From f86cae83d2630e2a41e3fd5e403750718e75a28c Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Mon, 27 Jan 2025 06:44:42 +0000 Subject: [PATCH] Build changes from 5a838c39b3610c062382e7043cb87e418393d611 --- .eslintrc.cjs | 52 + .prettierrc.mjs | 16 + .stylelintrc.mjs | 51 + changelog.txt | 107 + dist/_commonjsHelpers-DKOUU3wS.cjs | 1 + dist/_commonjsHelpers-DaMA6jEr.js | 8 + dist/force-ui.cjs | 297 + dist/force-ui.d.ts | 2794 ++ dist/force-ui.js | 48432 +++++++++++++++++++++++++++ dist/style.css | 1 + dist/withTW.cjs | 1 + dist/withTW.d.ts | 343 + dist/withTW.js | 294 + force-ui.zip | Bin 0 -> 737178 bytes package.json | 131 + tsconfig.app.json | 45 + tsconfig.app.tsbuildinfo | 1 + tsconfig.json | 7 + tsconfig.node.json | 36 + version.json | 3 + vite.config.ts | 40 + 21 files changed, 52660 insertions(+) create mode 100644 .eslintrc.cjs create mode 100644 .prettierrc.mjs create mode 100644 .stylelintrc.mjs create mode 100644 changelog.txt create mode 100644 dist/_commonjsHelpers-DKOUU3wS.cjs create mode 100644 dist/_commonjsHelpers-DaMA6jEr.js create mode 100644 dist/force-ui.cjs create mode 100644 dist/force-ui.d.ts create mode 100644 dist/force-ui.js create mode 100644 dist/style.css create mode 100644 dist/withTW.cjs create mode 100644 dist/withTW.d.ts create mode 100644 dist/withTW.js create mode 100644 force-ui.zip create mode 100644 package.json create mode 100644 tsconfig.app.json create mode 100644 tsconfig.app.tsbuildinfo create mode 100644 tsconfig.json create mode 100644 tsconfig.node.json create mode 100644 version.json create mode 100644 vite.config.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000..caf7fa59 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,52 @@ +// .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', + 'no-mixed-operators': '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..205bc869 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,107 @@ +Version 1.4.0 - 27th January, 2025 +- New: Added a Hamburger Menu component. +- Improvement: Added Y-axis tick formatter to the BarChart component. + +Version 1.3.6 - 9th January, 2025 +- Improvement: Optimized the Select component item search logic and reorganized props for improved usability. +- Improvement: Added a vertical dashed line feature to the LineChart. +- Fixed: LineChart component Tooltip does not show the required information. + +Version 1.3.5 - 6th January, 2025 +- Improvement: Display a light blue color on hover when selecting a date range. + +Version 1.3.4 - 31th December, 2024 +- Improvement - Enhanced the UI of the Table and Line chart component for responsive design. +- Improvement - Added option group to the Select component. +- Improvement - Updated the Table component design. +- Improvement - Added support for controlling selected dates through the 'selected' prop in DatePicker component. +- Improvement - Enhanced the UI of the Drawer component. +- Improvement - Added a new prop to the Badge component to disable hover effect. +- Fixed - Adjusted search icon size in Select combobox for better visual consistency. +- Fixed - Focus ring offset of Select, Switch, Checkbox, and dropdown component. +- Fixed - Checkbox/Switch toggle behavior with hint text and adjusted help text size. +- Fixed - DatePicker component crash when navigating through years. +- Fixed - DatePicker component UI styles for better visual consistency. + +Version 1.3.3 - 20th December, 2024 +- Fixed - React `Each child in a list should have a unique "key" prop` console warning. +- Fixed - Toaster content overlapping with the close button. + +Version 1.3.2 - 17th December, 2024 +- Fixed - Adjusted the color of the Switch component label and help text. + +Version 1.3.1 - 17th December, 2024 +- Fixed - The underline issue to enhance visual consistency. +- Fixed - Issue with the Select component where a check mark was displayed even when no item was selected. +- Fixed - Design mismatch in the Switch component. +- Fixed - Text, icon size, alignment, and color inconsistencies in the Date Picker to ensure a uniform appearance. +- Fixed - Input ref not pointing to the input field. +- Fixed - Icon size and alignment issues in the Menu component for better visual clarity. +- Fixed - Sidebar height not being overridable. +- Improvement - Removed backdrop blur to enhance performance and visual clarity. + +Version 1.3.0 - 16th December, 2024 +- New - Table component. +- Fixed - Asterisk missing on required input label. + +Version 1.2.2 - 4th December, 2024 +- Improvement - Removed margin and added new props to the Line Chart component for customizability. + +Version 1.2.1 - 25th November, 2024 +- Improvement - Added new props to the Bar Chart component for customizability. +- Improvement - Dropzone UAT improvements. +- Improvement - Sidebar Compatibility fixes with NextJS. +- Improvement - Improved the storybook deployment workflow to use latest library. + +Version 1.2.0 - 20th November, 2024 +- New - Dropzone +- New - Added Unit Tests setup and a11y CI setup +- Improvement - All components are a11y compatible. +- Fixes - Issues reported by internal dev team. + +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..c9898eb8 --- /dev/null +++ b/dist/force-ui.cjs @@ -0,0 +1,297 @@ +"use client";"use strict";var B8=Object.defineProperty;var XC=e=>{throw TypeError(e)};var F8=(e,t,n)=>t in e?B8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xo=(e,t,n)=>F8(e,typeof t!="symbol"?t+"":t,n),ZC=(e,t,n)=>t.has(e)||XC("Cannot "+n);var wr=(e,t,n)=>(ZC(e,t,"read from private field"),n?n.call(e):t.get(e)),Tv=(e,t,n)=>t.has(e)?XC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ha=(e,t,n,r)=>(ZC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("react/jsx-runtime"),O=require("react"),Nl=require("react-dom"),Qe=require("./_commonjsHelpers-DKOUU3wS.cjs");function CN(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 te=CN(O),AN=CN(Nl),jw="-",W8=e=>{const t=V8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(jw);return s[0]===""&&s.length!==1&&s.shift(),PN(s,t)||z8(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},PN=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?PN(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(jw);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},JC=/^\[(.+)\]$/,z8=e=>{if(JC.test(e)){const t=JC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},V8=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return H8(Object.entries(e.classGroups),n).forEach(([o,a])=>{Xb(a,r,o,t)}),r},Xb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:QC(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(U8(i)){Xb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{Xb(a,QC(t,o),n,r)})})},QC=(e,t)=>{let n=e;return t.split(jw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},U8=e=>e.isThemeGetter,H8=(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,K8=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)}}},TN="!",G8=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 v=0;vf?d-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:a}):a},Y8=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},q8=e=>({cache:K8(e.cacheSize),parseClassName:G8(e),...W8(e)}),X8=/\s+/,Z8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(X8);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 y=!!m,g=r(y?p.substring(0,m):p);if(!g){if(!y){s=c+(s.length>0?" "+s:s);continue}if(g=r(p),!g){s=c+(s.length>0?" "+s:s);continue}y=!1}const v=Y8(f).join(":"),x=d?v+TN:v,w=x+g;if(o.includes(w))continue;o.push(w);const S=i(g,y);for(let A=0;A0?" "+s:s)}return s};function J8(){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=q8(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=Z8(l,n);return i(l,f),f}return function(){return o(J8.apply(null,arguments))}}const kt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kN=/^\[(?:([a-z-]+):)?(.+)\]$/i,eH=/^\d+\/\d+$/,tH=new Set(["px","full","screen"]),nH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rH=/\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$/,iH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,io=e=>Cl(e)||tH.has(e)||eH.test(e),Zo=e=>mc(e,"length",pH),Cl=e=>!!e&&!Number.isNaN(Number(e)),Ev=e=>mc(e,"number",Cl),ru=e=>!!e&&Number.isInteger(Number(e)),sH=e=>e.endsWith("%")&&Cl(e.slice(0,-1)),Ke=e=>kN.test(e),Jo=e=>nH.test(e),lH=new Set(["length","size","percentage"]),cH=e=>mc(e,lH,MN),uH=e=>mc(e,"position",MN),fH=new Set(["image","url"]),dH=e=>mc(e,fH,gH),hH=e=>mc(e,"",mH),iu=()=>!0,mc=(e,t,n)=>{const r=kN.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pH=e=>rH.test(e)&&!iH.test(e),MN=()=>!1,mH=e=>oH.test(e),gH=e=>aH.test(e),yH=()=>{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"),c=kt("grayscale"),f=kt("hueRotate"),d=kt("invert"),p=kt("gap"),m=kt("gradientColorStops"),y=kt("gradientColorStopPositions"),g=kt("inset"),v=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",Ke,t],N=()=>[Ke,t],I=()=>["",io,Zo],L=()=>["auto",Cl,Ke],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["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"],G=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",Ke],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Cl,Ke];return{cacheSize:500,separator:":",theme:{colors:[iu],spacing:[io,Zo],blur:["none","",Jo,Ke],brightness:Y(),borderColor:[e],borderRadius:["none","","full",Jo,Ke],borderSpacing:N(),borderWidth:I(),contrast:Y(),grayscale:U(),hueRotate:Y(),invert:U(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[sH,Zo],inset:$(),margin:$(),opacity:Y(),padding:N(),saturate:Y(),scale:Y(),sepia:U(),skew:Y(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ke]}],container:["container"],columns:[{columns:[Jo]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:[...F(),Ke]}],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:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ru,Ke]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ke]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",ru,Ke]}],"grid-cols":[{"grid-cols":[iu]}],"col-start-end":[{col:["auto",{span:["full",ru,Ke]},Ke]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[iu]}],"row-start-end":[{row:["auto",{span:[ru,Ke]},Ke]}],"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",Ke]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ke]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"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:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"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",Ke,t]}],"min-w":[{"min-w":[Ke,t,"min","max","fit"]}],"max-w":[{"max-w":[Ke,t,"none","full","min","max","fit","prose",{screen:[Jo]},Jo]}],h:[{h:[Ke,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ke,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ke,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Jo,Zo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ev]}],"font-family":[{font:[iu]}],"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",Ke]}],"line-clamp":[{"line-clamp":["none",Cl,Ev]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",io,Ke]}],"list-image":[{"list-image":["none",Ke]}],"list-style-type":[{list:["none","disc","decimal",Ke]}],"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:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",io,Zo]}],"underline-offset":[{"underline-offset":["auto",io,Ke]}],"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",Ke]}],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",Ke]}],"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:[...F(),uH]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dH]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"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:[...W(),"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:W()}],"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:["",...W()]}],"outline-offset":[{"outline-offset":[io,Ke]}],"outline-w":[{outline:[io,Zo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[io,Zo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Jo,hH]}],"shadow-color":[{shadow:[iu]}],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",Jo,Ke]}],grayscale:[{grayscale:[c]}],"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":[c]}],"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",Ke]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",Ke]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ke]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[ru,Ke]}],"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",Ke]}],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",Ke]}],"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",Ke]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[io,Zo,Ev]}],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"]}}},vH=Q8(yH);function jN(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;tvH(Ue(...e)),Ku=(...e)=>(...t)=>e.forEach(n=>n==null?void 0:n(...t)),Rm=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},bH={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"},xH=()=>{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},wH=e=>e<1024?`${e} bytes`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,wu={set:(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error(n)}},get:e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.error(t),null}},remove:e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(t){console.error(t)}}},bn=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:c=!1,icon:f=null,iconPosition:d="left",loading:p=!1,...m}=e,y="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",g=p?"opacity-50 disabled:cursor-not-allowed":"",v={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,_="";f&&(_="flex items-center justify-center",d==="left"?S=f:A=f);const C=o;return P.jsxs(C,{ref:t,type:i,className:K(_,y,w,v,x,g,{"cursor-default":l},a),disabled:l,...m,children:[P.jsx(O.Fragment,{children:S},"left-icon"),s?P.jsx("span",{className:"px-1",children:s}):null,P.jsx(O.Fragment,{children:A},"right-icon")]})});bn.displayName="Button";const _H="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Wi=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=_H[n[e]&63];return t};const yi=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",c={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"},d={neutral:"",help:"font-normal",error:"font-normal",disabled:""};if(!e)return null;let p="";return o&&(p="after:content-['*'] after:text-field-required after:ml-0.5"),P.jsx(t,{ref:s,className:K(l,c[n],f[i],p,d==null?void 0:d[i],r),...a,children:e})});yi.displayName="Label";const SH=({label:e,switchId:t,disabled:n=!1,children:r,size:i})=>{const o={sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},a={sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},s={sm:"space-y-0.5",md:"space-y-1"};if(O.isValidElement(e))return P.jsxs("div",{className:K("inline-flex items-center gap-3","items-start"),children:[r,e]});const c=()=>{const{heading:p="",description:m=""}=e||{};return P.jsxs("div",{className:K("space-y-0.5",s[i]),children:[p&&P.jsx(yi,{htmlFor:t,className:K("m-0",o[i]),...n&&{variant:"disabled"},children:p}),m&&P.jsx(yi,{tag:"p",variant:"help",className:K("text-sm font-normal leading-5 m-0",a[i]),...n&&{variant:"disabled"},children:m})]})},f=!(e!=null&&e.heading)&&!(e!=null&&e.description),d=!(e!=null&&e.heading)||!(e!=null&&e.description)?"items-center":"items-start";return f?r:P.jsxs("div",{className:K("inline-flex",d,"gap-3"),children:[r,c()]})},OH=({id:e,onChange:t,value:n,defaultValue:r=!1,size:i="sm",disabled:o=!1,label:a={heading:"",description:""},name:s,className:l,...c},f)=>{const d=i==="lg"?"md":i,p=O.useMemo(()=>typeof n<"u",[n]),m=O.useMemo(()=>e||`switch-${Wi()}`,[]),[y,g]=O.useState(r),v="primary",x=O.useCallback(()=>p?n:y,[p,n,y]),w=k=>{if(o)return;const M=k.target.checked;p||g(M),typeof t=="function"&&t(M)},S={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 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"}},A={primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}},_={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"}},C={md:"group-hover/switch:size-5 group-focus-within/switch:size-5 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5"},E={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 P.jsx(SH,{label:a,switchId:m,disabled:o,size:d,children:P.jsxs("div",{className:K("relative group/switch inline-block cursor-pointer rounded-full shrink-0",_[d].container,l),children:[P.jsx("input",{ref:f,id:m,type:"checkbox",className:K("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",S[v].input,o&&E.input,!o&&A[v].input),checked:x(),onChange:w,disabled:o,name:s,...c}),P.jsx("label",{htmlFor:m,className:K("peer/toggle-dial bg-white border 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",_[d].toggleDial,S[v].toggleDial,o&&E.toggleDial,!o&&C[d])})]})})},Nw=O.forwardRef(OH);Nw.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 CH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),NN=(...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 AH={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 PH=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,...AH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:NN("lucide",i),...s},[...a.map(([c,f])=>O.createElement(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 Ht=(e,t)=>{const n=O.forwardRef(({className:r,...i},o)=>O.createElement(PH,{ref:o,iconNode:t,className:NN(`lucide-${CH(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 Hf=Ht("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 $w=Ht("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 $N=Ht("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 Dw=Ht("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 TH=Ht("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 EH=Ht("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]);/** + * @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 kH=Ht("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 MH=Ht("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/** + * @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 jH=Ht("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/** + * @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 Zb=Ht("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 NH=Ht("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 DN=Ht("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 $H=Ht("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 DH=Ht("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 IN=Ht("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 RN=Ht("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 IH=Ht("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 RH=Ht("Trash",[["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"}]]);/** + * @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 LH=Ht("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 eA=Ht("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 BH=Ht("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 ga=Ht("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),FH=({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:i,indeterminate:o,disabled:a,size:s="md",className:l,...c},f)=>{var C,E;const d=O.useMemo(()=>e||`checkbox-${Wi()}`,[e]),p=O.useMemo(()=>typeof r<"u",[r]),[m,y]=O.useState(n||!1),g="primary",v={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",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-2 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||y(M),typeof i=="function"&&i(M)},_=O.useCallback(()=>O.isValidElement(t)?t:!(t!=null&&t.heading)&&!(t!=null&&t.description)?null:P.jsxs("div",{className:v[s].gap,children:[(t==null?void 0:t.heading)&&P.jsx(yi,{className:K("text-text-primary font-medium leading-4 m-0",v[s].text,v[s].gap,a&&"text-text-disabled"),htmlFor:d,children:t==null?void 0:t.heading}),(t==null?void 0:t.description)&&P.jsx(yi,{tag:"p",className:K("font-normal leading-5 m-0",v[s].description,a&&"text-text-disabled"),variant:"help",children:t==null?void 0:t.description})]}),[t,s,a]);return P.jsxs("div",{className:K("inline-flex items-center justify-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[P.jsxs("label",{className:K("relative flex items-center justify-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:d,children:[P.jsx("input",{ref:f,id:d,type:"checkbox",className:K("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[g].checkbox,v[s].checkbox,a&&w.checkbox,l),checked:S(),onChange:A,disabled:a,...c}),P.jsx("span",{className:K("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[g].icon,a&&w.icon),children:o?P.jsx(DN,{className:K((C=v[s])==null?void 0:C.icon)}):P.jsx(Hf,{className:K((E=v[s])==null?void 0:E.icon)})})]}),!!t&&_()]})},Lm=O.forwardRef(FH);Lm.displayName="Checkbox";const tA={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-2 focus:ring-focus",icon:"text-white"}},nA={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"},WH={sm:"text-sm leading-5",md:"text-base leading-6"},kv={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},rA={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},zH={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"},VH="border-0 border-r border-border-subtle border-solid",UH="bg-background-primary text-primary cursor-pointer flex items-center justify-center",HH="hover:bg-button-tertiary-hover",KH="focus:outline-none";function Bm(){return typeof window<"u"}function Ca(e){return LN(e)?(e.nodeName||"").toLowerCase():"#document"}function fr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zi(e){var t;return(t=(LN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function LN(e){return Bm()?e instanceof Node||e instanceof fr(e).Node:!1}function bt(e){return Bm()?e instanceof Element||e instanceof fr(e).Element:!1}function en(e){return Bm()?e instanceof HTMLElement||e instanceof fr(e).HTMLElement:!1}function Jb(e){return!Bm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fr(e).ShadowRoot}function Kf(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 GH(e){return["table","td","th"].includes(Ca(e))}function Fm(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Iw(e){const t=Wm(),n=bt(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 YH(e){let t=Co(e);for(;en(t)&&!ya(t);){if(Iw(t))return t;if(Fm(t))return null;t=Co(t)}return null}function Wm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ya(e){return["html","body","#document"].includes(Ca(e))}function Mr(e){return fr(e).getComputedStyle(e)}function zm(e){return bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Co(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jb(e)&&e.host||zi(e);return Jb(t)?t.host:t}function BN(e){const t=Co(e);return ya(t)?e.ownerDocument?e.ownerDocument.body:e.body:en(t)&&Kf(t)?t:BN(t)}function fa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=BN(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=fr(i);if(o){const s=Qb(a);return t.concat(a,a.visualViewport||[],Kf(i)?i:[],s&&n?fa(s):[])}return t.concat(i,fa(i,[],n))}function Qb(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ui(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 Qt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Jb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function FN(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function WN(){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 zN(e){return e.mozInputSource===0&&e.isTrusted?!0:ex()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Rw(e){return qH()?!1:!ex()&&e.width===0&&e.height===0||ex()&&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 Lw(){return/apple/i.test(navigator.vendor)}function ex(){const e=/android/i;return e.test(FN())||e.test(WN())}function VN(){return FN().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function qH(){return WN().includes("jsdom/")}function Gu(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function XH(e){return"nativeEvent"in e}function ZH(e){return e.matches("html,body")}function Nn(e){return(e==null?void 0:e.ownerDocument)||document}function Mv(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 co(e){return"composedPath"in e?e.composedPath()[0]:e.target}const JH="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bw(e){return en(e)&&e.matches(JH)}function jn(e){e.preventDefault(),e.stopPropagation()}function tx(e){return e?e.getAttribute("role")==="combobox"&&Bw(e):!1}const va=Math.min,Ar=Math.max,Jh=Math.round,dl=Math.floor,ki=e=>({x:e,y:e}),QH={left:"right",right:"left",bottom:"top",top:"bottom"},eK={start:"end",end:"start"};function nx(e,t,n){return Ar(e,va(t,n))}function gc(e,t){return typeof e=="function"?e(t):e}function ba(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function UN(e){return e==="x"?"y":"x"}function Fw(e){return e==="y"?"height":"width"}function bs(e){return["top","bottom"].includes(ba(e))?"y":"x"}function Ww(e){return UN(bs(e))}function tK(e,t,n){n===void 0&&(n=!1);const r=yc(e),i=Ww(e),o=Fw(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Qh(a)),[a,Qh(a)]}function nK(e){const t=Qh(e);return[rx(e),t,rx(t)]}function rx(e){return e.replace(/start|end/g,t=>eK[t])}function rK(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 iK(e,t,n,r){const i=yc(e);let o=rK(ba(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(rx)))),o}function Qh(e){return e.replace(/left|right|bottom|top/g,t=>QH[t])}function oK(e){return{top:0,right:0,bottom:0,left:0,...e}}function HN(e){return typeof e!="number"?oK(e):{top:e,right:e,bottom:e,left:e}}function ep(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])"],tp=aK.join(","),KN=typeof Element>"u",$l=KN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,np=!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},rp=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},sK=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},lK=function(t,n,r){if(rp(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(tp));return n&&$l.call(t,tp)&&i.unshift(t),i=i.filter(r),i},cK=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!rp(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=$l.call(a,tp);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!rp(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},GN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},YN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||sK(t))&&!GN(t)?0:t.tabIndex},uK=function(t,n){var r=YN(t);return r<0&&n&&!GN(t)?0:r},fK=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},qN=function(t){return t.tagName==="INPUT"},dK=function(t){return qN(t)&&t.type==="hidden"},hK=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},pK=function(t,n){for(var r=0;rsummary:first-of-type"),a=o?t.parentElement:t;if($l.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=np(t);if(l&&!l.shadowRoot&&i(l)===!0)return iA(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(vK(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return iA(t);return!1},xK=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)},SK=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=uK(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(fK).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Vm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=cK([t],n.includeContainer,{filter:ix.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:_K}):r=lK(t,n.includeContainer,ix.bind(null,n)),SK(r)},OK=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return $l.call(t,tp)===!1?!1:ix(n,t)};function oA(e,t,n){let{reference:r,floating:i}=e;const o=bs(t),a=Ww(t),s=Fw(a),l=ba(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(yc(t)){case"start":m[a]-=p*(n&&c?-1:1);break;case"end":m[a]+=p*(n&&c?-1:1);break}return m}const CK=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}=oA(c,r,l),p=r,m={},y=0;for(let g=0;g({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}=gc(e,t)||{};if(c==null)return{};const d=HN(f),p={x:n,y:r},m=Ww(i),y=Fw(m),g=await a.getDimensions(c),v=m==="y",x=v?"top":"left",w=v?"bottom":"right",S=v?"clientHeight":"clientWidth",A=o.reference[y]+o.reference[m]-p[m]-o.floating[y],_=p[m]-o.reference[m],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let E=C?C[S]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[S]||o.floating[y]);const k=A/2-_/2,M=E/2-g[y]/2-1,D=va(d[x],M),$=va(d[w],M),N=D,I=E-g[y]-$,L=E/2-g[y]/2+k,F=nx(N,L,I),W=!l.arrow&&yc(i)!=null&&L!==F&&o.reference[y]/2-(LL<=0)){var $,N;const L=((($=o.flip)==null?void 0:$.index)||0)+1,F=E[L];if(F)return{data:{index:L,overflows:D},reset:{placement:F}};let W=(N=D.filter(z=>z.overflows[0]<=0).sort((z,G)=>z.overflows[1]-G.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(m){case"bestFit":{var I;const z=(I=D.filter(G=>{if(C){const U=bs(G.placement);return U===w||U==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(U=>U>0).reduce((U,V)=>U+V,0)]).sort((G,U)=>G[1]-U[1])[0])==null?void 0:I[0];z&&(W=z);break}case"initialPlacement":W=s;break}if(i!==W)return{reset:{placement:W}}}return{}}}};async function TK(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ba(n),s=yc(n),l=bs(n)==="y",c=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,d=gc(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof y=="number"&&(m=s==="end"?y*-1:y),l?{x:m*f,y:p*c}:{x:p*c,y:m*f}}const EK=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 TK(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}}}}},kK=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:v=>{let{x,y:w}=v;return{x,y:w}}},...l}=gc(e,t),c={x:n,y:r},f=await zw(t,l),d=bs(ba(i)),p=UN(d);let m=c[p],y=c[d];if(o){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=m+f[v],S=m-f[x];m=nx(w,m,S)}if(a){const v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=y+f[v],S=y-f[x];y=nx(w,y,S)}const g=s.fn({...t,[p]:m,[d]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[d]:a}}}}}},MK=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}=gc(e,t),f=await zw(t,c),d=ba(i),p=yc(i),m=bs(i)==="y",{width:y,height:g}=o.floating;let v,x;d==="top"||d==="bottom"?(v=d,x=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=d,v=p==="end"?"top":"bottom");const w=g-f.top-f.bottom,S=y-f.left-f.right,A=va(g-f[v],w),_=va(y-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),I=Ar(f.bottom,0);m?k=y-2*(D!==0||$!==0?D+$:Ar(f.left,f.right)):E=g-2*(N!==0||I!==0?N+I:Ar(f.top,f.bottom))}await l({...t,availableWidth:k,availableHeight:E});const M=await a.getDimensions(s.floating);return y!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function XN(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=en(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Jh(n)!==o||Jh(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Vw(e){return bt(e)?e:e.contextElement}function Al(e){const t=Vw(e);if(!en(t))return ki(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=XN(t);let a=(o?Jh(n.width):n.width)/r,s=(o?Jh(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const jK=ki(0);function ZN(e){const t=fr(e);return!Wm()||!t.visualViewport?jK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function NK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fr(e)?!1:t}function xs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Vw(e);let a=ki(1);t&&(r?bt(r)&&(a=Al(r)):a=Al(e));const s=NK(o,n,r)?ZN(o):ki(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=fr(o),m=r&&bt(r)?fr(r):r;let y=p,g=Qb(y);for(;g&&r&&m!==y;){const v=Al(g),x=g.getBoundingClientRect(),w=Mr(g),S=x.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,A=x.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,f*=v.x,d*=v.y,l+=S,c+=A,y=fr(g),g=Qb(y)}}return ep({width:f,height:d,x:l,y:c})}function Uw(e,t){const n=zm(e).scrollLeft;return t?t.left+n:xs(zi(e)).left+n}function JN(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Uw(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function $K(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=zi(r),s=t?Fm(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=ki(1);const f=ki(0),d=en(r);if((d||!d&&!o)&&((Ca(r)!=="body"||Kf(a))&&(l=zm(r)),en(r))){const m=xs(r);c=Al(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=a&&!d&&!o?JN(a,l,!0):ki(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 DK(e){return Array.from(e.getClientRects())}function IK(e){const t=zi(e),n=zm(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+Uw(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 RK(e,t){const n=fr(e),r=zi(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=Wm();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function LK(e,t){const n=xs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=en(e)?Al(e):ki(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 aA(e,t,n){let r;if(t==="viewport")r=RK(e,n);else if(t==="document")r=IK(zi(e));else if(bt(t))r=LK(t,n);else{const i=ZN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ep(r)}function QN(e,t){const n=Co(e);return n===t||!bt(n)||ya(n)?!1:Mr(n).position==="fixed"||QN(n,t)}function BK(e,t){const n=t.get(e);if(n)return n;let r=fa(e,[],!1).filter(s=>bt(s)&&Ca(s)!=="body"),i=null;const o=Mr(e).position==="fixed";let a=o?Co(e):e;for(;bt(a)&&!ya(a);){const s=Mr(a),l=Iw(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Kf(a)&&!l&&QN(e,a))?r=r.filter(f=>f!==a):i=s,a=Co(a)}return t.set(e,r),r}function FK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Fm(t)?[]:BK(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,f)=>{const d=aA(t,f,i);return c.top=Ar(d.top,c.top),c.right=va(d.right,c.right),c.bottom=va(d.bottom,c.bottom),c.left=Ar(d.left,c.left),c},aA(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function WK(e){const{width:t,height:n}=XN(e);return{width:t,height:n}}function zK(e,t,n){const r=en(t),i=zi(t),o=n==="fixed",a=xs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=ki(0);if(r||!r&&!o)if((Ca(t)!=="body"||Kf(i))&&(s=zm(t)),r){const p=xs(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Uw(i));const c=i&&!r&&!o?JN(i,s):ki(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 jv(e){return Mr(e).position==="static"}function sA(e,t){if(!en(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zi(e)===n&&(n=n.ownerDocument.body),n}function e$(e,t){const n=fr(e);if(Fm(e))return n;if(!en(e)){let i=Co(e);for(;i&&!ya(i);){if(bt(i)&&!jv(i))return i;i=Co(i)}return n}let r=sA(e,t);for(;r&&GH(r)&&jv(r);)r=sA(r,t);return r&&ya(r)&&jv(r)&&!Iw(r)?n:r||YH(e)||n}const VK=async function(e){const t=this.getOffsetParent||e$,n=this.getDimensions,r=await n(e.floating);return{reference:zK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function UK(e){return Mr(e).direction==="rtl"}const HK={convertOffsetParentRelativeRectToViewportRelativeRect:$K,getDocumentElement:zi,getClippingRect:FK,getOffsetParent:e$,getElementRects:VK,getClientRects:DK,getDimensions:WK,getScale:Al,isElement:bt,isRTL:UK};function KK(e,t){let n=null,r;const i=zi(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=dl(f),y=dl(i.clientWidth-(c+d)),g=dl(i.clientHeight-(f+p)),v=dl(c),w={rootMargin:-m+"px "+-y+"px "+-g+"px "+-v+"px",threshold:Ar(0,va(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 Um(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,c=Vw(e),f=i||o?[...c?fa(c):[],...fa(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=c&&s?KK(c,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let y,g=l?xs(e):null;l&&v();function v(){const x=xs(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&n(),g=x,y=requestAnimationFrame(v)}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(y)}}const GK=EK,YK=kK,qK=PK,XK=MK,lA=AK,ZK=(e,t,n)=>{const r=new Map,i={platform:HK,...n},o={...i.platform,_c:r};return CK(e,t,{...i,platform:o})};var zh=typeof document<"u"?O.useLayoutEffect:O.useEffect;function ip(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(!ip(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)&&!ip(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function t$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cA(e,t){const n=t$(e);return Math.round(t*n)/n}function Nv(e){const t=te.useRef(e);return zh(()=>{t.current=e}),t}function JK(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:c}=e,[f,d]=te.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=te.useState(r);ip(p,r)||m(r);const[y,g]=te.useState(null),[v,x]=te.useState(null),w=te.useCallback(G=>{G!==C.current&&(C.current=G,g(G))},[]),S=te.useCallback(G=>{G!==E.current&&(E.current=G,x(G))},[]),A=o||y,_=a||v,C=te.useRef(null),E=te.useRef(null),k=te.useRef(f),M=l!=null,D=Nv(l),$=Nv(i),N=Nv(c),I=te.useCallback(()=>{if(!C.current||!E.current)return;const G={placement:t,strategy:n,middleware:p};$.current&&(G.platform=$.current),ZK(C.current,E.current,G).then(U=>{const V={...U,isPositioned:N.current!==!1};L.current&&!ip(k.current,V)&&(k.current=V,AN.flushSync(()=>{d(V)}))})},[p,t,n,$,N]);zh(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(G=>({...G,isPositioned:!1})))},[c]);const L=te.useRef(!1);zh(()=>(L.current=!0,()=>{L.current=!1}),[]),zh(()=>{if(A&&(C.current=A),_&&(E.current=_),A&&_){if(D.current)return D.current(A,_,I);I()}},[A,_,I,D,M]);const F=te.useMemo(()=>({reference:C,floating:E,setReference:w,setFloating:S}),[w,S]),W=te.useMemo(()=>({reference:A,floating:_}),[A,_]),z=te.useMemo(()=>{const G={position:n,left:0,top:0};if(!W.floating)return G;const U=cA(W.floating,f.x),V=cA(W.floating,f.y);return s?{...G,transform:"translate("+U+"px, "+V+"px)",...t$(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:V}},[n,s,W.floating,f.x,f.y]);return te.useMemo(()=>({...f,update:I,refs:F,elements:W,floatingStyles:z}),[f,I,F,W,z])}const QK=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?lA({element:r.current,padding:i}).fn(n):{}:r?lA({element:r,padding:i}).fn(n):{}}}},Hm=(e,t)=>({...GK(e),options:[e,t]}),n$=(e,t)=>({...YK(e),options:[e,t]}),Km=(e,t)=>({...qK(e),options:[e,t]}),r$=(e,t)=>({...XK(e),options:[e,t]}),eG=(e,t)=>({...QK(e),options:[e,t]}),i$={...te},tG=i$.useInsertionEffect,nG=tG||(e=>e());function xn(e){const t=te.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return nG(()=>{t.current=e}),te.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=e.current.length}function $v(e,t){return Fn(e,{disabledIndices:t})}function uA(e,t){return Fn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Fn(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&&Vh(a,s,i));return s}function rG(e,t){let{event:n,orientation:r,loop:i,rtl:o,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:f,stopEvent:d=!1}=t,p=f;if(n.key===Hw){if(d&&jn(n),f===-1)p=c;else if(p=Fn(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),i&&(f-am?g:g-a}Tu(e,p)&&(p=f)}if(n.key===Gf&&(d&&jn(n),f===-1?p=l:(p=Fn(e,{startingIndex:f,amount:a,disabledIndices:s}),i&&f+a>c&&(p=Fn(e,{startingIndex:f%a-a,amount:a,disabledIndices:s}))),Tu(e,p)&&(p=f)),r==="both"){const m=dl(f/a);n.key===(o?da:ha)&&(d&&jn(n),f%a!==a-1?(p=Fn(e,{startingIndex:f,disabledIndices:s}),i&&fh(p,a,m)&&(p=Fn(e,{startingIndex:f-f%a-1,disabledIndices:s}))):i&&(p=Fn(e,{startingIndex:f-f%a-1,disabledIndices:s})),fh(p,a,m)&&(p=f)),n.key===(o?ha:da)&&(d&&jn(n),f%a!==0?(p=Fn(e,{startingIndex:f,decrement:!0,disabledIndices:s}),i&&fh(p,a,m)&&(p=Fn(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:s}))):i&&(p=Fn(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:s})),fh(p,a,m)&&(p=f));const y=dl(c/a)===m;Tu(e,p)&&(i&&y?p=n.key===(o?ha:da)?c:Fn(e,{startingIndex:f-f%a-1,disabledIndices:s}):p=f)}return p}function iG(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 c=!1;for(n&&(i=0);!c;){const f=[];for(let d=0;dr[d]==null)?(f.forEach(d=>{r[d]=a}),c=!0):i++}}),[...r]}function oG(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 aG(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Vh(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}var _t=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+sG++;function lG(){const[e,t]=te.useState(()=>fA?dA():void 0);return _t(()=>{e==null&&t(dA())},[]),te.useEffect(()=>{fA=!0},[]),e}const cG=i$.useId,Gm=cG||lG;let qu;process.env.NODE_ENV!=="production"&&(qu=new Set);function Uh(){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*(c/-8+1),$=l/2*c/4,N=!!m,I=E&&_==="end"?"bottom":"top";let L=E&&_==="end"?"right":"left";E&&w&&(L=_==="end"?"left":"right");const F=(o==null?void 0:o.x)!=null?E||o.x:"",W=(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",G={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[A];return te.createElement("svg",Yu({},v,{"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]:F,[I]:W,[A]:C||N?"100%":"calc(100% - "+k/2+"px)",transform:[G,y].filter(U=>!!U).join(" "),...g}}),k>0&&te.createElement("path",{clipPath:"url(#"+x+")",fill:"none",stroke:p,strokeWidth:k+(m?0:1),d:z}),te.createElement("path",{stroke:k&&!m?v.fill:"none",d:z}),te.createElement("clipPath",{id:x},te.createElement("rect",{x:-M,y:M*(N?-1:1),width:s+k,height:s})))});function dG(){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 hG=te.createContext(null),pG=te.createContext(null),Ym=()=>{var e;return((e=te.useContext(hG))==null?void 0:e.id)||null},Yf=()=>te.useContext(pG);function ws(e){return"data-floating-ui-"+e}function Dn(e){const t=O.useRef(e);return _t(()=>{t.current=e}),t}const hA=ws("safe-polygon");function Dv(e,t,n){return n&&!Gu(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function mG(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:c=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=t,m=Yf(),y=Ym(),g=Dn(c),v=Dn(l),x=Dn(n),w=te.useRef(),S=te.useRef(-1),A=te.useRef(),_=te.useRef(-1),C=te.useRef(!0),E=te.useRef(!1),k=te.useRef(()=>{}),M=te.useRef(!1),D=te.useCallback(()=>{var z;const G=(z=i.current.openEvent)==null?void 0:z.type;return(G==null?void 0:G.includes("mouse"))&&G!=="mousedown"},[i]);te.useEffect(()=>{if(!s)return;function z(G){let{open:U}=G;U||(clearTimeout(S.current),clearTimeout(_.current),C.current=!0,M.current=!1)}return o.on("openchange",z),()=>{o.off("openchange",z)}},[s,o]),te.useEffect(()=>{if(!s||!g.current||!n)return;function z(U){D()&&r(!1,U,"hover")}const G=Nn(a.floating).documentElement;return G.addEventListener("mouseleave",z),()=>{G.removeEventListener("mouseleave",z)}},[a.floating,n,r,s,g,D]);const $=te.useCallback(function(z,G,U){G===void 0&&(G=!0),U===void 0&&(U="hover");const V=Dv(v.current,"close",w.current);V&&!A.current?(clearTimeout(S.current),S.current=window.setTimeout(()=>r(!1,z,U),V)):G&&(clearTimeout(S.current),r(!1,z,U))},[v,r]),N=xn(()=>{k.current(),A.current=void 0}),I=xn(()=>{if(E.current){const z=Nn(a.floating).body;z.style.pointerEvents="",z.removeAttribute(hA),E.current=!1}}),L=xn(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);te.useEffect(()=>{if(!s)return;function z(Y){if(clearTimeout(S.current),C.current=!1,f&&!Gu(w.current)||d>0&&!Dv(v.current,"open"))return;const ee=Dv(v.current,"open",w.current);ee?S.current=window.setTimeout(()=>{x.current||r(!0,Y,"hover")},ee):n||r(!0,Y,"hover")}function G(Y){if(L())return;k.current();const ee=Nn(a.floating);if(clearTimeout(_.current),M.current=!1,g.current&&i.current.floatingContext){n||clearTimeout(S.current),A.current=g.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){I(),N(),L()||$(Y,!0,"safe-polygon")}});const re=A.current;ee.addEventListener("mousemove",re),k.current=()=>{ee.removeEventListener("mousemove",re)};return}(w.current==="touch"?!Qt(a.floating,Y.relatedTarget):!0)&&$(Y)}function U(Y){L()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){I(),N(),L()||$(Y)}})(Y))}if(bt(a.domReference)){var V;const Y=a.domReference;return n&&Y.addEventListener("mouseleave",U),(V=a.floating)==null||V.addEventListener("mouseleave",U),p&&Y.addEventListener("mousemove",z,{once:!0}),Y.addEventListener("mouseenter",z),Y.addEventListener("mouseleave",G),()=>{var ee;n&&Y.removeEventListener("mouseleave",U),(ee=a.floating)==null||ee.removeEventListener("mouseleave",U),p&&Y.removeEventListener("mousemove",z),Y.removeEventListener("mouseenter",z),Y.removeEventListener("mouseleave",G)}}},[a,s,e,f,d,p,$,N,I,r,n,x,m,v,g,i,L]),_t(()=>{var z;if(s&&n&&(z=g.current)!=null&&z.__options.blockPointerEvents&&D()){E.current=!0;const U=a.floating;if(bt(a.domReference)&&U){var G;const V=Nn(a.floating).body;V.setAttribute(hA,"");const Y=a.domReference,ee=m==null||(G=m.nodesRef.current.find(ie=>ie.id===y))==null||(G=G.context)==null?void 0:G.elements.floating;return ee&&(ee.style.pointerEvents=""),V.style.pointerEvents="none",Y.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{V.style.pointerEvents="",Y.style.pointerEvents="",U.style.pointerEvents=""}}}},[s,n,y,a,m,g,D]),_t(()=>{n||(w.current=void 0,M.current=!1,N(),I())},[n,N,I]),te.useEffect(()=>()=>{N(),clearTimeout(S.current),clearTimeout(_.current),I()},[s,a.domReference,N,I]);const F=te.useMemo(()=>{function z(G){w.current=G.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(G){const{nativeEvent:U}=G;function V(){!C.current&&!x.current&&r(!0,U,"hover")}f&&!Gu(w.current)||n||d===0||M.current&&G.movementX**2+G.movementY**2<2||(clearTimeout(_.current),w.current==="touch"?V():(M.current=!0,_.current=window.setTimeout(V,d)))}}},[f,r,n,x,d]),W=te.useMemo(()=>({onMouseEnter(){clearTimeout(S.current)},onMouseLeave(z){L()||$(z.nativeEvent,!1)}}),[$,L]);return te.useMemo(()=>s?{reference:F,floating:W}:{},[s,F,W])}let pA=0;function ra(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(pA);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():pA=requestAnimationFrame(o)}function gG(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 ds(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 yG(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),ds(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let nl=new WeakMap,dh=new WeakSet,hh={},Iv=0;const vG=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,o$=e=>e&&(e.host||o$(e.parentNode)),bG=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=o$(n);return e.contains(r)?r:null}).filter(n=>n!=null);function xG(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=bG(t,e),s=new Set,l=new Set(a),c=[];hh[i]||(hh[i]=new WeakMap);const f=hh[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,y=>{if(Ca(y)!=="script")if(s.has(y))p(y);else{const g=o?y.getAttribute(o):null,v=g!==null&&g!=="false",x=(nl.get(y)||0)+1,w=(f.get(y)||0)+1;nl.set(y,x),f.set(y,w),c.push(y),x===1&&v&&dh.add(y),w===1&&y.setAttribute(i,""),!v&&o&&y.setAttribute(o,"true")}})}return Iv++,()=>{c.forEach(m=>{const y=(nl.get(m)||0)-1,g=(f.get(m)||0)-1;nl.set(m,y),f.set(m,g),y||(!dh.has(m)&&o&&m.removeAttribute(o),dh.delete(m)),g||m.removeAttribute(i)}),Iv--,Iv||(nl=new WeakMap,nl=new WeakMap,dh=new WeakSet,hh={})}}function mA(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Nn(e[0]).body;return xG(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Xu=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function a$(e,t){const n=Vm(e,Xu());t==="prev"&&n.reverse();const r=n.indexOf(ui(Nn(e)));return n.slice(r+1)[0]}function s$(){return a$(document.body,"next")}function l$(){return a$(document.body,"prev")}function Eu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Qt(n,r)}function wG(e){Vm(e,Xu()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function gA(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 qm={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 _G;function yA(e){e.key==="Tab"&&(e.target,clearTimeout(_G))}const op=te.forwardRef(function(t,n){const[r,i]=te.useState();_t(()=>(Lw()&&i("button"),document.addEventListener("keydown",yA),()=>{document.removeEventListener("keydown",yA)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ws("focus-guard")]:"",style:qm};return te.createElement("span",Yu({},t,o))}),c$=te.createContext(null),vA=ws("portal");function SG(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Gm(),i=u$(),[o,a]=te.useState(null),s=te.useRef(null);return _t(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),_t(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(vA,""),l.appendChild(c),s.current=c,a(c)},[t,r]),_t(()=>{if(n===null||!r||s.current)return;let l=n||(i==null?void 0:i.portalNode);l&&!bt(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const f=document.createElement("div");f.id=r,f.setAttribute(vA,""),l=c||l,l.appendChild(f),s.current=f,a(f)},[t,n,r,i]),o}function Xm(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=SG({id:n,root:r}),[a,s]=te.useState(null),l=te.useRef(null),c=te.useRef(null),f=te.useRef(null),d=te.useRef(null),p=a==null?void 0:a.modal,m=a==null?void 0:a.open,y=!!a&&!a.modal&&a.open&&i&&!!(r||o);return te.useEffect(()=>{if(!o||!i||p)return;function g(v){o&&Eu(v)&&(v.type==="focusin"?gA:wG)(o)}return o.addEventListener("focusin",g,!0),o.addEventListener("focusout",g,!0),()=>{o.removeEventListener("focusin",g,!0),o.removeEventListener("focusout",g,!0)}},[o,i,p]),te.useEffect(()=>{o&&(m||gA(o))},[m,o]),te.createElement(c$.Provider,{value:te.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:d,portalNode:o,setFocusManagerState:s}),[i,o])},y&&o&&te.createElement(op,{"data-type":"outside",ref:l,onFocus:g=>{if(Eu(g,o)){var v;(v=f.current)==null||v.focus()}else{const x=l$()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus()}}}),y&&o&&te.createElement("span",{"aria-owns":o.id,style:qm}),o&&AN.createPortal(t,o),y&&o&&te.createElement(op,{"data-type":"outside",ref:c,onFocus:g=>{if(Eu(g,o)){var v;(v=d.current)==null||v.focus()}else{const x=s$()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,g.nativeEvent,"focus-out"))}}}))}const u$=()=>te.useContext(c$),ox="data-floating-ui-focusable";function f$(e){return e?e.hasAttribute(ox)?e:e.querySelector("["+ox+"]")||e:null}const bA=20;let Za=[];function Rv(e){Za=Za.filter(n=>n.isConnected);let t=e;if(!(!t||Ca(t)==="body")){if(!OK(t,Xu())){const n=Vm(t,Xu())[0];n&&(t=n)}Za.push(t),Za.length>bA&&(Za=Za.slice(-bA))}}function xA(){return Za.slice().reverse().find(e=>e.isConnected)}const OG=te.forwardRef(function(t,n){return te.createElement("button",Yu({},t,{type:"button",ref:n,tabIndex:-1,style:qm}))});function CG(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:c=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:y,onOpenChange:g,events:v,dataRef:x,floatingId:w,elements:{domReference:S,floating:A}}=t,_=typeof a=="number"&&a<0,C=tx(S)&&_,E=vG()?o:!0,k=Dn(i),M=Dn(a),D=Dn(s),$=Yf(),N=u$(),I=te.useRef(null),L=te.useRef(null),F=te.useRef(!1),W=te.useRef(!1),z=te.useRef(-1),G=N!=null,U=f$(A),V=xn(function(re){return re===void 0&&(re=U),re?Vm(re,Xu()):[]}),Y=xn(re=>{const le=V(re);return k.current.map(ae=>S&&ae==="reference"?S:U&&ae==="floating"?U:le).filter(Boolean).flat()});te.useEffect(()=>{if(r||!c)return;function re(ae){if(ae.key==="Tab"){Qt(U,ui(Nn(U)))&&V().length===0&&!C&&jn(ae);const ue=Y(),ne=co(ae);k.current[0]==="reference"&&ne===S&&(jn(ae),ae.shiftKey?ra(ue[ue.length-1]):ra(ue[1])),k.current[1]==="floating"&&ne===U&&ae.shiftKey&&(jn(ae),ra(ue[0]))}}const le=Nn(U);return le.addEventListener("keydown",re),()=>{le.removeEventListener("keydown",re)}},[r,S,U,c,k,C,V,Y]),te.useEffect(()=>{if(r||!A)return;function re(le){const ae=co(le),ne=V().indexOf(ae);ne!==-1&&(z.current=ne)}return A.addEventListener("focusin",re),()=>{A.removeEventListener("focusin",re)}},[r,A,V]),te.useEffect(()=>{if(r||!d)return;function re(){W.current=!0,setTimeout(()=>{W.current=!1})}function le(ae){const ue=ae.relatedTarget;queueMicrotask(()=>{const ne=!(Qt(S,ue)||Qt(A,ue)||Qt(ue,A)||Qt(N==null?void 0:N.portalNode,ue)||ue!=null&&ue.hasAttribute(ws("focus-guard"))||$&&(ds($.nodesRef.current,y).find(J=>{var fe,ve;return Qt((fe=J.context)==null?void 0:fe.elements.floating,ue)||Qt((ve=J.context)==null?void 0:ve.elements.domReference,ue)})||gG($.nodesRef.current,y).find(J=>{var fe,ve;return((fe=J.context)==null?void 0:fe.elements.floating)===ue||((ve=J.context)==null?void 0:ve.elements.domReference)===ue})));if(l&&ne&&ui(Nn(U))===Nn(U).body){en(U)&&U.focus();const J=z.current,fe=V(),ve=fe[J]||fe[fe.length-1]||U;en(ve)&&ve.focus()}(C||!c)&&ue&&ne&&!W.current&&ue!==xA()&&(F.current=!0,g(!1,ae,"focus-out"))})}if(A&&en(S))return S.addEventListener("focusout",le),S.addEventListener("pointerdown",re),A.addEventListener("focusout",le),()=>{S.removeEventListener("focusout",le),S.removeEventListener("pointerdown",re),A.removeEventListener("focusout",le)}},[r,S,A,U,c,y,$,N,g,d,l,V,C]),te.useEffect(()=>{var re;if(r)return;const le=Array.from((N==null||(re=N.portalNode)==null?void 0:re.querySelectorAll("["+ws("portal")+"]"))||[]);if(A){const ae=[A,...le,I.current,L.current,k.current.includes("reference")||C?S:null].filter(ne=>ne!=null),ue=c||C?mA(ae,E,!E):mA(ae);return()=>{ue()}}},[r,S,A,c,k,N,C,E]),_t(()=>{if(r||!en(U))return;const re=Nn(U),le=ui(re);queueMicrotask(()=>{const ae=Y(U),ue=M.current,ne=(typeof ue=="number"?ae[ue]:ue.current)||U,J=Qt(U,le);!_&&!J&&p&&ra(ne,{preventScroll:ne===U})})},[r,p,U,_,Y,M]),_t(()=>{if(r||!U)return;let re=!1;const le=Nn(U),ae=ui(le);let ne=x.current.openEvent;Rv(ae);function J(X){let{open:je,reason:he,event:Ee,nested:Ze}=X;je&&(ne=Ee),he==="escape-key"&&m.domReference.current&&Rv(m.domReference.current),he==="hover"&&Ee.type==="mouseleave"&&(F.current=!0),he==="outside-press"&&(Ze?(F.current=!1,re=!0):F.current=!(zN(Ee)||Rw(Ee)))}v.on("openchange",J);const fe=le.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,qm),G&&S&&S.insertAdjacentElement("afterend",fe);function ve(){return typeof D.current=="boolean"?xA()||fe:D.current.current||fe}return()=>{v.off("openchange",J);const X=ui(le),je=Qt(A,X)||$&&ds($.nodesRef.current,y).some(Ze=>{var tt;return Qt((tt=Ze.context)==null?void 0:tt.elements.floating,X)});(je||ne&&["click","mousedown"].includes(ne.type))&&m.domReference.current&&Rv(m.domReference.current);const Ee=ve();queueMicrotask(()=>{D.current&&!F.current&&en(Ee)&&(!(Ee!==X&&X!==le.body)||je)&&Ee.focus({preventScroll:re}),fe.remove()})}},[r,A,U,D,x,m,v,$,y,G,S]),te.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[r]),_t(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:g,refs:m}),()=>{N.setFocusManagerState(null)}},[r,N,c,p,g,m,d]),_t(()=>{if(r||!U||typeof MutationObserver!="function"||_)return;const re=()=>{const ae=U.getAttribute("tabindex"),ue=V(),ne=ui(Nn(A)),J=ue.indexOf(ne);J!==-1&&(z.current=J),k.current.includes("floating")||ne!==m.domReference.current&&ue.length===0?ae!=="0"&&U.setAttribute("tabindex","0"):ae!=="-1"&&U.setAttribute("tabindex","-1")};re();const le=new MutationObserver(re);return le.observe(U,{childList:!0,subtree:!0,attributes:!0}),()=>{le.disconnect()}},[r,A,U,m,k,V,_]);function ee(re){return r||!f||!c?null:te.createElement(OG,{ref:re==="start"?I:L,onClick:le=>g(!1,le.nativeEvent)},typeof f=="string"?f:"Dismiss")}const ie=!r&&E&&(c?!C:!0)&&(G||c);return te.createElement(te.Fragment,null,ie&&te.createElement(op,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:re=>{if(c){const ae=Y();ra(i[0]==="reference"?ae[0]:ae[ae.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(F.current=!1,Eu(re,N.portalNode)){const ae=s$()||S;ae==null||ae.focus()}else{var le;(le=N.beforeOutsideRef.current)==null||le.focus()}}}),!C&&ee("start"),n,ee("end"),ie&&te.createElement(op,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:re=>{if(c)ra(Y()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(F.current=!0),Eu(re,N.portalNode)){const ae=l$()||S;ae==null||ae.focus()}else{var le;(le=N.afterOutsideRef.current)==null||le.focus()}}}))}function wA(e){return en(e.target)&&e.target.tagName==="BUTTON"}function _A(e){return Bw(e)}function Kw(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:c=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,p=te.useRef(),m=te.useRef(!1),y=te.useMemo(()=>({onPointerDown(g){p.current=g.pointerType},onMouseDown(g){const v=p.current;g.button===0&&s!=="click"&&(Gu(v,!0)&&c||(n&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){const v=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}Gu(v,!0)&&c||(n&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){p.current=void 0,!(g.defaultPrevented||!f||wA(g))&&(g.key===" "&&!_A(o)&&(g.preventDefault(),m.current=!0),g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!f||wA(g)||_A(o)||g.key===" "&&m.current&&(m.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[i,o,s,c,f,r,n,d,l]);return te.useMemo(()=>a?{reference:y}:{},[a,y])}const AG={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},PG={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},SA=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 Zm(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:c="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:y}=t,g=Yf(),v=xn(typeof l=="function"?l:()=>!1),x=typeof l=="function"?v:l,w=te.useRef(!1),S=te.useRef(!1),{escapeKey:A,outsidePress:_}=SA(m),{escapeKey:C,outsidePress:E}=SA(y),k=te.useRef(!1),M=xn(F=>{var W;if(!n||!a||!s||F.key!=="Escape"||k.current)return;const z=(W=o.current.floatingContext)==null?void 0:W.nodeId,G=g?ds(g.nodesRef.current,z):[];if(!A&&(F.stopPropagation(),G.length>0)){let U=!0;if(G.forEach(V=>{var Y;if((Y=V.context)!=null&&Y.open&&!V.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,XH(F)?F.nativeEvent:F,"escape-key")}),D=xn(F=>{var W;const z=()=>{var G;M(F),(G=co(F))==null||G.removeEventListener("keydown",z)};(W=co(F))==null||W.addEventListener("keydown",z)}),$=xn(F=>{var W;const z=w.current;w.current=!1;const G=S.current;if(S.current=!1,c==="click"&&G||z||typeof x=="function"&&!x(F))return;const U=co(F),V="["+ws("inert")+"]",Y=Nn(i.floating).querySelectorAll(V);let ee=bt(U)?U:null;for(;ee&&!ya(ee);){const ae=Co(ee);if(ya(ae)||!bt(ae))break;ee=ae}if(Y.length&&bt(U)&&!ZH(U)&&!Qt(U,i.floating)&&Array.from(Y).every(ae=>!Qt(ee,ae)))return;if(en(U)&&L){const ae=U.clientWidth>0&&U.scrollWidth>U.clientWidth,ue=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let ne=ue&&F.offsetX>U.clientWidth;if(ue&&Mr(U).direction==="rtl"&&(ne=F.offsetX<=U.offsetWidth-U.clientWidth),ne||ae&&F.offsetY>U.clientHeight)return}const ie=(W=o.current.floatingContext)==null?void 0:W.nodeId,re=g&&ds(g.nodesRef.current,ie).some(ae=>{var ue;return Mv(F,(ue=ae.context)==null?void 0:ue.elements.floating)});if(Mv(F,i.floating)||Mv(F,i.domReference)||re)return;const le=g?ds(g.nodesRef.current,ie):[];if(le.length>0){let ae=!0;if(le.forEach(ue=>{var ne;if((ne=ue.context)!=null&&ne.open&&!ue.context.dataRef.current.__outsidePressBubbles){ae=!1;return}}),!ae)return}r(!1,F,"outside-press")}),N=xn(F=>{var W;const z=()=>{var G;$(F),(G=co(F))==null||G.removeEventListener(c,z)};(W=co(F))==null||W.addEventListener(c,z)});te.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=A,o.current.__outsidePressBubbles=_;let F=-1;function W(Y){r(!1,Y,"ancestor-scroll")}function z(){window.clearTimeout(F),k.current=!0}function G(){F=window.setTimeout(()=>{k.current=!1},Wm()?5:0)}const U=Nn(i.floating);s&&(U.addEventListener("keydown",C?D:M,C),U.addEventListener("compositionstart",z),U.addEventListener("compositionend",G)),x&&U.addEventListener(c,E?N:$,E);let V=[];return p&&(bt(i.domReference)&&(V=fa(i.domReference)),bt(i.floating)&&(V=V.concat(fa(i.floating))),!bt(i.reference)&&i.reference&&i.reference.contextElement&&(V=V.concat(fa(i.reference.contextElement)))),V=V.filter(Y=>{var ee;return Y!==((ee=U.defaultView)==null?void 0:ee.visualViewport)}),V.forEach(Y=>{Y.addEventListener("scroll",W,{passive:!0})}),()=>{s&&(U.removeEventListener("keydown",C?D:M,C),U.removeEventListener("compositionstart",z),U.removeEventListener("compositionend",G)),x&&U.removeEventListener(c,E?N:$,E),V.forEach(Y=>{Y.removeEventListener("scroll",W)}),window.clearTimeout(F)}},[o,i,s,x,c,n,r,p,a,A,_,M,C,D,$,E,N]),te.useEffect(()=>{w.current=!1},[x,c]);const I=te.useMemo(()=>({onKeyDown:M,[AG[d]]:F=>{f&&r(!1,F.nativeEvent,"reference-press")}}),[M,r,f,d]),L=te.useMemo(()=>({onKeyDown:M,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[PG[c]]:()=>{w.current=!0}}),[M,c]);return te.useMemo(()=>a?{reference:I,floating:L}:{},[a,I,L])}function TG(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Gm(),o=te.useRef({}),[a]=te.useState(()=>dG()),s=Ym()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!bt(m)&&uG("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=te.useState(r.reference),f=xn((m,y,g)=>{o.current.openEvent=m?y:void 0,a.emit("openchange",{open:m,event:y,reason:g,nested:s}),n==null||n(m,y,g)}),d=te.useMemo(()=>({setPositionReference:c}),[]),p=te.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return te.useMemo(()=>({dataRef:o,open:t,onOpenChange:f,elements:p,events:a,floatingId:i,refs:d}),[t,f,p,a,i,d])}function Jm(e){e===void 0&&(e={});const{nodeId:t}=e,n=TG({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=te.useState(null),[s,l]=te.useState(null),f=(i==null?void 0:i.domReference)||o,d=te.useRef(null),p=Yf();_t(()=>{f&&(d.current=f)},[f]);const m=JK({...e,elements:{...i,...s&&{reference:s}}}),y=te.useCallback(S=>{const A=bt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l(A),m.refs.setReference(A)},[m.refs]),g=te.useCallback(S=>{(bt(S)||S===null)&&(d.current=S,a(S)),(bt(m.refs.reference.current)||m.refs.reference.current===null||S!==null&&!bt(S))&&m.refs.setReference(S)},[m.refs]),v=te.useMemo(()=>({...m.refs,setReference:g,setPositionReference:y,domReference:d}),[m.refs,g,y]),x=te.useMemo(()=>({...m.elements,domReference:f}),[m.elements,f]),w=te.useMemo(()=>({...m,...r,refs:v,elements:x,nodeId:t}),[m,v,x,t,r]);return _t(()=>{r.dataRef.current.floatingContext=w;const S=p==null?void 0:p.nodesRef.current.find(A=>A.id===t);S&&(S.context=w)}),te.useMemo(()=>({...m,context:w,refs:v,elements:x}),[m,v,x,w])}function EG(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,c=te.useRef(!1),f=te.useRef(),d=te.useRef(!0);te.useEffect(()=>{if(!s)return;const m=fr(a.domReference);function y(){!n&&en(a.domReference)&&a.domReference===ui(Nn(a.domReference))&&(c.current=!0)}function g(){d.current=!0}return m.addEventListener("blur",y),m.addEventListener("keydown",g,!0),()=>{m.removeEventListener("blur",y),m.removeEventListener("keydown",g,!0)}},[a.domReference,n,s]),te.useEffect(()=>{if(!s)return;function m(y){let{reason:g}=y;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,s]),te.useEffect(()=>()=>{clearTimeout(f.current)},[]);const p=te.useMemo(()=>({onPointerDown(m){Rw(m.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;const y=co(m.nativeEvent);if(l&&bt(y))try{if(Lw()&&VN())throw Error();if(!y.matches(":focus-visible"))return}catch{if(!d.current&&!Bw(y))return}r(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;const y=m.relatedTarget,g=m.nativeEvent,v=bt(y)&&y.hasAttribute(ws("focus-guard"))&&y.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var x;const w=ui(a.domReference?a.domReference.ownerDocument:document);!y&&w===a.domReference||Qt((x=o.current.floatingContext)==null?void 0:x.refs.floating.current,w)||Qt(a.domReference,w)||v||r(!1,g,"focus")})}}),[o,a.domReference,r,l]);return te.useMemo(()=>s?{reference:p}:{},[s,p])}const OA="active",CA="selected";function Lv(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[OA]:a,[CA]:s,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[ox]:""},...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[c,f]=l;if(!(i&&[OA,CA].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var d;(d=r.get(c))==null||d.push(f),a[c]=function(){for(var p,m=arguments.length,y=new Array(m),g=0;gv(...y)).find(v=>v!==void 0)}}}else a[c]=f}),a),{})}}function Qm(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=te.useCallback(s=>Lv(s,e,"reference"),t),o=te.useCallback(s=>Lv(s,e,"floating"),n),a=te.useCallback(s=>Lv(s,e,"item"),r);return te.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}let AA=!1;function eg(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function PA(e,t){return eg(t,e===Hw||e===Gf,e===da||e===ha)}function Bv(e,t,n){return eg(t,e===Gf,n?e===da:e===ha)||e==="Enter"||e===" "||e===""}function kG(e,t,n){return eg(t,n?e===da:e===ha,e===Gf)}function TA(e,t,n){return eg(t,n?e===ha:e===da,e===Hw)}function MG(e,t){const{open:n,onOpenChange:r,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:f=!1,loop:d=!1,nested:p=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!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||Uh("`useListNavigation` looping must be enabled to allow escaping."),y||Uh("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&A>1&&Uh("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=f$(i.floating),D=Dn(M),$=Ym(),N=Yf(),I=xn(s),L=tx(i.domReference),F=te.useRef(g),W=te.useRef(c??-1),z=te.useRef(null),G=te.useRef(!0),U=te.useRef(I),V=te.useRef(!!i.floating),Y=te.useRef(n),ee=te.useRef(!1),ie=te.useRef(!1),re=Dn(w),le=Dn(n),ae=Dn(_),ue=Dn(c),[ne,J]=te.useState(),[fe,ve]=te.useState(),X=xn(function(Ne,nt,Se){Se===void 0&&(Se=!1);function ze(at){y?(J(at.id),N==null||N.events.emit("virtualfocus",at),C&&(C.current=at)):ra(at,{preventScroll:!0,sync:VN()&&Lw()?AA||ee.current:!1})}const Lt=Ne.current[nt.current];Lt&&ze(Lt),requestAnimationFrame(()=>{const at=Ne.current[nt.current]||Lt;if(!at)return;Lt||ze(at);const Wt=ae.current;Wt&&he&&(Se||!G.current)&&(at.scrollIntoView==null||at.scrollIntoView(typeof Wt=="boolean"?{block:"nearest",inline:"nearest"}:Wt))})});_t(()=>{document.createElement("div").focus({get preventScroll(){return AA=!0,!1}})},[]),_t(()=>{l&&(n&&i.floating?F.current&&c!=null&&(ie.current=!0,W.current=c,I(c)):V.current&&(W.current=-1,U.current(null)))},[l,n,i.floating,c,I]),_t(()=>{if(l&&n&&i.floating)if(a==null){if(ee.current=!1,ue.current!=null)return;if(V.current&&(W.current=-1,X(o,W)),(!Y.current||!V.current)&&F.current&&(z.current!=null||F.current===!0&&z.current==null)){let Ne=0;const nt=()=>{o.current[0]==null?(Ne<2&&(Ne?requestAnimationFrame:queueMicrotask)(nt),Ne++):(W.current=z.current==null||Bv(z.current,S,m)||p?$v(o,re.current):uA(o,re.current),z.current=null,I(W.current))};nt()}}else Tu(o,a)||(W.current=a,X(o,W,ie.current),ie.current=!1)},[l,n,i.floating,a,ue,p,o,S,m,I,X,re]),_t(()=>{var Ne;if(!l||i.floating||!N||y||!V.current)return;const nt=N.nodesRef.current,Se=(Ne=nt.find(at=>at.id===$))==null||(Ne=Ne.context)==null?void 0:Ne.elements.floating,ze=ui(Nn(i.floating)),Lt=nt.some(at=>at.context&&Qt(at.context.elements.floating,ze));Se&&!Lt&&G.current&&Se.focus({preventScroll:!0})},[l,i.floating,N,$,y]),_t(()=>{if(!l||!N||!y||$)return;function Ne(nt){ve(nt.id),C&&(C.current=nt)}return N.events.on("virtualfocus",Ne),()=>{N.events.off("virtualfocus",Ne)}},[l,N,y,$,C]),_t(()=>{U.current=I,V.current=!!i.floating}),_t(()=>{n||(z.current=null)},[n]),_t(()=>{Y.current=n},[n]);const je=a!=null,he=te.useMemo(()=>{function Ne(Se){if(!n)return;const ze=o.current.indexOf(Se);ze!==-1&&I(ze)}return{onFocus(Se){let{currentTarget:ze}=Se;Ne(ze)},onClick:Se=>{let{currentTarget:ze}=Se;return ze.focus({preventScroll:!0})},...v&&{onMouseMove(Se){let{currentTarget:ze}=Se;Ne(ze)},onPointerLeave(Se){let{pointerType:ze}=Se;!G.current||ze==="touch"||(W.current=-1,X(o,W),I(null),y||ra(D.current,{preventScroll:!0}))}}}},[n,D,X,v,o,I,y]),Ee=xn(Ne=>{if(G.current=!1,ee.current=!0,Ne.which===229||!le.current&&Ne.currentTarget===D.current)return;if(p&&TA(Ne.key,S,m)){jn(Ne),r(!1,Ne.nativeEvent,"list-navigation"),en(i.domReference)&&(y?N==null||N.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const nt=W.current,Se=$v(o,w),ze=uA(o,w);if(L||(Ne.key==="Home"&&(jn(Ne),W.current=Se,I(W.current)),Ne.key==="End"&&(jn(Ne),W.current=ze,I(W.current))),A>1){const Lt=E||Array.from({length:o.current.length},()=>({width:1,height:1})),at=iG(Lt,A,k),Wt=at.findIndex(rn=>rn!=null&&!Vh(o.current,rn,w)),$r=at.reduce((rn,nr,qe)=>nr!=null&&!Vh(o.current,nr,w)?qe:rn,-1),mn=at[rG({current:at.map(rn=>rn!=null?o.current[rn]:null)},{event:Ne,orientation:S,loop:d,rtl:m,cols:A,disabledIndices:aG([...w||o.current.map((rn,nr)=>Vh(o.current,nr)?nr:void 0),void 0],at),minIndex:Wt,maxIndex:$r,prevIndex:oG(W.current>ze?Se:W.current,Lt,at,A,Ne.key===Gf?"bl":Ne.key===(m?da:ha)?"tr":"tl"),stopEvent:!0})];if(mn!=null&&(W.current=mn,I(W.current)),S==="both")return}if(PA(Ne.key,S)){if(jn(Ne),n&&!y&&ui(Ne.currentTarget.ownerDocument)===Ne.currentTarget){W.current=Bv(Ne.key,S,m)?Se:ze,I(W.current);return}Bv(Ne.key,S,m)?d?W.current=nt>=ze?f&&nt!==o.current.length?-1:Se:Fn(o,{startingIndex:nt,disabledIndices:w}):W.current=Math.min(ze,Fn(o,{startingIndex:nt,disabledIndices:w})):d?W.current=nt<=Se?f&&nt!==-1?o.current.length:ze:Fn(o,{startingIndex:nt,decrement:!0,disabledIndices:w}):W.current=Math.max(Se,Fn(o,{startingIndex:nt,decrement:!0,disabledIndices:w})),Tu(o,W.current)?I(null):I(W.current)}}),Ze=te.useMemo(()=>y&&n&&je&&{"aria-activedescendant":fe||ne},[y,n,je,fe,ne]),tt=te.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...!tx(i.domReference)&&Ze,onKeyDown:Ee,onPointerMove(){G.current=!0}}),[Ze,Ee,i.domReference,S]),Rn=te.useMemo(()=>{function Ne(Se){g==="auto"&&zN(Se.nativeEvent)&&(F.current=!0)}function nt(Se){F.current=g,g==="auto"&&Rw(Se.nativeEvent)&&(F.current=!0)}return{...Ze,onKeyDown(Se){G.current=!1;const ze=Se.key.startsWith("Arrow"),Lt=["Home","End"].includes(Se.key),at=ze||Lt,Wt=kG(Se.key,S,m),$r=TA(Se.key,S,m),mn=PA(Se.key,S),rn=(p?Wt:mn)||Se.key==="Enter"||Se.key.trim()==="";if(y&&n){const pt=N==null?void 0:N.nodesRef.current.find(Dr=>Dr.parentId==null),Cn=N&&pt?yG(N.nodesRef.current,pt.id):null;if(at&&Cn&&C){const Dr=new KeyboardEvent("keydown",{key:Se.key,bubbles:!0});if(Wt||$r){var nr,qe;const Yi=((nr=Cn.context)==null?void 0:nr.elements.domReference)===Se.currentTarget,Xt=$r&&!Yi?(qe=Cn.context)==null?void 0:qe.elements.domReference:Wt?o.current.find(pr=>(pr==null?void 0:pr.id)===ne):null;Xt&&(jn(Se),Xt.dispatchEvent(Dr),ve(void 0))}if((mn||Lt)&&Cn.context&&Cn.context.open&&Cn.parentId&&Se.currentTarget!==Cn.context.elements.domReference){var $t;jn(Se),($t=Cn.context.elements.domReference)==null||$t.dispatchEvent(Dr);return}}return Ee(Se)}if(!(!n&&!x&&ze)){if(rn&&(z.current=p&&mn?null:Se.key),p){Wt&&(jn(Se),n?(W.current=$v(o,re.current),I(W.current)):r(!0,Se.nativeEvent,"list-navigation"));return}mn&&(c!=null&&(W.current=c),jn(Se),!n&&x?r(!0,Se.nativeEvent,"list-navigation"):Ee(Se),n&&I(W.current))}},onFocus(){n&&!y&&I(null)},onPointerDown:nt,onMouseDown:Ne,onClick:Ne}},[ne,Ze,Ee,re,g,o,p,I,r,n,x,S,m,c,N,y,C]);return te.useMemo(()=>l?{reference:Rn,floating:tt,item:he}:{},[l,Rn,tt,he])}const jG=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Gw(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,s=(n=jG.get(a))!=null?n:a,l=Gm(),f=Ym()!=null,d=te.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=te.useMemo(()=>{const y={id:i,...s&&{role:s}};return s==="tooltip"||a==="label"?y:{...y,...s==="menu"&&{"aria-labelledby":l}}},[s,i,l,a]),m=te.useCallback(y=>{let{active:g,selected:v}=y;const x={role:"option",...g&&{id:i+"-option"}};switch(a){case"select":return{...x,"aria-selected":g&&v};case"combobox":return{...x,...g&&{"aria-selected":!0}}}return{}},[i,a]);return te.useMemo(()=>o?{reference:d,floating:p,item:m}:{},[o,d,p,m])}const EA=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function rl(e,t){return typeof e=="function"?e(t):e}function NG(e,t){const[n,r]=te.useState(e);return e&&!n&&r(!0),te.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function $G(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]=te.useState("unmounted"),c=NG(n,a);return!c&&s==="close"&&l("unmounted"),_t(()=>{if(r){if(n){l("initial");const f=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(f)}}l("close")}},[n,r]),{isMounted:c,status:s}}function d$(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],c=te.useMemo(()=>({side:l,placement:s}),[l,s]),f=typeof a=="number",d=(f?a:a.open)||0,p=(f?a:a.close)||0,[m,y]=te.useState(()=>({...rl(o,c),...rl(n,c)})),{isMounted:g,status:v}=$G(e,{duration:a}),x=Dn(n),w=Dn(r),S=Dn(i),A=Dn(o);return _t(()=>{const _=rl(x.current,c),C=rl(S.current,c),E=rl(A.current,c),k=rl(w.current,c)||Object.keys(_).reduce((M,D)=>(M[D]="",M),{});if(v==="initial"&&y(M=>({transitionProperty:M.transitionProperty,...E,..._})),v==="open"&&y({transitionProperty:Object.keys(k).map(EA).join(","),transitionDuration:d+"ms",...E,...k}),v==="close"){const M=C||_;y({transitionProperty:Object.keys(M).map(EA).join(","),transitionDuration:p+"ms",...E,...M})}},[p,S,x,w,A,d,v,c]),{isMounted:g,styles:m}}function DG(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:f=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:m=null}=t,y=te.useRef(),g=te.useRef(""),v=te.useRef((n=m??a)!=null?n:-1),x=te.useRef(null),w=xn(s),S=xn(l),A=Dn(f),_=Dn(p);_t(()=>{r&&(clearTimeout(y.current),x.current=null,g.current="")},[r]),_t(()=>{if(r&&g.current===""){var D;v.current=(D=m??a)!=null?D:-1}},[r,m,a]);const C=xn(D=>{D?i.current.typing||(i.current.typing=D,S(D)):i.current.typing&&(i.current.typing=D,S(D))}),E=xn(D=>{function $(W,z,G){const U=A.current?A.current(z,G):z.find(V=>(V==null?void 0:V.toLocaleLowerCase().indexOf(G.toLocaleLowerCase()))===0);return U?W.indexOf(U):-1}const N=o.current;if(g.current.length>0&&g.current[0]!==" "&&($(N,N,g.current)===-1?C(!1):D.key===" "&&jn(D)),N==null||_.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(jn(D),C(!0)),N.every(W=>{var z,G;return W?((z=W[0])==null?void 0:z.toLocaleLowerCase())!==((G=W[1])==null?void 0:G.toLocaleLowerCase()):!0})&&g.current===D.key&&(g.current="",v.current=x.current),g.current+=D.key,clearTimeout(y.current),y.current=setTimeout(()=>{g.current="",v.current=x.current,C(!1)},d);const L=v.current,F=$(N,[...N.slice((L||0)+1),...N.slice(0,(L||0)+1)],g.current);F!==-1?(w(F),x.current=F):D.key!==" "&&(g.current="",C(!1))}),k=te.useMemo(()=>({onKeyDown:E}),[E]),M=te.useMemo(()=>({onKeyDown:E,onKeyUp(D){D.key===" "&&C(!1)}}),[E,C]);return te.useMemo(()=>c?{reference:k,floating:M}:{},[c,k,M])}function kA(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-c)/(d-c)+l&&(i=!i)}return i}function IG(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 c(d,p){const m=performance.now(),y=m-l;if(a===null||s===null||y===0)return a=d,s=p,l=m,null;const g=d-a,v=p-s,w=Math.sqrt(g*g+v*v)/y;return a=d,s=p,l=m,w}const f=d=>{let{x:p,y:m,placement:y,elements:g,onClose:v,nodeId:x,tree:w}=d;return function(A){function _(){clearTimeout(i),v()}if(clearTimeout(i),!g.domReference||!g.floating||y==null||p==null||m==null)return;const{clientX:C,clientY:E}=A,k=[C,E],M=co(A),D=A.type==="mouseleave",$=Qt(g.floating,M),N=Qt(g.domReference,M),I=g.domReference.getBoundingClientRect(),L=g.floating.getBoundingClientRect(),F=y.split("-")[0],W=p>L.right-L.width/2,z=m>L.bottom-L.height/2,G=IG(k,I),U=L.width>I.width,V=L.height>I.height,Y=(U?I:L).left,ee=(U?I:L).right,ie=(V?I:L).top,re=(V?I:L).bottom;if($&&(o=!0,!D))return;if(N&&(o=!1),N&&!D){o=!0;return}if(D&&bt(A.relatedTarget)&&Qt(g.floating,A.relatedTarget)||w&&ds(w.nodesRef.current,x).some(ue=>{let{context:ne}=ue;return ne==null?void 0:ne.open}))return;if(F==="top"&&m>=I.bottom-1||F==="bottom"&&m<=I.top+1||F==="left"&&p>=I.right-1||F==="right"&&p<=I.left+1)return _();let le=[];switch(F){case"top":le=[[Y,I.top+1],[Y,L.bottom-1],[ee,L.bottom-1],[ee,I.top+1]];break;case"bottom":le=[[Y,L.top+1],[Y,I.bottom-1],[ee,I.bottom-1],[ee,L.top+1]];break;case"left":le=[[L.right-1,re],[L.right-1,ie],[I.left+1,ie],[I.left+1,re]];break;case"right":le=[[I.right-1,re],[I.right-1,ie],[L.left+1,ie],[L.left+1,re]];break}function ae(ue){let[ne,J]=ue;switch(F){case"top":{const fe=[U?ne+t/2:W?ne+t*4:ne-t*4,J+t+1],ve=[U?ne-t/2:W?ne+t*4:ne-t*4,J+t+1],X=[[L.left,W||U?L.bottom-t:L.top],[L.right,W?U?L.bottom-t:L.top:L.bottom-t]];return[fe,ve,...X]}case"bottom":{const fe=[U?ne+t/2:W?ne+t*4:ne-t*4,J-t],ve=[U?ne-t/2:W?ne+t*4:ne-t*4,J-t],X=[[L.left,W||U?L.top+t:L.bottom],[L.right,W?U?L.top+t:L.bottom:L.top+t]];return[fe,ve,...X]}case"left":{const fe=[ne+t+1,V?J+t/2:z?J+t*4:J-t*4],ve=[ne+t+1,V?J-t/2:z?J+t*4:J-t*4];return[...[[z||V?L.right-t:L.left,L.top],[z?V?L.right-t:L.left:L.right-t,L.bottom]],fe,ve]}case"right":{const fe=[ne-t,V?J+t/2:z?J+t*4:J-t*4],ve=[ne-t,V?J-t/2:z?J+t*4:J-t*4],X=[[z||V?L.left+t:L.right,L.top],[z?V?L.left+t:L.right:L.left+t,L.bottom]];return[fe,ve,...X]}}}if(!kA([C,E],le)){if(o&&!G)return _();if(!D&&r){const ue=c(A.clientX,A.clientY);if(ue!==null&&ue<.1)return _()}kA([C,E],ae([p,m]))?!o&&r&&(i=window.setTimeout(_,40)):_()}}};return f.__options={blockPointerEvents:n},f}const qf="light",h$="neutral",LG="button",BG=({theme:e=qf,variant:t=h$})=>{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},ap=({icon:e,theme:t=qf,variant:n=h$})=>{var a;const r="[&>svg]:h-5 [&>svg]:w-5",i=BG({theme:t,variant:n});if(e&&O.isValidElement(e))return O.cloneElement(e,{className:K(r,i,((a=e==null?void 0:e.props)==null?void 0:a.className)??"")});const o={neutral:P.jsx(Zb,{className:K(r,i)}),info:P.jsx(Zb,{className:K(r,i)}),success:P.jsx(Hf,{className:K(r,i)}),warning:P.jsx(LH,{className:K(r,i)}),error:P.jsx(IH,{className:K(r,i)})};return o[n]||o.neutral},ax=({actionType:e=LG,onAction:t=()=>{},actionLabel:n="",theme:r=qf})=>{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 P.jsx(bn,{variant:"outline",size:"xs",onClick:t,className:K("rounded",i,o,r==="dark"?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return P.jsx(bn,{variant:"link",size:"xs",onClick:t,className:K(i,o),children:n});default:return null}},sp=({theme:e=qf,title:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return P.jsx("span",{className:K("block",r[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t})},lp=({theme:e=qf,content:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return P.jsx("span",{className:K(r[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t})},sx=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},tg=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:i=!1,open:o,setOpen:a,children:s,className:l,tooltipPortalRoot:c,tooltipPortalId:f,boundary:d="clippingAncestors",strategy:p="fixed",offset:m=8,triggers:y=["hover","focus"],interactive:g=!1})=>{const v=O.useMemo(()=>typeof o=="boolean"&&typeof a=="function",[o,a]),[x,w]=O.useState(!1),S=O.useRef(null),{refs:A,floatingStyles:_,context:C}=Jm({open:v?o:x,onOpenChange:v?a:w,placement:t,strategy:p,middleware:[Hm(m),Km({boundary:d}),n$({boundary:d}),eG({element:S})],whileElementsMounted:Um}),E=Kw(C,{enabled:!v&&y.includes("click")}),k=mG(C,{move:!1,enabled:!v&&y.includes("hover"),...g&&{handleClose:RG()}}),M=EG(C,{enabled:!v&&y.includes("focus")}),D=Zm(C),$=Gw(C,{role:"tooltip"}),{getReferenceProps:N,getFloatingProps:I}=Qm([E,k,M,D,$]),{isMounted:L,styles:F}=d$(C,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),W="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],G=e==="dark"?"text-tooltip-background-dark":"text-tooltip-background-light";return P.jsxs(O.Fragment,{children:[O.isValidElement(s)&&P.jsx(O.Fragment,{children:O.cloneElement(s,{ref:sx(s.ref,A.setReference),className:K(s.props.className),...N()})},"tooltip-reference"),P.jsx(Xm,{id:f,root:c,children:L&&P.jsxs("div",{className:K(W,z,"max-w-80 w-fit",l),ref:A.setFloating,style:{..._,...F},...I(),children:[P.jsxs("div",{children:[!!n&&P.jsx("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&P.jsx("div",{className:"font-normal",children:r},"tooltip-content")]}),i&&P.jsx(fG,{ref:S,context:C,className:K("fill-current",G)})]})})]})};tg.displayName="Tooltip";const p$=O.createContext({}),m$=()=>O.useContext(p$),g$=({children:e,name:t,style:n="simple",size:r="md",value:i,defaultValue:o,by:a="id",as:s="div",onChange:l,className:c,disableGroup:f=!1,vertical:d=!1,columns:p=4,multiSelection:m=!1,gapClassName:y="gap-2"})=>{const g=O.useMemo(()=>typeof i<"u",[i]),v=O.useMemo(()=>t||`radio-button-group-${Wi()}`,[t]);let x;g?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(g||S(E),typeof l!="function")return;l(E)}},[l]);c=K("grid grid-cols-4",bH[p],y,n==="tile"&&"gap-0",d&&"grid-cols-1",c);const _=K(n==="tile"?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",c),C=()=>P.jsx(p$.Provider,{value:{name:v,value:g?i:w,by:a,onChange:A,isControlled:g,disableAll:f,style:n,columns:p,multiSelection:m,size:r},children:O.Children.map(e,E=>O.isValidElement(E)?E:null)});return P.jsx(P.Fragment,{children:n==="tile"?P.jsx("div",{className:_,children:C()}):P.jsx(s,{...s===O.Fragment?{}:{className:c},children:C()})})};g$.displayName="RadioButton.Group";const FG=({id:e,label:t,value:n,children:r,disabled:i,icon:o=null,inlineIcon:a=!1,hideSelection:s=!1,reversePosition:l=!1,borderOn:c=!1,borderOnActive:f=!0,badgeItem:d=null,useSwitch:p=!1,info:m=void 0,minWidth:y=!0,...g},v)=>{var G,U;const{buttonWrapperClasses:x,...w}=g,S=m$(),{name:A,value:_,by:C,onChange:E,disableAll:k,checked:M,multiSelection:D,size:$="md"}=S,N="primary",I=O.useMemo(()=>e||`radio-button-${Wi()}`,[e]),L=O.useMemo(()=>k||i,[k,i]),F=O.useMemo(()=>D?Array.isArray(_)&&_.includes(n):typeof M<"u"?M:typeof _!=typeof n?!1:typeof _=="string"?_===n:Array.isArray(_)?_.includes(n):_[C]===n[C],[_,n,M]),W=O.useCallback(()=>O.isValidElement(t)?t:t!=null&&t.heading?P.jsxs("div",{className:K(!a&&"space-y-1.5 mt-[2px]",l&&(p?"ml-10":"ml-4"),a&&"flex gap-2",a&&!t.description&&"items-center"),children:[o&&P.jsx(P.Fragment,{children:o}),P.jsxs("div",{className:K("space-y-1.5"),children:[P.jsx("p",{className:K("text-text-primary font-medium m-0",WH[$],i&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&P.jsx("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if(S.style==="tile")return P.jsx(WG,{id:e,label:t,value:n,disabled:i,size:$,children:r});const z=()=>{L||(D?p&&E(n,!F):E(n))};return P.jsxs("label",{className:K("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",y&&"min-w-[180px]",c&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",f&&c&&F&&"ring-2 ring-border-interactive",$==="sm"?"px-3 py-3":"px-4 py-4","pr-12",L&&"cursor-not-allowed opacity-40",x),htmlFor:I,onClick:z,children:[!!t&&P.jsx("label",{className:K("cursor-pointer",L&&"cursor-not-allowed"),htmlFor:I,children:W()}),!!m&&P.jsx("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:P.jsx(tg,{title:m==null?void 0:m.heading,content:m==null?void 0:m.description,children:P.jsx(Zb,{className:K("text-text-primary",(G=kv[$])==null?void 0:G.info)})})}),P.jsxs("label",{className:K("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",l&&"left-0",L&&"cursor-not-allowed",a&&"mr-3",p?rA[$].switch:rA[$].radio),onClick:z,children:[!!d&&d,!s&&(p?P.jsx(P.Fragment,{children:P.jsx(Nw,{defaultValue:!1,size:$,onChange:()=>{D?E(n,!F):E(n)},checked:F,...w,"aria-label":(t==null?void 0:t.heading)??"Switch"})}):P.jsxs("span",{className:"relative p-0.5",children:[P.jsx("input",{ref:v,id:I,type:D?"checkbox":"radio",className:K("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",!D&&"rounded-full",tA[N].checkbox,kv[$].checkbox,L&&nA.checkbox),name:A,value:n,onChange:V=>E(V.target.value),checked:F,disabled:L,...w}),P.jsx("span",{className:K("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",tA[N].icon,L&&nA.icon),children:D?P.jsx(Hf,{className:$==="sm"?"size-3":"size-4"}):P.jsx("div",{className:K("rounded-full bg-current",$==="sm"&&"mt-[0.5px]",(U=kv[$])==null?void 0:U.icon)})})]}))]})]})},lx=O.forwardRef(FG);lx.displayName="RadioButton.Button";const WG=({id:e,children:t,value:n,disabled:r,size:i="md",...o})=>{const a=m$(),{name:s,value:l,by:c,onChange:f,disableAll:d,checked:p}=a||{},m=O.useMemo(()=>e||`radio-button-${Wi()}`,[e]),y=O.useMemo(()=>d||r,[d,r]),g=O.useMemo(()=>typeof p<"u"?p:typeof l!=typeof n?!1:typeof l=="string"?l===n:Array.isArray(l)?l.includes(n):l&&c?l[c]===n[c]:!1,[l,n,p,c]),v=()=>{f&&f(n)},w=K(UH,HH,KH,y?"text-text-disabled cursor-not-allowed":"",zH[i],VH);return P.jsx(P.Fragment,{children:P.jsxs("button",{type:"button",id:m,"aria-label":"Radio Button",className:K(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",g&&"bg-button-disabled"),onClick:v,disabled:y,...o,children:[P.jsx("input",{type:"hidden",value:n,name:s,checked:g,onChange:S=>f==null?void 0:f(S.target.value)}),t]})})},zG=Object.assign(lx,{Group:g$,Button:lx}),Xf=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:c=()=>{},disableHover:f=!1},d)=>{const p="font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",m={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"},y={pill:"rounded-full",rounded:"rounded"},g={neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"},v={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let x="",w="group relative justify-center flex items-center cursor-pointer";const S={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(x=v.disabled,w+=" cursor-not-allowed disabled"):x=v[i],e?P.jsxs("span",{className:K(p,m[t],y[r],"gap-0.5",x,!f&&g[i],n),ref:d,children:[o?P.jsx("span",{className:K("justify-center flex items-center",S[t]),children:o}):null,P.jsx("span",{className:"px-1 truncate inline-block",children:e}),l&&P.jsxs("span",{className:K(w,S[t]),onMouseDown:c,role:"button",tabIndex:0,...!a&&{onClick:s},children:[P.jsx("span",{className:"sr-only",children:`Remove ${e}`}),P.jsx(ga,{}),P.jsx("span",{className:"absolute -inset-1"})]})]}):null});Xf.displayName="Badge";const VG=({id:e,defaultValue:t="",value:n,size:r="sm",className:i="",disabled:o=!1,onChange:a=()=>{},error:s=!1,onError:l=()=>{},...c},f)=>{const d=O.useMemo(()=>e||`input-textarea-${Wi()}`,[e]),p=O.useMemo(()=>typeof n<"u",[n]),[m,y]=O.useState(t),g=O.useCallback(()=>p?n:m,[p,n,m]),v=E=>{if(o)return;const k=E.target.value;p||y(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 P.jsx("textarea",{ref:f,id:d,className:K(x,C,w[r],A,S,_,i),disabled:o,onChange:v,onInvalid:l,value:g(),...c})},y$=O.forwardRef(VG);y$.displayName="TextArea";const UG=O.forwardRef(({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:i,children:o,className:a,...s},l)=>{const[c,f]=O.useState(!1),d=r&&n==="none"?"subtle":n,p="rounded-full overflow-hidden flex items-center justify-center",m={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],y={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"}[d],v=r?"object-cover object-center":"",x=()=>{var _,C,E;if(r&&c){if(i&&typeof i=="string")return(_=i==null?void 0:i[0])==null?void 0:_.toUpperCase();if(o&&typeof o=="string")return(C=o==null?void 0:o[0])==null?void 0:C.toUpperCase();if(!o&&!i)return P.jsx(BH,{})}return o?typeof o=="string"?(E=o==null?void 0:o[0])==null?void 0:E.toUpperCase():o:null},w=()=>{f(!0)},S=!r||c,A=S?"div":"img";return O.useEffect(()=>{f(!1)},[r]),P.jsx(A,{ref:l,className:K(p,S&&m,y,g,v,a),...S?{children:x()}:{src:r,alt:i,onError:w},...s})}),HG=({id:e,type:t="text",defaultValue:n="",value:r,size:i="sm",className:o="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:c=()=>{},prefix:f=null,suffix:d=null,label:p="",...m},y)=>{const g=O.useRef(null),v=O.useMemo(()=>e||`input-${t}-${Wi()}`,[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=ne=>{if(a)return;let J;t==="file"?(J=ne.target.files,J&&J.length>0?_(J[0].name):_(null)):J=ne.target.value,!x&&t!=="file"&&S(J),typeof s=="function"&&s(J)},k=()=>{_(null),g.current&&(g.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"},I={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":""},F=a?"hover:outline-border-disabled":"hover:outline-border-strong",W="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":"",G=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":"",V=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",ee=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",ie={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},re=()=>f?P.jsx("div",{className:K(Y,"left-0 pl-3",N[i]),children:f}):null,le=()=>t==="file"?A?P.jsx("div",{className:K(ee,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",ie[i]),onClick:k,role:"button",tabIndex:0,onKeyDown:ne=>{(ne.key==="Enter"||ne.key===" ")&&k()},children:P.jsx(ga,{})}):P.jsx("div",{className:K(ee,"right-0 pr-3",ie[i]),children:P.jsx(eA,{})}):d?P.jsx("div",{className:K(Y,"right-0 pr-3",N[i]),children:d}):null,ae=O.useMemo(()=>p?P.jsx(yi,{className:K($[i]),htmlFor:v,...(m==null?void 0:m.required)&&{required:!0},children:p}):null,[p,i,v]),ue=A?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return t==="file"?P.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,P.jsxs("div",{className:K("w-full relative flex focus-within:z-10",o),children:[P.jsx("input",{ref:sx(g,y),id:v,type:"file",className:K(M,V,D[i],N[i],W,F,G,ue),disabled:a,onChange:E,onInvalid:c,...m}),P.jsx("div",{className:K(ee,"right-0 pr-3",ie[i]),children:P.jsx(eA,{})})]})]}):P.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,P.jsxs("div",{className:K("w-full relative flex focus-within:z-10",o),children:[re(),P.jsx("input",{ref:sx(g,y),id:v,type:t,className:K(M,U,D[i],N[i],I[i],L[i],W,F,z),disabled:a,onChange:E,onInvalid:c,value:C(),...m}),le()]})]})},v$=O.forwardRef(HG);v$.displayName="Input";const KG=({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 P.jsx(f,{className:K(d,p[o]),children:e})},c=()=>{const f={xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"};return P.jsx("p",{className:K("text-text-secondary font-normal my-0",f[o]),children:t})};return t?P.jsxs("div",{className:a,children:[P.jsxs("div",{children:[n&&r==="left"&&P.jsxs("div",{className:K("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&P.jsxs("div",{className:K("flex items-center",s[o]),children:[l(),n]}),!n&&l()]}),c()]}):P.jsxs("div",{className:a,children:[n&&r==="left"&&P.jsxs("div",{className:K("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&P.jsxs("div",{className:K("flex items-center",s[o]),children:[l(),n]}),!n&&l()]})},Yw=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const i={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],o={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return P.jsx("span",{className:K("flex",o,i,r),children:n||P.jsx(NH,{className:"animate-spin shrink-0"})})},GG=({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 P.jsx("div",{className:K("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",n),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Progress Bar",children:P.jsx("div",{className:o,style:{transform:i}})})},b$=O.createContext({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),YG=({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=K("box-border flex border border-border-subtle border-solid rounded",r);return P.jsx("div",{className:s,children:P.jsx(b$.Provider,{value:{activeItem:t,onChange:a,size:i,iconPosition:o},children:O.Children.map(e,(l,c)=>{if(!O.isValidElement(l))return null;const f=c===0,d=c===O.Children.count(e)-1;return O.cloneElement(l,{...l.props,index:c,isFirstChild:f,isLastChild:d})})})})},qG=({slug:e,text:t,icon:n,className:r,disabled:i=!1,isFirstChild:o,isLastChild:a,...s},l)=>{const c=O.useContext(b$);if(!c)throw new Error("Button should be used inside Button Group");const{activeItem:f,onChange:d,size:p,iconPosition:m}=c,y={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"},g="bg-background-primary text-primary cursor-pointer flex items-center justify-center",v="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=K(g,v,x,w,y[p],_,C,S,A,r),k=M=>{d({event:M,value:{slug:e,text:t}})};return P.jsxs("button",{ref:l,className:E,disabled:i,onClick:k,...s,children:[m==="left"&&n&&P.jsx("span",{className:"mr-1",children:n}),t,m==="right"&&n&&P.jsx("span",{className:"ml-1",children:n})]})},x$=O.forwardRef(qG);x$.displayName="Button";const XG={Group:YG,Button:x$},MA=new Set;function ng(e,t,n){e||MA.has(t)||(console.warn(t),MA.add(t))}function ZG(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&ng(!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 rg(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const cx=e=>Array.isArray(e);function w$(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 qw(e,t,n,r){if(typeof t=="function"){const[i,o]=jA(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]=jA(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function ig(e,t,n){const r=e.getProps();return qw(r,t,n!==void 0?n:r.custom,e)}const Xw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Zw=["initial",...Xw],Zf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ms=new Set(Zf),Mi=e=>e*1e3,yo=e=>e/1e3,JG={type:"spring",stiffness:500,damping:25,restSpeed:10},QG=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eY={type:"keyframes",duration:.8},tY={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nY=(e,{keyframes:t})=>t.length>2?eY:Ms.has(e)?e.startsWith("scale")?QG(t[1]):JG:tY;function Jw(e,t){return e?e[t]||e.default||e:void 0}const rY={skipAnimations:!1,useManualTiming:!1},iY=e=>e!==null;function og(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(iY),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const In=e=>e;function oY(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(c){o.has(c)&&(l.schedule(c),e()),c(a)}const l={schedule:(c,f=!1,d=!1)=>{const m=d&&r?t:n;return f&&o.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),o.delete(c)},process:c=>{if(a=c,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(c))}};return l}const ph=["read","resolveKeyframes","update","preRender","render","postRender"],aY=40;function _$(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=ph.reduce((x,w)=>(x[w]=oY(o),x),{}),{read:s,resolveKeyframes:l,update:c,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,aY),1),i.timestamp=x,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:ph.reduce((x,w)=>{const S=a[w];return x[w]=(A,_=!1,C=!1)=>(n||y(),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,sY=1e-7,lY=12;function cY(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=S$(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>sY&&++scY(o,0,1,e,n);return o=>o===0||o===1?o:S$(i(o),t,r)}const O$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,C$=e=>t=>1-e(1-t),A$=Jf(.33,1.53,.69,.99),Qw=C$(A$),P$=O$(Qw),T$=e=>(e*=2)<1?.5*Qw(e):.5*(2-Math.pow(2,-10*(e-1))),e1=e=>1-Math.sin(Math.acos(e)),E$=C$(e1),k$=O$(e1),M$=e=>/^0[^.\s]+$/u.test(e);function uY(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||M$(e):!0}let vc=In,Ao=In;process.env.NODE_ENV!=="production"&&(vc=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ao=(e,t)=>{if(!e)throw new Error(t)});const j$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),N$=e=>t=>typeof t=="string"&&t.startsWith(e),$$=N$("--"),fY=N$("var(--"),t1=e=>fY(e)?dY.test(e.split("/*")[0].trim()):!1,dY=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,hY=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pY(e){const t=hY.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const mY=4;function D$(e,t,n=1){Ao(n<=mY,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=pY(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return j$(a)?parseFloat(a):a}return t1(i)?D$(i,t,n+1):i}const wa=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Ju={...bc,transform:e=>wa(0,1,e)},mh={...bc,default:1},Qf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ta=Qf("deg"),ji=Qf("%"),Re=Qf("px"),gY=Qf("vh"),yY=Qf("vw"),NA={...ji,parse:e=>ji.parse(e)/100,transform:e=>ji.transform(e*100)},vY=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),$A=e=>e===bc||e===Re,DA=(e,t)=>parseFloat(e.split(", ")[t]),IA=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return DA(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?DA(o[1],e):0}},bY=new Set(["x","y","z"]),xY=Zf.filter(e=>!bY.has(e));function wY(e){const t=[];return xY.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Dl={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:IA(4,13),y:IA(5,14)};Dl.translateX=Dl.x;Dl.translateY=Dl.y;const I$=e=>t=>t.test(e),_Y={test:e=>e==="auto",parse:e=>e},R$=[bc,Re,ji,ta,yY,gY,_Y],RA=e=>R$.find(I$(e)),hs=new Set;let ux=!1,fx=!1;function L$(){if(fx){const e=Array.from(hs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=wY(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)})}fx=!1,ux=!1,hs.forEach(e=>e.complete()),hs.clear()}function B$(){hs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(fx=!0)})}function SY(){B$(),L$()}class n1{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?(hs.add(this),ux||(ux=!0,yt.read(B$),yt.resolveKeyframes(L$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;oMath.round(e*1e5)/1e5,r1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function OY(e){return e==null}const CY=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,i1=(e,t)=>n=>!!(typeof n=="string"&&CY.test(n)&&n.startsWith(e)||t&&!OY(n)&&Object.prototype.hasOwnProperty.call(n,t)),F$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(r1);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},AY=e=>wa(0,255,e),Wv={...bc,transform:e=>Math.round(AY(e))},os={test:i1("rgb","red"),parse:F$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wv.transform(e)+", "+Wv.transform(t)+", "+Wv.transform(n)+", "+ku(Ju.transform(r))+")"};function PY(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 dx={test:i1("#"),parse:PY,transform:os.transform},hl={test:i1("hsl","hue"),parse:F$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ji.transform(ku(t))+", "+ji.transform(ku(n))+", "+ku(Ju.transform(r))+")"},Wn={test:e=>os.test(e)||dx.test(e)||hl.test(e),parse:e=>os.test(e)?os.parse(e):hl.test(e)?hl.parse(e):dx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?os.transform(e):hl.transform(e)},TY=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EY(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(r1))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(TY))===null||n===void 0?void 0:n.length)||0)>0}const W$="number",z$="color",kY="var",MY="var(",LA="${}",jY=/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 Qu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(jY,l=>(Wn.test(l)?(r.color.push(o),i.push(z$),n.push(Wn.parse(l))):l.startsWith(MY)?(r.var.push(o),i.push(kY),n.push(l)):(r.number.push(o),i.push(W$),n.push(parseFloat(l))),++o,LA)).split(LA);return{values:n,split:s,indexes:r,types:i}}function V$(e){return Qu(e).values}function U$(e){const{split:t,types:n}=Qu(e),r=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function $Y(e){const t=V$(e);return U$(e)(t.map(NY))}const _a={test:EY,parse:V$,createTransformer:U$,getAnimatableNone:$Y},DY=new Set(["brightness","contrast","saturate","opacity"]);function IY(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(r1)||[];if(!r)return e;const i=n.replace(r,"");let o=DY.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const RY=/\b([a-z-]*)\(.*?\)/gu,hx={..._a,getAnimatableNone:e=>{const t=e.match(RY);return t?t.map(IY).join(" "):e}},LY={borderWidth:Re,borderTopWidth:Re,borderRightWidth:Re,borderBottomWidth:Re,borderLeftWidth:Re,borderRadius:Re,radius:Re,borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomRightRadius:Re,borderBottomLeftRadius:Re,width:Re,maxWidth:Re,height:Re,maxHeight:Re,top:Re,right:Re,bottom:Re,left:Re,padding:Re,paddingTop:Re,paddingRight:Re,paddingBottom:Re,paddingLeft:Re,margin:Re,marginTop:Re,marginRight:Re,marginBottom:Re,marginLeft:Re,backgroundPositionX:Re,backgroundPositionY:Re},BY={rotate:ta,rotateX:ta,rotateY:ta,rotateZ:ta,scale:mh,scaleX:mh,scaleY:mh,scaleZ:mh,skew:ta,skewX:ta,skewY:ta,distance:Re,translateX:Re,translateY:Re,translateZ:Re,x:Re,y:Re,z:Re,perspective:Re,transformPerspective:Re,opacity:Ju,originX:NA,originY:NA,originZ:Re},BA={...bc,transform:Math.round},o1={...LY,...BY,zIndex:BA,size:Re,fillOpacity:Ju,strokeOpacity:Ju,numOctaves:BA},FY={...o1,color:Wn,backgroundColor:Wn,outlineColor:Wn,fill:Wn,stroke:Wn,borderColor:Wn,borderTopColor:Wn,borderRightColor:Wn,borderBottomColor:Wn,borderLeftColor:Wn,filter:hx,WebkitFilter:hx},a1=e=>FY[e];function H$(e,t){let n=a1(e);return n!==hx&&(n=_a),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const WY=new Set(["auto","none","0"]);function zY(e,t,n){let r=0,i;for(;r{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function s1(e){return typeof e=="function"}let Hh;function VY(){Hh=void 0}const Ni={now:()=>(Hh===void 0&&Ni.set(kn.isProcessing||rY.useManualTiming?kn.timestamp:performance.now()),Hh),set:e=>{Hh=e,queueMicrotask(VY)}},FA=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_a.test(e)||e==="0")&&!e.startsWith("url("));function UY(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nKY?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&SY(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ni.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!HY(t,r,i,o))if(a)this.options.duration=0;else{l==null||l(og(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)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function Y$(e,t){return t?e*(1e3/t):0}const GY=5;function q$(e,t,n){const r=Math.max(t-GY,0);return Y$(n-e(r),t-r)}const zv=.001,YY=.01,WA=10,qY=.05,XY=1;function ZY({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;vc(e<=Mi(WA),"Spring duration must be 10 seconds or less");let a=1-t;a=wa(qY,XY,a),e=wa(YY,WA,yo(e)),a<1?(i=c=>{const f=c*a,d=f*e,p=f-n,m=px(c,a),y=Math.exp(-d);return zv-p/m*y},o=c=>{const d=c*a*e,p=d*n+n,m=Math.pow(a,2)*Math.pow(c,2)*e,y=Math.exp(-d),g=px(Math.pow(c,2),a);return(-i(c)+zv>0?-1:1)*((p-m)*y)/g}):(i=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-zv+f*d},o=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const s=5/e,l=QY(i,o,s);if(e=Mi(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const JY=12;function QY(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function nq(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!zA(e,tq)&&zA(e,eq)){const n=ZY(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function X$({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:c,duration:f,velocity:d,isResolvedFromDuration:p}=nq({...r,velocity:-yo(r.velocity||0)}),m=d||0,y=l/(2*Math.sqrt(s*c)),g=o-i,v=yo(Math.sqrt(s/c)),x=Math.abs(g)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let w;if(y<1){const S=px(v,y);w=A=>{const _=Math.exp(-y*v*A);return o-_*((m+y*v*g)/S*Math.sin(S*A)+g*Math.cos(S*A))}}else if(y===1)w=S=>o-Math.exp(-v*S)*(g+(m+v*g)*S);else{const S=v*Math.sqrt(y*y-1);w=A=>{const _=Math.exp(-y*v*A),C=Math.min(S*A,300);return o-_*((m+y*v*g)*Math.sinh(C)+S*g*Math.cosh(C))/S}}return{calculatedDuration:p&&f||null,next:S=>{const A=w(S);if(p)a.done=S>=f;else{let _=0;y<1&&(_=S===0?Mi(m):q$(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 VA({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:f}){const d=e[0],p={done:!1,value:d},m=k=>s!==void 0&&kl,y=k=>s===void 0?l:l===void 0||Math.abs(s-k)-g*Math.exp(-k/r),S=k=>x+w(k),A=k=>{const M=w(k),D=S(k);p.done=Math.abs(M)<=c,p.value=p.done?x:D};let _,C;const E=k=>{m(p.value)&&(_=k,C=X$({keyframes:[p.value,y(p.value)],velocity:q$(S,k,p.value),damping:i,stiffness:o,restDelta:c,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 rq=Jf(.42,0,1,1),iq=Jf(0,0,.58,1),Z$=Jf(.42,0,.58,1),oq=e=>Array.isArray(e)&&typeof e[0]!="number",l1=e=>Array.isArray(e)&&typeof e[0]=="number",UA={linear:In,easeIn:rq,easeInOut:Z$,easeOut:iq,circIn:e1,circInOut:k$,circOut:E$,backIn:Qw,backInOut:P$,backOut:A$,anticipate:T$},HA=e=>{if(l1(e)){Ao(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Jf(t,n,r,i)}else if(typeof e=="string")return Ao(UA[e]!==void 0,`Invalid easing type '${e}'`),UA[e];return e},aq=(e,t)=>n=>t(e(n)),vo=(...e)=>e.reduce(aq),Il=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ft=(e,t,n)=>e+(t-e)*n;function Vv(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 sq({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=Vv(l,s,e+1/3),o=Vv(l,s,e),a=Vv(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function cp(e,t){return n=>n>0?t:e}const Uv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},lq=[dx,os,hl],cq=e=>lq.find(t=>t.test(e));function KA(e){const t=cq(e);if(vc(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===hl&&(n=sq(n)),n}const GA=(e,t)=>{const n=KA(e),r=KA(t);if(!n||!r)return cp(e,t);const i={...n};return o=>(i.red=Uv(n.red,r.red,o),i.green=Uv(n.green,r.green,o),i.blue=Uv(n.blue,r.blue,o),i.alpha=Ft(n.alpha,r.alpha,o),os.transform(i))},mx=new Set(["none","hidden"]);function uq(e,t){return mx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function fq(e,t){return n=>Ft(e,t,n)}function c1(e){return typeof e=="number"?fq:typeof e=="string"?t1(e)?cp:Wn.test(e)?GA:pq:Array.isArray(e)?J$:typeof e=="object"?Wn.test(e)?GA:dq:cp}function J$(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>c1(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in r)n[o]=r[o](i);return n}}function hq(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=_a.createTransformer(t),r=Qu(e),i=Qu(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?mx.has(e)&&!i.values.length||mx.has(t)&&!r.values.length?uq(e,t):vo(J$(hq(r,i),i.values),n):(vc(!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.`),cp(e,t))};function Q$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ft(e,t,n):c1(e)(e,t)}function mq(e,t,n){const r=[],i=n||Q$,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=mq(t,r,i),s=a.length,l=c=>{let f=0;if(s>1)for(;fl(wa(e[0],e[o-1],c)):l}function yq(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Il(0,t,r);e.push(Ft(n,1,i))}}function vq(e){const t=[0];return yq(t,e.length-1),t}function bq(e,t){return e.map(n=>n*t)}function xq(e,t){return e.map(()=>t||Z$).splice(0,e.length-1)}function up({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=oq(r)?r.map(HA):HA(r),o={done:!1,value:t[0]},a=bq(n&&n.length===t.length?n:vq(t),e),s=gq(a,t,{ease:Array.isArray(i)?i:xq(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}const YA=2e4;function wq(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=YA?1/0:t}const _q=e=>{const t=({timestamp:n})=>e(n);return{start:()=>yt.update(t,!0),stop:()=>xa(t),now:()=>kn.isProcessing?kn.timestamp:Ni.now()}},Sq={decay:VA,inertia:VA,tween:up,keyframes:up,spring:X$},Oq=e=>e/100;class u1 extends G${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)||n1,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=s1(n)?n:Sq[n]||up;let l,c;s!==up&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Ao(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=vo(Oq,Q$(t[0],t[1])),t=[0,100]);const f=s({...this.options,keyframes:t});o==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=wq(f));const{calculatedDuration:d}=f,p=d+i,m=p*(r+1)-i;return{generator:f,mirroredGenerator:c,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:c,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:p,repeat:m,repeatType:y,repeatDelay:g,onUpdate:v}=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)&&(y==="reverse"?(D=1-D,g&&(D-=g/d)):y==="mirror"&&(A=a)),S=wa(0,1,D)*d}const _=w?{done:!1,value:l[0]}:A.next(S);s&&(_.value=s(_.value));let{done:C}=_;!w&&c!==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=og(l,this.options,i)),v&&v(_.value),E&&this.finish(),_}get duration(){const{resolved:t}=this;return t?yo(t.calculatedDuration):0}get time(){return yo(this.currentTime)}set time(t){t=Mi(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=yo(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=_q,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 Cq=new Set(["opacity","clipPath","filter","transform"]),Aq=10,Pq=(e,t)=>{let n="";const r=Math.max(Math.round(t/Aq),2);for(let i=0;i(t===void 0&&(t=e()),t)}const Tq={linearEasing:void 0};function Eq(e,t){const n=f1(e);return()=>{var r;return(r=Tq[t])!==null&&r!==void 0?r:n()}}const fp=Eq(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function eD(e){return!!(typeof e=="function"&&fp()||!e||typeof e=="string"&&(e in gx||fp())||l1(e)||Array.isArray(e)&&e.every(eD))}const _u=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_u([0,.65,.55,1]),circOut:_u([.55,0,1,.45]),backIn:_u([.31,.01,.66,-.59]),backOut:_u([.33,1.53,.69,.99])};function tD(e,t){if(e)return typeof e=="function"&&fp()?Pq(e,t):l1(e)?_u(e):Array.isArray(e)?e.map(n=>tD(n,t)||gx.easeOut):gx[e]}function kq(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const f=tD(s,i);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function qA(e,t){e.timeline=t,e.onfinish=null}const Mq=f1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),dp=10,jq=2e4;function Nq(e){return s1(e.type)||e.type==="spring"||!eD(e.ease)}function $q(e,t){const n=new u1({...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:c,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&fp()&&Dq(a)&&(a=nD[a]),Nq(this.options)){const{onComplete:p,onUpdate:m,motionValue:y,element:g,...v}=this.options,x=$q(t,v);t=x.keyframes,t.length===1&&(t[1]=t[0]),i=x.duration,o=x.times,a=x.ease,s="keyframes"}const d=kq(l.owner.current,c,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=f??this.calcStartTime(),this.pendingTimeline?(qA(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(og(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 yo(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return yo(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Mi(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 In;const{animation:r}=n;qA(r,t)}return In}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:c,onUpdate:f,onComplete:d,element:p,...m}=this.options,y=new u1({...m,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),g=Mi(this.time);c.setWithVelocity(y.sample(g-dp).value,y.sample(g).value,dp)}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 Mq()&&r&&Cq.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const Iq=f1(()=>window.ScrollTimeline!==void 0);class Rq{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;rIq()&&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]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Lq({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:c,...f}){return!!Object.keys(f).length}const d1=(e,t,n,r={},i,o)=>a=>{const s=Jw(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Mi(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,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};Lq(s)||(f={...f,...nY(e,f)}),f.duration&&(f.duration=Mi(f.duration)),f.repeatDelay&&(f.repeatDelay=Mi(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=og(f.keyframes,s);if(p!==void 0)return yt.update(()=>{f.onUpdate(p),f.onComplete()}),new Rq([])}return!o&&XA.supports(f)?new XA(f):new u1(f)},Bq=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Fq=e=>cx(e)?e[e.length-1]||0:e;function h1(e,t){e.indexOf(t)===-1&&e.push(t)}function p1(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class m1{constructor(){this.subscriptions=[]}add(t){return h1(this.subscriptions,t),()=>p1(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 zq{constructor(t,n={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Ni.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=Ni.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Wq(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&ng(!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 m1);const r=this.events[t].add(n);return t==="change"?()=>{r(),yt.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=Ni.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ZA)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ZA);return Y$(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 ef(e,t){return new zq(e,t)}function Vq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ef(n))}function Uq(e,t){const n=ig(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=Fq(o[a]);Vq(e,a,s)}}const g1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Hq="framerAppearId",rD="data-"+g1(Hq);function iD(e){return e.props[rD]}const Un=e=>!!(e&&e.getVelocity);function Kq(e){return!!(Un(e)&&e.add)}function yx(e,t){const n=e.getValue("willChange");if(Kq(n))return n.add(t)}function Gq({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function oD(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],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&&Gq(f,d))continue;const y={delay:n,...Jw(a||{},d)};let g=!1;if(window.MotionHandoffAnimation){const x=iD(e);if(x){const w=window.MotionHandoffAnimation(x,d,yt);w!==null&&(y.startTime=w,g=!0)}}yx(e,d),p.start(d1(d,p,m,e.shouldReduceMotion&&Ms.has(d)?{type:!1}:y,e,g));const v=p.animation;v&&c.push(v)}return s&&Promise.all(c).then(()=>{yt.update(()=>{s&&Uq(e,s)})}),c}function vx(e,t,n={}){var r;const i=ig(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(oD(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=o;return Yq(e,t,f+c,d,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,f]=l==="beforeChildren"?[a,s]:[s,a];return c().then(()=>f())}else return Promise.all([a(),s(n.delay)])}function Yq(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(qq).forEach((c,f)=>{c.notify("AnimationStart",t),a.push(vx(c,t,{...o,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function qq(e,t){return e.sortNodePosition(t)}function Xq(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>vx(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=vx(e,t,n);else{const i=typeof t=="function"?ig(e,t,n.custom):t;r=Promise.all(oD(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Zq=Zw.length;function aD(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?aD(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})=>Xq(e,n,r)))}function t9(e){let t=e9(e),n=JA(),r=!0;const i=l=>(c,f)=>{var d;const p=ig(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:m,transitionEnd:y,...g}=p;c={...c,...g,...y}}return c};function o(l){t=l(e)}function a(l){const{props:c}=e,f=aD(e.parent)||{},d=[],p=new Set;let m={},y=1/0;for(let v=0;vy&&A,M=!1;const D=Array.isArray(S)?S:[S];let $=D.reduce(i(x),{});_===!1&&($={});const{prevResolvedValues:N={}}=w,I={...N,...$},L=z=>{k=!0,p.has(z)&&(M=!0,p.delete(z)),w.needsAnimating[z]=!0;const G=e.getValue(z);G&&(G.liveStyle=!1)};for(const z in I){const G=$[z],U=N[z];if(m.hasOwnProperty(z))continue;let V=!1;cx(G)&&cx(U)?V=!w$(G,U):V=G!==U,V?G!=null?L(z):p.add(z):G!==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 v={};p.forEach(x=>{const w=e.getBaseTarget(x),S=e.getValue(x);S&&(S.liveStyle=!0),v[x]=w??null}),d.push({animation:v})}let g=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function s(l,c){var f;if(n[l].isActive===c)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,c)}),n[l].isActive=c;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=JA(),r=!0}}}function n9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!w$(t,e):!1}function Ka(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function JA(){return{animate:Ka(!0),whileInView:Ka(),whileHover:Ka(),whileTap:Ka(),whileDrag:Ka(),whileFocus:Ka(),exit:Ka()}}class Aa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class r9 extends Aa{constructor(t){super(t),t.animationState||(t.animationState=t9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();rg(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 i9=0;class o9 extends Aa{constructor(){super(...arguments),this.id=i9++}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 a9={animation:{Feature:r9},exit:{Feature:o9}},sD=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function ag(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const s9=e=>t=>sD(t)&&e(t,ag(t));function uo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function bo(e,t,n,r){return uo(e,t,s9(n),r)}const QA=(e,t)=>Math.abs(e-t);function l9(e,t){const n=QA(e.x,t.x),r=QA(e.y,t.y);return Math.sqrt(n**2+r**2)}class lD{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=Kv(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=l9(d.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:y}=d,{timestamp:g}=kn;this.history.push({...y,timestamp:g});const{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hv(p,this.transformPagePoint),yt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Kv(d.type==="pointercancel"?this.lastMoveEventInfo:Hv(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,v),y&&y(d,v)},!sD(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=ag(t),s=Hv(a,this.transformPagePoint),{point:l}=s,{timestamp:c}=kn;this.history=[{...l,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,Kv(s,this.history)),this.removeListeners=vo(bo(this.contextWindow,"pointermove",this.handlePointerMove),bo(this.contextWindow,"pointerup",this.handlePointerUp),bo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),xa(this.updatePoint)}}function Hv(e,t){return t?{point:t(e.point)}:e}function eP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kv({point:e},t){return{point:e,delta:eP(e,cD(t)),offset:eP(e,c9(t)),velocity:u9(t,.1)}}function c9(e){return e[0]}function cD(e){return e[e.length-1]}function u9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=cD(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Mi(t)));)n--;if(!r)return{x:0,y:0};const o=yo(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 uD(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const tP=uD("dragHorizontal"),nP=uD("dragVertical");function fD(e){let t=!1;if(e==="y")t=nP();else if(e==="x")t=tP();else{const n=tP(),r=nP();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function dD(){const e=fD(!0);return e?(e(),!1):!0}function pl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const hD=1e-4,f9=1-hD,d9=1+hD,pD=.01,h9=0-pD,p9=0+pD;function jr(e){return e.max-e.min}function m9(e,t,n){return Math.abs(e-t)<=n}function rP(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>=f9&&e.scale<=d9||isNaN(e.scale))&&(e.scale=1),(e.translate>=h9&&e.translate<=p9||isNaN(e.translate))&&(e.translate=0)}function Mu(e,t,n,r){rP(e.x,t.x,n.x,r?r.originX:void 0),rP(e.y,t.y,n.y,r?r.originY:void 0)}function iP(e,t,n){e.min=n.min+t.min,e.max=e.min+jr(t)}function g9(e,t,n){iP(e.x,t.x,n.x),iP(e.y,t.y,n.y)}function oP(e,t,n){e.min=t.min-n.min,e.max=e.min+jr(t)}function ju(e,t,n){oP(e.x,t.x,n.x),oP(e.y,t.y,n.y)}function y9(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ft(n,e,r.max):Math.min(e,n)),e}function aP(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 v9(e,{top:t,left:n,bottom:r,right:i}){return{x:aP(e.x,n,i),y:aP(e.y,t,r)}}function sP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Il(t.min,t.max-r,e.min):r>i&&(n=Il(e.min,e.max-i,t.min)),wa(0,1,n)}function w9(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 bx=.35;function _9(e=bx){return e===!1?e=0:e===!0&&(e=bx),{x:lP(e,"left","right"),y:lP(e,"top","bottom")}}function lP(e,t,n){return{min:cP(e,t),max:cP(e,n)}}function cP(e,t){return typeof e=="number"?e:e[t]||0}const uP=()=>({translate:0,scale:1,origin:0,originPoint:0}),ml=()=>({x:uP(),y:uP()}),fP=()=>({min:0,max:0}),Yt=()=>({x:fP(),y:fP()});function qr(e){return[e("x"),e("y")]}function mD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function S9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function O9(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 Gv(e){return e===void 0||e===1}function xx({scale:e,scaleX:t,scaleY:n}){return!Gv(e)||!Gv(t)||!Gv(n)}function Ja(e){return xx(e)||gD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function gD(e){return dP(e.x)||dP(e.y)}function dP(e){return e&&e!=="0%"}function hp(e,t,n){const r=e-n,i=t*r;return n+i}function hP(e,t,n,r,i){return i!==void 0&&(e=hp(e,i,r)),hp(e,n,r)+t}function wx(e,t=0,n=1,r,i){e.min=hP(e.min,t,n,r,i),e.max=hP(e.max,t,n,r,i)}function yD(e,{x:t,y:n}){wx(e.x,t.translate,t.scale,t.originPoint),wx(e.y,n.translate,n.scale,n.originPoint)}const pP=.999999999999,mP=1.0000000000001;function C9(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;spP&&(t.x=1),t.ypP&&(t.y=1)}function gl(e,t){e.min=e.min+t,e.max=e.max+t}function gP(e,t,n,r,i=.5){const o=Ft(e.min,e.max,i);wx(e,t,n,o,r)}function yl(e,t){gP(e.x,t.x,t.scaleX,t.scale,t.originX),gP(e.y,t.y,t.scaleY,t.scale,t.originY)}function vD(e,t){return mD(O9(e.getBoundingClientRect(),t))}function A9(e,t,n){const r=vD(e,n),{scroll:i}=t;return i&&(gl(r.x,i.offset.x),gl(r.y,i.offset.y)),r}const bD=({current:e})=>e?e.ownerDocument.defaultView:null,P9=new WeakMap;class T9{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=Yt(),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(ag(f,"page").point)},o=(f,d)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=fD(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(v=>{let x=this.getAxisMotionValue(v).get()||0;if(ji.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[v];S&&(x=jr(S)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&yt.postRender(()=>y(f,d)),yx(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(f,d)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:v}=d;if(m&&this.currentDirection===null){this.currentDirection=E9(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),g&&g(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:c}=this.getProps();this.panSession=new lD(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:bD(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&&yt.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||!gh(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=y9(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&&pl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=v9(i.layoutBox,n):this.constraints=!1,this.elastic=_9(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=w9(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!pl(t))return!1;const r=t.current;Ao(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=A9(r,i.root,this.visualElement.getTransformPagePoint());let a=b9(i.layout.layoutBox,o);if(n){const s=n(S9(a));this.hasMutatedConstraints=!!s,s&&(a=mD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=qr(f=>{if(!gh(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,y={type:"inertia",velocity:r?t[f]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(f,y)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yx(this.visualElement,t),r.start(d1(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(!gh(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(!pl(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]=x9({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(!gh(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(Ft(l,c,i[a]))})}addListeners(){if(!this.visualElement.current)return;P9.set(this.visualElement,this);const t=this.visualElement.current,n=bo(t,"pointerdown",l=>{const{drag:c,dragListener:f=!0}=this.getProps();c&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();pl(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()),yt.read(r);const a=uo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(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=bx,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function gh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function E9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class k9 extends Aa{constructor(t){super(t),this.removeGroupControls=In,this.removeListeners=In,this.controls=new T9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||In}unmount(){this.removeGroupControls(),this.removeListeners()}}const yP=e=>(t,n)=>{e&&yt.postRender(()=>e(t,n))};class M9 extends Aa{constructor(){super(...arguments),this.removePointerDownListener=In}onPointerDown(t){this.session=new lD(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bD(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:yP(t),onStart:yP(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&yt.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=bo(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 sg=O.createContext(null);function j9(){const e=O.useContext(sg);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 tf=O.createContext({}),xD=O.createContext({}),Kh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function vP(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ou={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Re.test(e))e=parseFloat(e);else return e;const n=vP(e,t.target.x),r=vP(e,t.target.y);return`${n}% ${r}%`}},N9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=_a.parse(e);if(i.length>5)return r;const o=_a.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 c=Ft(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=c),typeof i[3+a]=="number"&&(i[3+a]/=c),o(i)}},pp={};function $9(e){Object.assign(pp,e)}const{schedule:y1,cancel:jEe}=_$(queueMicrotask,!1);class D9 extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;$9(I9),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()})),Kh.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()||yt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),y1.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 wD(e){const[t,n]=j9(),r=O.useContext(tf);return P.jsx(D9,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(xD),isPresent:t,safeToRemove:n})}const I9={borderRadius:{...ou,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ou,borderTopRightRadius:ou,borderBottomLeftRadius:ou,borderBottomRightRadius:ou,boxShadow:N9},_D=["TopLeft","TopRight","BottomLeft","BottomRight"],R9=_D.length,bP=e=>typeof e=="string"?parseFloat(e):e,xP=e=>typeof e=="number"||Re.test(e);function L9(e,t,n,r,i,o){i?(e.opacity=Ft(0,n.opacity!==void 0?n.opacity:1,B9(r)),e.opacityExit=Ft(t.opacity!==void 0?t.opacity:1,0,F9(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(Il(e,t,r))}function _P(e,t){e.min=t.min,e.max=t.max}function Hr(e,t){_P(e.x,t.x),_P(e.y,t.y)}function SP(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function OP(e,t,n,r,i){return e-=t,e=hp(e,1/n,r),i!==void 0&&(e=hp(e,1/i,r)),e}function W9(e,t=0,n=1,r=.5,i,o=e,a=e){if(ji.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=OP(e.min,t,n,s,i),e.max=OP(e.max,t,n,s,i)}function CP(e,t,[n,r,i],o,a){W9(e,t[n],t[r],t[i],t.scale,o,a)}const z9=["x","scaleX","originX"],V9=["y","scaleY","originY"];function AP(e,t,n,r){CP(e.x,t,z9,n?n.x:void 0,r?r.x:void 0),CP(e.y,t,V9,n?n.y:void 0,r?r.y:void 0)}function PP(e){return e.translate===0&&e.scale===1}function OD(e){return PP(e.x)&&PP(e.y)}function TP(e,t){return e.min===t.min&&e.max===t.max}function U9(e,t){return TP(e.x,t.x)&&TP(e.y,t.y)}function EP(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function CD(e,t){return EP(e.x,t.x)&&EP(e.y,t.y)}function kP(e){return jr(e.x)/jr(e.y)}function MP(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class H9{constructor(){this.members=[]}add(t){h1(this.members,t),t.scheduleRender()}remove(t){if(p1(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 K9(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:c,rotate:f,rotateX:d,rotateY:p,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}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 G9=(e,t)=>e.depth-t.depth;class Y9{constructor(){this.children=[],this.isDirty=!1}add(t){h1(this.children,t),this.isDirty=!0}remove(t){p1(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G9),this.isDirty=!1,this.children.forEach(t)}}function Gh(e){const t=Un(e)?e.get():e;return Bq(t)?t.toValue():t}function q9(e,t){const n=Ni.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(xa(r),e(o-t))};return yt.read(r,!0),()=>xa(r)}function X9(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Z9(e,t,n){const r=Un(e)?e:ef(e);return r.start(d1("",r,t,n)),r.animation}const Qa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Su=typeof window<"u"&&window.MotionDebug!==void 0,Yv=["","X","Y","Z"],J9={visibility:"hidden"},jP=1e3;let Q9=0;function qv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function AD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=iD(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",yt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&AD(r)}function PD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=Q9++,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,Su&&(Qa.totalNodes=Qa.resolvedTargetDeltas=Qa.recalculatedProjection=0),this.nodes.forEach(n7),this.nodes.forEach(s7),this.nodes.forEach(l7),this.nodes.forEach(r7),Su&&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=q9(p,250),Kh.hasAnimatedSinceResize&&(Kh.hasAnimatedSinceResize=!1,this.nodes.forEach($P))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||f.getDefaultTransition()||h7,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=f.getProps(),w=!this.targetLayout||!CD(this.targetLayout,y)||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={...Jw(g,"layout"),onPlay:v,onComplete:x};(f.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else p||$P(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,xa(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(c7),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&&AD(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;DP(d.x,a.x,_),DP(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ju(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f7(this.relativeTarget,this.relativeTargetOrigin,p,_),S&&U9(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Yt()),Hr(S,this.relativeTarget)),g&&(this.animationValues=f,L9(f,c,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&&(xa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=yt.update(()=>{Kh.hasAnimatedSinceResize=!0,this.currentAnimation=Z9(0,jP,{...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(jP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:f}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&TD(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Yt();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}Hr(s,l),yl(s,f),Mu(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new H9),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&qv("z",a,c,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(NP),this.root.sharedNodes.clear()}}}function e7(e){e.updateLayout()}function t7(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}):TD(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=ml();Mu(s,r,n.layoutBox);const l=ml();a?Mu(l,e.applyTransform(i,!0),n.measuredBox):Mu(l,r,n.layoutBox);const c=!OD(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 y=Yt();ju(y,n.layoutBox,p.layoutBox);const g=Yt();ju(g,r,m.layoutBox),CD(y,g)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function n7(e){Su&&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 r7(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function i7(e){e.clearSnapshot()}function NP(e){e.clearMeasurements()}function o7(e){e.isLayoutDirty=!1}function a7(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function $P(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function s7(e){e.resolveTargetDelta()}function l7(e){e.calcProjection()}function c7(e){e.resetSkewAndRotation()}function u7(e){e.removeLeadSnapshot()}function DP(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 IP(e,t,n,r){e.min=Ft(t.min,n.min,r),e.max=Ft(t.max,n.max,r)}function f7(e,t,n,r){IP(e.x,t.x,n.x,r),IP(e.y,t.y,n.y,r)}function d7(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const h7={duration:.45,ease:[.4,0,.1,1]},RP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),LP=RP("applewebkit/")&&!RP("chrome/")?Math.round:In;function BP(e){e.min=LP(e.min),e.max=LP(e.max)}function p7(e){BP(e.x),BP(e.y)}function TD(e,t,n){return e==="position"||e==="preserve-aspect"&&!m9(kP(t),kP(n),.2)}function m7(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const g7=PD({attachResizeListener:(e,t)=>uo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xv={current:void 0},ED=PD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xv.current){const e=new g7({});e.mount(window),e.setOptions({layoutScroll:!0}),Xv.current=e}return Xv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),y7={pan:{Feature:M9},drag:{Feature:k9,ProjectionNode:ED,MeasureLayout:wD}};function FP(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||dD())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[r];l&&yt.postRender(()=>l(o,a))};return bo(e.current,n,i,{passive:!e.getProps()[r]})}class v7 extends Aa{mount(){this.unmount=vo(FP(this.node,!0),FP(this.node,!1))}unmount(){}}class b7 extends Aa{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=vo(uo(this.node.current,"focus",()=>this.onFocus()),uo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const kD=(e,t)=>t?e===t?!0:kD(e,t.parentElement):!1;function Zv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,ag(n))}class x7 extends Aa{constructor(){super(...arguments),this.removeStartListeners=In,this.removeEndListeners=In,this.removeAccessibleListeners=In,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=bo(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:f,globalTapTarget:d}=this.node.getProps(),p=!d&&!kD(this.node.current,s.target)?f:c;p&&yt.update(()=>p(s,l))},{passive:!(r.onTap||r.onPointerUp)}),a=bo(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=vo(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,c)=>{const{onTap:f}=this.node.getProps();f&&yt.postRender(()=>f(l,c))})};this.removeEndListeners(),this.removeEndListeners=uo(this.node.current,"keyup",a),Zv("down",(s,l)=>{this.startPress(s,l)})},n=uo(this.node.current,"keydown",t),r=()=>{this.isPressing&&Zv("cancel",(o,a)=>this.cancelPress(o,a))},i=uo(this.node.current,"blur",r);this.removeAccessibleListeners=vo(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&&yt.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!dD()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&yt.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=bo(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=uo(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=vo(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const _x=new WeakMap,Jv=new WeakMap,w7=e=>{const t=_x.get(e.target);t&&t(e)},_7=e=>{e.forEach(w7)};function S7({root:e,...t}){const n=e||document;Jv.has(n)||Jv.set(n,{});const r=Jv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(_7,{root:e,...t})),r[i]}function O7(e,t,n){const r=S7(t);return _x.set(e,n),r.observe(e),()=>{_x.delete(e),r.unobserve(e)}}const C7={some:0,all:1};class A7 extends Aa{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:C7[i]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=c?f:d;p&&p(l)};return O7(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(P7(t,n))&&this.startObserver()}unmount(){}}function P7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const T7={inView:{Feature:A7},tap:{Feature:x7},focus:{Feature:b7},hover:{Feature:v7}},E7={layout:{ProjectionNode:ED,MeasureLayout:wD}},v1=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),lg=O.createContext({}),b1=typeof window<"u",x1=b1?O.useLayoutEffect:O.useEffect,MD=O.createContext({strict:!1});function k7(e,t,n,r,i){var o,a;const{visualElement:s}=O.useContext(lg),l=O.useContext(MD),c=O.useContext(sg),f=O.useContext(v1).reducedMotion,d=O.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,m=O.useContext(xD);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&M7(d.current,n,i,m);const y=O.useRef(!1);O.useInsertionEffect(()=>{p&&y.current&&p.update(n,c)});const g=n[rD],v=O.useRef(!!g&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,g))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,g)));return x1(()=>{p&&(y.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),y1.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())}),O.useEffect(()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}),v.current=!1))}),p}function M7(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:jD(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&pl(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function jD(e){if(e)return e.options.allowProjection!==!1?e.projection:jD(e.parent)}function j7(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):pl(n)&&(n.current=r))},[t])}function cg(e){return rg(e.animate)||Zw.some(t=>Zu(e[t]))}function ND(e){return!!(cg(e)||e.variants)}function N7(e,t){if(cg(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Zu(n)?n:void 0,animate:Zu(r)?r:void 0}}return e.inherit!==!1?t:{}}function $7(e){const{initial:t,animate:n}=N7(e,O.useContext(lg));return O.useMemo(()=>({initial:t,animate:n}),[WP(t),WP(n)])}function WP(e){return Array.isArray(e)?e.join(" "):e}const zP={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"]},Rl={};for(const e in zP)Rl[e]={isEnabled:t=>zP[e].some(n=>!!t[n])};function D7(e){for(const t in e)Rl[t]={...Rl[t],...e[t]}}const I7=Symbol.for("motionComponentSymbol");function R7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&D7(e);function o(s,l){let c;const f={...O.useContext(v1),...s,layoutId:L7(s)},{isStatic:d}=f,p=$7(s),m=r(s,d);if(!d&&b1){B7(f,e);const y=F7(f);c=y.MeasureLayout,p.visualElement=k7(i,m,f,t,y.ProjectionNode)}return P.jsxs(lg.Provider,{value:p,children:[c&&p.visualElement?P.jsx(c,{visualElement:p.visualElement,...f}):null,n(i,s,j7(m,p.visualElement,l),m,d,p.visualElement)]})}const a=O.forwardRef(o);return a[I7]=i,a}function L7({layoutId:e}){const t=O.useContext(tf).id;return t&&e!==void 0?t+"-"+e:e}function B7(e,t){const n=O.useContext(MD).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?vc(!1,r):Ao(!1,r)}}function F7(e){const{drag:t,layout:n}=Rl;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 W7=["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 w1(e){return typeof e!="string"||e.includes("-")?!1:!!(W7.indexOf(e)>-1||/[A-Z]/u.test(e))}function $D(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 DD=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 ID(e,t,n,r){$D(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(DD.has(i)?i:g1(i),t.attrs[i])}function RD(e,{layout:t,layoutId:n}){return Ms.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pp[e]||e==="opacity")}function _1(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Un(i[a])||t.style&&Un(t.style[a])||RD(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 LD(e,t,n){const r=_1(e,t,n);for(const i in e)if(Un(e[i])||Un(t[i])){const o=Zf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function S1(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}function z7({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:V7(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const BD=e=>(t,n)=>{const r=O.useContext(lg),i=O.useContext(sg),o=()=>z7(e,t,r,i);return n?o():S1(o)};function V7(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=Gh(o[p]);let{initial:a,animate:s}=e;const l=cg(e),c=ND(e);t&&c&&!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"&&!rg(d)){const p=Array.isArray(d)?d:[d];for(let m=0;m({style:{},transform:{},transformOrigin:{},vars:{}}),FD=()=>({...O1(),attrs:{}}),WD=(e,t)=>t&&typeof e=="number"?t.transform(e):e,U7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},H7=Zf.length;function K7(e,t,n){let r="",i=!0;for(let o=0;otypeof e=="string"&&e.toLowerCase()==="svg",Z7={useVisualState:BD({scrapeMotionValuesFromProps:LD,createRenderState:FD,onMount:(e,t,{renderState:n,latestValues:r})=>{yt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),yt.render(()=>{A1(n,r,P1(t.tagName),e.transformTemplate),ID(t,n)})}})},J7={useVisualState:BD({scrapeMotionValuesFromProps:_1,createRenderState:O1})};function zD(e,t,n){for(const r in t)!Un(t[r])&&!RD(r,n)&&(e[r]=t[r])}function Q7({transformTemplate:e},t){return O.useMemo(()=>{const n=O1();return C1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function eX(e,t){const n=e.style||{},r={};return zD(r,n,e),Object.assign(r,Q7(e,t)),r}function tX(e,t){const n={},r=eX(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 nX=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 mp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nX.has(e)}let VD=e=>!mp(e);function rX(e){e&&(VD=t=>t.startsWith("on")?!mp(t):e(t))}try{rX(require("@emotion/is-prop-valid").default)}catch{}function iX(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(VD(i)||n===!0&&mp(i)||!t&&!mp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function oX(e,t,n,r){const i=O.useMemo(()=>{const o=FD();return A1(o,t,P1(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};zD(o,e.style,e),i.style={...o,...i.style}}return i}function aX(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(w1(n)?oX:tX)(r,o,a,n),c=iX(r,typeof n=="string",e),f=n!==O.Fragment?{...c,...l,ref:i}:{},{children:d}=r,p=O.useMemo(()=>Un(d)?d.get():d,[d]);return O.createElement(n,{...f,children:p})}}function sX(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...w1(r)?Z7:J7,preloadedFeatures:e,useRender:aX(i),createVisualElement:t,Component:r};return R7(a)}}const Sx={current:null},UD={current:!1};function lX(){if(UD.current=!0,!!b1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Sx.current=e.matches;e.addListener(t),t()}else Sx.current=!1}function cX(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"&&ng(i.version==="11.11.17",`Attempting to mix Motion versions ${i.version} with 11.11.17 may not work as expected.`);else if(Un(o))e.addValue(r,ef(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,ef(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const UP=new WeakMap,uX=[...R$,Wn,_a],fX=e=>uX.find(I$(e)),HP=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dX{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=n1,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=Ni.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),UD.current||lX(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Sx.current,process.env.NODE_ENV!=="production"&&ng(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(){UP.delete(this.current),this.projection&&this.projection.unmount(),xa(this.notifyUpdate),xa(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=Ms.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&yt.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 Rl){const n=Rl[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):Yt()}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=ef(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"&&(j$(i)||M$(i))?i=parseFloat(i):!fX(i)&&_a.test(n)&&(i=H$(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=qw(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 m1),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class HD extends dX{constructor(){super(...arguments),this.KeyframeResolver=K$}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 hX(e){return window.getComputedStyle(e)}class pX extends HD{constructor(){super(...arguments),this.type="html",this.renderInstance=$D}readValueFromInstance(t,n){if(Ms.has(n)){const r=a1(n);return r&&r.default||0}else{const r=hX(t),i=($$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return vD(t,n)}build(t,n,r){C1(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return _1(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 mX extends HD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ms.has(n)){const r=a1(n);return r&&r.default||0}return n=DD.has(n)?n:g1(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return LD(t,n,r)}build(t,n,r){A1(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){ID(t,n,r,i)}mount(t){this.isSVGTag=P1(t.tagName),super.mount(t)}}const gX=(e,t)=>w1(e)?new mX(t):new pX(t,{allowProjection:e!==O.Fragment}),yX=sX({...a9,...T7,...y7,...E7},gX),dn=ZG(yX);class vX extends te.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 bX({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(v1);return O.useInsertionEffect(()=>{const{width:a,height:s,top:l,left:c}=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: ${c}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),P.jsx(vX,{isPresent:t,childRef:r,sizeRef:i,children:te.cloneElement(e,{ref:r})})}const xX=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=S1(wX),l=O.useId(),c=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:c,register:d=>(s.set(d,!1),()=>s.delete(d))}),o?[Math.random(),c]:[n,c]);return O.useMemo(()=>{s.forEach((d,p)=>s.set(p,!1))},[n]),te.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=P.jsx(bX,{isPresent:n,children:e})),P.jsx(sg.Provider,{value:f,children:e})};function wX(){return new Map}const yh=e=>e.key||"";function KP(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const js=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{Ao(!t,"Replace exitBeforeEnter with mode='wait'");const s=O.useMemo(()=>KP(e),[e]),l=s.map(yh),c=O.useRef(!0),f=O.useRef(s),d=S1(()=>new Map),[p,m]=O.useState(s),[y,g]=O.useState(s);x1(()=>{c.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(tf);return P.jsx(P.Fragment,{children:y.map(w=>{const S=yh(w),A=s===y||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(),g(f.current),i&&i())};return P.jsx(xX,{isPresent:A,initial:!c.current||r?void 0:!1,custom:A?void 0:n,presenceAffectsLayout:o,mode:a,onExitComplete:A?void 0:_,children:w},S)})})},_X=O.createContext(null);function SX(){const e=O.useRef(!1);return x1(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function OX(){const e=SX(),[t,n]=O.useState(0),r=O.useCallback(()=>{e.current&&n(t+1)},[t]);return[O.useCallback(()=>yt.postRender(r),[r]),t]}const CX=e=>!e.isLayoutDirty&&e.willUpdate(!1);function GP(){const e=new Set,t=new WeakMap,n=()=>e.forEach(CX);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const i=t.get(r);i&&(i(),t.delete(r)),n()},dirty:n}}const KD=e=>e===!0,AX=e=>KD(e===!0)||e==="id",PX=({children:e,id:t,inherit:n=!0})=>{const r=O.useContext(tf),i=O.useContext(_X),[o,a]=OX(),s=O.useRef(null),l=r.id||i;s.current===null&&(AX(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:KD(n)&&r.group||GP()});const c=O.useMemo(()=>({...s.current,forceRender:o}),[a]);return P.jsx(tf.Provider,{value:c,children:e})},TX=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function EX(...e){const t=O.useRef(0),[n,r]=O.useState(e[t.current]),i=O.useCallback(o=>{t.current=typeof o!="number"?TX(0,e.length,t.current+1):o,r(e[t.current])},[e.length,...e]);return[n,i]}const GD=O.createContext({}),YD=()=>O.useContext(GD),qD=O.createContext(null),kX=()=>O.useContext(qD),XD=({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 c=Wi(),f=YD(),d=(f==null?void 0:f.activeItem)||t,p=O.useCallback((C,E)=>{n&&n({event:C,value:E})},[n]);let m="rounded-full",y="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"?m="rounded-md":a==="underline"&&(m="rounded-none",y="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 _=K(`box-border [&>*]:box-border flex items-center ${l==="full"?"w-full":""} ${o==="vertical"?"flex-col":""}`,m,y,g,v,a!=="underline"?"bg-tab-background":"",r);return P.jsx("div",{className:_,children:P.jsx(qD.Provider,{value:{activeItem:d,onChange:p,size:i,variant:a,orientation:o,iconPosition:s,width:l},children:P.jsx(PX,{id:c,children:O.Children.map(e,C=>O.isValidElement(C)?O.cloneElement(C):null)})})})};XD.displayName="Tabs.Group";const ZD=O.forwardRef(({slug:e,text:t,icon:n,className:r,disabled:i=!1,badge:o=null,...a},s)=>{const l=kX();if(!l)throw new Error("Tab should be used inside Tabs Group");const{activeItem:c,onChange:f,size:d,variant:p,orientation:m,iconPosition:y,width:g}=l,v={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=K("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200",g==="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=K(S,A,_,"hover:text-text-primary group","focus:outline-none",v,c===e?"bg-background-primary text-text-primary shadow-sm":"",i?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),$=K("flex items-center gap-1 group-hover:text-text-primary",i&&"group-hover:text-text-disabled"),N=I=>{f(I,{slug:e,text:t})};return P.jsxs(dn.button,{ref:s,className:D,disabled:i,onClick:N,...a,layoutRoot:!0,children:[c===e&&p==="underline"&&P.jsx(dn.span,{layoutId:"underline",layoutDependency:c,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),P.jsxs("span",{className:$,children:[y==="left"&&n&&P.jsx("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,y==="right"&&n&&P.jsx("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),o&&O.isValidElement(o)&&o]})});ZD.displayName="Tabs.Tab";const ug=({activeItem:e,children:t})=>P.jsx(GD.Provider,{value:{activeItem:e},children:t}),JD=({slug:e,children:t})=>{const n=YD();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?P.jsx(P.Fragment,{children:t}):null};JD.displayName="Tabs.Panel";ug.Group=XD;ug.Tab=ZD;ug.Panel=JD;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:"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:"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:"size-5",label:"text-base font-medium"}},vh={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"},MX="h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",jX={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},Yh=e=>{var t;return typeof e=="string"?e:typeof e=="object"&&"textContent"in e?((t=e.textContent)==null?void 0:t.toString().toLowerCase())||"":typeof e=="object"&&"children"in e?Yh(e.children):""},QD=O.createContext({}),fg=()=>O.useContext(QD);function eI({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:i,label:o,className:a,...s}){var M,D;const{sizeValue:l,getReferenceProps:c,getValues:f,selectId:d,refs:p,isOpen:m,multiple:y,combobox:g,setSelected:v,onChange:x,isControlled:w,disabled:S,by:A}=fg(),_={sm:"xs",md:"sm",lg:"md"}[l],C=O.useCallback(()=>{if(t)return t;const $="text-field-placeholder "+vh.icon;return g?P.jsx(TH,{className:$}):P.jsx($w,{className:$})},[t]),E=O.useCallback(()=>{const $=f();if(!$)return null;if(y)return $.map((I,L)=>P.jsx(Xf,{className:"cursor-default",icon:r,type:"rounded",size:_,onMouseDown:k(I),label:typeof i=="function"?i(I):I.toString(),closable:!0,disabled:S},L));let N=typeof $=="string"?$:"";if(typeof i=="function"&&(N=i($)),typeof e=="function"&&typeof i!="function"){const I={value:$,...y?{onClose:k($)}:{}};N=e(I)}return(O.isValidElement(e)||typeof e=="string")&&typeof i!="function"&&(N=e),P.jsx("span",{className:K("truncate",fi[l].displaySelected,vh.text),children:N})},[f,S]),k=$=>N=>{N==null||N.preventDefault(),N==null||N.stopPropagation();const I=[...f()??[]],L=I.findIndex(F=>F!==null&&$!==null&&typeof F=="object"?F[A]===$[A]:F===$);L!==-1&&(I.splice(L,1),w||v(I),typeof x=="function"&&x(I))};return P.jsxs("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!o&&P.jsx("label",{className:K((M=fi[l])==null?void 0:M.label,"text-field-label"),htmlFor:d,children:o}),P.jsxs("button",{id:d,ref:p.setReference,className:K("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!m&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",fi[l].selectButton,y&&fi[l].multiSelect,vh.selectButton,a),tabIndex:0,disabled:S,...s,...c(),children:[P.jsxs("div",{className:K("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",f()&&"flex flex-wrap"),children:[E(),(y?!((D=f())!=null&&D.length):!f())&&P.jsx("div",{className:K("[grid-area:1/1/2/3] text-field-input px-1",fi[l].displaySelected,vh.text),children:n})]}),P.jsx("div",{className:K("flex items-center [&>svg]:shrink-0",fi[l].icon),children:C()})]})]})}function vl({label:e,children:t,className:n,...r}){const{index:i,totalGroups:o}=r,{sizeValue:a}=fg(),s={sm:"text-xs",md:"text-xs",lg:"text-sm"};return P.jsxs(O.Fragment,{children:[P.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e,children:[P.jsx("div",{className:K("p-2 font-normal text-text-tertiary",s[a],n),id:`group-${e==null?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:e}),P.jsx("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e==null?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),i0)&&P.jsx("hr",{className:K(MX,jX[a])})]})}function tI({children:e,className:t}){const{isOpen:n,context:r,refs:i,combobox:o,floatingStyles:a,getFloatingProps:s,sizeValue:l,setSearchKeyword:c,setActiveIndex:f,setSelectedIndex:d,value:p,selected:m,getValues:y,searchKeyword:g,listContentRef:v,by:x,searchPlaceholder:w,activeIndex:S}=fg(),A=O.useMemo(()=>{const E=y();let k=-1;if(E){let M=O.Children.toArray(e);M.length>0&&O.isValidElement(M[0])&&M[0].type===vl&&(M=O.Children.toArray(e).map(D=>O.isValidElement(D)?O.Children.toArray(D.props.children):[]).flat()),k=M.findIndex(D=>{if(!O.isValidElement(D))return!1;const $=D.props.value;return typeof $=="object"&&typeof E=="object"?$[x]===E[x]:$===E})}return k},[p,m,e,x]);O.useLayoutEffect(()=>{n||(f(A),d(A))},[A,n]),O.useLayoutEffect(()=>{n&&(o&&[-1,null].includes(S)||f(-1))},[g,n]);const _=O.useMemo(()=>{let E=0,k=0;O.Children.forEach(e,N=>{O.isValidElement(N)&&N.type===vl&&O.Children.toArray(N.props.children).some(L=>{var F;if(!O.isValidElement(L))return!1;if(g){const W=(F=Yh(L.props.children))==null?void 0:F.toLowerCase(),z=g.toLowerCase();return W.includes(z)}return!0})&&E++}),k=Math.max(0,E-1);let M=0,D=0;const $=N=>{var I,L;if(!O.isValidElement(N))return null;if(N.type===vl){const F=O.Children.map(N.props.children,$);if(!(F==null?void 0:F.some(G=>G!==null)))return null;const z={...N.props,children:F,index:D,totalGroups:k};return D++,O.cloneElement(N,z)}if(g){const F=(L=Yh((I=N.props)==null?void 0:I.children))==null?void 0:L.toLowerCase(),W=g.toLowerCase();if(!(F==null?void 0:F.includes(W)))return null}return O.cloneElement(N,{...N.props,index:M++})};return O.Children.map(e,$)},[g,p,m,e]),C=O.Children.count(_);return O.useEffect(()=>{v.current=[];let E=O.Children.toArray(e);E&&O.isValidElement(E[0])&&E[0].type===vl&&(E=O.Children.toArray(E).map(k=>O.isValidElement(k)?k.props.children:null).filter(Boolean)),O.Children.forEach(E,k=>{var D,$;if(!O.isValidElement(k))return;const M=($=Yh((D=k.props)==null?void 0:D.children))==null?void 0:$.toLowerCase();if(g){const N=g.toLowerCase();if(!(M==null?void 0:M.includes(N)))return}v.current.push(M)})},[g]),P.jsx(P.Fragment,{children:n&&P.jsx(P.Fragment,{children:P.jsx(CG,{context:r,modal:!1,children:P.jsxs("div",{ref:i.setFloating,className:K("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",o&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",fi[l].dropdown,!o&&"h-auto",o?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...a},...s(),children:[o&&P.jsxs("div",{className:K(fi[l].searchbarWrapper),children:[P.jsx(RN,{className:K("text-icon-secondary shrink-0",fi[l].searchbarIcon)}),P.jsx("input",{className:K("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",fi[l].searchbar),type:"search",name:"keyword",placeholder:w,onChange:E=>c(E.target.value),value:g,autoComplete:"off"})]}),P.jsxs("div",{className:K("overflow-y-auto overflow-x-hidden",!o&&"w-full h-full",fi[l].dropdownItemsWrapper),children:[!!C&&_,!C&&P.jsx("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function nI({children:e,root:t,id:n}){return P.jsx(Xm,{id:n,root:t,children:e})}function rI({value:e,selected:t,children:n,className:r,...i}){const{sizeValue:o,getItemProps:a,onKeyDownItem:s,onClickItem:l,activeIndex:c,selectedIndex:f,updateListRef:d,getValues:p,by:m,multiple:y}=fg(),{index:g}=i,v=O.useRef(g),x={sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},w={sm:"size-4",md:"size-4",lg:"size-5"},S=O.useMemo(()=>{if(!y)return!1;const _=p();return _?_.some(C=>C!==null&&e!==null&&typeof C=="object"?C[m]===e[m]:C===e):!1},[e,p]),A=O.useMemo(()=>typeof t=="boolean"?t:y?S:g===f,[S,f,t]);return P.jsxs("div",{className:K("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",x[o],g===c&&"bg-button-tertiary-hover",r),ref:_=>{d(g,_)},role:"option",tabIndex:g===c?0:-1,"aria-selected":A&&g===c,...a({onClick(){l(v.current,e)},onKeyDown(_){s(_,v.current,e)}}),children:[P.jsx("span",{className:"w-full truncate",children:n}),A&&P.jsx(Hf,{className:K("text-icon-on-color-disabled",w[o])})]})}const xc=({id:e,size:t="md",value:n,defaultValue:r,onChange:i,by:o="id",children:a,multiple:s=!1,combobox:l=!1,disabled:c=!1,searchPlaceholder:f="Search..."})=>{const d=O.useMemo(()=>e||`select-${Wi()}`,[e]),p=O.useMemo(()=>typeof n<"u",[n]),[m,y]=O.useState(r),[g,v]=O.useState(""),x=O.useCallback(()=>p?n:m,[p,n,m]),[w,S]=O.useState(!1),[A,_]=O.useState(null),[C,E]=O.useState(null),k={sm:l?256:172,md:l?256:216,lg:l?256:216},{refs:M,floatingStyles:D,context:$}=Jm({placement:"bottom-start",open:w,onOpenChange:S,whileElementsMounted:Um,middleware:[Hm(5),Km({padding:10}),r$({apply({rects:ne,elements:J,availableHeight:fe}){Object.assign(J.floating.style,{maxHeight:`min(${fe}px, ${k[t]}px)`,maxWidth:`${ne.reference.width}px`})},padding:10})]}),N=O.useRef([]),I=O.useRef([]),L=O.useRef(!1),F=Kw($,{event:"mousedown"}),W=Zm($),z=Gw($,{role:"listbox"}),G=MG($,{listRef:N,activeIndex:A,selectedIndex:C,onNavigate:_,loop:!0}),U=DG($,{listRef:I,activeIndex:A,selectedIndex:C,onMatch:w?_:E,onTypingChange(ne){L.current=ne}}),{getReferenceProps:V,getFloatingProps:Y,getItemProps:ee}=Qm([W,z,G,F,...l?[]:[U]]),ie=(ne,J)=>{const fe=[...x()??[]];fe.findIndex(X=>X!==null&&J!==null&&typeof X=="object"?X[o]===J[o]:X===J)===-1&&(fe.push(J),p||y(fe),E(ne),M.reference.current.focus(),S(!1),v(""),typeof i=="function"&&i(fe))},re=(ne,J)=>{if(s)return ie(ne,J);E(ne),p||y(J),M.reference.current.focus(),S(!1),v(""),typeof i=="function"&&i(J)},le=O.useCallback((ne,J)=>{N.current[ne]=J},[]),ae=(ne,J)=>{re(ne,J)},ue=(ne,J,fe)=>{ne.key==="Enter"&&(ne.preventDefault(),re(J,fe)),ne.key===" "&&!L.current&&(ne.preventDefault(),re(J,fe))};return P.jsx(QD.Provider,{value:{selectedIndex:C,setSelectedIndex:E,activeIndex:A,setActiveIndex:_,selected:m,setSelected:y,handleSelect:re,combobox:l,sizeValue:t,multiple:s,onChange:i,isTypingRef:L,getItemProps:ee,onClickItem:ae,onKeyDownItem:ue,getValues:x,selectId:d,getReferenceProps:V,isOpen:w,value:n,updateListRef:le,refs:M,listContentRef:I,by:o,getFloatingProps:Y,floatingStyles:D,context:$,searchKeyword:g,setSearchKeyword:v,disabled:c,isControlled:p,searchPlaceholder:f},children:a})};nI.displayName="Select.Portal";eI.displayName="Select.Button";tI.displayName="Select.Options";rI.displayName="Select.Option";vl.displayName="Select.OptionGroup";xc.Portal=nI;xc.Button=eI;xc.Options=tI;xc.Option=rI;xc.OptionGroup=vl;let NX=1;var sr,Ci;class $X{constructor(){Tv(this,sr);Tv(this,Ci);Ha(this,sr,[]),Ha(this,Ci,[])}subscribe(t){return wr(this,Ci).push(t),()=>{Ha(this,Ci,wr(this,Ci).filter(n=>n!==t))}}publish(t){wr(this,Ci).forEach(n=>n(t))}add(t){wr(this,sr).push(t),this.publish(t)}remove(t){return Ha(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:NX++;return wr(this,sr).find(l=>l.id===a)&&Ha(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}Ha(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,Ci).forEach(r=>r({id:n.id,dismiss:!0}))),wr(this,Ci).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,Ci=new WeakMap;const yn=new $X,DX=(e,t)=>yn.default(e,t),IX=Object.seal(Object.assign(DX,{success:yn.success.bind(yn),error:yn.error.bind(yn),warning:yn.warning.bind(yn),info:yn.info.bind(yn),custom:yn.custom.bind(yn),dismiss:yn.dismiss.bind(yn),update:yn.update.bind(yn)},{getHistory:yn.history.bind(yn)}));let YP=!1;const RX=e=>O.memo(n=>{const r=n.singleTon;return YP&&r?null:(YP=!0,P.jsx(e,{...n}))}),qP={"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"},XP={stack:"w-[22.5rem]",inline:"lg:w-[47.5rem] w-full"},bh={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"},xh={light:"text-icon-secondary",dark:"text-icon-inverse"},LX=({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(()=>{yn.subscribe(c=>{if(c!=null&&c.dismiss){s(f=>f.map(d=>d.id===c.id?{...d,dismiss:!0}:d));return}setTimeout(()=>{Nl.flushSync(()=>s(f=>f.findIndex(p=>p.id===c.id)!==-1?f.map(p=>p.id===c.id?{...p,...c}:p):[...f,c]))})})},[]);const l=c=>{s(f=>f.filter(d=>d.id!==c))};return P.jsx("ul",{className:K("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",qP[e]??qP["top-right"],r),children:P.jsx(js,{initial:!1,children:a.map(c=>P.jsx(dn.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-${c.id}`,children:P.jsx(BX,{toastItem:c,title:c.title,content:c==null?void 0:c.description,icon:(c==null?void 0:c.icon)??void 0,design:(c==null?void 0:c.design)??t,autoDismiss:(c==null?void 0:c.autoDismiss)??i,dismissAfter:(c==null?void 0:c.dismissAfter)??o,removeToast:l,variant:c.type,theme:(c==null?void 0:c.theme)??n})},c.id))})})},BX=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:i=5e3,theme:o="light",design:a="stack",icon:s,variant:l="neutral",removeToast:c})=>{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 c=="function"&&c(M.id)},D)},y=()=>{clearTimeout(p.current),d.current=new Date().getTime()},g=()=>{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 c!="function"||c(e.id)},[e]);const v=()=>{var M,D;typeof c=="function"&&((D=(M=e==null?void 0:e.action)==null?void 0:M.onClick)==null||D.call(M,()=>c(e.id)))};let x=null;return a==="stack"&&(x=P.jsx("div",{className:K("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?bh.dark:(w=bh.light)==null?void 0:w[l],XP.stack),onMouseEnter:y,onMouseLeave:g,children:e.type!=="custom"?P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ap({variant:l,icon:s,theme:o})}),P.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[sp({title:t,theme:o}),lp({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"&&P.jsx("div",{className:"mt-2.5",children:ax({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:v,theme:o})})]}),P.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:P.jsx("button",{className:K("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",xh[o]??xh.light),onClick:()=>{typeof c=="function"&&c(e.id)},children:P.jsx(ga,{})})})]}):(E=e==null?void 0:e.jsx)==null?void 0:E.call(e,{close:()=>c(e.id),action:e!=null&&e.action?{...e==null?void 0:e.action,onClick:v}:null})})),a==="inline"&&(x=P.jsxs("div",{className:K("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?bh.dark:(k=bh.light)==null?void 0:k[l],XP.inline),children:[P.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ap({variant:l,icon:s,theme:o})}),P.jsxs("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[sp({title:t,theme:o}),lp({content:n,theme:o})]}),P.jsx("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:P.jsx("button",{className:K("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",xh[o]??xh.light),onClick:()=>c(e.id),children:P.jsx(ga,{})})})]})),x},FX=RX(LX),WX={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"}},iI={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"}},oI={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"}},aI={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"}},zX={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"}},VX={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"}},UX={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"}},sI={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"}},lI={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"}},cI={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"}},uI={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"}},HX={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"}},KX={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"}},GX={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"}},YX={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"}},qX={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},XX={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,c;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(((c=t==null?void 0:t[r])==null?void 0:c[n])??"");break}return i.join(" ")},gp=({className:e,cols:t,gap:n,gapX:r,gapY:i,align:o,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:f=!1,autoCols:d=!1,children:p,...m})=>{const y=It(t,WX,1),g=It(n,iI,"sm"),v=It(r,oI,""),x=It(i,aI,""),w=It(o,lI,""),S=It(a,sI,""),A=It(s,UX,"");return P.jsx("div",{className:K("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":d,"auto-rows-auto":f},y,g,v,x,w,S,A,e),...m,children:p})},ZX=({className:e,children:t,colSpan:n,colStart:r,alignSelf:i,justifySelf:o,...a})=>{const s=It(n,zX,0),l=It(r,VX,0),c=It(i,cI,""),f=It(o,uI,"");return P.jsx("div",{className:K(s,l,c,f,e),...a,children:t})};gp.Item=ZX;const Ox=O.createContext({}),JX=()=>O.useContext(Ox),T1=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:i,justify:o,align:a,wrap:s,cols:l,className:c,children:f,...d})=>{if(e==="grid")return P.jsx(Ox.Provider,{value:{containerType:e},children:P.jsx(gp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d})});const p=It(s,KX,""),m=It(t,iI,"sm"),y=It(n,oI,""),g=It(r,aI,""),v=It(i,HX,""),x=It(o,sI,""),w=It(a,lI,""),S=K("flex",p,m,y,g,v,x,w,c),A=()=>e==="flex"?P.jsx("div",{className:S,children:f}):P.jsx(gp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d});return P.jsx(Ox.Provider,{value:{containerType:e,cols:l},children:A()})},fI=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:i,className:o,children:a,...s})=>{const{containerType:l,cols:c}=JX();if(l==="grid")return P.jsx(gp.Item,{className:o,alignSelf:r,justifySelf:i,children:a,...s});const f=It(r,cI,""),d=It(i,uI,""),p=It(e,qX,0),m=It(t,XX,0),y=It(n,YX,0),g=It(c,GX,1);return P.jsx("div",{className:K("box-border",p,m,y,f,d,g,o),children:a})};T1.Item=fI;T1.displayName="Container";fI.displayName="Container.Item";const QX=({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,y;const c=()=>{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 g;(g=l==null?void 0:l.onClick)==null||g.call(l,c)};return e==="stack"?P.jsx("div",{className:K("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:P.jsxs(P.Fragment,{children:[P.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ap({variant:n,icon:a,theme:t})}),P.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[sp({title:i,theme:t}),lp({content:o,theme:t}),(l==null?void 0:l.label)&&typeof(l==null?void 0:l.onClick)=="function"&&P.jsx("div",{className:"mt-2.5",children:ax({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})})]}),P.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:P.jsx("button",{className:K("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",d[t]??d.light),onClick:()=>c(),"aria-label":"Close alert",children:P.jsx(ga,{})})})]})}):P.jsxs("div",{className:K("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg",t==="dark"?f.dark:(y=f.light)==null?void 0:y[n],r),children:[P.jsxs("div",{className:"flex items-center justify-start gap-2",children:[P.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:ap({variant:n,icon:a,theme:t})}),P.jsxs("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[sp({title:i,theme:t,inline:!0}),lp({content:o,theme:t,inline:!0})]})]}),P.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"&&P.jsx("div",{className:"self-center flex h-5",children:ax({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})}),typeof s=="function"&&P.jsx("button",{className:K("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:()=>c(),"aria-label":"Close alert",children:P.jsx(ga,{})})]})]})};function eZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tZ=eZ(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 iZ(e){return{}}const E1={},oZ={},ps={},Pl={},Cx={},Tl={},k1={},Ax={},nf={},rf={},as={},M1={},j1={},hI={},N1={},aZ={},$1={},sZ={},pI={},mI={},of={},lZ={},D1={},gI={},yI={},vI={},bI={},xI={},cZ={},uZ={},I1={},R1={},Px={},fZ={},dZ={},wh={},_h={},hZ={},pZ={},mZ={},bi=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,gZ=bi&&"documentMode"in document?document.documentMode:null,oi=bi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),pa=bi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),yp=!(!bi||!("InputEvent"in window)||gZ)&&"getTargetRanges"in new window.InputEvent("input"),L1=bi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),dg=bi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,yZ=bi&&/Android/.test(navigator.userAgent),wI=bi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),vZ=bi&&yZ&&wI,B1=bi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!wI,ed=1,Pa=3,_s=0,_I=1,Ll=2,bZ=0,xZ=1,wZ=2,vp=4,bp=8,F1=128,_Z=112|(3|vp|bp)|F1,W1=1,z1=2,V1=3,U1=4,H1=5,K1=6,hg=L1||dg||B1?" ":"​",Po=` + +`,SZ=pa?" ":hg,SI="֑-߿יִ-﷽ﹰ-ﻼ",OI="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",OZ=new RegExp("^[^"+OI+"]*["+SI+"]"),CZ=new RegExp("^[^"+SI+"]*["+OI+"]"),xo={bold:1,code:16,highlight:F1,italic:2,strikethrough:vp,subscript:32,superscript:64,underline:bp},AZ={directionless:1,unmergeable:2},ZP={center:z1,end:K1,justify:U1,left:W1,right:V1,start:H1},PZ={[z1]:"center",[K1]:"end",[U1]:"justify",[W1]:"left",[V1]:"right",[H1]:"start"},TZ={normal:0,segmented:2,token:1},EZ={[bZ]:"normal",[wZ]:"segmented",[xZ]:"token"};function kZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we=kZ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nMZ;try{Pr(e,()=>{const i=ke()||function(p){return p.getEditorState().read(()=>{const m=ke();return m!==null?m.clone():null})}(e),o=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,f="";for(let p=0;p0){let A=0;for(let _=0;_0)for(const[p,m]of o)if(ge(m)){const y=m.getChildrenKeys();let g=p.firstChild;for(let v=0;v0){for(let p=0;p{CI(e,t,n)})}function JP(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 QP(e,t){const n=e.mergeWithSibling(t),r=tn()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function eT(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(JP(t,r)){r=QP(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&_e(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(JP(r,n)){r=QP(r,n);break}break}n.remove()}}else r.remove()}function DZ(e){return tT(e.anchor),tT(e.focus),e}function tT(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 IZ=1;const RZ=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function TI(e){const t=document.activeElement;if(t===null)return!1;const n=t.nodeName;return Nt(gg(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&mg(t)==null)}function pg(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!TI(t)&&EI(t)===e}catch{return!1}}function Y1(e){return e instanceof Pg}function EI(e){let t=e;for(;t!=null;){const n=mg(t);if(Y1(n))return n;t=vg(t)}return null}function mg(e){return e?e.__lexicalEditor:null}function cl(e){return e.isToken()||e.isSegmented()}function LZ(e){return e.nodeType===Pa}function wp(e){let t=e;for(;t!=null;){if(LZ(t))return t;t=t.firstChild}return null}function Ex(e,t,n){const r=xo[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=~xo.superscript:t==="superscript"&&(i&=~xo.subscript),i}function BZ(e,t){if(t!=null)return void(e.__key=t);lr(),oR();const n=tn(),r=$o(),i=""+IZ++;r._nodeMap.set(i,e),ge(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=_I,e.__key=i}function ms(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 _p(e){oR();const t=e.getLatest(),n=t.__parent,r=$o(),i=tn(),o=r._nodeMap,a=i._dirtyElements;n!==null&&function(l,c,f){let d=l;for(;d!==null;){if(f.has(d))return;const p=c.get(d);if(p===void 0)break;f.set(d,!1),d=p.__parent}}(n,o,a);const s=t.__key;i._dirtyType=_I,ge(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function $n(e){lr();const t=tn(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=wn(n);r!==null&&r.getWritable()}if(e!==null){const r=wn(e);r!==null&&r.getWritable()}}}function sa(){return id()?null:tn()._compositionKey}function wn(e,t){const n=(t||$o())._nodeMap.get(e);return n===void 0?null:n}function kI(e,t){const n=e[`__lexicalKey_${tn()._key}`];return n!==void 0?wn(n,t):null}function gg(e,t){let n=e;for(;n!=null;){const r=kI(n,t);if(r!==null)return r;n=vg(n)}return null}function MI(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function nT(e){return e.read(()=>Hn().getTextContent())}function Hn(){return jI($o())}function jI(e){return e._nodeMap.get("root")}function To(e){lr();const t=$o();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function bl(e){const t=tn(),n=function(r,i){let o=r;for(;o!=null;){const a=o[`__lexicalKey_${i._key}`];if(a!==void 0)return a;o=vg(o)}return null}(e,t);return n===null?e===t.getRootElement()?wn("root"):null:wn(n)}function rT(e,t){return t?e.getTextContentSize():0}function NI(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function q1(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function $I(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function DI(e){return e.nodeType===Pa?e.nodeValue:null}function X1(e,t,n){const r=Bi(t._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(i!==null){let s=DI(i);const l=gg(i);if(s!==null&&_e(l)){if(s===hg&&n){const c=n.length;s=n,o=c,a=c}s!==null&&Z1(l,s,o,a,e)}}}function Z1(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]===hg&&(s=t.slice(0,-1));const l=o.getTextContent();if(i||s!==l){if(s===""){if($n(null),L1||dg||B1)o.remove();else{const g=tn();setTimeout(()=>{g.update(()=>{o.isAttached()&&o.remove()})},20)}return}const c=o.getParent(),f=Og(),d=o.getTextContentSize(),p=sa(),m=o.getKey();if(o.isToken()||p!==null&&m===p&&!a||xe(f)&&(c!==null&&!c.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 y=ke();if(!xe(y)||n===null||r===null)return void o.setTextContent(s);if(y.setTextNodeRange(o,n,o,r),o.isSegmented()){const g=Mn(o.getTextContent());o.replace(g),o=g}o.setTextContent(s)}}}function FZ(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 iT(e){return e==="ArrowLeft"}function oT(e){return e==="ArrowRight"}function Ou(e,t){return oi?e:t}function aT(e){return e==="Enter"}function au(e){return e==="Backspace"}function su(e){return e==="Delete"}function sT(e,t,n){return e.toLowerCase()==="a"&&Ou(t,n)}function WZ(){const e=Hn();To(DZ(e.select(0,e.getChildrenSize())))}function Nu(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=xp(i);return n[t]=o,o}return i}function J1(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 c=e.get(l);c===void 0&&(c=new Map,e.set(l,c));const f=c.get(a),d=f==="destroyed"&&i==="created";(f===void 0||d)&&c.set(a,d?"updated":i)}function lT(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 kx(e,t){const n=e.offset;if(e.type==="element")return lT(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?lT(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function II(e){const t=bg(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Oe(e,t,n){return lR(e,t,n)}function yg(e){return!Zn(e)&&!e.isLastChild()&&!e.isInline()}function Sp(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&we(75,t),n}function vg(e){const t=e.assignedSlot||e.parentElement;return t!==null&&t.nodeType===11?t.host:t}function Mx(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function bg(e){const t=e._window;return t===null&&we(78),t}function zZ(e){let t=e.getParentOrThrow();for(;t!==null;){if(td(t))return t;t=t.getParentOrThrow()}return t}function td(e){return Zn(e)||ge(e)&&e.isShadowRoot()}function xg(e){const t=tn(),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 eb(e,t){!Zn(e.getParent())||ge(t)||Nt(t)||we(99)}function tb(e){return(Nt(e)||ge(e)&&!e.canBeEmpty())&&!e.isInline()}function Q1(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function VZ(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())tb(o.getChildAtIndex(a-1))&&(s=!0);else{const c=o.getChildAtIndex(a);if(tb(c)){const f=c.getPreviousSibling();(f===null||tb(f))&&(s=!0,l=e.getElementByKey(c.__key))}}if(s){const c=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 y=xp(m);m=d.blockCursor=y}m!==void 0&&p.classList.add(...m)}return p}(e._config)),t.style.caretColor="transparent",void(l===null?c.appendChild(r):c.insertBefore(r,l))}}r!==null&&Q1(r,e,t)}function Bi(e){return bi?(e||window).getSelection():null}function e_(e){return e.nodeType===1}function UZ(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 cT(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 ul(e){if(Zn(e)||Nt(e)&&!e.isInline())return!0;if(!ge(e)||td(e))return!1;const t=e.getFirstChild(),n=t===null||Iu(t)||_e(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function nb(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const uT=new WeakMap,HZ=new Map;function KZ(e){if(!e._readOnly&&e.isEmpty())return HZ;e._readOnly||we(192);let t=uT.get(e);if(!t){t=new Map,uT.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 RI(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function LI(e,t,n,r,i,o){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&(ge(a)&&LI(a,s,n,r,i,o),n.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}let Sa,tr,af,wg,jx,Nx,Ss,pi,$x,sf,ln="",Xn="",Oi=null,ai="",lo="",BI=!1,lf=!1,qh=null;function Op(e,t){const n=Ss.get(e);if(t!==null){const r=Rx(e);r.parentNode===t&&t.removeChild(r)}if(pi.has(e)||tr._keyToDOMMap.delete(e),ge(n)){const r=Ap(n,Ss);Dx(r,0,r.length-1,null)}n!==void 0&&J1(sf,af,wg,n,"destroyed")}function Dx(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&Op(o,r)}}function Ga(e,t){e.setProperty("text-align",t)}const GZ="40px";function FI(e,t){const n=Sa.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")||GZ;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function WI(e,t){const n=e.style;t===0?Ga(n,""):t===W1?Ga(n,"left"):t===z1?Ga(n,"center"):t===V1?Ga(n,"right"):t===U1?Ga(n,"justify"):t===H1?Ga(n,"start"):t===K1&&Ga(n,"end")}function Cp(e,t,n){const r=pi.get(e);r===void 0&&we(60);const i=r.createDOM(Sa,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&&FI(i,o),a!==0){const l=a-1;(function(c,f,d,p){const m=Xn;Xn="",Ix(c,d,0,f,p,null),VI(d,p),Xn=m})(Ap(r,pi),l,r,i)}const s=r.__format;s!==0&&WI(i,s),r.isInline()||zI(null,r,i),yg(r)&&(ln+=Po,lo+=Po)}else{const o=r.getTextContent();if(Nt(r)){const a=r.decorate(tr,Sa);a!==null&&UI(e,a),i.contentEditable="false"}else _e(r)&&(r.isDirectionless()||(Xn+=o));ln+=o,lo+=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 J1(sf,af,wg,r,"created"),i}function Ix(e,t,n,r,i,o){const a=ln;ln="";let s=n;for(;s<=r;++s){Cp(e[s],i,o);const l=pi.get(e[s]);l!==null&&_e(l)&&(Oi===null&&(Oi=l.getFormat()),ai===""&&(ai=l.getStyle()))}yg(t)&&(ln+=Po),i.__lexicalTextContent=ln,ln=a+ln}function fT(e,t){const n=t.get(e);return Iu(n)||Nt(n)&&n.isInline()}function zI(e,t,n){const r=e!==null&&(e.__size===0||fT(e.__last,Ss)),i=t.__size===0||fT(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 VI(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==Xn||r!==qh){const o=Xn==="",a=o?qh:(i=Xn,OZ.test(i)?"rtl":CZ.test(i)?"ltr":null);if(a!==r){const s=t.classList,l=Sa.theme;let c=r!==null?l[r]:void 0,f=a!==null?l[a]:void 0;if(c!==void 0){if(typeof c=="string"){const d=xp(c);c=l[r]=d}s.remove(...c)}if(a===null||o&&a==="ltr")t.removeAttribute("dir");else{if(f!==void 0){if(typeof f=="string"){const d=xp(f);f=l[a]=d}f!==void 0&&s.add(...f)}t.dir=a}lf||(e.getWritable().__dir=a)}qh=a,t.__lexicalDirTextContent=Xn,t.__lexicalDir=a}var i}function YZ(e,t,n){const r=Xn;var i;Xn="",Oi=null,ai="",function(o,a,s){const l=ln,c=o.__size,f=a.__size;if(ln="",c===1&&f===1){const d=o.__first,p=a.__first;if(d===p)Cu(d,s);else{const y=Rx(d),g=Cp(p,null,null);try{s.replaceChild(g,y)}catch(v){if(typeof v=="object"&&v!=null){const x=`${v.toString()} Parent: ${s.tagName}, new child: {tag: ${g.tagName} key: ${p}}, old child: {tag: ${y.tagName}, key: ${d}}.`;throw new Error(x)}throw v}Op(d,null)}const m=pi.get(p);_e(m)&&(Oi===null&&(Oi=m.getFormat()),ai===""&&(ai=m.getStyle()))}else{const d=Ap(o,Ss),p=Ap(a,pi);if(c===0)f!==0&&Ix(p,a,0,f-1,s,null);else if(f===0){if(c!==0){const m=s.__lexicalLineBreak==null;Dx(d,0,c-1,m?null:s),m&&(s.textContent="")}}else(function(m,y,g,v,x,w){const S=v-1,A=x-1;let _,C,E=(D=w,D.firstChild),k=0,M=0;for(var D;k<=S&&M<=A;){const I=y[k],L=g[M];if(I===L)E=rb(Cu(L,w)),k++,M++;else{_===void 0&&(_=new Set(y)),C===void 0&&(C=new Set(g));const W=C.has(I),z=_.has(L);if(W)if(z){const G=Sp(tr,L);G===E?E=rb(Cu(L,w)):(E!=null?w.insertBefore(G,E):w.appendChild(G),Cu(L,w)),k++,M++}else Cp(L,w,E),M++;else E=rb(Rx(I)),Op(I,w),k++}const F=pi.get(L);F!==null&&_e(F)&&(Oi===null&&(Oi=F.getFormat()),ai===""&&(ai=F.getStyle()))}const $=k>S,N=M>A;if($&&!N){const I=g[A+1];Ix(g,m,M,A,w,I===void 0?null:tr.getElementByKey(I))}else N&&!$&&Dx(y,k,S,w)})(a,d,p,c,f,s)}yg(a)&&(ln+=Po),s.__lexicalTextContent=ln,ln=l+ln}(e,t,n),VI(t,n),Ux(i=t)&&Oi!=null&&Oi!==i.__textFormat&&!lf&&(i.setTextFormat(Oi),i.setTextStyle(ai)),function(o){Ux(o)&&ai!==""&&ai!==o.__textStyle&&!lf&&o.setTextStyle(ai)}(t),Xn=r}function Ap(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 Cu(e,t){const n=Ss.get(e);let r=pi.get(e);n!==void 0&&r!==void 0||we(61);const i=BI||Nx.has(e)||jx.has(e),o=Sp(tr,e);if(n===r&&!i){if(ge(n)){const a=o.__lexicalTextContent;a!==void 0&&(ln+=a,lo+=a);const s=o.__lexicalDirTextContent;s!==void 0&&(Xn+=s)}else{const a=n.getTextContent();_e(n)&&!n.isDirectionless()&&(Xn+=a),lo+=a,ln+=a}return o}if(n!==r&&i&&J1(sf,af,wg,r,"updated"),r.updateDOM(n,o,Sa)){const a=Cp(e,null,null);return t===null&&we(62),t.replaceChild(a,o),Op(e,null),a}if(ge(n)&&ge(r)){const a=r.__indent;a!==n.__indent&&FI(o,a);const s=r.__format;s!==n.__format&&WI(o,s),i&&(YZ(n,r,o),Zn(r)||r.isInline()||zI(n,r,o)),yg(r)&&(ln+=Po,lo+=Po)}else{const a=r.getTextContent();if(Nt(r)){const s=r.decorate(tr,Sa);s!==null&&UI(e,s)}else _e(r)&&!r.isDirectionless()&&(Xn+=a);ln+=a,lo+=a}if(!lf&&Zn(r)&&r.__cachedText!==lo){const a=r.getWritable();a.__cachedText=lo,r=a}return o}function UI(e,t){let n=tr._pendingDecorators;const r=tr._decorators;if(n===null){if(r[e]===t)return;n=MI(tr)}n[e]=t}function rb(e){let t=e.nextSibling;return t!==null&&t===tr._blockCursorElement&&(t=t.nextSibling),t}function qZ(e,t,n,r,i,o){ln="",lo="",Xn="",BI=r===Ll,qh=null,tr=n,Sa=n._config,af=n._nodes,wg=tr._listeners.mutation,jx=i,Nx=o,Ss=e._nodeMap,pi=t._nodeMap,lf=t._readOnly,$x=new Map(n._keyToDOMMap);const a=new Map;return sf=a,Cu("root",null),tr=void 0,af=void 0,jx=void 0,Nx=void 0,Ss=void 0,pi=void 0,Sa=void 0,$x=void 0,sf=void 0,a}function Rx(e){const t=$x.get(e);return t===void 0&&we(75,e),t}const oo=Object.freeze({}),Lx=30,Bx=[["keydown",function(e,t){if($u=e.timeStamp,HI=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;Oe(t,hI,e)||n!=null&&(function(s,l,c,f){return oT(s)&&!l&&!f&&!c}(n,i,a,o)?Oe(t,N1,e):function(s,l,c,f,d){return oT(s)&&!f&&!c&&(l||d)}(n,i,r,a,o)?Oe(t,aZ,e):function(s,l,c,f){return iT(s)&&!l&&!f&&!c}(n,i,a,o)?Oe(t,$1,e):function(s,l,c,f,d){return iT(s)&&!f&&!c&&(l||d)}(n,i,r,a,o)?Oe(t,sZ,e):function(s,l,c){return function(f){return f==="ArrowUp"}(s)&&!l&&!c}(n,i,o)?Oe(t,pI,e):function(s,l,c){return function(f){return f==="ArrowDown"}(s)&&!l&&!c}(n,i,o)?Oe(t,mI,e):function(s,l){return aT(s)&&l}(n,r)?(Du=!0,Oe(t,of,e)):function(s){return s===" "}(n)?Oe(t,lZ,e):function(s,l){return oi&&l&&s.toLowerCase()==="o"}(n,i)?(e.preventDefault(),Du=!0,Oe(t,Pl,!0)):function(s,l){return aT(s)&&!l}(n,r)?(Du=!1,Oe(t,of,e)):function(s,l,c,f){return oi?!l&&!c&&(au(s)||s.toLowerCase()==="h"&&f):!(f||l||c)&&au(s)}(n,a,o,i)?au(n)?Oe(t,D1,e):(e.preventDefault(),Oe(t,ps,!0)):function(s){return s==="Escape"}(n)?Oe(t,gI,e):function(s,l,c,f,d){return oi?!(c||f||d)&&(su(s)||s.toLowerCase()==="d"&&l):!(l||f||d)&&su(s)}(n,i,r,a,o)?su(n)?Oe(t,yI,e):(e.preventDefault(),Oe(t,ps,!1)):function(s,l,c){return au(s)&&(oi?l:c)}(n,a,i)?(e.preventDefault(),Oe(t,nf,!0)):function(s,l,c){return su(s)&&(oi?l:c)}(n,a,i)?(e.preventDefault(),Oe(t,nf,!1)):function(s,l){return oi&&l&&au(s)}(n,o)?(e.preventDefault(),Oe(t,rf,!0)):function(s,l){return oi&&l&&su(s)}(n,o)?(e.preventDefault(),Oe(t,rf,!1)):function(s,l,c,f){return s.toLowerCase()==="b"&&!l&&Ou(c,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,as,"bold")):function(s,l,c,f){return s.toLowerCase()==="u"&&!l&&Ou(c,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,as,"underline")):function(s,l,c,f){return s.toLowerCase()==="i"&&!l&&Ou(c,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,as,"italic")):function(s,l,c,f){return s==="Tab"&&!l&&!c&&!f}(n,a,i,o)?Oe(t,vI,e):function(s,l,c,f){return s.toLowerCase()==="z"&&!l&&Ou(c,f)}(n,r,o,i)?(e.preventDefault(),Oe(t,M1,void 0)):function(s,l,c,f){return oi?s.toLowerCase()==="z"&&c&&l:s.toLowerCase()==="y"&&f||s.toLowerCase()==="z"&&f&&l}(n,r,o,i)?(e.preventDefault(),Oe(t,j1,void 0)):Sg(t._editorState._selection)?function(s,l,c,f){return!l&&s.toLowerCase()==="c"&&(oi?c:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,I1,e)):function(s,l,c,f){return!l&&s.toLowerCase()==="x"&&(oi?c:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,R1,e)):sT(n,o,i)&&(e.preventDefault(),Oe(t,Px,e)):!pa&&sT(n,o,i)&&(e.preventDefault(),Oe(t,Px,e)),function(s,l,c,f){return s||l||c||f}(i,r,a,o)&&Oe(t,mZ,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&r!=="touch"&&Pr(t,()=>{Nt(gg(n))||(Wx=!0)})}],["compositionstart",function(e,t){Pr(t,()=>{const n=ke();if(xe(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();$n(r.key),(e.timeStamp<$u+Lx||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||_e(i)&&i.getStyle()!==n.style)&&Oe(t,Tl,SZ)}})}],["compositionend",function(e,t){pa?lu=!0:Pr(t,()=>{ib(t,e.data)})}],["input",function(e,t){e.stopPropagation(),Pr(t,()=>{const n=ke(),r=e.data,i=qI(e);if(r!=null&&xe(n)&&YI(n,i,r,e.timeStamp,!1)){lu&&(ib(t,r),lu=!1);const o=n.anchor.getNode(),a=Bi(t._window);if(a===null)return;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,c=s?n.focus.offset:n.anchor.offset;yp&&!n.isCollapsed()&&_e(o)&&a.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+c)===DI(a.anchorNode)||Oe(t,Tl,r);const f=r.length;pa&&f>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=f),L1||dg||B1||!t.isComposing()||($u=0,$n(null))}else X1(!1,t,r!==null?r:void 0),lu&&(ib(t,r||void 0),lu=!1);lr(),AI(tn())}),fl=null}],["click",function(e,t){Pr(t,()=>{const n=ke(),r=Bi(t._window),i=Og();if(r){if(xe(n)){const o=n.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Zn(a)&&Hn().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===ed||a===Pa)&&To(r_(i,r,t,e))}}}Oe(t,oZ,e)})}],["cut",oo],["copy",oo],["dragstart",oo],["dragover",oo],["dragend",oo],["paste",oo],["focus",oo],["blur",oo],["drop",oo]];yp&&Bx.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=qI(n);i==="deleteCompositionText"||pa&&II(r)||i!=="insertCompositionText"&&Pr(r,()=>{const a=ke();if(i==="deleteContentBackward"){if(a===null){const m=Og();if(!xe(m))return;To(m.clone())}if(xe(a)){const m=a.anchor.key===a.focus.key;if(s=n.timeStamp,HI==="MediaLast"&&s<$u+Lx&&r.isComposing()&&m){if($n(null),$u=0,setTimeout(()=>{Pr(r,()=>{$n(null)})},Lx),xe(a)){const y=a.anchor.getNode();y.markDirty(),a.format=y.getFormat(),_e(y)||we(142),a.style=y.getStyle()}}else{$n(null),n.preventDefault();const y=a.anchor.getNode().getTextContent(),g=a.anchor.offset===0&&a.focus.offset===y.length;vZ&&m&&!g||Oe(r,ps,!0)}return}}var s;if(!xe(a))return;const l=n.data;fl!==null&&X1(!1,r,fl),a.dirty&&fl===null||!a.isCollapsed()||Zn(a.anchor.getNode())||o===null||a.applyDOMRange(o),fl=null;const c=a.anchor,f=a.focus,d=c.getNode(),p=f.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Oe(r,Tl,n);break;case"insertFromComposition":$n(null),Oe(r,Tl,n);break;case"insertLineBreak":$n(null),Oe(r,Pl,!1);break;case"insertParagraph":$n(null),Du&&!dg?(Du=!1,Oe(r,Pl,!1)):Oe(r,Cx,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Oe(r,k1,n);break;case"deleteByComposition":(function(m,y){return m!==y||ge(m)||ge(y)||!m.isToken()||!y.isToken()})(d,p)&&Oe(r,Ax,n);break;case"deleteByDrag":case"deleteByCut":Oe(r,Ax,n);break;case"deleteContent":Oe(r,ps,!1);break;case"deleteWordBackward":Oe(r,nf,!0);break;case"deleteWordForward":Oe(r,nf,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Oe(r,rf,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Oe(r,rf,!1);break;case"formatStrikeThrough":Oe(r,as,"strikethrough");break;case"formatBold":Oe(r,as,"bold");break;case"formatItalic":Oe(r,as,"italic");break;case"formatUnderline":Oe(r,as,"underline");break;case"historyUndo":Oe(r,M1,void 0);break;case"historyRedo":Oe(r,j1,void 0)}else{if(l===` +`)n.preventDefault(),Oe(r,Pl,!1);else if(l===Po)n.preventDefault(),Oe(r,Cx,void 0);else if(l==null&&n.dataTransfer){const m=n.dataTransfer.getData("text/plain");n.preventDefault(),a.insertRawText(m)}else l!=null&&YI(a,o,l,n.timeStamp,!0)?(n.preventDefault(),Oe(r,Tl,l)):fl=l;KI=n.timeStamp}})}(e,t)]);let $u=0,HI=null,KI=0,fl=null;const Pp=new WeakMap;let Fx=!1,Wx=!1,Du=!1,lu=!1,GI=[0,"",0,"root",0];function YI(e,t,n,r,i){const o=e.anchor,a=e.focus,s=o.getNode(),l=tn(),c=Bi(l._window),f=c!==null?c.anchorNode:null,d=o.key,p=l.getElementByKey(d),m=n.length;return d!==a.key||!_e(s)||(!i&&(!yp||KI1||(i||!yp)&&p!==null&&!s.isComposing()&&f!==wp(p)||c!==null&&t!==null&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||FZ(e,s)}function dT(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===Pa&&t!==0&&t!==e.nodeValue.length}function hT(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}=e;Fx&&(Fx=!1,dT(r,i)&&dT(o,a))||Pr(t,()=>{if(!n)return void To(null);if(!pg(t,r,o))return;const s=ke();if(xe(s)){const l=s.anchor,c=l.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);const f=bg(t).event,d=f?f.timeStamp:performance.now(),[p,m,y,g,v]=GI,x=Hn(),w=t.isComposing()===!1&&x.getTextContent()==="";if(d{const c=Og(),f=n.anchorNode;if(f===null)return;const d=f.nodeType;d!==ed&&d!==Pa||To(r_(c,n,r,e))}));const i=q1(r),o=i[i.length-1],a=o._key,s=El.get(a),l=s||o;l!==r&&hT(n,l,!1),hT(n,r,!0),r!==o?El.set(a,r):s&&El.delete(a)}function pT(e){e._lexicalHandled=!0}function mT(e){return e._lexicalHandled===!0}function XZ(e){const t=e.ownerDocument,n=Pp.get(t);n===void 0&&we(162);const r=n-1;r>=0||we(164),Pp.set(t,r),r===0&&t.removeEventListener("selectionchange",ZI);const i=mg(e);Y1(i)?(function(a){if(a._parentEditor!==null){const s=q1(a),l=s[s.length-1]._key;El.get(l)===a&&El.delete(l)}else El.delete(a._key)}(i),e.__lexicalEditor=null):i&&we(198);const o=XI(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:wn(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(td(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:wn(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:wn(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(g)})),xe(r)){To(r);const g=r.anchor,v=r.focus;g.key===o&&bT(g,s),v.key===o&&bT(v,s)}return sa()===o&&$n(a),s}insertAfter(t,n=!0){lr(),eb(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),a=ke();let s=!1,l=!1;if(o!==null){const m=t.getIndexWithinParent();if(ms(i),xe(a)){const y=o.__key,g=a.anchor,v=a.focus;s=g.type==="element"&&g.key===y&&g.offset===m+1,l=v.type==="element"&&v.key===y&&v.offset===m+1}}const c=this.getNextSibling(),f=this.getParentOrThrow().getWritable(),d=i.__key,p=r.__next;if(c===null?f.__last=d:c.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();Tp(a,f,m+1);const y=f.__key;s&&a.anchor.set(y,m+2,"element"),l&&a.focus.set(y,m+2,"element")}return t}insertBefore(t,n=!0){lr(),eb(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;ms(i);const a=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,c=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=ke();return n&&xe(f)&&Tp(f,this.getParentOrThrow(),c),t}isParentRequired(){return!1}createParentElementNode(){return wo()}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 nd extends _g{static getType(){return"linebreak"}static clone(t){return new nd(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&&cT(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Sh(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&Sh(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&cT(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&Sh(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&Sh(o))return!0}return!1}(t)?null:{conversion:ZZ,priority:0}}}static importJSON(t){return cf()}exportJSON(){return{type:"linebreak",version:1}}}function ZZ(e){return{node:cf()}}function cf(){return xg(new nd)}function Iu(e){return e instanceof nd}function Sh(e){return e.nodeType===Pa&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function ob(e,t){return 16&t?"code":t&F1?"mark":32&t?"sub":64&t?"sup":null}function ab(e,t){return 1&t?"strong":2&t?"em":"span"}function JI(e,t,n,r,i){const o=r.classList;let a=Nu(i,"base");a!==void 0&&o.add(...a),a=Nu(i,"underlineStrikethrough");let s=!1;const l=t&bp&&t&vp;a!==void 0&&(n&bp&&n&vp?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const c in xo){const f=xo[c];if(a=Nu(i,c),a!==void 0)if(n&f){if(s&&(c==="underline"||c==="strikethrough")){t&f&&o.remove(...a);continue}t&f&&(!l||c!=="underline")&&c!=="strikethrough"||o.add(...a)}else t&f&&o.remove(...a)}}function QI(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?hg:"");if(r==null)t.textContent=o;else{const a=r.nodeValue;if(a!==o)if(i||pa){const[s,l,c]=function(f,d){const p=f.length,m=d.length;let y=0,g=0;for(;y({conversion:tJ,priority:0}),b:()=>({conversion:QZ,priority:0}),code:()=>({conversion:Qo,priority:0}),em:()=>({conversion:Qo,priority:0}),i:()=>({conversion:Qo,priority:0}),s:()=>({conversion:Qo,priority:0}),span:()=>({conversion:JZ,priority:0}),strong:()=>({conversion:Qo,priority:0}),sub:()=>({conversion:Qo,priority:0}),sup:()=>({conversion:Qo,priority:0}),u:()=>({conversion:Qo,priority:0})}}static importJSON(t){const n=Mn(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&&e_(n)||we(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=Oh(n,"b")),this.hasFormat("italic")&&(n=Oh(n,"i")),this.hasFormat("strikethrough")&&(n=Oh(n,"s")),this.hasFormat("underline")&&(n=Oh(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"?xo[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?AZ[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=Ex(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=TZ[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=ke(),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 iR(s,r,s,i,"text","text");{const l=sa();l!==o.anchor.key&&l!==o.focus.key||$n(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 c=ke();if(i&&xe(c)){const d=t+s;c.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=sa(),a=new Set(t),s=[],l=r.length;let c="";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&&$n(M),A=D,S.push(k)}if(p!==null){(function(E){const k=E.getPreviousSibling(),M=E.getNextSibling();k!==null&&_p(k),M!==null&&_p(M)})(this);const _=p.getWritable(),C=this.getIndexWithinParent();x?(_.splice(C,0,S),this.remove()):_.splice(C,1,S),xe(w)&&Tp(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;sa()===i&&$n(r);const s=ke();if(xe(s)){const d=s.anchor,p=s.focus;d!==null&&d.key===i&&(AT(d,n,r,t,a),s.dirty=!0),p!==null&&p.key===i&&(AT(p,n,r,t,a),s.dirty=!0)}const l=t.__text,c=n?l+o:o+l;this.setTextContent(c);const f=this.getWritable();return t.remove(),f}isTextEntity(){return!1}}function JZ(e){return{forChild:t_(e.style),node:null}}function QZ(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:t_(t.style,n?void 0:"bold"),node:null}}const yT=new WeakMap;function eJ(e){return e.nodeName==="PRE"||e.nodeType===ed&&e.style!==void 0&&e.style.whiteSpace!==void 0&&e.style.whiteSpace.startsWith("pre")}function tJ(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=yT.get(o))===void 0&&!eJ(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=vT(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:Mn(n)}}function vT(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===ed){const o=n.style.display;if(o===""&&!UZ(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(n.nodeType===Pa)return n;if(n.nodeName==="BR")return null}}const nJ={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Qo(e){const t=nJ[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:t_(e.style,t),node:null}}function Mn(e=""){return xg(new wc(e))}function _e(e){return e instanceof wc}function t_(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 c=>(_e(c)&&(i&&!c.hasFormat("bold")&&c.toggleFormat("bold"),o&&!c.hasFormat("strikethrough")&&c.toggleFormat("strikethrough"),a&&!c.hasFormat("italic")&&c.toggleFormat("italic"),s&&!c.hasFormat("underline")&&c.toggleFormat("underline"),l!=="sub"||c.hasFormat("subscript")||c.toggleFormat("subscript"),l!=="super"||c.hasFormat("superscript")||c.toggleFormat("superscript"),t&&!c.hasFormat(t)&&c.toggleFormat(t)),c)}class rd extends wc{static getType(){return"tab"}static clone(t){return new rd(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=n_();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 n_(){return xg(new rd)}function rJ(e){return e instanceof rd}class iJ{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 bT(e,t){if(ge(t)){const n=t.getLastDescendant();ge(n)||_e(n)?sb(e,n):sb(e,t)}else sb(e,t)}function ia(e,t,n,r){e.key=t,e.offset=n,e.type=r}let eR=class tR{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Sg(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 tR(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),id()||(this._cachedNodes=d),d}setTextNodeRange(t,n,r,i){ia(this.anchor,t.__key,n,"text"),ia(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]=Vx(this);let c="",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))&&(v.delete(k.__key),M=k),k=k.getParent()}}if(p.isToken())if(l===m)p.select();else{const k=Mn(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&&(v===g.getTextContentSize()||cl(g)||([g]=g.splitText(v)),g.setFormat(x));for(let w=f+1;w(ge(m)||Nt(m))&&!m.isInline())){ge(n)||we(135);const m=lb(this);return n.splice(m,0,t),void r.selectEnd()}const i=function(m){const y=wo();let g=null;for(let v=0;vc?c:l,p=l>c?l:c,m=a.splitText(d,p),y=d===0?m[0]:m[1];return y!=null?[y]:[]}return[a]}const f=i.isBefore(o);if(_e(a)){const d=f?l:c;d===a.getTextContentSize()?t.shift():d!==0&&([,a]=a.splitText(d),t[0]=a)}if(_e(s)){const d=s.getTextContent().length,p=f?c: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=kx(i,n);if(Nt(s)&&!s.isIsolated()){if(a&&s.isKeyboardSelectable()){const m=OT();return m.add(s.__key),void To(m)}const p=n?s.getPreviousSibling():s.getNextSibling();if(_e(p)){const m=p.__key,y=n?p.getTextContent().length:0;return i.set(m,y,"text"),void(a&&o.set(m,y,"text"))}{const m=s.getParentOrThrow();let y,g;return ge(p)?(g=p.__key,y=n?p.getChildrenSize():0):(y=s.getIndexWithinParent(),g=m.__key,n||y++),i.set(g,y,"element"),void(a&&o.set(g,y,"element"))}}const l=tn(),c=Bi(l._window);if(!c)return;const f=l._blockCursorElement,d=l._rootElement;if(d===null||f===null||!ge(s)||s.isInline()||s.canBeEmpty()||Q1(f,l,d),function(p,m,y,g){p.modify(m,y,g)}(c,t,n?"backward":"forward",r),c.rangeCount>0){const p=c.getRangeAt(0),m=this.anchor.getNode(),y=Zn(m)?m:zZ(m);if(this.applyDOMRange(p),this.dirty=!0,!a){const g=this.getNodes(),v=[];let x=!1;for(let w=0;w0)if(n){const w=v[0];ge(w)?w.selectStart():w.getParentOrThrow().selectStart()}else{const w=v[v.length-1];ge(w)?w.selectEnd():w.getParentOrThrow().selectEnd()}c.anchorNode===p.startContainer&&c.anchorOffset===p.startOffset||function(w){const S=w.focus,A=w.anchor,_=A.key,C=A.offset,E=A.type;ia(A,S.key,S.offset,S.type),ia(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=kx(o,t);if(Nt(a)&&!a.isIsolated()){if(a.isKeyboardSelectable()&&ge(i)&&i.getChildrenSize()===0){i.remove();const s=OT();s.add(a.__key),To(s)}else a.remove(),tn().dispatchCommand(E1,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,c=s.getTextContentSize();if(s.is(i)||t&&l!==c||!t&&l!==0)return void wT(s,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,c=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==c)return void wT(i,t,l)}(function(l,c){const f=l.anchor,d=l.focus,p=f.getNode(),m=d.getNode();if(p===m&&f.type==="text"&&d.type==="text"){const y=f.offset,g=d.offset,v=yn||f){i.splice(c,1),f&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function _T(e,t,n,r){let i,o=t;if(e.nodeType===ed){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;o===l&&(a=!0,o=l-1);let f=s[o],d=!1;if(f===c)f=s[o+1],d=!0;else if(c!==null){const p=c.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,c)&&o--}if(i=bl(f),_e(i))o=rT(i,a);else{let p=bl(e);if(p===null)return null;if(ge(p)){o=Math.min(p.getChildrenSize(),o);let m=p.getChildAtIndex(o);if(ge(m)&&function(y,g,v){const x=y.getParent();return v===null||x===null||!x.canBeEmpty()||x!==v.getNode()}(m,0,n)){const y=a?m.getLastDescendant():m.getFirstDescendant();y===null?p=m:(m=y,p=ge(m)?m:m.getParentOrThrow()),o=0}_e(m)?(i=m,p=null,o=rT(m,a)):m!==p&&a&&!d&&o++}else{const m=p.getIndexWithinParent();o=t===0&&Nt(p)&&bl(e)===p?m:m+1,p=p.getParentOrThrow()}if(ge(p))return Oa(p.__key,o,"element")}}else i=bl(e);return _e(i)?Oa(i.__key,o,"text"):null}function ST(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 nR(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);ST(e,r,i),ST(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const o=tn();if(o.isComposing()&&o._compositionKey!==e.key&&xe(n)){const a=n.anchor,s=n.focus;ia(e,a.key,a.offset,a.type),ia(t,s.key,s.offset,s.type)}}}function rR(e,t,n,r,i,o){if(e===null||n===null||!pg(i,e,n))return null;const a=_T(e,t,xe(o)?o.anchor:null,i);if(a===null)return null;const s=_T(n,r,xe(o)?o.focus:null,i);if(s===null)return null;if(a.type==="element"&&s.type==="element"){const l=bl(e),c=bl(n);if(Nt(l)&&Nt(c))return null}return nR(a,s,o),[a,s]}function iR(e,t,n,r,i,o){const a=$o(),s=new Ns(Oa(e,t,i),Oa(n,r,o),0,"");return s.dirty=!0,a._selection=s,s}function OT(){return new eR(new Set)}function r_(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=!Tx&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let c,f,d,p;if(xe(e)&&!l)return e.clone();if(t===null)return null;if(c=t.anchorNode,f=t.focusNode,d=t.anchorOffset,p=t.focusOffset,s&&xe(e)&&!pg(n,c,f))return e.clone();const m=rR(c,d,f,p,n,e);if(m===null)return null;const[y,g]=m;return new Ns(y,g,xe(e)?e.format:0,xe(e)?e.style:"")}function ke(){return $o()._selection}function Og(){return tn()._editorState._selection}function Tp(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 c=i.offset;if(n<=c&&r>0||n0||n0||n=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(c)){let f=0;l&&(f=c.getTextContentSize()),t.set(c.__key,f,"text"),r.set(c.__key,f,"text")}}else{if(ge(o)){const s=o.getChildrenSize(),l=n>=s,c=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(c)){let f=0;l&&(f=c.getTextContentSize()),t.set(c.__key,f,"text")}}if(ge(a)){const s=a.getChildrenSize(),l=i>=s,c=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(_e(c)){let f=0;l&&(f=c.getTextContentSize()),r.set(c.__key,f,"text")}}}}function Ep(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 AT(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function oJ(e,t,n,r,i,o,a){const s=r.anchorNode,l=r.focusNode,c=r.anchorOffset,f=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&TI(d))return;if(!xe(t))return void(e!==null&&pg(n,s,l)&&r.removeAllRanges());const p=t.anchor,m=t.focus,y=p.key,g=m.key,v=Sp(n,y),x=Sp(n,g),w=p.offset,S=m.offset,A=t.format,_=t.style,C=t.isCollapsed();let E=v,k=x,M=!1;if(p.type==="text"){E=wp(v);const F=p.getNode();M=F.getFormat()!==A||F.getStyle()!==_}else xe(e)&&e.anchor.type==="text"&&(M=!0);var D,$,N,I,L;if(m.type==="text"&&(k=wp(x)),E!==null&&k!==null&&(C&&(e===null||M||xe(e)&&(e.format!==A||e.style!==_))&&(D=A,$=_,N=w,I=y,L=performance.now(),GI=[D,$,N,I,L]),c!==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 F=t instanceof Ns&&t.anchor.type==="element"?E.childNodes[w]||null:r.rangeCount>0?r.getRangeAt(0):null;if(F!==null){let W;if(F instanceof Text){const z=document.createRange();z.selectNode(F),W=z.getBoundingClientRect()}else W=F.getBoundingClientRect();(function(z,G,U){const V=U.ownerDocument,Y=V.defaultView;if(Y===null)return;let{top:ee,bottom:ie}=G,re=0,le=0,ae=U;for(;ae!==null;){const ue=ae===V.body;if(ue)re=0,le=bg(z).innerHeight;else{const J=ae.getBoundingClientRect();re=J.top,le=J.bottom}let ne=0;if(eele&&(ne=ie-le),ne!==0)if(ue)Y.scrollBy(0,ne);else{const J=ae.scrollTop;ae.scrollTop+=ne;const fe=ae.scrollTop-J;ee-=fe,ie-=fe}if(ue)break;ae=vg(ae)}})(n,W,o)}}Fx=!0}}function lb(e){let t=e;e.isCollapsed()||t.removeText();const n=ke();xe(n)&&(t=n),xe(t)||we(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!ul(i);)[i,o]=aJ(i,o);return o}function aJ(e,t){const n=e.getParent();if(!n){const i=wo();return Hn().append(i),i.select(),[Hn(),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 Ns(Oa(e.__key,t,"element"),Oa(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let _n=null,Sn=null,dr=!1,cb=!1,Xh=0;const PT={characterData:!0,childList:!0,subtree:!0};function id(){return dr||_n!==null&&_n._readOnly}function lr(){dr&&we(13)}function oR(){Xh>99&&we(14)}function $o(){return _n===null&&we(195,aR()),_n}function tn(){return Sn===null&&we(196,aR()),Sn}function aR(){let e=0;const t=new Set,n=Pg.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=mg(i);if(Y1(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 sJ(){return Sn}function TT(e,t,n){const r=t.__type,i=function(s,l){const c=s._nodes.get(l);return c===void 0&&we(30,l),c}(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=lR(e,t,n)}),i}const r=q1(e);for(let i=4;i>=0;i--)for(let o=0;o0||N>0;){if(D>0){S._dirtyLeaves=new Set;for(const I of M){const L=C.get(I);_e(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&eT(L),L!==void 0&&ET(L,E)&&TT(S,L,k),A.add(I)}if(M=S._dirtyLeaves,D=M.size,D>0){Xh++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map;for(const I of $){const L=I[0],F=I[1];if(L!=="root"&&!F)continue;const W=C.get(L);W!==void 0&&ET(W,E)&&TT(S,W,k),_.set(L,F)}M=S._dirtyLeaves,D=M.size,$=S._dirtyElements,N=$.size,Xh++}S._dirtyLeaves=A,S._dirtyElements=_}(c,e),MT(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)&&LI(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,c,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(c._flushSync=!0);const x=c._selection;if(xe(x)){const w=c._nodeMap,S=x.anchor.key,A=x.focus.key;w.get(S)!==void 0&&w.get(A)!==void 0||we(19)}else Sg(x)&&x._nodes.size===0&&(c._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=l,e._dirtyType=Ll,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void la(e)}finally{_n=d,dr=p,Sn=m,e._updating=y,Xh=0}e._dirtyType!==_s||function(v,x){const w=x.getEditorState()._selection,S=v._selection;if(S!==null){if(S.dirty||!S.is(w))return!0}else if(w!==null)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,la(e)):f&&RZ(()=>{la(e)}):(c._flushSync=!1,f&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Pr(e,t,n){e._updating?e._updates.push([t,n]):cR(e,t,n)}class Cg extends _g{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 PZ[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=tn()._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:wn(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&we(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:wn(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!==""?ZP[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=[],c=[],f=this.getChildAtIndex(t+n);let d=null,p=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const y=this.getChildAtIndex(t);y!==null&&(d=y.getPreviousSibling())}if(n>0){let y=d===null?this.getFirstChild():d.getNextSibling();for(let g=0;g({root:fR(Hn())}))}}class lJ extends Cg{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class _c extends Cg{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=xo[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 _c(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}createDOM(t){const n=document.createElement("p"),r=Nu(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:cJ,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(n&&e_(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=wo();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=wo();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 cJ(e){const t=wo();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 wo(){return xg(new _c)}function Ux(e){return e instanceof _c}const Vt=0,Bl=1;function dR(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=i_(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=_s,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 uJ(e){const t=e||{},n=sJ(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,a=i_(),s=t.namespace||(i!==null?i._config.namespace:$I()),l=t.editorState,c=[od,wc,nd,rd,_c,lJ,...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 g=0;g{Object.keys(A).forEach(_=>{let C=x.get(_);C===void 0&&(C=[],x.set(_,C)),C.push(A[_])})};return g.forEach(A=>{const _=A.klass.importDOM;if(_==null||w.has(_))return;w.add(_);const C=_.call(A.klass);C!==null&&S(C)}),v&&S(v),x}(m,d?d.import:void 0),p);return l!==void 0&&(y._pendingEditorState=l,y._dirtyType=Ll),y}class Pg{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=_s,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=$I(),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=KZ(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=$o();if(l.isEmpty())return;if(s==="root")return void Hn().markDirty();const c=l._nodeMap;for(const[,f]of c)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=Nu(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,dR(this,n,t,i),n!==null&&(this._config.disableEvents||XZ(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=Ll,PI(this),this._updateTags.add("history-merge"),la(this),this._config.disableEvents||function(s,l){const c=s.ownerDocument,f=Pp.get(c);(f===void 0||f<1)&&c.addEventListener("selectionchange",ZI),Pp.set(c,(f||0)+1),s.__lexicalEditor=l;const d=XI(s);for(let p=0;p{mT(v)||(pT(v),(l.isEditable()||m==="click")&&y(v,l))}:v=>{if(mT(v))return;pT(v);const x=l.isEditable();switch(m){case"cut":return x&&Oe(l,R1,v);case"copy":return Oe(l,I1,v);case"paste":return x&&Oe(l,k1,v);case"dragstart":return x&&Oe(l,xI,v);case"dragover":return x&&Oe(l,cZ,v);case"dragend":return x&&Oe(l,uZ,v);case"focus":return x&&Oe(l,hZ,v);case"blur":return x&&Oe(l,pZ,v);case"drop":return x&&Oe(l,bI,v)}};s.addEventListener(m,g),d.push(()=>{s.removeEventListener(m,g)})}}(t,this),r!=null&&t.classList.add(...r)}else this._editorState=i,this._pendingEditorState=null,this._window=null;Ru("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&we(38),AI(this);const r=this._pendingEditorState,i=this._updateTags,o=n!==void 0?n.tag:null;r===null||r.isEmpty()||(o!=null&&i.add(o),la(this)),this._pendingEditorState=t,this._dirtyType=Ll,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&i.add(o),la(this)}parseEditorState(t,n){return function(r,i,o){const a=i_(),s=_n,l=dr,c=Sn,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,_n=a,dr=!1,Sn=i;try{const y=i._nodes;sR(r.root,y),o&&o(),a._readOnly=!0}catch(y){y instanceof Error&&i._onError(y)}finally{i._dirtyElements=f,i._dirtyLeaves=d,i._cloneNotNeeded=p,i._dirtyType=m,_n=s,dr=l,Sn=c}return a}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return la(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=ke(),o=Hn();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=Bi(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Ru("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}Pg.version="0.17.1+prod.esm";const hR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,fJ=hR?O.useLayoutEffect:O.useEffect,Ch={tag:"history-merge"};function dJ({initialConfig:e,children:t}){const n=O.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:a,editorState:s,html:l}=e,c=nZ(null,r),f=uJ({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=Hn();if(m.isEmpty()){const y=wo();m.append(y);const g=hR?document.activeElement:null;(ke()!==null||g!==null&&g===d.getRootElement())&&y.select()}},Ch);else if(p!==null)switch(typeof p){case"string":{const m=d.parseEditorState(p);d.setEditorState(m,Ch);break}case"object":d.setEditorState(p,Ch);break;case"function":d.update(()=>{Hn().isEmpty()&&p(d)},Ch)}}}(f,s),[f,c]},[]);return fJ(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),P.jsx(dI.Provider,{value:n,children:t})}const hJ=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function pJ(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function mJ(){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 hJ(()=>{const{initialValueFn:a,subscribe:s}=n,l=a();return r.current!==l&&(r.current=l,o(l)),s(c=>{r.current=c,o(c)})},[n,e]),i}(pJ)}function gJ(){return Hn().getTextContent()}function yJ(e,t=!0){if(e)return!1;let n=gJ();return t&&(n=n.trim()),n===""}function vJ(e){if(!yJ(e,!1))return!1;const t=Hn().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;rvJ(e)}function bJ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}bJ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nd?d:f,g=f>d?f:d):m?(v=o?d:f,g=void 0):y&&(v=0,g=o?f:d),t.__text=t.__text.slice(v,g),t}}return t}function NT(e,t){const n=kx(e.focus,t);return Nt(n)&&!n.isIsolated()||ge(n)&&!n.isInline()&&!n.canBeEmpty()}function _J(e,t,n,r){e.modify(t?"extend":"move",n,r)}function SJ(e){const t=e.anchor.getNode();return(Zn(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function $T(e,t,n){const r=SJ(e);_J(e,t,n?!r:r,"character")}function OJ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}OJ(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 AJ(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function PJ(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[c,f,d,p,m,y]=l;e.update(()=>{const g=ke();if(xe(g)){const v=g.anchor;let x=v.getNode(),w=0,S=0;if(_e(x)&&c>=0&&f>=0&&(w=c,S=c+f,g.setTextNodeRange(x,w,x,S)),w===S&&d===""||(g.insertRawText(d),x=v.getNode()),_e(x)){w=p,S=p+m;const A=x.getTextContentSize();w=w>A?A:w,S=S>A?A:S,g.setTextNodeRange(x,w,x,S)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function TJ(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=Hn().getChildren();for(let i=0;i{if(e!==null){const n=AJ(e,KeyboardEvent)?null:e.clipboardData,r=ke();if(r!==null&&n!=null){e.preventDefault();const i=MJ(t);i!==null&&n.setData("text/html",i),n.setData("text/plain",r.getTextContent())}}})}function LJ(e){return Eo(e.registerCommand(ps,t=>{const n=ke();return!!xe(n)&&(n.deleteCharacter(t),!0)},Vt),e.registerCommand(nf,t=>{const n=ke();return!!xe(n)&&(n.deleteWord(t),!0)},Vt),e.registerCommand(rf,t=>{const n=ke();return!!xe(n)&&(n.deleteLine(t),!0)},Vt),e.registerCommand(Tl,t=>{const n=ke();if(!xe(n))return!1;if(typeof t=="string")n.insertText(t);else{const r=t.dataTransfer;if(r!=null)DT(r,n);else{const i=t.data;i&&n.insertText(i)}}return!0},Vt),e.registerCommand(Ax,()=>{const t=ke();return!!xe(t)&&(t.removeText(),!0)},Vt),e.registerCommand(Pl,t=>{const n=ke();return!!xe(n)&&(n.insertLineBreak(t),!0)},Vt),e.registerCommand(Cx,()=>{const t=ke();return!!xe(t)&&(t.insertLineBreak(),!0)},Vt),e.registerCommand($1,t=>{const n=ke();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!NT(n,!0)&&(r.preventDefault(),$T(n,i,!0),!0)},Vt),e.registerCommand(N1,t=>{const n=ke();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!NT(n,!1)&&(r.preventDefault(),$T(n,i,!1),!0)},Vt),e.registerCommand(D1,t=>{const n=ke();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(ps,!0))},Vt),e.registerCommand(yI,t=>{const n=ke();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(ps,!1))},Vt),e.registerCommand(of,t=>{const n=ke();if(!xe(n))return!1;if(t!==null){if((DJ||$J||RJ)&&NJ)return!1;t.preventDefault()}return e.dispatchCommand(Pl,!1)},Vt),e.registerCommand(Px,()=>(WZ(),!0),Vt),e.registerCommand(I1,t=>{const n=ke();return!!xe(n)&&(IT(t,e),!0)},Vt),e.registerCommand(R1,t=>{const n=ke();return!!xe(n)&&(function(r,i){IT(r,i),i.update(()=>{const o=ke();xe(o)&&o.removeText()})}(t,e),!0)},Vt),e.registerCommand(k1,t=>{const n=ke();return!!xe(n)&&(function(r,i){r.preventDefault(),i.update(()=>{const o=ke(),{clipboardData:a}=r;a!=null&&xe(o)&&DT(a,o)},{tag:"paste"})}(t,e),!0)},Vt),e.registerCommand(bI,t=>{const n=ke();return!!xe(n)&&(t.preventDefault(),!0)},Vt),e.registerCommand(xI,t=>{const n=ke();return!!xe(n)&&(t.preventDefault(),!0)},Vt))}const Hx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function RT(e){return e.getEditorState().read(pR(e.isComposing()))}function BJ({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Nr(),i=function(o,a){const[s,l]=O.useState(()=>o.getDecorators());return Hx(()=>o.registerDecoratorListener(c=>{Nl.flushSync(()=>{l(c)})}),[o]),O.useEffect(()=>{l(o.getDecorators())},[o]),O.useMemo(()=>{const c=[],f=Object.keys(s);for(let d=0;do._onError(g),children:P.jsx(O.Suspense,{fallback:null,children:s[p]})}),y=o.getElementByKey(p);y!==null&&c.push(Nl.createPortal(m,y,p))}return c},[a,s,o])}(r,n);return function(o){Hx(()=>Eo(LJ(o),PJ(o)),[o])}(r),P.jsxs(P.Fragment,{children:[e,P.jsx(FJ,{content:t}),i]})}function FJ({content:e}){const[t]=Nr(),n=function(i){const[o,a]=O.useState(()=>RT(i));return Hx(()=>{function s(){const l=RT(i);a(l)}return s(),Eo(i.registerUpdateListener(()=>{s()}),i.registerEditableListener(()=>{s()}))},[i]),o}(t),r=mJ();return n?typeof e=="function"?e(r):e:null}const yR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function WJ({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaExpanded:o,ariaLabel:a,ariaLabelledBy:s,ariaMultiline:l,ariaOwns:c,ariaRequired:f,autoCapitalize:d,className:p,id:m,role:y="textbox",spellCheck:g=!0,style:v,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 yR(()=>(C(e.isEditable()),e.registerEditableListener(M=>{C(M)})),[e]),P.jsx("div",{...S,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":i,"aria-expanded":_&&y==="combobox"?!!o:void 0,"aria-label":a,"aria-labelledby":s,"aria-multiline":l,"aria-owns":_?c:void 0,"aria-readonly":!_||void 0,"aria-required":f,autoCapitalize:d,className:p,contentEditable:_,"data-testid":w,id:m,ref:k,role:_?y:void 0,spellCheck:g,style:v,tabIndex:x})}const zJ=O.forwardRef(WJ);function LT(e){return e.getEditorState().read(pR(e.isComposing()))}const VJ=O.forwardRef(UJ);function UJ(e,t){const{placeholder:n,...r}=e,[i]=Nr();return P.jsxs(P.Fragment,{children:[P.jsx(zJ,{editor:i,...r,ref:t}),n!=null&&P.jsx(HJ,{editor:i,content:n})]})}function HJ({content:e,editor:t}){const n=function(a){const[s,l]=O.useState(()=>LT(a));return yR(()=>{function c(){const f=LT(a);l(f)}return c(),Eo(a.registerUpdateListener(()=>{c()}),a.registerEditableListener(()=>{c()}))},[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:P.jsx("div",{"aria-hidden":!0,children:o})}const Ah=0,Kx=1,Gx=2,si=0,KJ=1,BT=2,GJ=3,YJ=4;function qJ(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 KJ;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?BT:si}const l=s[0],c=e._nodeMap.get(l.__key);if(!_e(c)||!_e(l)||c.__mode!==l.__mode)return si;const f=c.__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 y=p.offset,g=m.offset,v=d.length-f.length;return v===1&&g===y-1?BT:v===-1&&g===y+1?GJ:v===-1&&g===y?YJ:si}function XJ(e,t){let n=Date.now(),r=si;return(i,o,a,s,l,c)=>{const f=Date.now();if(c.has("historic"))return r=si,n=f,Gx;const d=qJ(i,o,s,l,e.isComposing()),p=(()=>{const m=a===null||a.editor===e,y=c.has("history-push");if(!y&&m&&c.has("history-merge"))return Ah;if(i===null)return Kx;const g=o._selection;return s.size>0||l.size>0?y===!1&&d!==si&&d===r&&fS.exportJSON()))===JSON.stringify(w.read(()=>A.exportJSON()))}(Array.from(s)[0],i,o)?Ah:Kx:g!==null?Ah:Gx})();return n=f,r=d,p}}function FT(e){e.undoStack=[],e.redoStack=[],e.current=null}function ZJ(e,t,n){const r=XJ(e,n);return Eo(e.registerCommand(M1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(l.length!==0){const c=a.current,f=l.pop();c!==null&&(s.push(c),o.dispatchCommand(wh,!0)),l.length===0&&o.dispatchCommand(_h,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(j1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(s.length!==0){const c=a.current;c!==null&&(l.push(c),o.dispatchCommand(_h,!0));const f=s.pop();s.length===0&&o.dispatchCommand(wh,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(fZ,()=>(FT(t),!1),Vt),e.registerCommand(dZ,()=>(FT(t),e.dispatchCommand(wh,!1),e.dispatchCommand(_h,!1),!0),Vt),e.registerUpdateListener(({editorState:o,prevEditorState:a,dirtyLeaves:s,dirtyElements:l,tags:c})=>{const f=t.current,d=t.redoStack,p=t.undoStack,m=f===null?null:f.editorState;if(f!==null&&o===m)return;const y=r(a,o,f,s,l,c);if(y===Kx)d.length!==0&&(t.redoStack=[],e.dispatchCommand(wh,!1)),f!==null&&(p.push({...f}),e.dispatchCommand(_h,!0));else if(y===Gx)return;t.current={editor:e,editorState:o}}))}function JJ(){return{current:null,redoStack:[],undoStack:[]}}function QJ({delay:e,externalHistoryState:t}){const[n]=Nr();return function(r,i,o=1e3){const a=O.useMemo(()=>i||JJ(),[i]);O.useEffect(()=>ZJ(r,a,o),[o,r,a])}(n,t,e),null}function Yx(e,t){return Yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Yx(e,t)}var WT={error:null},eQ=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 iQ({editorRef:e}){const[t]=Nr();return te.useEffect(()=>{typeof e=="function"?e(t):typeof e=="object"&&(e.current=t)},[t]),null}const oQ="w-full [&>p]:w-full [&>p]:m-0",aQ="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",sQ="bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",lQ={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"},cQ="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",uQ={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]"},fQ="m-0 text-text-primary cursor-pointer",dQ={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"},hQ="bg-button-tertiary-hover",zT="startTransition",pQ=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect,VT=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 UT(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 y=m.position==="absolute",g=/(auto|scroll)/;if(m.position==="fixed")return document.body;for(let v=d;v=v.parentElement;)if(m=getComputedStyle(v),(!y||m.position!=="static")&&g.test(m.overflow+m.overflowY+m.overflowX))return v;return document.body}(o):document.body;let s=!1,l=UT(t,a);const c=function(){s||(window.requestAnimationFrame(function(){n(),s=!1}),s=!0);const d=UT(t,a);d!==l&&(l=d,r!=null&&r(d))},f=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",c,{capture:!0,passive:!0}),f.observe(t),()=>{f.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",c,!0)}}},[t,i,r,n,e])}const HT=iZ();function gQ({close:e,editor:t,anchorElementRef:n,resolution:r,options:i,menuRenderFn:o,onSelectOption:a,shouldSplitNodeWithQuery:s=!1,commandPriority:l=Bl}){const[c,f]=O.useState(null),d=r.match&&r.match.matchingString;O.useEffect(()=>{f(0)},[d]);const p=O.useCallback(y=>{t.update(()=>{const g=r.match!=null&&s?function(v){const x=ke();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=v.replaceableString.length,E=A-function(M,D,$){let N=$;for(let I=N;I<=D.length;I++)M.substr(-I)===D.substr(0,I)&&(N=I);return N}(_,v.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(y,g,e,r.match?r.match.matchingString:"")})},[t,s,r.match,a,e]),m=O.useCallback(y=>{const g=t.getRootElement();g!==null&&(g.setAttribute("aria-activedescendant","typeahead-item-"+y),f(y))},[t]);return O.useEffect(()=>()=>{const y=t.getRootElement();y!==null&&y.removeAttribute("aria-activedescendant")},[t]),pQ(()=>{i===null?f(null):c===null&&m(0)},[i,c,m]),O.useEffect(()=>Eo(t.registerCommand(HT,({option:y})=>!(!y.ref||y.ref.current==null)&&(VT(y.ref.current),!0),l)),[t,m,l]),O.useEffect(()=>Eo(t.registerCommand(mI,y=>{const g=y;if(i!==null&&i.length&&c!==null){const v=c!==i.length-1?c+1:0;m(v);const x=i[v];x.ref!=null&&x.ref.current&&t.dispatchCommand(HT,{index:v,option:x}),g.preventDefault(),g.stopImmediatePropagation()}return!0},l),t.registerCommand(pI,y=>{const g=y;if(i!==null&&i.length&&c!==null){const v=c!==0?c-1:i.length-1;m(v);const x=i[v];x.ref!=null&&x.ref.current&&VT(x.ref.current),g.preventDefault(),g.stopImmediatePropagation()}return!0},l),t.registerCommand(gI,y=>{const g=y;return g.preventDefault(),g.stopImmediatePropagation(),e(),!0},l),t.registerCommand(vI,y=>{const g=y;return i!==null&&c!==null&&i[c]!=null&&(g.preventDefault(),g.stopImmediatePropagation(),p(i[c]),!0)},l),t.registerCommand(of,y=>i!==null&&c!==null&&i[c]!=null&&(y!==null&&(y.preventDefault(),y.stopImmediatePropagation()),p(i[c]),!0),l)),[p,e,t,i,c,m,l]),o(n,O.useMemo(()=>({options:i,selectOptionAndCleanUp:p,selectedIndex:c,setHighlightedIndex:f}),[p,c,i]),r.match?r.match.matchingString:"")}function yQ({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:i,menuRenderFn:o,triggerFn:a,anchorClassName:s,commandPriority:l=Bl,parent:c}){const[f]=Nr(),[d,p]=O.useState(null),m=function(v,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&&v!==null){const{left:$,top:N,width:I,height:L}=v.getRect(),F=_.current.offsetHeight;if(M.style.top=`${N+window.pageYOffset+F+3}px`,M.style.left=`${$+window.pageXOffset}px`,M.style.height=`${L}px`,M.style.width=`${I}px`,D!==null){D.style.top=`${N}`;const W=D.getBoundingClientRect(),z=W.height,G=W.width,U=k.getBoundingClientRect();$+G>U.right&&(M.style.left=`${U.right-G+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,v,w,S]);O.useEffect(()=>{const k=A.getRootElement();if(v!==null)return C(),()=>{k!==null&&k.removeAttribute("aria-controls");const M=_.current;M!==null&&M.isConnected&&M.remove()}},[A,C,v]);const E=O.useCallback(k=>{v!==null&&(k||x(null))},[v,x]);return mQ(v,_.current,C,E),_}(d,p,s,c),y=O.useCallback(()=>{p(null),i!=null&&d!==null&&i()},[i,d]),g=O.useCallback(v=>{p(v),r!=null&&d===null&&r(v)},[r,d]);return O.useEffect(()=>{const v=f.registerUpdateListener(()=>{f.getEditorState().read(()=>{const x=f._window||window,w=x.document.createRange(),S=ke(),A=function(E){let k=null;return E.getEditorState().read(()=>{const M=ke();xe(M)&&(k=function(D){const $=D.anchor;if($.type!=="text")return null;const N=$.getNode();if(!N.isSimpleText())return null;const I=$.offset;return N.getTextContent().slice(0,I)}(M))}),k}(f);if(!xe(S)||!S.isCollapsed()||A===null||w===null)return void y();const _=a(A,f);if(t(_?_.matchingString:null),_!==null&&!function(E,k){return k===0&&E.getEditorState().read(()=>{const M=ke();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,I=k,L=$.anchorOffset;if(N==null||L==null)return!1;try{M.setStart(N,I),M.setEnd(N,L)}catch{return!1}return!0}(_.leadOffset,w,x)!==null)return C=()=>g({getRect:()=>w.getBoundingClientRect(),match:_}),void(zT in O?O[zT](C):C());var C;y()})});return()=>{v()}},[f,a,t,d,y,g]),d===null||f===null?null:P.jsx(gQ,{close:y,resolution:d,editor:f,anchorElementRef:m,options:e,menuRenderFn:o,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:l})}const vQ=e=>{switch(e){case"sm":return"xs";case"md":return"sm";case"lg":return"md";default:return"sm"}},bQ=({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=wn(r);d&&d.remove()})};let s=e;typeof e=="object"&&(s=e[t]);const l=O.useCallback(f=>{const d=wn(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]),c=O.useCallback(f=>{const d=wn(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=Eo(i.registerCommand($1,l,Bl),i.registerCommand(N1,c,Bl));return()=>{f()}},[i,l,c]),P.jsx(Xf,{className:"inline-flex mr-0.5",type:"rounded",size:vQ(n),label:s,icon:null,closable:!0,onClose:a,disabled:o})};class Fl extends uR{constructor(n,r,i,o){super(o);Xo(this,"__data");Xo(this,"__by");Xo(this,"__size");this.__data=n,this.__by=r,this.__size=i}static getType(){return"mention"}static clone(n){return new Fl(n.__data,n.__by,n.__size,n.__key)}static importJSON(n){return vR(n.data,n.by,n.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:Fl.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return P.jsx(bQ,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const vR=(e,t,n)=>new Fl(e,t,n),xQ=e=>e instanceof Fl;class wQ{constructor(t){Xo(this,"data");Xo(this,"key");Xo(this,"ref");Xo(this,"setRefElement");this.initData=t,this.key="",this.data=t,this.ref={current:null},this.setRefElement=n=>{this.ref.current=n}}}const ub=new Map;function _Q(e,t,n="name"){const[r,i]=O.useState([]);return O.useEffect(()=>{if(t===null){i([]);return}const o=ub.get(t);if(o!==null){if(o!==void 0){i(o);return}ub.set(t,null),SQ.search(e,t,a=>{ub.set(t,a),i(a)},n)}},[t]),r}const SQ={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)}},kp=({size:e,className:t,children:n})=>P.jsx("ul",{role:"menu",className:K(cQ,uQ[e],t),children:n});kp.displayName="EditorCombobox";const bR=O.forwardRef(({size:e,children:t,selected:n=!1,className:r,...i},o)=>P.jsx("li",{role:"option",ref:o,className:K(fQ,dQ[e],n&&hQ,r),...i,children:t}));bR.displayName="EditorCombobox.Item";kp.Item=bR;const OQ=({optionsArray:e,by:t="name",size:n="md",trigger:r="@",menuComponent:i=kp,menuItemComponent:o=kp.Item,autoSpace:a=!0})=>{const s=O.useRef(!1),l=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,c=[r].join(""),f="[^"+c+l+"\\s]",d="(?:\\.[ |$]| |["+l+"]|)",p=75,m=new RegExp(`(^|\\s|\\()([${c}]((?:${f}${d}){0,${p}}))$`),y=50,g=new RegExp(`(^|\\s|\\()([${c}]((?:${f}){0,${y}}))$`),v=M=>{let D=m.exec(M);if(D===null&&(D=g.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=_Q(e,w,t),_=O.useCallback((M,D,$)=>{x.update(()=>{const N=vR(M.data,t,n);D&&D.replace(N),$()})},[x]),C=O.useMemo(()=>A.map(M=>new wQ(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 I=ke(),{focus:L,anchor:F}=I,[W]=I.getNodes();if(!F||!L||(F==null?void 0:F.key)!==(L==null?void 0:L.key)||(F==null?void 0:F.offset)!==(L==null?void 0:L.offset)||!W)return!1;if(xQ(W)){const z=Mn(" ");return W.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 Eo(x.registerCommand(hI,E,Bl),x.registerCommand(D1,k,Bl))},[x,E]),P.jsx(yQ,{onQueryChange:S,onSelectOption:_,triggerFn:v,options:C,menuRenderFn:(M,{selectedIndex:D,selectOptionAndCleanUp:$,setHighlightedIndex:N})=>M.current&&(C!=null&&C.length)?P.jsx(i,{size:n,children:C.map((I,L)=>{var F;return P.jsx(o,{ref:I.ref,size:n,selected:L===D,onMouseEnter:()=>{N(L)},onClick:()=>$(I),children:typeof I.data=="string"?I.data:(F=I.data)==null?void 0:F[t]},L)})}):null})},CQ={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"}},AQ=({content:e})=>P.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:P.jsx("span",{className:"truncate",children:e})});function PQ(e){console.error(e)}const TQ=`{ + "root": { + "children": [ + { + "children": [], + "direction": null, + "format": "", + "indent": 0, + "type": "paragraph", + "version": 1, + "textFormat": 0, + "textStyle": "" + } + ], + "direction": null, + "format": "", + "indent": 0, + "type": "root", + "version": 1 + } +}`,xR=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:c,className:f,wrapperClassName:d,disabled:p=!1,autoSpaceAfterMention:m=!1},y)=>{const g={namespace:"Editor",editorTheme:CQ,onError:PQ,nodes:[Fl],editorState:e||TQ,editable:!p},v=(S,A)=>{typeof n=="function"&&n(S,A)};let x,w;return O.isValidElement(l)&&(x=l),O.isValidElement(c)&&(w=c),P.jsx("div",{className:K("relative w-full",aQ,lQ[r],p&&sQ,d),children:P.jsxs(dJ,{initialConfig:g,children:[P.jsx("div",{className:"relative w-full [&_p]:m-0",children:P.jsx(BJ,{contentEditable:P.jsx(VJ,{className:K("editor-content focus-visible:outline-none outline-none",oQ,f)}),placeholder:P.jsx(AQ,{content:t}),ErrorBoundary:tQ})}),P.jsx(QJ,{}),P.jsx(OQ,{menuComponent:x,menuItemComponent:w,size:r,by:a,optionsArray:o,trigger:s,autoSpace:m}),P.jsx(rQ,{onChange:v,ignoreSelectionChange:!0}),y&&P.jsx(iQ,{editorRef:y}),i&&P.jsx(rZ,{})]})})});xR.displayName="EditorInput";const EQ=(e,t,n,r)=>{const i=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return e==="dot"?K(i,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):e==="number"?K(i,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):e==="icon"?K(i,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""},kQ=(e,t,n)=>K("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),MQ=(e,t)=>K("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),jQ={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"}},wR=({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 c=O.Children.map(i,(f,d)=>{const p=d+1{const m=NQ(a,r,n,s,l,t,f),y={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)]"},g={lg:"top-3.5",md:"top-3",sm:"top-2.5"},v=()=>{if(e){const w=K(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 P.jsx("span",{className:w,children:e})}return null},x=()=>{if(!c){const w=K("block",r?"border-brand-primary-600":"border-border-subtle",d);return o==="stack"?P.jsx("div",{className:K("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",g[l],y[l]),children:P.jsx("span",{className:"block"})}):P.jsx("div",{className:"flex-1",children:P.jsx("span",{className:K("mr-2 border-y border-solid",!e&&"ml-2",w)})})}return null};return o==="stack"?P.jsxs("div",{className:"relative flex-1 justify-center",children:[P.jsxs("div",{className:K("flex items-center flex-col",i),...p,children:[m,v()]}),x()]}):P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:K("flex items-center",i),...p,children:[m,v()]}),x()]})};_R.displayName="ProgressSteps.Step";const NQ=(e,t,n,r,i,o,a)=>{if(t)return P.jsx(Hf,{className:MQ(r,i)});const s=kQ(!!n,r,i),l=EQ(e,n,r,i);let c=null;return e==="number"?c=a+1:e==="icon"&&o&&(c=o),P.jsx("span",{className:s,children:P.jsx("span",{className:l,children:c})})};wR.Step=_R;const $Q=({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 P.jsx("div",{className:K(r,"animate-pulse",i,t),...n})},SR=O.createContext({}),OR=()=>O.useContext(SR),Do=({size:e="md",children:t,className:n})=>P.jsx(SR.Provider,{value:{size:e},children:P.jsx("div",{className:K("flex flex-col bg-background-primary p-2",n),children:t})});Do.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),[c,f]=O.useState(!1),{size:d}=OR(),p="text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",m={sm:"text-xs",md:"text-sm"}[d??"md"],y={sm:"size-4",md:"size-5"}[d??"md"],g=()=>{l(!s),i&&i(!s)},v={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||c?"visible":"hidden":"visible";return P.jsxs("div",{children:[!!e&&P.jsxs("div",{role:"button",tabIndex:0,onClick:g,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&g()},onMouseEnter:()=>n&&f(!0),onMouseLeave:()=>n&&f(!1),className:K(p,m,e?"p-1":"p-0",a),"aria-expanded":s,children:[P.jsx("span",{className:"text-text-tertiary",children:e}),t&&P.jsx(dn.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:S(),exit:"hidden",variants:w,transition:{duration:.15},children:P.jsx(dn.span,{className:"inline-flex p-1",variants:v,animate:s?"open":"closed",transition:{duration:.15},children:P.jsx($w,{className:K("shrink-0",y)})})})]}),P.jsx(js,{initial:!1,children:s&&P.jsx(dn.ul,{role:"menu",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 AR=({disabled:e=!1,active:t,onClick:n,children:r,className:i})=>{const{size:o}=OR(),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",c=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 P.jsx("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(n==null||n())},className:K(a,s,l,c,f,"transition-colors duration-300 ease-in-out",i),children:r})};AR.displayName="Menu.Item";const PR=({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 P.jsx("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:P.jsx("hr",{className:K("w-full border-0 border-t border-border-subtle",n,t)})})};PR.displayName="Menu.Separator";Do.List=CR;Do.Item=AR;Do.Separator=PR;const TR=O.createContext({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),ER=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,borderOn:i=!0,...o})=>{const a=O.useRef(null),[s,l]=O.useState(()=>{const c=wu.get("sidebar-collapsed"),f=window.innerWidth<1280;return c||f});return O.useEffect(()=>{n&&n(s)},[s,n]),O.useEffect(()=>{const c=()=>{const f=window.innerWidth<1280;if(!r)l(!1),wu.remove("sidebar-collapsed");else if(f)l(!0),wu.set("sidebar-collapsed",!0);else{const d=wu.get("sidebar-collapsed");l(d||!1)}};return window.addEventListener("resize",c),c(),()=>{window.removeEventListener("resize",c)}},[r]),P.jsx(TR.Provider,{value:{isCollapsed:s,setIsCollapsed:l,collapsible:r},children:P.jsx("div",{ref:a,className:K("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",i&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",s&&"w-16 px-2",t),...o,children:e})})};ER.displayName="Sidebar";const kR=({children:e})=>P.jsx("div",{className:"space-y-2",children:e});kR.displayName="Sidebar.Header";const MR=({children:e})=>P.jsx("div",{className:K("space-y-4 grow items-start"),children:e});MR.displayName="Sidebar.Body";const jR=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=O.useContext(TR);return P.jsxs("div",{className:"space-y-4",children:[e,r&&P.jsx("button",{className:K("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),wu.set("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?P.jsx(P.Fragment,{children:P.jsx(tg,{title:"Expand",children:P.jsx(DH,{className:"size-5"})})}):P.jsxs(P.Fragment,{children:[P.jsx($H,{className:"size-5"})," Collapse"]})})]})};jR.displayName="Sidebar.Footer";const NR=({children:e,className:t})=>P.jsx("div",{className:K("w-full",t),children:e});NR.displayName="Sidebar.Item";const DQ=Object.assign(ER,{Header:kR,Body:MR,Footer:jR,Item:NR}),qx={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},ad=O.createContext({sizes:qx.sm}),Ta=({children:e,size:t="sm"})=>{const n=qx[t]||qx.sm;return P.jsx(ad.Provider,{value:{sizes:n},children:P.jsx("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:P.jsx("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};Ta.displayName="Breadcrumb";const $R=({children:e})=>P.jsx(P.Fragment,{children:e});$R.displayName="Breadcrumb.List";const DR=({children:e})=>P.jsx("li",{className:"m-0 inline-flex items-center gap-2",children:e});DR.displayName="Breadcrumb.Item";const IR=({href:e,children:t,className:n,as:r="a",...i})=>{const{sizes:o}=O.useContext(ad);return P.jsx(r,{href:e,className:K(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})};IR.displayName="Breadcrumb.Link";const RR=({type:e})=>{const{sizes:t}=O.useContext(ad),n={slash:P.jsx("span",{className:K("mx-1",t.separator),children:"/"}),arrow:P.jsx(Dw,{size:t.separatorIconSize})};return P.jsx("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:n[e]||n.arrow})};RR.displayName="Breadcrumb.Separator";const LR=()=>{const{sizes:e}=O.useContext(ad);return P.jsx(kH,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};LR.displayName="Breadcrumb.Ellipsis";const BR=({children:e})=>{const{sizes:t}=O.useContext(ad);return P.jsx("span",{className:K(t.text,"font-medium text-text-primary"),children:e})};BR.displayName="Breadcrumb.Page";Ta.List=$R;Ta.Item=DR;Ta.Link=IR;Ta.Separator=RR;Ta.Ellipsis=LR;Ta.Page=BR;const FR=O.createContext({}),Tg=()=>O.useContext(FR),WR={open:{opacity:1},exit:{opacity:0}},zR={duration:.2},Vi=({open:e,setOpen:t,children:n,trigger:r=null,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",scrollLock:l=!0})=>{const c=e!==void 0&&t!==void 0,[f,d]=O.useState(!1),p=O.useRef(null),m=O.useRef(null),y=O.useMemo(()=>c?e:f,[e,f]),g=O.useMemo(()=>c?t:d,[d,d]),v=()=>{y||g(!0)},x=()=>{y&&g(!1)},w=O.useCallback(()=>{var _;return O.isValidElement(r)?O.cloneElement(r,{onClick:Ku(v,(_=r==null?void 0:r.props)==null?void 0:_.onClick)}):typeof r=="function"?r({onClick:v}):null},[r,v,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)}),[y]),O.useEffect(()=>{if(!l)return;const _=document.querySelector("html");return y&&_&&(_.style.overflow="hidden"),()=>{_&&(_.style.overflow="")}},[y]),P.jsxs(P.Fragment,{children:[w(),P.jsx(FR.Provider,{value:{open:y,setOpen:g,handleClose:x,design:s,dialogContainerRef:m,dialogRef:p},children:P.jsx("div",{ref:m,className:K("fixed z-999999 w-0 h-0 overflow-visible",i),children:n})})]})};Vi.displayName="Dialog";const VR=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:i}=Tg();return P.jsx(js,{children:n&&P.jsx(dn.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:WR,role:"dialog",transition:zR,children:P.jsx("div",{className:"flex items-center justify-center min-h-full",children:P.jsx("div",{ref:i,className:K("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})})})})};VR.displayName="Dialog.Panel";const UR=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=Tg();return r!=null&&r.current?P.jsx(P.Fragment,{children:Nl.createPortal(P.jsx(js,{children:n&&P.jsx(dn.div,{className:K("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:WR,transition:zR})}),r.current)}):null};UR.displayName="Dialog.Backdrop";const HR=({children:e,className:t,...n})=>P.jsx("div",{className:K("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});HR.displayName="Dialog.Header";const KR=({children:e,as:t="h3",className:n,...r})=>P.jsx(t,{className:K("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});KR.displayName="Dialog.Title";const GR=({children:e,as:t="p",className:n,...r})=>P.jsx(t,{className:K("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});GR.displayName="Dialog.Description";const IQ=({className:e,...t})=>P.jsx("button",{className:K("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:P.jsx(ga,{className:"size-4 text-text-primary shrink-0"})}),YR=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=Tg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.cloneElement(e,{onClick:r}):P.jsx(t,{...n,onClick:r,children:e}):P.jsx(IQ,{onClick:r,...n})};YR.displayName="Dialog.CloseButton";const qR=({children:e,className:t,...n})=>P.jsx("div",{className:K("px-5",t),...n,children:e});qR.displayName="Dialog.Body";const XR=({children:e,className:t})=>{const{design:n,handleClose:r}=Tg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return P.jsx("div",{className:K("p-4 flex justify-end gap-3",{"bg-background-secondary":n==="footer-divided"},t),children:i()})};XR.displayName="Dialog.Footer";Vi.Panel=VR;Vi.Title=KR;Vi.Description=GR;Vi.CloseButton=YR;Vi.Header=HR;Vi.Body=qR;Vi.Footer=XR;Vi.Backdrop=UR;const Oc=({children:e,gap:t="lg",className:n,...r})=>P.jsx("div",{className:K("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",Rm(t),n),...r,children:e});Oc.displayName="Topbar";const ZR=({gap:e="sm",children:t,className:n})=>P.jsx("div",{className:K("flex items-center",Rm(e),n),children:t});ZR.displayName="Topbar.Left";const JR=({gap:e="md",children:t,align:n="center",className:r})=>{const i={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return P.jsx("div",{className:K("flex items-center grow",Rm(e),i,r),children:t})};JR.displayName="Topbar.Middle";const QR=({gap:e="sm",children:t,className:n})=>P.jsx("div",{className:K("flex items-center",Rm(e),n),children:t});QR.displayName="Topbar.Right";const e2=({children:e,className:t})=>P.jsx("div",{className:K("flex items-center [&>svg]:block h-full",t),children:e});e2.displayName="Topbar.Item";Oc.Left=ZR;Oc.Middle=JR;Oc.Right=QR;Oc.Item=e2;const RQ=e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,i=t.rightr;return{isLeft:i,isRight:o,isCenter:!i&&!o,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}},t2=O.createContext({}),LQ=t2.Provider,n2=()=>O.useContext(t2),BQ=e=>{const t=O.useRef({width:0,height:0});return O.useEffect(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current},FQ=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=e==null?void 0:e.getBoundingClientRect(),i=t==null?void 0:t.getBoundingClientRect(),o=n?(r==null?void 0:r.x)-(i==null?void 0:i.x)+(r==null?void 0:r.width)/2:(i==null?void 0:i.width)-((i==null?void 0:i.right)-(r==null?void 0:r.x))+(r==null?void 0:r.width)/2,a=(r==null?void 0:r.y)-(i==null?void 0:i.y)+(r==null?void 0:r.height)/2,s=(r==null?void 0:r.width)/2;return{open:(l=1e3)=>({clipPath:`circle(${l*2+200}px at ${o}px ${a}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${s}px at ${o}px ${a}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},fb=e=>P.jsx(dn.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),r2=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=n2();return P.jsx(bn,{ref:n,className:K("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu",icon:P.jsxs(dn.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[P.jsx(fb,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),P.jsx(fb,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),P.jsx(fb,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},WQ={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},i2=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:i,children:o,...a})=>{var f;let s=null,l=null;const c=n&&O.isValidElement(n)?O.cloneElement(n,{key:"left-icon",className:K("size-5",t?"text-brand-800":"text-icon-secondary",((f=n.props)==null?void 0:f.className)??"")}):null;switch(r){case"left":s=c;break;case"right":l=c;break;default:s=null,l=null;break}return P.jsx(VQ,{children:P.jsxs(e,{className:K("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",i),...a,children:[!!s&&s,P.jsx("span",{className:"contents",children:o}),!!l&&l]})})},zQ={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},VQ=({children:e})=>P.jsx(dn.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:zQ,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),o2=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:i}=n2(),[o,a]=O.useState(null);return n?P.jsxs(dn.div,{ref:a,className:K("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[o&&P.jsx(dn.div,{className:K("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",r?"right-0":"left-0"),variants:FQ(n,o,i??!1)}),P.jsx(dn.ul,{variants:WQ,className:K("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},sd=({className:e,children:t})=>{const[n,r]=EX(!1,!0),[i,o]=O.useState(null),a=O.useRef(null),{height:s}=BQ(a),{isRight:l=!1,isLeft:c=!0}=RQ(i),d={isOpen:n,toggleOpen:r,setTriggerRef:p=>{O.startTransition(()=>{o(p)})},triggerRef:i,triggerOnRight:l,triggerOnLeft:c};return P.jsx(LQ,{value:d,children:P.jsx("div",{className:K("size-6 z-[1]",e),children:P.jsx(dn.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:s,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:a,children:t})})})};sd.displayName="HamburgerMenu";r2.displayName="HamburgerMenu.Toggle";o2.displayName="HamburgerMenu.Options";i2.displayName="HamburgerMenu.Option";sd.Options=o2;sd.Option=i2;sd.Toggle=r2;var Mp={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 + */Mp.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__",c=500,f="__lodash_placeholder__",d=1,p=2,m=4,y=1,g=2,v=1,x=2,w=4,S=8,A=16,_=32,C=64,E=128,k=256,M=512,D=30,$="...",N=800,I=16,L=1,F=2,W=3,z=1/0,G=9007199254740991,U=17976931348623157e292,V=NaN,Y=4294967295,ee=Y-1,ie=Y>>>1,re=[["ary",E],["bind",v],["bindKey",x],["curry",S],["curryRight",A],["flip",M],["partial",_],["partialRight",C],["rearg",k]],le="[object Arguments]",ae="[object Array]",ue="[object AsyncFunction]",ne="[object Boolean]",J="[object Date]",fe="[object DOMException]",ve="[object Error]",X="[object Function]",je="[object GeneratorFunction]",he="[object Map]",Ee="[object Number]",Ze="[object Null]",tt="[object Object]",Rn="[object Promise]",Ne="[object Proxy]",nt="[object RegExp]",Se="[object Set]",ze="[object String]",Lt="[object Symbol]",at="[object Undefined]",Wt="[object WeakMap]",$r="[object WeakSet]",mn="[object ArrayBuffer]",rn="[object DataView]",nr="[object Float32Array]",qe="[object Float64Array]",$t="[object Int8Array]",pt="[object Int16Array]",Cn="[object Int32Array]",Dr="[object Uint8Array]",Yi="[object Uint8ClampedArray]",Xt="[object Uint16Array]",pr="[object Uint32Array]",Zt=/\b__p \+= '';/g,Ir=/\b(__p \+=) '' \+/g,lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wd=/&(?:amp|lt|gt|quot|#39);/g,_d=/[&<>"']/g,my=RegExp(wd.source),Fc=RegExp(_d.source),Wc=/<%-([\s\S]+?)%>/g,dz=/<%([\s\S]+?)%>/g,SS=/<%=([\s\S]+?)%>/g,hz=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pz=/^\w*$/,mz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gy=/[\\^$.*+?()[\]{}|]/g,gz=RegExp(gy.source),yy=/^\s+/,yz=/\s/,vz=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bz=/\{\n\/\* \[wrapped with (.+)\] \*/,xz=/,? & /,wz=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,_z=/[()=,{}\[\]\/\s]/,Sz=/\\(\\)?/g,Oz=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,OS=/\w*$/,Cz=/^[-+]0x[0-9a-f]+$/i,Az=/^0b[01]+$/i,Pz=/^\[object .+?Constructor\]$/,Tz=/^0o[0-7]+$/i,Ez=/^(?:0|[1-9]\d*)$/,kz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sd=/($^)/,Mz=/['\n\r\u2028\u2029\\]/g,Od="\\ud800-\\udfff",jz="\\u0300-\\u036f",Nz="\\ufe20-\\ufe2f",$z="\\u20d0-\\u20ff",CS=jz+Nz+$z,AS="\\u2700-\\u27bf",PS="a-z\\xdf-\\xf6\\xf8-\\xff",Dz="\\xac\\xb1\\xd7\\xf7",Iz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Rz="\\u2000-\\u206f",Lz=" \\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",TS="A-Z\\xc0-\\xd6\\xd8-\\xde",ES="\\ufe0e\\ufe0f",kS=Dz+Iz+Rz+Lz,vy="['’]",Bz="["+Od+"]",MS="["+kS+"]",Cd="["+CS+"]",jS="\\d+",Fz="["+AS+"]",NS="["+PS+"]",$S="[^"+Od+kS+jS+AS+PS+TS+"]",by="\\ud83c[\\udffb-\\udfff]",Wz="(?:"+Cd+"|"+by+")",DS="[^"+Od+"]",xy="(?:\\ud83c[\\udde6-\\uddff]){2}",wy="[\\ud800-\\udbff][\\udc00-\\udfff]",zs="["+TS+"]",IS="\\u200d",RS="(?:"+NS+"|"+$S+")",zz="(?:"+zs+"|"+$S+")",LS="(?:"+vy+"(?:d|ll|m|re|s|t|ve))?",BS="(?:"+vy+"(?:D|LL|M|RE|S|T|VE))?",FS=Wz+"?",WS="["+ES+"]?",Vz="(?:"+IS+"(?:"+[DS,xy,wy].join("|")+")"+WS+FS+")*",Uz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zS=WS+FS+Vz,Kz="(?:"+[Fz,xy,wy].join("|")+")"+zS,Gz="(?:"+[DS+Cd+"?",Cd,xy,wy,Bz].join("|")+")",Yz=RegExp(vy,"g"),qz=RegExp(Cd,"g"),_y=RegExp(by+"(?="+by+")|"+Gz+zS,"g"),Xz=RegExp([zs+"?"+NS+"+"+LS+"(?="+[MS,zs,"$"].join("|")+")",zz+"+"+BS+"(?="+[MS,zs+RS,"$"].join("|")+")",zs+"?"+RS+"+"+LS,zs+"+"+BS,Hz,Uz,jS,Kz].join("|"),"g"),Zz=RegExp("["+IS+Od+CS+ES+"]"),Jz=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qz=["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"],e5=-1,Et={};Et[nr]=Et[qe]=Et[$t]=Et[pt]=Et[Cn]=Et[Dr]=Et[Yi]=Et[Xt]=Et[pr]=!0,Et[le]=Et[ae]=Et[mn]=Et[ne]=Et[rn]=Et[J]=Et[ve]=Et[X]=Et[he]=Et[Ee]=Et[tt]=Et[nt]=Et[Se]=Et[ze]=Et[Wt]=!1;var Ot={};Ot[le]=Ot[ae]=Ot[mn]=Ot[rn]=Ot[ne]=Ot[J]=Ot[nr]=Ot[qe]=Ot[$t]=Ot[pt]=Ot[Cn]=Ot[he]=Ot[Ee]=Ot[tt]=Ot[nt]=Ot[Se]=Ot[ze]=Ot[Lt]=Ot[Dr]=Ot[Yi]=Ot[Xt]=Ot[pr]=!0,Ot[ve]=Ot[X]=Ot[Wt]=!1;var t5={À:"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"},n5={"&":"&","<":"<",">":">",'"':""","'":"'"},r5={"&":"&","<":"<",">":">",""":'"',"'":"'"},i5={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},o5=parseFloat,a5=parseInt,VS=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,s5=typeof self=="object"&&self&&self.Object===Object&&self,An=VS||s5||Function("return this")(),Sy=t&&!t.nodeType&&t,Ia=Sy&&!0&&e&&!e.nodeType&&e,US=Ia&&Ia.exports===Sy,Oy=US&&VS.process,Rr=function(){try{var Z=Ia&&Ia.require&&Ia.require("util").types;return Z||Oy&&Oy.binding&&Oy.binding("util")}catch{}}(),HS=Rr&&Rr.isArrayBuffer,KS=Rr&&Rr.isDate,GS=Rr&&Rr.isMap,YS=Rr&&Rr.isRegExp,qS=Rr&&Rr.isSet,XS=Rr&&Rr.isTypedArray;function mr(Z,ce,oe){switch(oe.length){case 0:return Z.call(ce);case 1:return Z.call(ce,oe[0]);case 2:return Z.call(ce,oe[0],oe[1]);case 3:return Z.call(ce,oe[0],oe[1],oe[2])}return Z.apply(ce,oe)}function l5(Z,ce,oe,Ce){for(var We=-1,st=Z==null?0:Z.length;++We-1}function Cy(Z,ce,oe){for(var Ce=-1,We=Z==null?0:Z.length;++Ce-1;);return oe}function iO(Z,ce){for(var oe=Z.length;oe--&&Vs(ce,Z[oe],0)>-1;);return oe}function y5(Z,ce){for(var oe=Z.length,Ce=0;oe--;)Z[oe]===ce&&++Ce;return Ce}var v5=Ey(t5),b5=Ey(n5);function x5(Z){return"\\"+i5[Z]}function w5(Z,ce){return Z==null?n:Z[ce]}function Us(Z){return Zz.test(Z)}function _5(Z){return Jz.test(Z)}function S5(Z){for(var ce,oe=[];!(ce=Z.next()).done;)oe.push(ce.value);return oe}function Ny(Z){var ce=-1,oe=Array(Z.size);return Z.forEach(function(Ce,We){oe[++ce]=[We,Ce]}),oe}function oO(Z,ce){return function(oe){return Z(ce(oe))}}function Vo(Z,ce){for(var oe=-1,Ce=Z.length,We=0,st=[];++oe-1}function u3(u,h){var b=this.__data__,T=Vd(b,u);return T<0?(++this.size,b.push([u,h])):b[T][1]=h,this}qi.prototype.clear=a3,qi.prototype.delete=s3,qi.prototype.get=l3,qi.prototype.has=c3,qi.prototype.set=u3;function Xi(u){var h=-1,b=u==null?0:u.length;for(this.clear();++h=h?u:h)),u}function Wr(u,h,b,T,j,B){var H,q=h&d,Q=h&p,de=h&m;if(b&&(H=j?b(u,T,j,B):b(u)),H!==n)return H;if(!Bt(u))return u;var pe=Ve(u);if(pe){if(H=pV(u),!q)return rr(u,H)}else{var me=Bn(u),be=me==X||me==je;if(qo(u))return WO(u,q);if(me==tt||me==le||be&&!j){if(H=Q||be?{}:aC(u),!q)return Q?rV(u,A3(H,u)):nV(u,yO(H,u))}else{if(!Ot[me])return j?u:{};H=mV(u,me,q)}}B||(B=new ti);var Pe=B.get(u);if(Pe)return Pe;B.set(u,H),DC(u)?u.forEach(function(De){H.add(Wr(De,h,b,De,u,B))}):NC(u)&&u.forEach(function(De,Je){H.set(Je,Wr(De,h,b,Je,u,B))});var $e=de?Q?ov:iv:Q?or:gn,Ye=pe?n:$e(u);return Lr(Ye||u,function(De,Je){Ye&&(Je=De,De=u[Je]),Yc(H,Je,Wr(De,h,b,Je,u,B))}),H}function P3(u){var h=gn(u);return function(b){return vO(b,u,h)}}function vO(u,h,b){var T=b.length;if(u==null)return!T;for(u=wt(u);T--;){var j=b[T],B=h[j],H=u[j];if(H===n&&!(j in u)||!B(H))return!1}return!0}function bO(u,h,b){if(typeof u!="function")throw new Br(a);return tu(function(){u.apply(n,b)},h)}function qc(u,h,b,T){var j=-1,B=Ad,H=!0,q=u.length,Q=[],de=h.length;if(!q)return Q;b&&(h=Dt(h,gr(b))),T?(B=Cy,H=!1):h.length>=i&&(B=zc,H=!1,h=new Ba(h));e:for(;++jj?0:j+b),T=T===n||T>j?j:He(T),T<0&&(T+=j),T=b>T?0:RC(T);b0&&b(q)?h>1?Pn(q,h-1,b,T,j):zo(j,q):T||(j[j.length]=q)}return j}var Fy=GO(),_O=GO(!0);function wi(u,h){return u&&Fy(u,h,gn)}function Wy(u,h){return u&&_O(u,h,gn)}function Hd(u,h){return Wo(h,function(b){return to(u[b])})}function Wa(u,h){h=Go(h,u);for(var b=0,T=h.length;u!=null&&bh}function k3(u,h){return u!=null&&mt.call(u,h)}function M3(u,h){return u!=null&&h in wt(u)}function j3(u,h,b){return u>=Ln(h,b)&&u=120&&pe.length>=120)?new Ba(H&&pe):n}pe=u[0];var me=-1,be=q[0];e:for(;++me-1;)q!==u&&Id.call(q,Q,1),Id.call(u,Q,1);return u}function NO(u,h){for(var b=u?h.length:0,T=b-1;b--;){var j=h[b];if(b==T||j!==B){var B=j;eo(j)?Id.call(u,j,1):Zy(u,j)}}return u}function Yy(u,h){return u+Bd(hO()*(h-u+1))}function H3(u,h,b,T){for(var j=-1,B=an(Ld((h-u)/(b||1)),0),H=oe(B);B--;)H[T?B:++j]=u,u+=b;return H}function qy(u,h){var b="";if(!u||h<1||h>G)return b;do h%2&&(b+=u),h=Bd(h/2),h&&(u+=u);while(h);return b}function Xe(u,h){return dv(cC(u,h,ar),u+"")}function K3(u){return gO(tl(u))}function G3(u,h){var b=tl(u);return nh(b,Fa(h,0,b.length))}function Jc(u,h,b,T){if(!Bt(u))return u;h=Go(h,u);for(var j=-1,B=h.length,H=B-1,q=u;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 B=oe(j);++T>>1,H=u[B];H!==null&&!vr(H)&&(b?H<=h:H=i){var de=h?null:sV(u);if(de)return Td(de);H=!1,j=zc,Q=new Ba}else Q=h?[]:q;e:for(;++T=T?u:zr(u,h,b)}var FO=L5||function(u){return An.clearTimeout(u)};function WO(u,h){if(h)return u.slice();var b=u.length,T=lO?lO(b):new u.constructor(b);return u.copy(T),T}function tv(u){var h=new u.constructor(u.byteLength);return new $d(h).set(new $d(u)),h}function J3(u,h){var b=h?tv(u.buffer):u.buffer;return new u.constructor(b,u.byteOffset,u.byteLength)}function Q3(u){var h=new u.constructor(u.source,OS.exec(u));return h.lastIndex=u.lastIndex,h}function eV(u){return Gc?wt(Gc.call(u)):{}}function zO(u,h){var b=h?tv(u.buffer):u.buffer;return new u.constructor(b,u.byteOffset,u.length)}function VO(u,h){if(u!==h){var b=u!==n,T=u===null,j=u===u,B=vr(u),H=h!==n,q=h===null,Q=h===h,de=vr(h);if(!q&&!de&&!B&&u>h||B&&H&&Q&&!q&&!de||T&&H&&Q||!b&&Q||!j)return 1;if(!T&&!B&&!de&&u=q)return Q;var de=b[T];return Q*(de=="desc"?-1:1)}}return u.index-h.index}function UO(u,h,b,T){for(var j=-1,B=u.length,H=b.length,q=-1,Q=h.length,de=an(B-H,0),pe=oe(Q+de),me=!T;++q1?b[j-1]:n,H=j>2?b[2]:n;for(B=u.length>3&&typeof B=="function"?(j--,B):n,H&&Gn(b[0],b[1],H)&&(B=j<3?n:B,j=1),h=wt(h);++T-1?j[B?h[H]:H]:n}}function XO(u){return Qi(function(h){var b=h.length,T=b,j=Fr.prototype.thru;for(u&&h.reverse();T--;){var B=h[T];if(typeof B!="function")throw new Br(a);if(j&&!H&&eh(B)=="wrapper")var H=new Fr([],!0)}for(T=H?T:b;++T1&&it.reverse(),pe&&Qq))return!1;var de=B.get(u),pe=B.get(h);if(de&&pe)return de==h&&pe==u;var me=-1,be=!0,Pe=b&g?new Ba:n;for(B.set(u,h),B.set(h,u);++me1?"& ":"")+h[T],h=h.join(b>2?", ":" "),u.replace(vz,`{ +/* [wrapped with `+h+`] */ +`)}function yV(u){return Ve(u)||Ua(u)||!!(fO&&u&&u[fO])}function eo(u,h){var b=typeof u;return h=h??G,!!h&&(b=="number"||b!="symbol"&&Ez.test(u))&&u>-1&&u%1==0&&u0){if(++h>=N)return arguments[0]}else h=0;return u.apply(n,arguments)}}function nh(u,h){var b=-1,T=u.length,j=T-1;for(h=h===n?T:h;++b1?u[h-1]:n;return b=typeof b=="function"?(u.pop(),b):n,wC(u,b)});function _C(u){var h=R(u);return h.__chain__=!0,h}function T4(u,h){return h(u),u}function rh(u,h){return h(u)}var E4=Qi(function(u){var h=u.length,b=h?u[0]:0,T=this.__wrapped__,j=function(B){return By(B,u)};return h>1||this.__actions__.length||!(T instanceof rt)||!eo(b)?this.thru(j):(T=T.slice(b,+b+(h?1:0)),T.__actions__.push({func:rh,args:[j],thisArg:n}),new Fr(T,this.__chain__).thru(function(B){return h&&!B.length&&B.push(n),B}))});function k4(){return _C(this)}function M4(){return new Fr(this.value(),this.__chain__)}function j4(){this.__values__===n&&(this.__values__=IC(this.value()));var u=this.__index__>=this.__values__.length,h=u?n:this.__values__[this.__index__++];return{done:u,value:h}}function N4(){return this}function $4(u){for(var h,b=this;b instanceof zd;){var T=mC(b);T.__index__=0,T.__values__=n,h?j.__wrapped__=T:h=T;var j=T;b=b.__wrapped__}return j.__wrapped__=u,h}function D4(){var u=this.__wrapped__;if(u instanceof rt){var h=u;return this.__actions__.length&&(h=new rt(this)),h=h.reverse(),h.__actions__.push({func:rh,args:[hv],thisArg:n}),new Fr(h,this.__chain__)}return this.thru(hv)}function I4(){return LO(this.__wrapped__,this.__actions__)}var R4=qd(function(u,h,b){mt.call(u,b)?++u[b]:Zi(u,b,1)});function L4(u,h,b){var T=Ve(u)?ZS:T3;return b&&Gn(u,h,b)&&(h=n),T(u,Me(h,3))}function B4(u,h){var b=Ve(u)?Wo:wO;return b(u,Me(h,3))}var F4=qO(gC),W4=qO(yC);function z4(u,h){return Pn(ih(u,h),1)}function V4(u,h){return Pn(ih(u,h),z)}function U4(u,h,b){return b=b===n?1:He(b),Pn(ih(u,h),b)}function SC(u,h){var b=Ve(u)?Lr:Ho;return b(u,Me(h,3))}function OC(u,h){var b=Ve(u)?c5:xO;return b(u,Me(h,3))}var H4=qd(function(u,h,b){mt.call(u,b)?u[b].push(h):Zi(u,b,[h])});function K4(u,h,b,T){u=ir(u)?u:tl(u),b=b&&!T?He(b):0;var j=u.length;return b<0&&(b=an(j+b,0)),ch(u)?b<=j&&u.indexOf(h,b)>-1:!!j&&Vs(u,h,b)>-1}var G4=Xe(function(u,h,b){var T=-1,j=typeof h=="function",B=ir(u)?oe(u.length):[];return Ho(u,function(H){B[++T]=j?mr(h,H,b):Xc(H,h,b)}),B}),Y4=qd(function(u,h,b){Zi(u,b,h)});function ih(u,h){var b=Ve(u)?Dt:PO;return b(u,Me(h,3))}function q4(u,h,b,T){return u==null?[]:(Ve(h)||(h=h==null?[]:[h]),b=T?n:b,Ve(b)||(b=b==null?[]:[b]),MO(u,h,b))}var X4=qd(function(u,h,b){u[b?0:1].push(h)},function(){return[[],[]]});function Z4(u,h,b){var T=Ve(u)?Ay:tO,j=arguments.length<3;return T(u,Me(h,4),b,j,Ho)}function J4(u,h,b){var T=Ve(u)?u5:tO,j=arguments.length<3;return T(u,Me(h,4),b,j,xO)}function Q4(u,h){var b=Ve(u)?Wo:wO;return b(u,sh(Me(h,3)))}function eU(u){var h=Ve(u)?gO:K3;return h(u)}function tU(u,h,b){(b?Gn(u,h,b):h===n)?h=1:h=He(h);var T=Ve(u)?S3:G3;return T(u,h)}function nU(u){var h=Ve(u)?O3:q3;return h(u)}function rU(u){if(u==null)return 0;if(ir(u))return ch(u)?Hs(u):u.length;var h=Bn(u);return h==he||h==Se?u.size:Hy(u).length}function iU(u,h,b){var T=Ve(u)?Py:X3;return b&&Gn(u,h,b)&&(h=n),T(u,Me(h,3))}var oU=Xe(function(u,h){if(u==null)return[];var b=h.length;return b>1&&Gn(u,h[0],h[1])?h=[]:b>2&&Gn(h[0],h[1],h[2])&&(h=[h[0]]),MO(u,Pn(h,1),[])}),oh=B5||function(){return An.Date.now()};function aU(u,h){if(typeof h!="function")throw new Br(a);return u=He(u),function(){if(--u<1)return h.apply(this,arguments)}}function CC(u,h,b){return h=b?n:h,h=u&&h==null?u.length:h,Ji(u,E,n,n,n,n,h)}function AC(u,h){var b;if(typeof h!="function")throw new Br(a);return u=He(u),function(){return--u>0&&(b=h.apply(this,arguments)),u<=1&&(h=n),b}}var mv=Xe(function(u,h,b){var T=v;if(b.length){var j=Vo(b,Qs(mv));T|=_}return Ji(u,T,h,b,j)}),PC=Xe(function(u,h,b){var T=v|x;if(b.length){var j=Vo(b,Qs(PC));T|=_}return Ji(h,T,u,b,j)});function TC(u,h,b){h=b?n:h;var T=Ji(u,S,n,n,n,n,n,h);return T.placeholder=TC.placeholder,T}function EC(u,h,b){h=b?n:h;var T=Ji(u,A,n,n,n,n,n,h);return T.placeholder=EC.placeholder,T}function kC(u,h,b){var T,j,B,H,q,Q,de=0,pe=!1,me=!1,be=!0;if(typeof u!="function")throw new Br(a);h=Ur(h)||0,Bt(b)&&(pe=!!b.leading,me="maxWait"in b,B=me?an(Ur(b.maxWait)||0,h):B,be="trailing"in b?!!b.trailing:be);function Pe(Gt){var ri=T,ro=j;return T=j=n,de=Gt,H=u.apply(ro,ri),H}function $e(Gt){return de=Gt,q=tu(Je,h),pe?Pe(Gt):H}function Ye(Gt){var ri=Gt-Q,ro=Gt-de,qC=h-ri;return me?Ln(qC,B-ro):qC}function De(Gt){var ri=Gt-Q,ro=Gt-de;return Q===n||ri>=h||ri<0||me&&ro>=B}function Je(){var Gt=oh();if(De(Gt))return it(Gt);q=tu(Je,Ye(Gt))}function it(Gt){return q=n,be&&T?Pe(Gt):(T=j=n,H)}function br(){q!==n&&FO(q),de=0,T=Q=j=q=n}function Yn(){return q===n?H:it(oh())}function xr(){var Gt=oh(),ri=De(Gt);if(T=arguments,j=this,Q=Gt,ri){if(q===n)return $e(Q);if(me)return FO(q),q=tu(Je,h),Pe(Q)}return q===n&&(q=tu(Je,h)),H}return xr.cancel=br,xr.flush=Yn,xr}var sU=Xe(function(u,h){return bO(u,1,h)}),lU=Xe(function(u,h,b){return bO(u,Ur(h)||0,b)});function cU(u){return Ji(u,M)}function ah(u,h){if(typeof u!="function"||h!=null&&typeof h!="function")throw new Br(a);var b=function(){var T=arguments,j=h?h.apply(this,T):T[0],B=b.cache;if(B.has(j))return B.get(j);var H=u.apply(this,T);return b.cache=B.set(j,H)||B,H};return b.cache=new(ah.Cache||Xi),b}ah.Cache=Xi;function sh(u){if(typeof u!="function")throw new Br(a);return function(){var h=arguments;switch(h.length){case 0:return!u.call(this);case 1:return!u.call(this,h[0]);case 2:return!u.call(this,h[0],h[1]);case 3:return!u.call(this,h[0],h[1],h[2])}return!u.apply(this,h)}}function uU(u){return AC(2,u)}var fU=Z3(function(u,h){h=h.length==1&&Ve(h[0])?Dt(h[0],gr(Me())):Dt(Pn(h,1),gr(Me()));var b=h.length;return Xe(function(T){for(var j=-1,B=Ln(T.length,b);++j=h}),Ua=OO(function(){return arguments}())?OO:function(u){return zt(u)&&mt.call(u,"callee")&&!uO.call(u,"callee")},Ve=oe.isArray,AU=HS?gr(HS):$3;function ir(u){return u!=null&&lh(u.length)&&!to(u)}function Kt(u){return zt(u)&&ir(u)}function PU(u){return u===!0||u===!1||zt(u)&&Kn(u)==ne}var qo=W5||Pv,TU=KS?gr(KS):D3;function EU(u){return zt(u)&&u.nodeType===1&&!nu(u)}function kU(u){if(u==null)return!0;if(ir(u)&&(Ve(u)||typeof u=="string"||typeof u.splice=="function"||qo(u)||el(u)||Ua(u)))return!u.length;var h=Bn(u);if(h==he||h==Se)return!u.size;if(eu(u))return!Hy(u).length;for(var b in u)if(mt.call(u,b))return!1;return!0}function MU(u,h){return Zc(u,h)}function jU(u,h,b){b=typeof b=="function"?b:n;var T=b?b(u,h):n;return T===n?Zc(u,h,n,b):!!T}function yv(u){if(!zt(u))return!1;var h=Kn(u);return h==ve||h==fe||typeof u.message=="string"&&typeof u.name=="string"&&!nu(u)}function NU(u){return typeof u=="number"&&dO(u)}function to(u){if(!Bt(u))return!1;var h=Kn(u);return h==X||h==je||h==ue||h==Ne}function jC(u){return typeof u=="number"&&u==He(u)}function lh(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=G}function Bt(u){var h=typeof u;return u!=null&&(h=="object"||h=="function")}function zt(u){return u!=null&&typeof u=="object"}var NC=GS?gr(GS):R3;function $U(u,h){return u===h||Uy(u,h,sv(h))}function DU(u,h,b){return b=typeof b=="function"?b:n,Uy(u,h,sv(h),b)}function IU(u){return $C(u)&&u!=+u}function RU(u){if(xV(u))throw new We(o);return CO(u)}function LU(u){return u===null}function BU(u){return u==null}function $C(u){return typeof u=="number"||zt(u)&&Kn(u)==Ee}function nu(u){if(!zt(u)||Kn(u)!=tt)return!1;var h=Dd(u);if(h===null)return!0;var b=mt.call(h,"constructor")&&h.constructor;return typeof b=="function"&&b instanceof b&&Md.call(b)==D5}var vv=YS?gr(YS):L3;function FU(u){return jC(u)&&u>=-G&&u<=G}var DC=qS?gr(qS):B3;function ch(u){return typeof u=="string"||!Ve(u)&&zt(u)&&Kn(u)==ze}function vr(u){return typeof u=="symbol"||zt(u)&&Kn(u)==Lt}var el=XS?gr(XS):F3;function WU(u){return u===n}function zU(u){return zt(u)&&Bn(u)==Wt}function VU(u){return zt(u)&&Kn(u)==$r}var UU=Qd(Ky),HU=Qd(function(u,h){return u<=h});function IC(u){if(!u)return[];if(ir(u))return ch(u)?ei(u):rr(u);if(Vc&&u[Vc])return S5(u[Vc]());var h=Bn(u),b=h==he?Ny:h==Se?Td:tl;return b(u)}function no(u){if(!u)return u===0?u:0;if(u=Ur(u),u===z||u===-z){var h=u<0?-1:1;return h*U}return u===u?u:0}function He(u){var h=no(u),b=h%1;return h===h?b?h-b:h:0}function RC(u){return u?Fa(He(u),0,Y):0}function Ur(u){if(typeof u=="number")return u;if(vr(u))return V;if(Bt(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=Bt(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=nO(u);var b=Az.test(u);return b||Tz.test(u)?a5(u.slice(2),b?2:8):Cz.test(u)?V:+u}function LC(u){return _i(u,or(u))}function KU(u){return u?Fa(He(u),-G,G):u===0?u:0}function ct(u){return u==null?"":yr(u)}var GU=Zs(function(u,h){if(eu(h)||ir(h)){_i(h,gn(h),u);return}for(var b in h)mt.call(h,b)&&Yc(u,b,h[b])}),BC=Zs(function(u,h){_i(h,or(h),u)}),uh=Zs(function(u,h,b,T){_i(h,or(h),u,T)}),YU=Zs(function(u,h,b,T){_i(h,gn(h),u,T)}),qU=Qi(By);function XU(u,h){var b=Xs(u);return h==null?b:yO(b,h)}var ZU=Xe(function(u,h){u=wt(u);var b=-1,T=h.length,j=T>2?h[2]:n;for(j&&Gn(h[0],h[1],j)&&(T=1);++b1),B}),_i(u,ov(u),b),T&&(b=Wr(b,d|p|m,lV));for(var j=h.length;j--;)Zy(b,h[j]);return b});function m6(u,h){return WC(u,sh(Me(h)))}var g6=Qi(function(u,h){return u==null?{}:V3(u,h)});function WC(u,h){if(u==null)return{};var b=Dt(ov(u),function(T){return[T]});return h=Me(h),jO(u,b,function(T,j){return h(T,j[0])})}function y6(u,h,b){h=Go(h,u);var T=-1,j=h.length;for(j||(j=1,u=n);++Th){var T=u;u=h,h=T}if(b||u%1||h%1){var j=hO();return Ln(u+j*(h-u+o5("1e-"+((j+"").length-1))),h)}return Yy(u,h)}var T6=Js(function(u,h,b){return h=h.toLowerCase(),u+(b?UC(h):h)});function UC(u){return wv(ct(u).toLowerCase())}function HC(u){return u=ct(u),u&&u.replace(kz,v5).replace(qz,"")}function E6(u,h,b){u=ct(u),h=yr(h);var T=u.length;b=b===n?T:Fa(He(b),0,T);var j=b;return b-=h.length,b>=0&&u.slice(b,j)==h}function k6(u){return u=ct(u),u&&Fc.test(u)?u.replace(_d,b5):u}function M6(u){return u=ct(u),u&&gz.test(u)?u.replace(gy,"\\$&"):u}var j6=Js(function(u,h,b){return u+(b?"-":"")+h.toLowerCase()}),N6=Js(function(u,h,b){return u+(b?" ":"")+h.toLowerCase()}),$6=YO("toLowerCase");function D6(u,h,b){u=ct(u),h=He(h);var T=h?Hs(u):0;if(!h||T>=h)return u;var j=(h-T)/2;return Jd(Bd(j),b)+u+Jd(Ld(j),b)}function I6(u,h,b){u=ct(u),h=He(h);var T=h?Hs(u):0;return h&&T>>0,b?(u=ct(u),u&&(typeof h=="string"||h!=null&&!vv(h))&&(h=yr(h),!h&&Us(u))?Yo(ei(u),0,b):u.split(h,b)):[]}var V6=Js(function(u,h,b){return u+(b?" ":"")+wv(h)});function U6(u,h,b){return u=ct(u),b=b==null?0:Fa(He(b),0,u.length),h=yr(h),u.slice(b,b+h.length)==h}function H6(u,h,b){var T=R.templateSettings;b&&Gn(u,h,b)&&(h=n),u=ct(u),h=uh({},h,T,tC);var j=uh({},h.imports,T.imports,tC),B=gn(j),H=jy(j,B),q,Q,de=0,pe=h.interpolate||Sd,me="__p += '",be=$y((h.escape||Sd).source+"|"+pe.source+"|"+(pe===SS?Oz:Sd).source+"|"+(h.evaluate||Sd).source+"|$","g"),Pe="//# sourceURL="+(mt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++e5+"]")+` +`;u.replace(be,function(De,Je,it,br,Yn,xr){return it||(it=br),me+=u.slice(de,xr).replace(Mz,x5),Je&&(q=!0,me+=`' + +__e(`+Je+`) + +'`),Yn&&(Q=!0,me+=`'; +`+Yn+`; +__p += '`),it&&(me+=`' + +((__t = (`+it+`)) == null ? '' : __t) + +'`),de=xr+De.length,De}),me+=`'; +`;var $e=mt.call(h,"variable")&&h.variable;if(!$e)me=`with (obj) { +`+me+` +} +`;else if(_z.test($e))throw new We(s);me=(Q?me.replace(Zt,""):me).replace(Ir,"$1").replace(lt,"$1;"),me="function("+($e||"obj")+`) { +`+($e?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(q?", __e = _.escape":"")+(Q?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+me+`return __p +}`;var Ye=GC(function(){return st(B,Pe+"return "+me).apply(n,H)});if(Ye.source=me,yv(Ye))throw Ye;return Ye}function K6(u){return ct(u).toLowerCase()}function G6(u){return ct(u).toUpperCase()}function Y6(u,h,b){if(u=ct(u),u&&(b||h===n))return nO(u);if(!u||!(h=yr(h)))return u;var T=ei(u),j=ei(h),B=rO(T,j),H=iO(T,j)+1;return Yo(T,B,H).join("")}function q6(u,h,b){if(u=ct(u),u&&(b||h===n))return u.slice(0,aO(u)+1);if(!u||!(h=yr(h)))return u;var T=ei(u),j=iO(T,ei(h))+1;return Yo(T,0,j).join("")}function X6(u,h,b){if(u=ct(u),u&&(b||h===n))return u.replace(yy,"");if(!u||!(h=yr(h)))return u;var T=ei(u),j=rO(T,ei(h));return Yo(T,j).join("")}function Z6(u,h){var b=D,T=$;if(Bt(h)){var j="separator"in h?h.separator:j;b="length"in h?He(h.length):b,T="omission"in h?yr(h.omission):T}u=ct(u);var B=u.length;if(Us(u)){var H=ei(u);B=H.length}if(b>=B)return u;var q=b-Hs(T);if(q<1)return T;var Q=H?Yo(H,0,q).join(""):u.slice(0,q);if(j===n)return Q+T;if(H&&(q+=Q.length-q),vv(j)){if(u.slice(q).search(j)){var de,pe=Q;for(j.global||(j=$y(j.source,ct(OS.exec(j))+"g")),j.lastIndex=0;de=j.exec(pe);)var me=de.index;Q=Q.slice(0,me===n?q:me)}}else if(u.indexOf(yr(j),q)!=q){var be=Q.lastIndexOf(j);be>-1&&(Q=Q.slice(0,be))}return Q+T}function J6(u){return u=ct(u),u&&my.test(u)?u.replace(wd,P5):u}var Q6=Js(function(u,h,b){return u+(b?" ":"")+h.toUpperCase()}),wv=YO("toUpperCase");function KC(u,h,b){return u=ct(u),h=b?n:h,h===n?_5(u)?k5(u):h5(u):u.match(h)||[]}var GC=Xe(function(u,h){try{return mr(u,n,h)}catch(b){return yv(b)?b:new We(b)}}),e8=Qi(function(u,h){return Lr(h,function(b){b=Si(b),Zi(u,b,mv(u[b],u))}),u});function t8(u){var h=u==null?0:u.length,b=Me();return u=h?Dt(u,function(T){if(typeof T[1]!="function")throw new Br(a);return[b(T[0]),T[1]]}):[],Xe(function(T){for(var j=-1;++jG)return[];var b=Y,T=Ln(u,Y);h=Me(h),u-=Y;for(var j=My(T,h);++b0||h<0)?new rt(b):(u<0?b=b.takeRight(-u):u&&(b=b.drop(u)),h!==n&&(h=He(h),b=h<0?b.dropRight(-h):b.take(h-u)),b)},rt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},rt.prototype.toArray=function(){return this.take(Y)},wi(rt.prototype,function(u,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),T=/^(?:head|last)$/.test(h),j=R[T?"take"+(h=="last"?"Right":""):h],B=T||/^find/.test(h);j&&(R.prototype[h]=function(){var H=this.__wrapped__,q=T?[1]:arguments,Q=H instanceof rt,de=q[0],pe=Q||Ve(H),me=function(Je){var it=j.apply(R,zo([Je],q));return T&&be?it[0]:it};pe&&b&&typeof de=="function"&&de.length!=1&&(Q=pe=!1);var be=this.__chain__,Pe=!!this.__actions__.length,$e=B&&!be,Ye=Q&&!Pe;if(!B&&pe){H=Ye?H:new rt(this);var De=u.apply(H,q);return De.__actions__.push({func:rh,args:[me],thisArg:n}),new Fr(De,be)}return $e&&Ye?u.apply(this,q):(De=this.thru(me),$e?T?De.value()[0]:De.value():De)})}),Lr(["pop","push","shift","sort","splice","unshift"],function(u){var h=Ed[u],b=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",T=/^(?:pop|shift)$/.test(u);R.prototype[u]=function(){var j=arguments;if(T&&!this.__chain__){var B=this.value();return h.apply(Ve(B)?B:[],j)}return this[b](function(H){return h.apply(Ve(H)?H:[],j)})}}),wi(rt.prototype,function(u,h){var b=R[h];if(b){var T=b.name+"";mt.call(qs,T)||(qs[T]=[]),qs[T].push({name:h,func:b})}}),qs[Xd(n,x).name]=[{name:"wrapper",func:n}],rt.prototype.clone=J5,rt.prototype.reverse=Q5,rt.prototype.value=e3,R.prototype.at=E4,R.prototype.chain=k4,R.prototype.commit=M4,R.prototype.next=j4,R.prototype.plant=$4,R.prototype.reverse=D4,R.prototype.toJSON=R.prototype.valueOf=R.prototype.value=I4,R.prototype.first=R.prototype.head,Vc&&(R.prototype[Vc]=N4),R},Ks=M5();Ia?((Ia.exports=Ks)._=Ks,Sy._=Ks):An._=Ks}).call(Qe.commonjsGlobal)})(Mp,Mp.exports);var UQ=Mp.exports;const Xx={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},$i={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"}},HQ={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"},KQ="text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary",KT={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"},a2=O.createContext({}),$s=()=>O.useContext(a2),Ui=O.forwardRef(({className:e,size:t="sm",open:n=!1,onOpenChange:r=()=>{},loading:i=!1,...o},a)=>{const[s,l]=O.useState(""),[c,f]=O.useState(i??!1),{refs:d,floatingStyles:p,context:m}=Jm({open:n,onOpenChange:r,placement:"bottom-start",whileElementsMounted:Um,middleware:[Hm(t==="sm"?4:6),Km({padding:10}),r$({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}})]}),y=Zm(m),{getReferenceProps:g,getFloatingProps:v}=Qm([y]);return O.useEffect(()=>{const x=xH(),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]),P.jsx(a2.Provider,{value:{size:t,open:n,onOpenChange:r,refs:d,floatingStyles:p,context:m,getReferenceProps:g,getFloatingProps:v,searchTerm:s,setSearchTerm:l,isLoading:c,setIsLoading:f},children:P.jsx("div",{className:K("searchbox-wrapper box-border relative w-full",e),...o,ref:a})})});Ui.displayName="SearchBox";const s2=O.forwardRef(({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:i=!1,onChange:o=()=>{},...a},s)=>{const{size:l,onOpenChange:c,refs:f,getReferenceProps:d,searchTerm:p,setSearchTerm:m}=$s(),y=l==="lg"?"sm":"xs",g=v=>{const x=v.target.value;m(x),o(x),typeof c=="function"&&(x.trim()?c(!0):c(!1))};return P.jsxs("div",{ref:f.setReference,className:K("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",HQ[r],$i.input[l],i?KT[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:[P.jsx("span",{className:K(Xx[l],i?"text-icon-disabled":KQ,"flex justify-center items-center"),children:P.jsx(RN,{})}),P.jsx("input",{type:t,ref:s,className:K(Xx[l],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",i?KT[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:i,value:p,onChange:g,placeholder:n,...UQ.omit(a,["size","open","onOpenChange","loading"])}),P.jsx(Xf,{label:"⌘/",size:y,type:"rounded",variant:"neutral"})]})});s2.displayName="SearchBox.Input";const l2=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...i})=>{const{size:o,open:a,refs:s,floatingStyles:l,getFloatingProps:c}=$s();return a?P.jsx(Xm,{id:n,root:t,children:P.jsx("div",{ref:s.setFloating,style:{...l},className:K("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",$i.dialog[o],e),...c(),...i,children:r})}):null};l2.displayName="SearchBox.Content";const c2=({filter:e=!0,children:t})=>{const{searchTerm:n,isLoading:r}=$s();if(!e)return P.jsx("div",{children:t});const i=O.Children.toArray(t).map(o=>{if(O.isValidElement(o)&&o.type===a_){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?P.jsx(s_,{}):P.jsx("div",{children:i.some(o=>O.isValidElement(o)&&o.type!==l_)?i:P.jsx(o_,{})})};c2.displayName="SearchBox.List";const o_=({children:e="No results found."})=>{const{size:t}=$s();return P.jsx("div",{className:K("flex justify-center items-center",$i.item[t],"text-text-tertiary p-4"),children:e})};o_.displayName="SearchBox.Empty";const a_=({heading:e,children:t})=>{const{size:n}=$s();return P.jsxs("div",{className:K($i.content[n],$i.item[n]),children:[e&&P.jsx("div",{className:K($i.title[n],"text-text-secondary"),children:e}),t]})};a_.displayName="SearchBox.Group";const u2=O.forwardRef(({className:e,icon:t,children:n,...r},i)=>{const{size:o}=$s();return P.jsxs("div",{ref:i,className:K("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",$i.item[o]),...r,children:[t&&P.jsx("span",{className:K($i.icon[o],"flex items-center justify-center"),children:t}),P.jsx("span",{className:K("flex-grow p-1 font-normal cursor-pointer",$i.item[o],e),children:n})]})});u2.displayName="SearchBox.Item";const s_=({loadingIcon:e=P.jsx(Yw,{})})=>{const{size:t}=$s(),n=O.isValidElement(e)?O.cloneElement(e,{size:t}):e;return P.jsx("div",{className:K("flex justify-center p-4",Xx[t],$i.item[t]),children:n})};s_.displayName="SearchBox.Loading";const l_=O.forwardRef(({className:e,...t},n)=>P.jsx("hr",{ref:n,className:K("border-0 border-t border-border-subtle border-solid m-0",e),...t}));l_.displayName="SearchBox.Separator";Ui.Input=s2;Ui.Loading=s_;Ui.Separator=l_;Ui.Content=l2;Ui.List=c2;Ui.Empty=o_;Ui.Group=a_;Ui.Item=u2;const f2=O.createContext({}),d2=()=>O.useContext(f2),Ea=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:r,className:i})=>{const[o,a]=O.useState(!1),{refs:s,floatingStyles:l,context:c}=Jm({open:o,onOpenChange:a,placement:e,strategy:"absolute",middleware:[Hm(t),Km({boundary:n}),n$({boundary:n})],whileElementsMounted:Um}),f=Kw(c),d=Zm(c),p=Gw(c,{role:"menu"}),{getReferenceProps:m,getFloatingProps:y}=Qm([f,d,p]),{isMounted:g,styles:v}=d$(c,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),x=()=>a(S=>!S),w=()=>a(!1);return P.jsx(f2.Provider,{value:{refs:s,handleClose:w,isMounted:g,styles:v,floatingStyles:l,getFloatingProps:y},children:P.jsxs("div",{className:K("relative inline-block",i),children:[O.Children.map(r,S=>{var A;return O.isValidElement(S)&&((A=S==null?void 0:S.type)==null?void 0:A.displayName)==="DropdownMenu.Trigger"?O.cloneElement(S,{ref:s.setReference,onClick:x,...m()}):null}),O.Children.map(r,S=>{var A;return O.isValidElement(S)&&((A=S==null?void 0:S.type)==null?void 0:A.displayName)==="DropdownMenu.Portal"?S:null})]})})};Ea.displayName="DropdownMenu";const h2=({children:e,className:t,root:n,id:r})=>{const{refs:i,floatingStyles:o,getFloatingProps:a,isMounted:s,styles:l}=d2();return s&&P.jsx(Xm,{id:r,root:n,children:P.jsx("div",{ref:i.setFloating,className:t,style:{...o,...l},...a(),children:O.Children.map(e,c=>{var f;return((f=c==null?void 0:c.type)==null?void 0:f.displayName)==="DropdownMenu.Content"?c:null})})})};h2.displayName="DropdownMenu.Portal";const p2=O.forwardRef(({children:e,className:t,...n},r)=>O.isValidElement(e)?O.cloneElement(e,{className:K(t,e.props.className),ref:r,...n}):P.jsx("div",{ref:r,className:K("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e}));p2.displayName="DropdownMenu.Trigger";const m2=({children:e,className:t,...n})=>P.jsx("div",{className:K("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:P.jsx(Do,{...n,children:e})});m2.displayName="DropdownMenu.Content";const g2=e=>P.jsx(Do.List,{...e});g2.displayName="DropdownMenu.List";const y2=({children:e,as:t=Do.Item,...n})=>{var i;const{handleClose:r}=d2();return e?t===O.Fragment&&O.isValidElement(e)?O.cloneElement(e,{onClick:Ku((i=e.props)==null?void 0:i.onClick,r)}):P.jsx(t,{...n,className:K("px-2",n.className),onClick:Ku(n.onClick,r),children:e}):null};y2.displayName="DropdownMenu.Item";const v2=e=>P.jsx(Do.Separator,{...e});v2.displayName="DropdownMenu.Separator";Ea.Trigger=p2;Ea.Content=m2;Ea.List=g2;Ea.Item=y2;Ea.Separator=v2;Ea.Portal=h2;const GQ={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},b2=({children:e,className:t})=>{const{open:n,position:r,handleClose:i,drawerRef:o,transitionDuration:a}=Eg();return P.jsx(js,{children:n&&P.jsx("div",{className:"fixed inset-0",children:P.jsx("div",{className:K("flex items-center justify-center h-full",{"justify-start":r==="left","justify-end":r==="right"}),children:P.jsx(dn.div,{ref:o,className:K("flex flex-col w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:GQ[r],transition:a,children:typeof e=="function"?e({close:i}):e})})})})};b2.displayName="Drawer.Panel";const x2=({children:e,className:t,...n})=>P.jsx("div",{className:K("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});x2.displayName="Drawer.Header";const w2=({children:e,as:t="h3",className:n,...r})=>P.jsx(t,{className:K("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});w2.displayName="Drawer.Title";const _2=({children:e,as:t="p",className:n,...r})=>P.jsx(t,{className:K("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});_2.displayName="Drawer.Description";const S2=({children:e,className:t,...n})=>P.jsx("div",{className:K("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});S2.displayName="Drawer.Body";const O2=({children:e,className:t})=>{const{design:n,handleClose:r}=Eg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return P.jsx("div",{className:K("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":n==="footer-divided","border-t border-b-0 border-x-0 border-solid border-border-subtle":n==="footer-bordered"},t),children:i()})};O2.displayName="Drawer.Footer";const GT=({className:e,...t})=>P.jsx("button",{className:K("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:P.jsx(ga,{className:"size-4 text-text-primary shrink-0"})}),C2=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=Eg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.isValidElement(e)?O.cloneElement(e,{onClick:r}):P.jsx(GT,{onClick:r,...n}):P.jsx(t,{...n,onClick:r,children:e}):P.jsx(GT,{onClick:r,...n})};C2.displayName="Drawer.CloseButton";const YQ={open:{opacity:1},exit:{opacity:0}},A2=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:i}=Eg();return r!=null&&r.current?!!r.current&&Nl.createPortal(P.jsx(js,{children:n&&P.jsx(dn.div,{className:K("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:YQ,transition:i})}),r.current):null};A2.displayName="Drawer.Backdrop";const qQ=.2,P2=O.createContext({}),Eg=()=>O.useContext(P2),Hi=({open:e,setOpen:t,children:n,trigger:r,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",position:l="right",transitionDuration:c=qQ,scrollLock:f=!0})=>{const d=e!==void 0&&t!==void 0,[p,m]=O.useState(!1),y=O.useRef(null),g=O.useRef(null),v=O.useMemo(()=>d?e:p,[e,p]),x=O.useMemo(()=>d?t:m,[m,m]),w=()=>{v||x(!0)},S=()=>{v&&x(!1)},A=O.useCallback(()=>O.isValidElement(r)?O.cloneElement(r,{onClick:Ku(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&&y.current&&!y.current.contains(E.target)&&S()};return O.useEffect(()=>(window.addEventListener("keydown",_),document.addEventListener("mousedown",C),()=>{window.removeEventListener("keydown",_),document.removeEventListener("mousedown",C)}),[v]),O.useEffect(()=>{if(!f)return;const E=document.querySelector("html");return v&&E&&(E.style.overflow="hidden"),()=>{E&&(E.style.overflow="")}},[v]),P.jsxs(P.Fragment,{children:[A(),P.jsx(P2.Provider,{value:{open:v,setOpen:x,handleClose:S,design:s,position:l,drawerContainerRef:g,drawerRef:y,transitionDuration:{duration:c}},children:P.jsx("div",{className:K("fixed z-auto w-0 h-0 overflow-visible",i),ref:g,role:"dialog","aria-modal":"true","aria-label":"drawer",children:n})})]})};Hi.displayName="Drawer";Hi.Panel=b2;Hi.Header=x2;Hi.Title=w2;Hi.Description=_2;Hi.Body=S2;Hi.CloseButton=C2;Hi.Footer=O2;Hi.Backdrop=A2;const kg={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"}},Os={general:"group disabled:border-field-border-disabled opacity-50",text:"group-disabled:text-field-color-disabled"},T2=O.createContext({size:"sm",disabled:!1}),ld=()=>O.useContext(T2),Ds=({size:e="sm",disabled:t=!1,children:n,className:r,...i})=>P.jsx(T2.Provider,{value:{size:e,disabled:t},children:P.jsx("nav",{role:"navigation","aria-label":"pagination",className:K("flex w-full justify-center box-border m-0",r),...i,children:n})});Ds.displayName="Pagination";const E2=O.forwardRef(({className:e,...t},n)=>P.jsx("ul",{ref:n,className:K("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));E2.displayName="Pagination.Content";const k2=O.forwardRef(({isActive:e=!1,className:t,children:n,...r},i)=>{const{disabled:o}=ld();return P.jsx("li",{ref:i,className:K("flex",o&&Os.general),children:P.jsx(c_,{isActive:e,disabled:o,className:t,...r,children:n})})});k2.displayName="Pagination.Item";const c_=({isActive:e=!1,tag:t="a",children:n,className:r,...i})=>{const{size:o,disabled:a}=ld(),s=l=>l.preventDefault();return P.jsx(bn,{tag:t,size:o,variant:"ghost",className:K("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",kg[o].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[Os.general,Os.text,"focus:ring-transparent cursor-not-allowed"],r),disabled:a,...i,onClick:l=>Ku(i.onClick||(()=>{}),a?s:()=>{})(l),children:P.jsx("span",{className:"px-1 flex",children:n})})},M2=e=>{const{size:t,disabled:n}=ld();return P.jsx("li",{className:K("flex",n&&Os.general),"aria-label":"Go to previous page",children:P.jsx(c_,{className:K("[&>span]:flex [&>span]:items-center"),...e,children:P.jsx($N,{className:K(kg[t].icon)})})})};M2.displayName="Pagination.Previous";const j2=e=>{const{size:t,disabled:n}=ld();return P.jsx("li",{className:K("flex",n&&Os.general),"aria-label":"Go to next page",children:P.jsx(c_,{className:K("[&>span]:flex [&>span]:items-center"),...e,children:P.jsx(Dw,{className:K(kg[t].icon)})})})};j2.displayName="Pagination.Next";const N2=e=>{const{size:t,disabled:n}=ld();return P.jsx("li",{className:K("flex",n&&Os.general),children:P.jsx("span",{className:K("flex justify-center",kg[t].ellipse,n&&Os.general),...e,children:"•••"})})};N2.displayName="Pagination.Ellipsis";Ds.Content=E2;Ds.Item=k2;Ds.Previous=M2;Ds.Next=j2;Ds.Ellipsis=N2;var Ie;(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"})(Ie||(Ie={}));var Pt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Pt||(Pt={}));var hi;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(hi||(hi={}));const $2=6048e5,XQ=864e5,YT=Symbol.for("constructDateFrom");function hn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&YT in e?e[YT](t):e instanceof Date?new e.constructor(t):new Date(t)}function xt(e,t){return hn(t||e,e)}function u_(e,t,n){const r=xt(e,n==null?void 0:n.in);return isNaN(t)?hn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function f_(e,t,n){const r=xt(e,n==null?void 0:n.in);if(isNaN(t))return hn(e,NaN);if(!t)return r;const i=r.getDate(),o=hn(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 ZQ={};function cd(){return ZQ}function Cs(e,t){var s,l,c,f;const n=cd(),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=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=xt(e,t==null?void 0:t.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function qT(e){const t=xt(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 ud(e,...t){const n=hn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Wl(e,t){const n=xt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function I2(e,t,n){const[r,i]=ud(n==null?void 0:n.in,e,t),o=Wl(r),a=Wl(i),s=+o-qT(o),l=+a-qT(a);return Math.round((s-l)/XQ)}function JQ(e,t){const n=D2(e,t),r=hn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),uf(r)}function QQ(e,t,n){return u_(e,t*7,n)}function eee(e,t,n){return f_(e,t*12,n)}function tee(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=hn.bind(null,i));const o=xt(i,r);(!n||n{!r&&typeof i=="object"&&(r=hn.bind(null,i));const o=xt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),hn(r,n||NaN)}function XT(e){return hn(e,Date.now())}function ree(e,t,n){const[r,i]=ud(n==null?void 0:n.in,e,t);return+Wl(r)==+Wl(i)}function R2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function iee(e){return!(!R2(e)&&typeof e!="number"||isNaN(+xt(e)))}function oee(e,t,n){const[r,i]=ud(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function L2(e,t){const n=xt(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 B2(e,t){const n=xt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function aee(e,t){const n=xt(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 F2(e,t){const n=xt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function d_(e,t){var s,l,c,f;const n=cd(),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=(c=n.locale)==null?void 0:c.options)==null?void 0:f.weekStartsOn)??0,i=xt(e,t==null?void 0:t.in),o=i.getDay(),a=(o{let r;const i=lee[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 db(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const uee={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hee={date:db({formats:uee,defaultWidth:"full"}),time:db({formats:fee,defaultWidth:"full"}),dateTime:db({formats:dee,defaultWidth:"full"})},pee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mee=(e,t,n,r)=>pee[e];function cu(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 gee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},yee={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vee={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"]},bee={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"]},xee={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"}},wee={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"}},_ee=(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"},See={ordinalNumber:_ee,era:cu({values:gee,defaultWidth:"wide"}),quarter:cu({values:yee,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cu({values:vee,defaultWidth:"wide"}),day:cu({values:bee,defaultWidth:"wide"}),dayPeriod:cu({values:xee,defaultWidth:"wide",formattingValues:wee,defaultFormattingWidth:"wide"})};function uu(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)?Cee(s,d=>d.test(a)):Oee(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const f=t.slice(a.length);return{value:c,rest:f}}}function Oee(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Cee(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 Pee=/^(\d+)(th|st|nd|rd)?/i,Tee=/\d+/i,Eee={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},kee={any:[/^b/i,/^(a|c)/i]},Mee={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},jee={any:[/1/i,/2/i,/3/i,/4/i]},Nee={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},$ee={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]},Dee={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},Iee={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]},Ree={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},Lee={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}},Bee={ordinalNumber:Aee({matchPattern:Pee,parsePattern:Tee,valueCallback:e=>parseInt(e,10)}),era:uu({matchPatterns:Eee,defaultMatchWidth:"wide",parsePatterns:kee,defaultParseWidth:"any"}),quarter:uu({matchPatterns:Mee,defaultMatchWidth:"wide",parsePatterns:jee,defaultParseWidth:"any",valueCallback:e=>e+1}),month:uu({matchPatterns:Nee,defaultMatchWidth:"wide",parsePatterns:$ee,defaultParseWidth:"any"}),day:uu({matchPatterns:Dee,defaultMatchWidth:"wide",parsePatterns:Iee,defaultParseWidth:"any"}),dayPeriod:uu({matchPatterns:Ree,defaultMatchWidth:"any",parsePatterns:Lee,defaultParseWidth:"any"})},Mg={code:"en-US",formatDistance:cee,formatLong:hee,formatRelative:mee,localize:See,match:Bee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Fee(e,t){const n=xt(e,t==null?void 0:t.in);return I2(n,F2(n))+1}function W2(e,t){const n=xt(e,t==null?void 0:t.in),r=+uf(n)-+JQ(n);return Math.round(r/$2)+1}function z2(e,t){var f,d,p,m;const n=xt(e,t==null?void 0:t.in),r=n.getFullYear(),i=cd(),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=hn((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Cs(a,t),l=hn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Cs(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Wee(e,t){var s,l,c,f;const n=cd(),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=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,i=z2(e,t),o=hn((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Cs(o,t)}function V2(e,t){const n=xt(e,t==null?void 0:t.in),r=+Cs(n,t)-+Wee(n,t);return Math.round(r/$2)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ea={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)}},il={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ZT={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 ea.y(e,t)},Y:function(e,t,n,r){const i=z2(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=D2(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 ea.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=V2(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):gt(i,t.length)},I:function(e,t,n){const r=W2(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"}):ea.d(e,t)},D:function(e,t,n){const r=Fee(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=il.noon:r===0?i=il.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=il.evening:r>=12?i=il.afternoon:r>=4?i=il.morning:i=il.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 ea.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ea.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"}):ea.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ea.s(e,t)},S:function(e,t){return ea.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return QT(r);case"XXXX":case"XX":return es(r);case"XXXXX":case"XXX":default:return es(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return QT(r);case"xxxx":case"xx":return es(r);case"xxxxx":case"xxx":default:return es(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+JT(r,":");case"OOOO":default:return"GMT"+es(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+JT(r,":");case"zzzz":default:return"GMT"+es(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 JT(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 QT(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):es(e,t)}function es(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 eE=(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"})}},U2=(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"})}},zee=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return eE(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}}",eE(r,t)).replace("{{time}}",U2(i,t))},Vee={p:U2,P:zee},Uee=/^D+$/,Hee=/^Y+$/,Kee=["D","DD","YY","YYYY"];function Gee(e){return Uee.test(e)}function Yee(e){return Hee.test(e)}function qee(e,t,n){const r=Xee(e,t,n);if(console.warn(r),Kee.includes(e))throw new RangeError(r)}function Xee(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 Zee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qee=/^'([^]*?)'?$/,ete=/''/g,tte=/[a-zA-Z]/;function Tn(e,t,n){var f,d,p,m,y,g,v,x;const r=cd(),i=(n==null?void 0:n.locale)??r.locale??Mg,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)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((x=(v=r.locale)==null?void 0:v.options)==null?void 0:x.weekStartsOn)??0,s=xt(e,n==null?void 0:n.in);if(!iee(s))throw new RangeError("Invalid time value");let l=t.match(Jee).map(w=>{const S=w[0];if(S==="p"||S==="P"){const A=Vee[S];return A(w,i.formatLong)}return w}).join("").match(Zee).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:nte(w)};if(ZT[S])return{isToken:!0,value:w};if(S.match(tte))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 c={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Yee(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Gee(S))&&qee(S,t,String(e));const A=ZT[S[0]];return A(s,S,i.localize,c)}).join("")}function nte(e){const t=e.match(Qee);return t?t[1].replace(ete,"'"):e}function rte(e,t){const n=xt(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),o=hn(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function Zx(e,t){return+xt(e)>+xt(t)}function Jx(e,t){return+xt(e)<+xt(t)}function tE(e,t){return+xt(e)==+xt(t)}function ite(e,t,n){const[r,i]=ud(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function ote(e,t,n){const[r,i]=ud(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}function nE(e,t,n){return u_(e,-t,n)}function ate(e,t,n){const r=xt(e,n==null?void 0:n.in),i=r.getFullYear(),o=r.getDate(),a=hn(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=rte(a);return r.setMonth(t,Math.min(o,s)),r}function ste(e,t,n){const r=xt(e,n==null?void 0:n.in);return isNaN(+r)?hn(e,NaN):(r.setFullYear(t),r)}function rE(e){return Wl(Date.now(),e)}function iE(e){const t=XT(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),o=XT(e==null?void 0:e.in);return o.setFullYear(n,r,i-1),o.setHours(0,0,0,0),o}function lte(e,t,n){return f_(e,-t,n)}class Io{constructor(t,n){this.Date=Date,this.addDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,i):u_(r,i)},this.addMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,i):f_(r,i)},this.addWeeks=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,i):QQ(r,i)},this.addYears=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,i):eee(r,i)},this.differenceInCalendarDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):I2(r,i)},this.differenceInCalendarMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):oee(r,i)},this.endOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfISOWeek?this.overrides.endOfISOWeek(r):see(r)},this.endOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.endOfMonth?this.overrides.endOfMonth(r):L2(r)},this.endOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,this.options):d_(r,this.options)},this.endOfYear=r=>{var i;return(i=this.overrides)!=null&&i.endOfYear?this.overrides.endOfYear(r):aee(r)},this.format=(r,i)=>{var o;return(o=this.overrides)!=null&&o.format?this.overrides.format(r,i,this.options):Tn(r,i,this.options)},this.getISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.getISOWeek?this.overrides.getISOWeek(r):W2(r)},this.getWeek=r=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):V2(r,this.options)},this.isAfter=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,i):Zx(r,i)},this.isBefore=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,i):Jx(r,i)},this.isDate=r=>{var i;return(i=this.overrides)!=null&&i.isDate?this.overrides.isDate(r):R2(r)},this.isSameDay=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,i):ree(r,i)},this.isSameMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,i):ite(r,i)},this.isSameYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,i):ote(r,i)},this.max=r=>{var i;return(i=this.overrides)!=null&&i.max?this.overrides.max(r):tee(r)},this.min=r=>{var i;return(i=this.overrides)!=null&&i.min?this.overrides.min(r):nee(r)},this.setMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,i):ate(r,i)},this.setYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,i):ste(r,i)},this.startOfDay=r=>{var i;return(i=this.overrides)!=null&&i.startOfDay?this.overrides.startOfDay(r):Wl(r)},this.startOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfISOWeek?this.overrides.startOfISOWeek(r):uf(r)},this.startOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.startOfMonth?this.overrides.startOfMonth(r):B2(r)},this.startOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Cs(r,this.options)},this.startOfYear=r=>{var i;return(i=this.overrides)!=null&&i.startOfYear?this.overrides.startOfYear(r):F2(r)},this.options={locale:Mg,...t},this.overrides=n}}const Is=new Io;function cte(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[o])=>(n[o]?i.push(n[o]):t[Pt[o]]?i.push(t[Pt[o]]):t[hi[o]]&&i.push(t[hi[o]]),i),[t[Ie.Day]])}function ute(e){return O.createElement("button",{...e})}function fte(e){return O.createElement("span",{...e})}function dte(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 hte(e){const{day:t,modifiers:n,...r}=e;return O.createElement("td",{...r})}function pte(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 mte(e){const{options:t,className:n,components:r,classNames:i,...o}=e,a=[i[Ie.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[Ie.DropdownRoot]},O.createElement(r.Select,{className:a,...o},t==null?void 0:t.map(({value:l,label:c,disabled:f})=>O.createElement(r.Option,{key:l,value:l,disabled:f},c))),O.createElement("span",{className:i[Ie.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,O.createElement(r.Chevron,{orientation:"down",size:18,className:i[Ie.Chevron]})))}function gte(e){return O.createElement("div",{...e})}function yte(e){return O.createElement("div",{...e})}function vte(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r},e.children)}function bte(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r})}function xte(e){return O.createElement("table",{...e})}function wte(e){return O.createElement("div",{...e})}const H2=O.createContext(void 0);function Cc(){const e=O.useContext(H2);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function _te(e){const{components:t}=Cc();return O.createElement(t.Dropdown,{...e})}function Ste(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:c}}=Cc();return O.createElement("nav",{...o},O.createElement(a.PreviousMonthButton,{type:"button",className:s[Ie.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[Ie.Chevron],orientation:"left"})),O.createElement(a.NextMonthButton,{type:"button",className:s[Ie.NextMonthButton],tabIndex:i?void 0:-1,disabled:i?void 0:!0,"aria-label":c(i),onClick:e.onNextClick},O.createElement(a.Chevron,{disabled:i?void 0:!0,orientation:"right",className:s[Ie.Chevron]})))}function Ote(e){const{components:t}=Cc();return O.createElement(t.Button,{...e})}function Cte(e){return O.createElement("option",{...e})}function Ate(e){const{components:t}=Cc();return O.createElement(t.Button,{...e})}function Pte(e){return O.createElement("div",{...e})}function Tte(e){return O.createElement("select",{...e})}function Ete(e){const{week:t,...n}=e;return O.createElement("tr",{...n})}function kte(e){return O.createElement("th",{...e})}function Mte(e){return O.createElement("thead",null,O.createElement("tr",{...e}))}function jte(e){const{week:t,...n}=e;return O.createElement("th",{...n})}function Nte(e){return O.createElement("th",{...e})}function $te(e){return O.createElement("tbody",{...e})}function Dte(e){const{components:t}=Cc();return O.createElement(t.Dropdown,{...e})}const Ite=Object.freeze(Object.defineProperty({__proto__:null,Button:ute,CaptionLabel:fte,Chevron:dte,Day:hte,DayButton:pte,Dropdown:mte,DropdownNav:gte,Footer:yte,Month:vte,MonthCaption:bte,MonthGrid:xte,Months:wte,MonthsDropdown:_te,Nav:Ste,NextMonthButton:Ote,Option:Cte,PreviousMonthButton:Ate,Root:Pte,Select:Tte,Week:Ete,WeekNumber:jte,WeekNumberHeader:Nte,Weekday:kte,Weekdays:Mte,Weeks:$te,YearsDropdown:Dte},Symbol.toStringTag,{value:"Module"}));function Rte(e){return{...Ite,...e}}function Lte(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 Bte(){const e={};for(const t in Ie)e[Ie[t]]=`rdp-${Ie[t]}`;for(const t in Pt)e[Pt[t]]=`rdp-${Pt[t]}`;for(const t in hi)e[hi[t]]=`rdp-${hi[t]}`;return e}function K2(e,t,n){return(n??new Io(t)).format(e,"LLLL y")}const Fte=K2;function Wte(e,t,n){return(n??new Io(t)).format(e,"d")}function zte(e,t){var n;return(n=t.localize)==null?void 0:n.month(e)}function Vte(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function Ute(){return""}function Hte(e,t,n){return(n??new Io(t)).format(e,"cccccc")}function G2(e){return e.toString()}const Kte=G2,Gte=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:K2,formatDay:Wte,formatMonthCaption:Fte,formatMonthDropdown:zte,formatWeekNumber:Vte,formatWeekNumberHeader:Ute,formatWeekdayName:Hte,formatYearCaption:Kte,formatYearDropdown:G2},Symbol.toStringTag,{value:"Module"}));function Yte(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Gte,...e}}function qte(e,t,n,r,i){if(!t||!n)return;const{addMonths:o,startOfMonth:a,isBefore:s}=i,l=e.getFullYear(),c=[];let f=t;for(;c.length<12&&s(f,o(n,1));)c.push(f.getMonth()),f=o(f,1);return c.sort((m,y)=>m-y).map(m=>{const y=r.formatMonthDropdown(m,i.options.locale??Mg),g=i.Date?new i.Date(l,m):new Date(l,m),v=t&&ga(n)||!1;return{value:m,label:y,disabled:v}})}function Xte(e,t={},n={}){let r={...t==null?void 0:t[Ie.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n==null?void 0:n[i]}}),r}const hb={},Au={};function Lu(e,t){try{const r=(hb[e]||(hb[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in Au?Au[r]:oE(r,r.split(":"))}catch{if(e in Au)return Au[e];const n=e==null?void 0:e.match(Zte);return n?oE(e,n.slice(1)):NaN}}const Zte=/([+-]\d\d):?(\d\d)?/;function oE(e,t){const n=+t[0],r=+(t[1]||0);return Au[e]=n>0?n*60+r:n*60-r}class Ai extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Lu(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)),Y2(this),Qx(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ai(...n,t):new Ai(Date.now(),t)}withTimeZone(t){return new Ai(+this,t)}getTimezoneOffset(){return-Lu(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Qx(this),+this}[Symbol.for("constructDateFrom")](t){return new Ai(+new Date(t),this.timeZone)}}const aE=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!aE.test(e))return;const t=e.replace(aE,"$1UTC");Ai.prototype[t]&&(e.startsWith("get")?Ai.prototype[e]=function(){return this.internal[t]()}:(Ai.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Jte(this),+this},Ai.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Qx(this),+this}))});function Qx(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Jte(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()),Y2(e)}function Y2(e){const t=Lu(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=Lu(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=Lu(e.timeZone,e),y=l-m;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class Pi extends Ai{static tz(t,...n){return n.length?new Pi(...n,t):new Pi(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} (${Qte(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 Pi(+this,t)}[Symbol.for("constructDateFrom")](t){return new Pi(+new Date(t),this.timeZone)}}function Qte(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}function ene(e,t,n){const r=n?Pi.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 tne(e,t,n,r,i){if(!t||!n)return;const{startOfMonth:o,startOfYear:a,endOfYear:s,addYears:l,isBefore:c,isSameYear:f}=i,d=e.getMonth(),p=a(t),m=s(n),y=[];let g=p;for(;c(g,m)||f(g,m);)y.push(g.getFullYear()),g=l(g,1);return y.map(v=>{const x=i.Date?new i.Date(v,d):new Date(v,d),w=t&&xo(n)||!1,S=r.formatYearDropdown(v);return{value:v,label:S,disabled:w}})}function q2(e,t,n){return(n??new Io(t)).format(e,"LLLL y")}const nne=q2;function rne(e,t,n,r){let i=(r??new Io(n)).format(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i}function X2(e,t,n,r){let i=(r??new Io(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const ine=X2;function one(){return""}function ane(e){return"Choose the Month"}function sne(e){return"Go to the Next Month"}function lne(e){return"Go to the Previous Month"}function cne(e,t,n){return(n??new Io(t)).format(e,"cccc")}function une(e,t){return`Week ${e}`}function fne(e){return"Week Number"}function dne(e){return"Choose the Year"}const hne=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:nne,labelDay:ine,labelDayButton:X2,labelGrid:q2,labelGridcell:rne,labelMonthDropdown:ane,labelNav:one,labelNext:sne,labelPrevious:lne,labelWeekNumber:une,labelWeekNumberHeader:fne,labelWeekday:cne,labelYearDropdown:dne},Symbol.toStringTag,{value:"Module"})),e0=42;function pne(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:a,fixedWeeks:s}=n??{},{startOfWeek:l,endOfWeek:c,startOfISOWeek:f,endOfISOWeek:d,addDays:p,differenceInCalendarDays:m,differenceInCalendarMonths:y,isAfter:g,endOfMonth:v}=r,x=a?f(i):l(i),w=a?d(v(o)):c(v(o)),S=m(w,x),A=y(o,i)+1,_=[];for(let E=0;E<=S;E++){const k=p(x,E);if(t&&g(k,t))break;_.push(k)}const C=e0*A;if(s&&_.length{const i=[],o=r.weeks.reduce((a,s)=>[...a,...s.days],i);return[...n,...o]},t)}function gne(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let a=0;at)break;o.push(s)}return o}function sE(e,t){const{month:n,defaultMonth:r,today:i=e.timeZone?Pi.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:c,addMonths:f,startOfMonth:d}=t;if(a&&c(a,l)<0){const p=-1*(o-1);l=f(a,p)}return s&&c(l,s)<0&&(l=s),d(l)}class Z2{constructor(t,n,r=Is){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 yne{constructor(t,n){this.date=t,this.weeks=n}}class vne{constructor(t,n){this.days=n,this.weekNumber=t}}function bne(e,t,n,r){const{startOfWeek:i,endOfWeek:o,startOfISOWeek:a,endOfISOWeek:s,endOfMonth:l,addDays:c,getWeek:f,getISOWeek:d}=r,p=e.reduce((m,y)=>{const g=n.ISOWeek?a(y):i(y),v=n.ISOWeek?s(l(y)):o(l(y)),x=t.filter(A=>A>=g&&A<=v);if(n.fixedWeeks&&x.length{const C=e0-x.length;return _>v&&_<=c(v,C)});x.push(...A)}const w=x.reduce((A,_)=>{const C=n.ISOWeek?d(_):f(_),E=A.find(M=>M.weekNumber===C),k=new Z2(_,y,r);return E?E.days.push(k):A.push(new vne(C,[k])),A},[]),S=new yne(y,w);return m.push(S),m},[]);return n.reverseMonths?p.reverse():p}function xne(e,t){var g;let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:c}=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 y=(g=e.captionLayout)==null?void 0:g.startsWith("dropdown");if(n)n=a(n);else if(f)n=new Date(f,0,1);else if(!n&&y){const v=e.today??(e.timeZone?Pi.tz(e.timeZone):t.Date?new t.Date:new Date);n=i(l(v,-100))}if(r)r=s(r);else if(d)r=new Date(d,11,31);else if(!r&&y){const v=e.today??(e.timeZone?Pi.tz(e.timeZone):t.Date?new t.Date:new Date);r=c(v)}return[n&&o(n),r&&o(r)]}function wne(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,c=i?o:1,f=a(e);if(!t)return s(f,c);if(!(l(t,e)[...n,...r.weeks],t)}function jg(e,t){const[n,r]=O.useState(e);return[t===void 0?n:t,r]}function One(e,t){const[n,r]=xne(e,t),{startOfMonth:i,endOfMonth:o}=t,a=sE(e,t),[s,l]=jg(a,e.month?i(e.month):void 0);O.useEffect(()=>{const C=sE(e,t);l(C)},[e.timeZone]);const c=gne(s,r,e,t),f=pne(c,e.endMonth?o(e.endMonth):void 0,e,t),d=bne(c,f,e,t),p=Sne(d),m=mne(d),y=_ne(s,n,e,t),g=wne(s,r,e,t),{disableNavigation:v,onMonthChange:x}=e,w=C=>p.some(E=>E.days.some(k=>k.isEqualTo(C))),S=C=>{if(v)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:y,nextMonth:g,goToMonth:S,goToDay:C=>{w(C)||S(C.date)}}}function Cne(e,t,n,r){let i,o=0,a=!1;for(;o{const l=t(s);return!l[Pt.disabled]&&!l[Pt.hidden]&&!l[Pt.outside]})),i}function fo(e,t,n=!1,r=Is){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 J2(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function h_(e){return!!(e&&typeof e=="object"&&"from"in e)}function Q2(e){return!!(e&&typeof e=="object"&&"after"in e)}function eL(e){return!!(e&&typeof e=="object"&&"before"in e)}function tL(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function nL(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ho(e,t,n=Is){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(nL(s,n))return s.includes(e);if(h_(s))return fo(s,e,!1,n);if(tL(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(J2(s)){const l=o(s.before,e),c=o(s.after,e),f=l>0,d=c<0;return a(s.before,s.after)?d&&f:f||d}return Q2(s)?o(e,s.after)>0:eL(s)?o(s.before,e)>0:typeof s=="function"?s(e):!1})}function Ane(e,t,n,r,i,o,a){const{ISOWeek:s}=o,{addDays:l,addMonths:c,addYears:f,addWeeks:d,startOfISOWeek:p,endOfISOWeek:m,startOfWeek:y,endOfWeek:g,max:v,min:x}=a;let S={day:l,week:d,month:c,year:f,startOfWeek:A=>s?p(A):y(A),endOfWeek:A=>s?m(A):g(A)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=v([r,S]):t==="after"&&i&&(S=x([i,S])),S}function rL(e,t,n,r,i,o,a,s=0){if(s>365)return;const l=Ane(e,t,n.date,r,i,o,a),c=!!(o.disabled&&ho(l,o.disabled,a)),f=!!(o.hidden&&ho(l,o.hidden,a)),d=l,p=new Z2(l,d,a);return!c&&!f?p:rL(e,t,p,r,i,o,a,s+1)}function Pne(e,t,n,r,i){const{autoFocus:o}=e,[a,s]=O.useState(),l=Cne(t.days,n,r||(()=>!1),a),[c,f]=O.useState(o?l:void 0);return{isFocusTarget:g=>!!(l!=null&&l.isEqualTo(g)),setFocused:f,focused:c,blur:()=>{s(c),f(void 0)},moveFocus:(g,v)=>{if(!c)return;const x=rL(g,v,c,t.navStart,t.navEnd,e,i);x&&(t.goToDay(x),f(x))}}}function Tne(e,t,n){const{disabled:r,hidden:i,modifiers:o,showOutsideDays:a,today:s}=t,{isSameDay:l,isSameMonth:c,startOfMonth:f,isBefore:d,endOfMonth:p,isAfter:m}=n,y=t.startMonth&&f(t.startMonth),g=t.endMonth&&p(t.endMonth),v={[Pt.focused]:[],[Pt.outside]:[],[Pt.disabled]:[],[Pt.hidden]:[],[Pt.today]:[]},x={};for(const w of e){const{date:S,displayMonth:A}=w,_=!!(A&&!c(S,A)),C=!!(y&&d(S,y)),E=!!(g&&m(S,g)),k=!!(r&&ho(S,r,n)),M=!!(i&&ho(S,i,n))||C||E||!a&&_,D=l(S,s??(t.timeZone?Pi.tz(t.timeZone):n.Date?new n.Date:new Date));_&&v.outside.push(w),k&&v.disabled.push(w),M&&v.hidden.push(w),D&&v.today.push(w),o&&Object.keys(o).forEach($=>{const N=o==null?void 0:o[$];N&&ho(S,N,n)&&(x[$]?x[$].push(w):x[$]=[w])})}return w=>{const S={[Pt.focused]:!1,[Pt.disabled]:!1,[Pt.hidden]:!1,[Pt.outside]:!1,[Pt.today]:!1},A={};for(const _ in v){const C=v[_];S[_]=C.some(E=>E===w)}for(const _ in x)A[_]=x[_].some(C=>C===w);return{...S,...A}}}function Ene(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=jg(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t,c=m=>(s==null?void 0:s.some(y=>l(y,m)))??!1,{min:f,max:d}=e;return{selected:s,select:(m,y,g)=>{let v=[...s??[]];if(c(m)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(x=>!l(x,m))}else(s==null?void 0:s.length)===d?v=[m]:v=[...v,m];return i||a(v),i==null||i(v,m,y,g),v},isSelected:c}}function kne(e,t,n=0,r=0,i=!1,o=Is){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:c,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(c(e,a))d={from:a,to:e};else if(c(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)?fo(e,s,!1,n):nL(s,n)?s.some(l=>fo(e,l,!1,n)):h_(s)?s.from&&s.to?lE(e,{from:s.from,to:s.to},n):!1:tL(s)?Mne(e,s.dayOfWeek,n):J2(s)?n.isAfter(s.before,s.after)?lE(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ho(e.from,s,n)||ho(e.to,s,n):Q2(s)||eL(s)?ho(e.from,s,n)||ho(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 c=0;c<=l;c++){if(a.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function Nne(e,t){const{disabled:n,excludeDisabled:r,selected:i,required:o,onSelect:a}=e,[s,l]=jg(i,a?i:void 0),c=a?i:s;return{selected:c,select:(p,m,y)=>{const{min:g,max:v}=e,x=p?kne(p,c,g,v,o,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&jne({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||l(x),a==null||a(x,p,m,y),x},isSelected:p=>c&&fo(c,p,!1,t)}}function $ne(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=jg(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t;return{selected:s,select:(d,p,m)=>{let y=d;return!r&&s&&s&&l(d,s)&&(y=void 0),i||a(y),i==null||i(y,d,p,m),y},isSelected:d=>s?l(s,d):!1}}function Dne(e,t){const n=$ne(e,t),r=Ene(e,t),i=Nne(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function Ine(e){const{components:t,formatters:n,labels:r,dateLib:i,locale:o,classNames:a}=O.useMemo(()=>{const qe={...Mg,...e.locale};return{dateLib:new Io({locale:qe,weekStartsOn:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:Rte(e.components),formatters:Yte(e.formatters),labels:{...hne,...e.labels},locale:qe,classNames:{...Bte(),...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:c,onDayClick:f,onDayFocus:d,onDayKeyDown:p,onDayMouseEnter:m,onDayMouseLeave:y,onNextClick:g,onPrevClick:v,showWeekNumber:x,styles:w}=e,{formatCaption:S,formatDay:A,formatMonthDropdown:_,formatWeekNumber:C,formatWeekNumberHeader:E,formatWeekdayName:k,formatYearDropdown:M}=n,D=One(e,i),{days:$,months:N,navStart:I,navEnd:L,previousMonth:F,nextMonth:W,goToMonth:z}=D,G=Tne($,e,i),{isSelected:U,select:V,selected:Y}=Dne(e,i)??{},{blur:ee,focused:ie,isFocusTarget:re,moveFocus:le,setFocused:ae}=Pne(e,D,G,U??(()=>!1),i),{labelDayButton:ue,labelGridcell:ne,labelGrid:J,labelMonthDropdown:fe,labelNav:ve,labelWeekday:X,labelWeekNumber:je,labelWeekNumberHeader:he,labelYearDropdown:Ee}=r,Ze=O.useMemo(()=>ene(i,e.ISOWeek,e.timeZone),[i,e.ISOWeek,e.timeZone]),tt=l!==void 0||f!==void 0,Rn=O.useCallback(()=>{F&&(z(F),v==null||v(F))},[F,z,v]),Ne=O.useCallback(()=>{W&&(z(W),g==null||g(W))},[z,W,g]),nt=O.useCallback((qe,$t)=>pt=>{pt.preventDefault(),pt.stopPropagation(),ae(qe),V==null||V(qe.date,$t,pt),f==null||f(qe.date,$t,pt)},[V,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=>{ee(),c==null||c(qe.date,$t,pt)},[ee,c]),Lt=O.useCallback((qe,$t)=>pt=>{const Cn={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(Cn[pt.key]){pt.preventDefault(),pt.stopPropagation();const[Dr,Yi]=Cn[pt.key];le(Dr,Yi)}p==null||p(qe.date,$t,pt)},[le,p,e.dir]),at=O.useCallback((qe,$t)=>pt=>{m==null||m(qe.date,$t,pt)},[m]),Wt=O.useCallback((qe,$t)=>pt=>{y==null||y(qe.date,$t,pt)},[y]),{className:$r,style:mn}=O.useMemo(()=>({className:[a[Ie.Root],e.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[Ie.Root],...e.style}}),[a,e.className,e.style,w]),rn=Lte(e),nr={dayPickerProps:e,selected:Y,select:V,isSelected:U,months:N,nextMonth:W,previousMonth:F,goToMonth:z,getModifiers:G,components:t,classNames:a,styles:w,labels:r,formatters:n};return O.createElement(H2.Provider,{value:nr},O.createElement(t.Root,{className:$r,style:mn,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...rn},O.createElement(t.Months,{className:a[Ie.Months],style:w==null?void 0:w[Ie.Months]},!e.hideNavigation&&O.createElement(t.Nav,{className:a[Ie.Nav],style:w==null?void 0:w[Ie.Nav],"aria-label":ve(),onPreviousClick:Rn,onNextClick:Ne,previousMonth:F,nextMonth:W}),N.map((qe,$t)=>{const pt=Xt=>{const pr=Number(Xt.target.value),Zt=i.setMonth(i.startOfMonth(qe.date),pr);z(Zt)},Cn=Xt=>{const pr=i.setYear(i.startOfMonth(qe.date),Number(Xt.target.value));z(pr)},Dr=qte(qe.date,I,L,n,i),Yi=tne(N[0].date,I,L,n,i);return O.createElement(t.Month,{className:a[Ie.Month],style:w==null?void 0:w[Ie.Month],key:$t,displayIndex:$t,calendarMonth:qe},O.createElement(t.MonthCaption,{className:a[Ie.MonthCaption],style:w==null?void 0:w[Ie.MonthCaption],calendarMonth:qe,displayIndex:$t},s!=null&&s.startsWith("dropdown")?O.createElement(t.DropdownNav,{className:a[Ie.Dropdowns],style:w==null?void 0:w[Ie.Dropdowns]},s==="dropdown"||s==="dropdown-months"?O.createElement(t.MonthsDropdown,{className:a[Ie.MonthsDropdown],"aria-label":fe(),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:pt,options:Dr,style:w==null?void 0:w[Ie.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[Ie.YearsDropdown],"aria-label":Ee(i.options),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:Cn,options:Yi,style:w==null?void 0:w[Ie.Dropdown],value:qe.date.getFullYear()}):O.createElement("span",{role:"status","aria-live":"polite"},M(qe.date.getFullYear()))):O.createElement(t.CaptionLabel,{className:a[Ie.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":J(qe.date,i.options,i)||void 0,className:a[Ie.MonthGrid],style:w==null?void 0:w[Ie.MonthGrid]},!e.hideWeekdays&&O.createElement(t.Weekdays,{className:a[Ie.Weekdays],style:w==null?void 0:w[Ie.Weekdays]},x&&O.createElement(t.WeekNumberHeader,{"aria-label":he(i.options),className:a[Ie.WeekNumberHeader],style:w==null?void 0:w[Ie.WeekNumberHeader],scope:"col"},E()),Ze.map((Xt,pr)=>O.createElement(t.Weekday,{"aria-label":X(Xt,i.options,i),className:a[Ie.Weekday],key:pr,style:w==null?void 0:w[Ie.Weekday],scope:"col"},k(Xt,i.options,i)))),O.createElement(t.Weeks,{className:a[Ie.Weeks],style:w==null?void 0:w[Ie.Weeks]},qe.weeks.map((Xt,pr)=>O.createElement(t.Week,{className:a[Ie.Week],key:Xt.weekNumber,style:w==null?void 0:w[Ie.Week],week:Xt},x&&O.createElement(t.WeekNumber,{week:Xt,style:w==null?void 0:w[Ie.WeekNumber],"aria-label":je(Xt.weekNumber,{locale:o}),className:a[Ie.WeekNumber],scope:"row"},C(Xt.weekNumber)),Xt.days.map(Zt=>{const{date:Ir}=Zt,lt=G(Zt);if(lt[Pt.focused]=!lt.hidden&&!!(ie!=null&&ie.isEqualTo(Zt)),lt[hi.selected]=!lt.disabled&&((U==null?void 0:U(Ir))||lt.selected),h_(Y)){const{from:Fc,to:Wc}=Y;lt[hi.range_start]=!!(Fc&&Wc&&i.isSameDay(Ir,Fc)),lt[hi.range_end]=!!(Fc&&Wc&&i.isSameDay(Ir,Wc)),lt[hi.range_middle]=fo(Y,Ir,!0,i)}const wd=Xte(lt,w,e.modifiersStyles),_d=cte(lt,a,e.modifiersClassNames),my=tt?void 0:ne(Ir,lt,i.options,i);return O.createElement(t.Day,{key:`${i.format(Ir,"yyyy-MM-dd")}_${i.format(Zt.displayMonth,"yyyy-MM")}`,day:Zt,modifiers:lt,className:_d.join(" "),style:wd,"aria-hidden":lt.hidden||void 0,"aria-selected":lt.selected||void 0,"aria-label":my,"data-day":i.format(Ir,"yyyy-MM-dd"),"data-month":Zt.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":Zt.outside||void 0,"data-focused":lt.focused||void 0,"data-today":lt.today||void 0},tt?O.createElement(t.DayButton,{className:a[Ie.DayButton],style:w==null?void 0:w[Ie.DayButton],type:"button",day:Zt,modifiers:lt,disabled:lt.disabled||void 0,tabIndex:re(Zt)?0:-1,"aria-label":ue(Ir,lt,i.options,i),onClick:nt(Zt,lt),onBlur:ze(Zt,lt),onFocus:Se(Zt,lt),onKeyDown:Lt(Zt,lt),onMouseEnter:at(Zt,lt),onMouseLeave:Wt(Zt,lt)},A(Ir,i.options,i)):A(Zt.date,i.options,i))}))))))})),e.footer&&O.createElement(t.Footer,{className:a[Ie.Footer],style:w==null?void 0:w[Ie.Footer],role:"status","aria-live":"polite"},e.footer)))}const cE=()=>P.jsx("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),uE=e=>Tn(e,"E").slice(0,1),Rne=(e,t=24)=>Array.from({length:t},(n,r)=>e+r),fE=e=>{if(e==="multiple")return[];if(e==="range")return{from:void 0,to:void 0}},pb=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:i,showOutsideDays:o=!0,mode:a="single",variant:s="normal",alignment:l="horizontal",numberOfMonths:c,disabled:f,...d})=>{const p=O.isValidElement(d.footer)||typeof d.footer=="function",[m,y]=O.useState(!1),[g,v]=O.useState(!1),[x,w]=O.useState(new Date().getFullYear()),[S,A]=O.useState(x-x%24);r===void 0&&(a==="multiple"?r=[]:a==="range"?r={from:void 0,to:void 0}:r=void 0);function _($){const{goToMonth:N,nextMonth:I,previousMonth:L}=Cc(),F=Tn($.calendarMonth.date,"yyyy"),W=Tn($.calendarMonth.date,"MMMM"),z=new Date($.calendarMonth.date);z.setDate(z.getDate()-z.getDay());const G=Array.from({length:7},(ie,re)=>{const le=new Date(z);return le.setDate(z.getDate()+re),uE(le)}),U=()=>{if(g)A(S-24);else if(m){const ie=new Date(x-1,$.calendarMonth.date.getMonth());w(ie.getFullYear()),N(ie)}else N(L)},V=()=>{if(g)A(S+24);else if(m){const ie=new Date(x+1,$.calendarMonth.date.getMonth());w(ie.getFullYear()),N(ie)}else N(I)},Y=ie=>{w(ie),v(!1),y(!0),N(new Date(ie,$.calendarMonth.date.getMonth()))};let ee;return g?ee=`${S} - ${S+23}`:m?ee=F:ee=`${W} ${F}`,P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"flex justify-between",children:[P.jsx(bn,{variant:"ghost",onClick:U,className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:P.jsx($N,{className:"h-4 w-4 text-button-tertiary-color"})}),P.jsx(bn,{variant:"ghost",onClick:()=>{c>1||(m?(v(!0),y(!1)):g?v(!1):y(!m))},children:ee}),P.jsx(bn,{variant:"ghost",onClick:V,className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:P.jsx(Dw,{className:"h-4 w-4 text-button-tertiary-color"})})]}),g&&P.jsx("div",{className:"grid grid-cols-4 w-full",children:Rne(S).map(ie=>P.jsxs(bn,{variant:"ghost",onClick:()=>Y(ie),className:K("h-10 w-full text-center font-normal relative",ie===x&&ie!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",ie===new Date().getFullYear()&&"font-semibold"),children:[ie,ie===new Date().getFullYear()&&cE()]},ie))}),m&&!g&&P.jsx("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(ie,re)=>P.jsxs(bn,{variant:"ghost",onClick:()=>{y(!1),N(new Date(x,re))},className:K("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",re===$.calendarMonth.date.getMonth()&&re!==new Date().getMonth()&&x===$.calendarMonth.date.getFullYear()&&$.calendarMonth.date.getFullYear()!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",re===new Date().getMonth()&&new Date().getFullYear()===x&&"font-semibold"),children:[Tn(new Date(0,re),"MMM"),new Date().getMonth()===re&&new Date().getFullYear()===x&&cE()]},re))}),!m&&!g&&P.jsx(C,{weekdays:G})]})}const C=({weekdays:$})=>P.jsx("div",{className:"flex justify-between",children:$.map((N,I)=>P.jsx("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-text-secondary text-sm font-normal content-center bg-transparent border-none shrink-0",children:N},I))}),E=({day:$,modifiers:N,...I})=>{const{selected:L,today:F,disabled:W,outside:z,range_middle:G,range_start:U,range_end:V}=N,Y=U||V||G,ee=new Date,ie=r==null?void 0:r.to,re=Tn($.displayMonth,"yyyy-MM")===Tn(ee,"yyyy-MM"),le=ie&&Tn(ie,"yyyy-MM")===Tn($.date,"yyyy-MM"),ae=lte(ee,1),ue=Tn($.date,"yyyy-MM")===Tn(ae,"yyyy-MM"),ne=re||le||Y,J=!o&&z,ve=K("h-10 w-10 flex items-center justify-center transition text-text-secondary relative text-sm","border-none rounded",(L||Y)&&!z?"bg-background-brand text-text-on-color":"bg-transparent hover:bg-button-tertiary-hover",G&&ne&&!z?"bg-brand-background-50 text-text-secondary rounded-none":"",W?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",z&&!Y||!ne&&z||z&&!ue||z?"bg-transparent opacity-50 text-text-disabled cursor-auto":""),X=Ee=>{typeof I.onMouseEnter=="function"&&I.onMouseEnter(Ee),Ee.currentTarget.setAttribute("data-hover","true")},je=Ee=>{typeof I.onMouseLeave=="function"&&I.onMouseLeave(Ee),Ee.currentTarget.setAttribute("data-hover","false")},he=Ee=>{typeof I.onClick=="function"&&I.onClick(Ee)};return P.jsxs("button",{className:K(ve,F&&"font-semibold",J&&"opacity-0",U&&"fui-range-start",V&&"fui-range-end",G&&"fui-range-middle",{"[&:is([data-hover=true])]:bg-brand-background-50 [&:is([data-hover=true])]:rounded-none":!Y&&!L}),disabled:W||z,onClick:he,onMouseEnter:X,onMouseLeave:je,"aria-label":Tn($.date,"EEEE, MMMM do, yyyy"),"data-selected":L,"data-day":Tn($.date,"yyyy-MM-dd"),children:[(!J||Y&&ne)&&I.children,F&&ne&&P.jsx("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},k=$=>P.jsx("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:$.children[1].props.children.map((N,I)=>P.jsx("div",{className:"flex flex-row justify-between",children:N},I))}),M=($,N)=>{if(a==="range"){const I=r;if(!(I!=null&&I.from)&&!(I!=null&&I.to)||I!=null&&I.from&&(I!=null&&I.to)){if(I.from&&tE(N,I==null?void 0:I.from)||I.to&&tE(N,I==null?void 0:I.to)){i({from:void 0,to:void 0});return}i({from:N,to:void 0});return}if(I!=null&&I.from&&!(I!=null&&I.to)){if(NTn(I,"yyyy-MM-dd")===Tn(N,"yyyy-MM-dd"))?i(r.filter(I=>Tn(I,"yyyy-MM-dd")!==Tn(N,"yyyy-MM-dd"))):i([...r,N]):a==="single"&&i($)},D=K("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":"",p?"rounded-b-none":"rounded-bl-md rounded-br-md");return P.jsx(P.Fragment,{children:P.jsx(Ine,{mode:a,selected:r,onSelect:M,hideNavigation:!0,captionLayout:"label",className:K(t),formatters:{formatWeekdayName:uE},classNames:{months:D,month:"flex flex-col p-2 gap-1 text-center 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-sm",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",...n},numberOfMonths:c,components:{MonthCaption:_,DayButton:E,Day:$=>{const N=Object.entries($).reduce((I,[L,F])=>(L.startsWith("data-")&&(I[L]=F),I),{});return P.jsx("div",{...N,className:K($.className,"inline-flex"),children:$.children})},Weekdays:()=>P.jsx(P.Fragment,{}),Week:$=>P.jsx("div",{className:K("bsf-force-ui-month-week flex flex-row",$.className),children:$.children}),Months:$=>{var N;return P.jsx(P.Fragment,{children:P.jsx("div",{className:K("bsf-force-ui-date-picker-month",D),children:(N=$==null?void 0:$.children)==null?void 0:N.map((I,L)=>I?P.jsx(O.Fragment,{children:I.map((F,W)=>P.jsxs(O.Fragment,{children:[W>0&&P.jsx("div",{className:"border border-solid border-border-subtle border-l-0"}),F]},W))},L):null)})})},MonthGrid:$=>!m&&!g?P.jsx(k,{...$}):P.jsx(P.Fragment,{})},...a==="range"?{required:!1}:{},...d,onDayMouseEnter:($,N,I)=>{var ae;if(a!=="range")return;const L=r;if(L!=null&&L.from&&(L!=null&&L.to)||!(L!=null&&L.from)&&!(L!=null&&L.to)){Array.from(document.querySelectorAll("[data-hover]")).forEach(ne=>{ne.setAttribute("data-hover","false")});return}const F=I.target,W=new Date(F.dataset.day),z=Jx(W,L.from),G=Zx(W,L.to);let U;switch(s){case"dualdate":case"presets":U=F.closest(".bsf-force-ui-date-picker-month");break;case"normal":default:U=F.closest(".bsf-force-ui-month-weeks");break}const V=Array.from(U.querySelectorAll("button"));G&&V.sort((ue,ne)=>Zx(new Date(ue.dataset.day),new Date(ne.dataset.day))?-1:1),z&&V.sort((ue,ne)=>Jx(new Date(ue.dataset.day),new Date(ne.dataset.day))?1:-1);const Y=V.indexOf(F),ee=V.findIndex(ue=>ue.getAttribute("data-selected")==="true"),ie=[],re=Math.min(Y,ee),le=Math.max(Y,ee);for(let ue=re;ue<=le;ue++)(ae=V[ue])!=null&&ae.disabled||ie.push(V[ue]);V.forEach(ue=>{ue.setAttribute("data-hover",ie.includes(ue)?"true":"false")})},disabled:f})})},Lne=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:i,onDateSelect:o,applyButtonText:a="Apply",cancelButtonText:s="Cancel",showOutsideDays:l=!0,isFooter:c=!0,selected:f,disabled:d,...p})=>{const[m,y]=O.useState(()=>{if(!f)return fE(e);const _=e==="multiple"&&Array.isArray(f),C=e==="range"&&"from"in f&&"to"in f,E=e==="single"&&f instanceof Date;return _||C||E?f:fE(e)}),g=_=>{y(_),o&&o(_)},v=[{label:"Today",range:{from:rE(),to:rE()}},{label:"Yesterday",range:{from:iE(),to:iE()}},{label:"This Week",range:{from:Cs(new Date,{weekStartsOn:1}),to:d_(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:nE(new Date,6),to:new Date}},{label:"This Month",range:{from:B2(new Date),to:L2(new Date)}},{label:"Last 30 Days",range:{from:nE(new Date,29),to:new Date}}],x=n.length>0?n:v,w=_=>{y(_)},S=()=>{y(e==="multiple"?[]:{from:void 0,to:void 0}),r&&r()},A=()=>{i&&i(m)};if(t==="normal")return P.jsx(pb,{...p,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:m,showOutsideDays:l,setSelectedDates:g,footer:c&&P.jsxs("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[P.jsx(bn,{variant:"outline",onClick:S,children:s}),P.jsx(bn,{onClick:A,children:a})]}),disabled:d});if(t==="dualdate")return P.jsx(pb,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:m,setSelectedDates:g,showOutsideDays:l,variant:t,width:"w-auto",footer:P.jsxs("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[P.jsx(bn,{variant:"outline",onClick:S,children:s}),P.jsx(bn,{onClick:A,children:a})]}),disabled:d,...p});if(t==="presets")return P.jsxs("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[P.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 bg-background-primary",children:x.map((_,C)=>P.jsx(bn,{onClick:()=>w(_.range),variant:"ghost",className:"text-left font-medium text-sm text-nowrap w-full",children:_.label},C))}),P.jsx(pb,{...p,mode:e,selectedDates:m,setSelectedDates:g,variant:t,showOutsideDays:l,width:"w-auto",numberOfMonths:2,footer:P.jsxs("div",{className:"flex justify-end p-2 gap-3 border-l border-r border-t-0 border-b border-solid border-border-subtle bg-background-primary rounded-br-md",children:[P.jsx(bn,{variant:"outline",onClick:S,children:s}),P.jsx(bn,{onClick:A,children:a})]}),disabled:d})]})},iL=({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])},c=e==="boxed"?"space-y-3":"";return P.jsx("div",{className:K(c,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)})};iL.displayName="Accordion";const oL=({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 P.jsx("div",{className:K(a,o),children:O.Children.map(i,s=>O.isValidElement(s)?O.cloneElement(s,{isOpen:e,onToggle:t,type:n,disabled:r}):s)})};oL.displayName="Accordion.Item";const aL=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:i="h3",type:o="simple",children:a,className:s,...l})=>{const c={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[o],f=()=>n==="arrow"?P.jsx($w,{className:K("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):n==="plus-minus"?P.jsx(dn.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?P.jsx(DN,{}):P.jsx(IN,{})},t?"minus":"plus"):null,d=i;return P.jsx(d,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:P.jsxs("button",{className:K("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",c,r&&"cursor-not-allowed opacity-40",s),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...l,children:[P.jsx("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),f()]})})};aL.displayName="Accordion.Trigger";const sL=({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 P.jsx(js,{initial:!1,children:e&&P.jsx(dn.div,{variants:o,initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:K("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:P.jsx("div",{className:K(a),children:r})},"content")})};sL.displayName="Accordion.Content";const Bne=Object.assign(iL,{Item:oL,Trigger:aL,Content:sL});var Fne=Array.isArray,hr=Fne,Wne=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,lL=Wne,zne=lL,Vne=typeof self=="object"&&self&&self.Object===Object&&self,Une=zne||Vne||Function("return this")(),Ki=Une,Hne=Ki,Kne=Hne.Symbol,fd=Kne,dE=fd,cL=Object.prototype,Gne=cL.hasOwnProperty,Yne=cL.toString,fu=dE?dE.toStringTag:void 0;function qne(e){var t=Gne.call(e,fu),n=e[fu];try{e[fu]=void 0;var r=!0}catch{}var i=Yne.call(e);return r&&(t?e[fu]=n:delete e[fu]),i}var Xne=qne,Zne=Object.prototype,Jne=Zne.toString;function Qne(e){return Jne.call(e)}var ere=Qne,hE=fd,tre=Xne,nre=ere,rre="[object Null]",ire="[object Undefined]",pE=hE?hE.toStringTag:void 0;function ore(e){return e==null?e===void 0?ire:rre:pE&&pE in Object(e)?tre(e):nre(e)}var Ro=ore;function are(e){return e!=null&&typeof e=="object"}var Lo=are,sre=Ro,lre=Lo,cre="[object Symbol]";function ure(e){return typeof e=="symbol"||lre(e)&&sre(e)==cre}var Ac=ure,fre=hr,dre=Ac,hre=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pre=/^\w*$/;function mre(e,t){if(fre(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||dre(e)?!0:pre.test(e)||!hre.test(e)||t!=null&&e in Object(t)}var p_=mre;function gre(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ka=gre;const Pc=Qe.getDefaultExportFromCjs(ka);var yre=Ro,vre=ka,bre="[object AsyncFunction]",xre="[object Function]",wre="[object GeneratorFunction]",_re="[object Proxy]";function Sre(e){if(!vre(e))return!1;var t=yre(e);return t==xre||t==wre||t==bre||t==_re}var m_=Sre;const Be=Qe.getDefaultExportFromCjs(m_);var Ore=Ki,Cre=Ore["__core-js_shared__"],Are=Cre,mb=Are,mE=function(){var e=/[^.]+$/.exec(mb&&mb.keys&&mb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pre(e){return!!mE&&mE in e}var Tre=Pre,Ere=Function.prototype,kre=Ere.toString;function Mre(e){if(e!=null){try{return kre.call(e)}catch{}try{return e+""}catch{}}return""}var uL=Mre,jre=m_,Nre=Tre,$re=ka,Dre=uL,Ire=/[\\^$.*+?()[\]{}|]/g,Rre=/^\[object .+?Constructor\]$/,Lre=Function.prototype,Bre=Object.prototype,Fre=Lre.toString,Wre=Bre.hasOwnProperty,zre=RegExp("^"+Fre.call(Wre).replace(Ire,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vre(e){if(!$re(e)||Nre(e))return!1;var t=jre(e)?zre:Rre;return t.test(Dre(e))}var Ure=Vre;function Hre(e,t){return e==null?void 0:e[t]}var Kre=Hre,Gre=Ure,Yre=Kre;function qre(e,t){var n=Yre(e,t);return Gre(n)?n:void 0}var Rs=qre,Xre=Rs,Zre=Xre(Object,"create"),Ng=Zre,gE=Ng;function Jre(){this.__data__=gE?gE(null):{},this.size=0}var Qre=Jre;function eie(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tie=eie,nie=Ng,rie="__lodash_hash_undefined__",iie=Object.prototype,oie=iie.hasOwnProperty;function aie(e){var t=this.__data__;if(nie){var n=t[e];return n===rie?void 0:n}return oie.call(t,e)?t[e]:void 0}var sie=aie,lie=Ng,cie=Object.prototype,uie=cie.hasOwnProperty;function fie(e){var t=this.__data__;return lie?t[e]!==void 0:uie.call(t,e)}var die=fie,hie=Ng,pie="__lodash_hash_undefined__";function mie(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hie&&t===void 0?pie:t,this}var gie=mie,yie=Qre,vie=tie,bie=sie,xie=die,wie=gie;function Tc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Lie=Rie,Bie=$g;function Fie(e,t){var n=this.__data__,r=Bie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Wie=Fie,zie=Oie,Vie=jie,Uie=Die,Hie=Lie,Kie=Wie;function Ec(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},ss=function(t){return dd(t)&&t.indexOf("%")===t.length-1},ye=function(t){return pae(t)&&!Mc(t)},fn=function(t){return ye(t)||dd(t)},vae=0,Ls=function(t){var n=++vae;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(!ye(t)&&!dd(t))return r;var o;if(ss(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Mc(o)&&(o=r),i&&o>n&&(o=n),o},aa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},bae=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 Cae(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 r0(e){"@babel/helpers - typeof";return r0=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},r0(e)}var CE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},_o=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},AE=null,yb=null,S_=function e(t){if(t===AE&&Array.isArray(yb))return yb;var n=[];return O.Children.forEach(t,function(r){Fe(r)||(cae.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),yb=n,AE=t,n};function kr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return _o(i)}):r=[_o(t)],S_(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 PE=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ye(r)||r<=0||!ye(i)||i<=0)},Aae=["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"],Pae=function(t){return t&&t.type&&dd(t.type)&&Aae.indexOf(t.type)>=0},vL=function(t){return t&&r0(t)==="object"&&"clipDot"in t},Tae=function(t,n,r,i){var o,a=(o=gb==null?void 0:gb[i])!==null&&o!==void 0?o:[];return!Be(t)&&(i&&a.includes(n)||wae.includes(n))||r&&__.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),!Pc(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;Tae((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},i0=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 TE(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 Nae(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 a0(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,c=jae(e,Mae),f=i||{width:n,height:r,x:0,y:0},d=Ue("recharts-surface",o);return O.createElement("svg",o0({},Te(c,!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 $ae=["children","className"];function s0(){return s0=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 Iae(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=Dae(e,$ae),o=Ue("recharts-layer",r);return O.createElement("g",s0({className:o},Te(i,!0),{ref:t}),n)}),Rae=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:Fae(e,t,n)}var zae=Wae,Vae="\\ud800-\\udfff",Uae="\\u0300-\\u036f",Hae="\\ufe20-\\ufe2f",Kae="\\u20d0-\\u20ff",Gae=Uae+Hae+Kae,Yae="\\ufe0e\\ufe0f",qae="\\u200d",Xae=RegExp("["+qae+Vae+Gae+Yae+"]");function Zae(e){return Xae.test(e)}var bL=Zae;function Jae(e){return e.split("")}var Qae=Jae,xL="\\ud800-\\udfff",ese="\\u0300-\\u036f",tse="\\ufe20-\\ufe2f",nse="\\u20d0-\\u20ff",rse=ese+tse+nse,ise="\\ufe0e\\ufe0f",ose="["+xL+"]",l0="["+rse+"]",c0="\\ud83c[\\udffb-\\udfff]",ase="(?:"+l0+"|"+c0+")",wL="[^"+xL+"]",_L="(?:\\ud83c[\\udde6-\\uddff]){2}",SL="[\\ud800-\\udbff][\\udc00-\\udfff]",sse="\\u200d",OL=ase+"?",CL="["+ise+"]?",lse="(?:"+sse+"(?:"+[wL,_L,SL].join("|")+")"+CL+OL+")*",cse=CL+OL+lse,use="(?:"+[wL+l0+"?",l0,_L,SL,ose].join("|")+")",fse=RegExp(c0+"(?="+c0+")|"+use+cse,"g");function dse(e){return e.match(fse)||[]}var hse=dse,pse=Qae,mse=bL,gse=hse;function yse(e){return mse(e)?gse(e):pse(e)}var vse=yse,bse=zae,xse=bL,wse=vse,_se=pL;function Sse(e){return function(t){t=_se(t);var n=xse(t)?wse(t):void 0,r=n?n[0]:t.charAt(0),i=n?bse(n,1).join(""):t.slice(1);return r[e]()+i}}var Ose=Sse,Cse=Ose,Ase=Cse("toUpperCase"),Pse=Ase;const Lg=Qe.getDefaultExportFromCjs(Pse);function At(e){return function(){return e}}const AL=Math.cos,$p=Math.sin,xi=Math.sqrt,Dp=Math.PI,Bg=2*Dp,u0=Math.PI,f0=2*u0,ts=1e-6,Tse=f0-ts;function PL(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return PL;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;its)if(!(Math.abs(d*l-c*f)>ts)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,y=i-s,g=l*l+c*c,v=m*m+y*y,x=Math.sqrt(g),w=Math.sqrt(p),S=o*Math.tan((u0-Math.acos((g+p-v)/(2*x*w)))/2),A=S/w,_=S/x;Math.abs(A-1)>ts&&this._append`L${t+A*f},${n+A*d}`,this._append`A${o},${o},0,0,${+(d*m>f*y)},${this._x1=t+_*l},${this._y1=n+_*c}`}}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),c=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ts||Math.abs(this._y1-f)>ts)&&this._append`L${c},${f}`,r&&(p<0&&(p=p%f0+f0),p>Tse?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=f}`:p>ts&&this._append`A${r},${r},0,${+(p>=u0)},${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 O_(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 kse(t)}function C_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TL(e){this._context=e}TL.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 Fg(e){return new TL(e)}function EL(e){return e[0]}function kL(e){return e[1]}function ML(e,t){var n=At(!0),r=null,i=Fg,o=null,a=O_(s);e=typeof e=="function"?e:e===void 0?EL:At(e),t=typeof t=="function"?t:t===void 0?kL:At(t);function s(l){var c,f=(l=C_(l)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),c=0;c<=f;++c)!(c=m;--y)s.point(S[y],A[y]);s.lineEnd(),s.areaEnd()}x&&(S[p]=+e(v,p,d),A[p]=+t(v,p,d),s.point(r?+r(v,p,d):S[p],n?+n(v,p,d):A[p]))}if(w)return s=null,w+""||null}function f(){return ML().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:At(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:At(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:At(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:At(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:At(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:At(+d),c):n},c.lineX0=c.lineY0=function(){return f().x(e).y(t)},c.lineY1=function(){return f().x(e).y(n)},c.lineX1=function(){return f().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:At(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class jL{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 Mse(e){return new jL(e,!0)}function jse(e){return new jL(e,!1)}const A_={draw(e,t){const n=xi(t/Dp);e.moveTo(n,0),e.arc(0,0,n,0,Bg)}},Nse={draw(e,t){const n=xi(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()}},NL=xi(1/3),$se=NL*2,Dse={draw(e,t){const n=xi(t/$se),r=n*NL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Ise={draw(e,t){const n=xi(t),r=-n/2;e.rect(r,r,n,n)}},Rse=.8908130915292852,$L=$p(Dp/10)/$p(7*Dp/10),Lse=$p(Bg/10)*$L,Bse=-AL(Bg/10)*$L,Fse={draw(e,t){const n=xi(t*Rse),r=Lse*n,i=Bse*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Bg*o/5,s=AL(a),l=$p(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},vb=xi(3),Wse={draw(e,t){const n=-xi(t/(vb*3));e.moveTo(0,n*2),e.lineTo(-vb*n,-n),e.lineTo(vb*n,-n),e.closePath()}},Kr=-.5,Gr=xi(3)/2,d0=1/xi(12),zse=(d0/2+1)*3,Vse={draw(e,t){const n=xi(t/zse),r=n/2,i=n*d0,o=r,a=n*d0+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Kr*r-Gr*i,Gr*r+Kr*i),e.lineTo(Kr*o-Gr*a,Gr*o+Kr*a),e.lineTo(Kr*s-Gr*l,Gr*s+Kr*l),e.lineTo(Kr*r+Gr*i,Kr*i-Gr*r),e.lineTo(Kr*o+Gr*a,Kr*a-Gr*o),e.lineTo(Kr*s+Gr*l,Kr*l-Gr*s),e.closePath()}};function Use(e,t){let n=null,r=O_(i);e=typeof e=="function"?e:At(e||A_),t=typeof t=="function"?t:At(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:At(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:At(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Ip(){}function Rp(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 DL(e){this._context=e}DL.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:Rp(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:Rp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hse(e){return new DL(e)}function IL(e){this._context=e}IL.prototype={areaStart:Ip,areaEnd:Ip,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:Rp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Kse(e){return new IL(e)}function RL(e){this._context=e}RL.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:Rp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Gse(e){return new RL(e)}function LL(e){this._context=e}LL.prototype={areaStart:Ip,areaEnd:Ip,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 Yse(e){return new LL(e)}function kE(e){return e<0?-1:1}function ME(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(kE(o)+kE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function jE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function bb(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 Lp(e){this._context=e}Lp.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:bb(this,this._t0,jE(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,bb(this,jE(this,n=ME(this,e,t)),n);break;default:bb(this,this._t0,n=ME(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function BL(e){this._context=new FL(e)}(BL.prototype=Object.create(Lp.prototype)).point=function(e,t){Lp.prototype.point.call(this,t,e)};function FL(e){this._context=e}FL.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 qse(e){return new Lp(e)}function Xse(e){return new BL(e)}function WL(e){this._context=e}WL.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=NE(e),i=NE(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 Jse(e){return new Wg(e,.5)}function Qse(e){return new Wg(e,0)}function ele(e){return new Wg(e,1)}function zl(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 tle(e,t){return e[t]}function nle(e){const t=[];return t.key=e,t}function rle(){var e=At([]),t=h0,n=zl,r=tle;function i(o){var a=Array.from(e.apply(this,arguments),nle),s,l=a.length,c=-1,f;for(const d of o)for(s=0,++c;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 dle(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 zL={symbolCircle:A_,symbolCross:Nse,symbolDiamond:Dse,symbolSquare:Ise,symbolStar:Fse,symbolTriangle:Wse,symbolWye:Vse},hle=Math.PI/180,ple=function(t){var n="symbol".concat(Lg(t));return zL[n]||A_},mle=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*hle;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}},gle=function(t,n){zL["symbol".concat(Lg(t))]=n},P_=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=fle(t,sle),c=DE(DE({},l),{},{type:r,size:o,sizeType:s}),f=function(){var v=ple(r),x=Use().type(v).size(mle(o,s,r));return x()},d=c.className,p=c.cx,m=c.cy,y=Te(c,!0);return p===+p&&m===+m&&o===+o?O.createElement("path",p0({},y,{className:Ue("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(m,")"),d:f()})):null};P_.registerSymbol=gle;function Vl(e){"@babel/helpers - typeof";return Vl=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},Vl(e)}function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var w=m.inactive?c:m.color;return O.createElement("li",m0({className:v,style:d,key:"legend-item-".concat(y)},As(r.props,m,y)),O.createElement(a0,{width:a,height:a,viewBox:f,style:p},r.renderIcon(m)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},g?g(x,m,y):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);df(T_,"displayName","Legend");df(T_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Ale=Dg;function Ple(){this.__data__=new Ale,this.size=0}var Tle=Ple;function Ele(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var kle=Ele;function Mle(e){return this.__data__.get(e)}var jle=Mle;function Nle(e){return this.__data__.has(e)}var $le=Nle,Dle=Dg,Ile=y_,Rle=v_,Lle=200;function Ble(e,t){var n=this.__data__;if(n instanceof Dle){var r=n.__data__;if(!Ile||r.lengths))return!1;var c=o.get(e),f=o.get(t);if(c&&f)return c==t&&f==e;var d=-1,p=!0,m=n&sce?new rce:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=fue}var j_=due,hue=Ro,pue=j_,mue=Lo,gue="[object Arguments]",yue="[object Array]",vue="[object Boolean]",bue="[object Date]",xue="[object Error]",wue="[object Function]",_ue="[object Map]",Sue="[object Number]",Oue="[object Object]",Cue="[object RegExp]",Aue="[object Set]",Pue="[object String]",Tue="[object WeakMap]",Eue="[object ArrayBuffer]",kue="[object DataView]",Mue="[object Float32Array]",jue="[object Float64Array]",Nue="[object Int8Array]",$ue="[object Int16Array]",Due="[object Int32Array]",Iue="[object Uint8Array]",Rue="[object Uint8ClampedArray]",Lue="[object Uint16Array]",Bue="[object Uint32Array]",Mt={};Mt[Mue]=Mt[jue]=Mt[Nue]=Mt[$ue]=Mt[Due]=Mt[Iue]=Mt[Rue]=Mt[Lue]=Mt[Bue]=!0;Mt[gue]=Mt[yue]=Mt[Eue]=Mt[vue]=Mt[kue]=Mt[bue]=Mt[xue]=Mt[wue]=Mt[_ue]=Mt[Sue]=Mt[Oue]=Mt[Cue]=Mt[Aue]=Mt[Pue]=Mt[Tue]=!1;function Fue(e){return mue(e)&&pue(e.length)&&!!Mt[hue(e)]}var Wue=Fue;function zue(e){return function(t){return e(t)}}var QL=zue,zp={exports:{}};zp.exports;(function(e,t){var n=lL,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})(zp,zp.exports);var Vue=zp.exports,Uue=Wue,Hue=QL,zE=Vue,VE=zE&&zE.isTypedArray,Kue=VE?Hue(VE):Uue,eB=Kue,Gue=Xce,Yue=k_,que=hr,Xue=JL,Zue=M_,Jue=eB,Que=Object.prototype,efe=Que.hasOwnProperty;function tfe(e,t){var n=que(e),r=!n&&Yue(e),i=!n&&!r&&Xue(e),o=!n&&!r&&!i&&Jue(e),a=n||r||i||o,s=a?Gue(e.length,String):[],l=s.length;for(var c in e)(t||efe.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Zue(c,l)))&&s.push(c);return s}var nfe=tfe,rfe=Object.prototype;function ife(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rfe;return e===n}var ofe=ife;function afe(e,t){return function(n){return e(t(n))}}var tB=afe,sfe=tB,lfe=sfe(Object.keys,Object),cfe=lfe,ufe=ofe,ffe=cfe,dfe=Object.prototype,hfe=dfe.hasOwnProperty;function pfe(e){if(!ufe(e))return ffe(e);var t=[];for(var n in Object(e))hfe.call(e,n)&&n!="constructor"&&t.push(n);return t}var mfe=pfe,gfe=m_,yfe=j_;function vfe(e){return e!=null&&yfe(e.length)&&!gfe(e)}var hd=vfe,bfe=nfe,xfe=mfe,wfe=hd;function _fe(e){return wfe(e)?bfe(e):xfe(e)}var zg=_fe,Sfe=Lce,Ofe=Yce,Cfe=zg;function Afe(e){return Sfe(e,Cfe,Ofe)}var Pfe=Afe,UE=Pfe,Tfe=1,Efe=Object.prototype,kfe=Efe.hasOwnProperty;function Mfe(e,t,n,r,i,o){var a=n&Tfe,s=UE(e),l=s.length,c=UE(t),f=c.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:kfe.call(t,p)))return!1}var m=o.get(e),y=o.get(t);if(m&&y)return m==t&&y==e;var g=!0;o.set(e,t),o.set(t,e);for(var v=a;++d-1}var Ehe=The;function khe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Hhe){var c=t?null:Vhe(e);if(c)return Uhe(c);a=!1,i=zhe,l=new Bhe}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function spe(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 lpe(e){return e.value}function cpe(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var n=ape(t,Jhe);return O.createElement(T_,n)}var ak=1,So=function(e){function t(){var n;Qhe(this,t);for(var r=arguments.length,i=new Array(r),o=0;oak||Math.abs(i.height-this.lastBoundingBox.height)>ak)&&(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?ao({},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,c=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:((c||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 y=this.getBBoxSnapshot();p={top:((f||0)-y.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ao(ao({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,f=i.payload,d=ao(ao({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}},cpe(o,ao(ao({},this.props),{},{payload:lB(f,c,lpe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=ao(ao({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&ye(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(O.PureComponent);Vg(So,"displayName","Legend");Vg(So,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var sk=fd,upe=k_,fpe=hr,lk=sk?sk.isConcatSpreadable:void 0;function dpe(e){return fpe(e)||upe(e)||!!(lk&&e&&e[lk])}var hpe=dpe,ppe=XL,mpe=hpe;function fB(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=mpe),i||(i=[]);++o0&&n(s)?t>1?fB(s,t-1,n,r,i):ppe(i,s):r||(i[i.length]=s)}return i}var dB=fB;function gpe(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 ype=gpe,vpe=ype,bpe=vpe(),xpe=bpe,wpe=xpe,_pe=zg;function Spe(e,t){return e&&wpe(e,t,_pe)}var hB=Spe,Ope=hd;function Cpe(e,t){return function(n,r){if(n==null)return n;if(!Ope(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Bpe=Lpe,Sb=x_,Fpe=w_,Wpe=Gi,zpe=pB,Vpe=$pe,Upe=QL,Hpe=Bpe,Kpe=$c,Gpe=hr;function Ype(e,t,n){t.length?t=Sb(t,function(o){return Gpe(o)?function(a){return Fpe(a,o.length===1?o[0]:o)}:o}):t=[Kpe];var r=-1;t=Sb(t,Upe(Wpe));var i=zpe(e,function(o,a,s){var l=Sb(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Vpe(i,function(o,a){return Hpe(o,a,n)})}var qpe=Ype;function Xpe(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 Zpe=Xpe,Jpe=Zpe,uk=Math.max;function Qpe(e,t,n){return t=uk(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=uk(r.length-t,0),a=Array(o);++i0){if(++t>=cme)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var hme=dme,pme=lme,mme=hme,gme=mme(pme),yme=gme,vme=$c,bme=eme,xme=yme;function wme(e,t){return xme(bme(e,t,vme),e+"")}var _me=wme,Sme=g_,Ome=hd,Cme=M_,Ame=ka;function Pme(e,t,n){if(!Ame(n))return!1;var r=typeof t;return(r=="number"?Ome(n)&&Cme(t,n.length):r=="string"&&t in n)?Sme(n[t],e):!1}var Ug=Pme,Tme=dB,Eme=qpe,kme=_me,dk=Ug,Mme=kme(function(e,t){if(e==null)return[];var n=t.length;return n>1&&dk(e,t[0],t[1])?t=[]:n>2&&dk(t[0],t[1],t[2])&&(t=[t[0]]),Eme(e,Tme(t,1),[])}),jme=Mme;const D_=Qe.getDefaultExportFromCjs(jme);function hf(e){"@babel/helpers - typeof";return hf=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},hf(e)}function S0(){return S0=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(du,"-left"),ye(n)&&t&&ye(t.x)&&n=t.y),"".concat(du,"-top"),ye(r)&&t&&ye(t.y)&&rg?Math.max(f,l[r]):Math.max(d,l[r])}function Gme(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 Yme(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,c,f,d;return a.height>0&&a.width>0&&n?(f=mk({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=mk({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=Gme({translateX:f,translateY:d,useTranslate3d:s})):c=Hme,{cssProperties:c,cssClasses:Kme({translateX:f,translateY:d,coordinate:n})}}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 gk(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 yk(e){for(var t=1;tvk||Math.abs(r.height-this.state.lastBoundingBox.height)>vk)&&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,c=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,m=i.offset,y=i.position,g=i.reverseDirection,v=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,S=Yme({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:m,position:y,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:x}),A=S.cssClasses,_=S.cssProperties,C=yk(yk({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}},c)}}])}(O.PureComponent),ige=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gi={isSsr:ige(),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 Kl(e){"@babel/helpers - typeof";return Kl=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},Kl(e)}function bk(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 xk(e){for(var t=1;t0;return O.createElement(rge,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:f,hasPayload:C,offset:m,position:v,reverseDirection:x,useTranslate3d:w,viewBox:S,wrapperStyle:A},pge(c,xk(xk({},this.props),{},{payload:_})))}}])}(O.PureComponent);I_(Cr,"displayName","Tooltip");I_(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 mge=Ki,gge=function(){return mge.Date.now()},yge=gge,vge=/\s/;function bge(e){for(var t=e.length;t--&&vge.test(e.charAt(t)););return t}var xge=bge,wge=xge,_ge=/^\s+/;function Sge(e){return e&&e.slice(0,wge(e)+1).replace(_ge,"")}var Oge=Sge,Cge=Oge,wk=ka,Age=Ac,_k=NaN,Pge=/^[-+]0x[0-9a-f]+$/i,Tge=/^0b[01]+$/i,Ege=/^0o[0-7]+$/i,kge=parseInt;function Mge(e){if(typeof e=="number")return e;if(Age(e))return _k;if(wk(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wk(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Cge(e);var n=Tge.test(e);return n||Ege.test(e)?kge(e.slice(2),n?2:8):Pge.test(e)?_k:+e}var xB=Mge,jge=ka,Cb=yge,Sk=xB,Nge="Expected a function",$ge=Math.max,Dge=Math.min;function Ige(e,t,n){var r,i,o,a,s,l,c=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Nge);t=Sk(t)||0,jge(n)&&(f=!!n.leading,d="maxWait"in n,o=d?$ge(Sk(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,c=C,a=e.apply(k,E),a}function y(C){return c=C,s=setTimeout(x,t),f?m(C):a}function g(C){var E=C-l,k=C-c,M=t-E;return d?Dge(M,o-k):M}function v(C){var E=C-l,k=C-c;return l===void 0||E>=t||E<0||d&&k>=o}function x(){var C=Cb();if(v(C))return w(C);s=setTimeout(x,g(C))}function w(C){return s=void 0,p&&r?m(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function A(){return s===void 0?a:w(Cb())}function _(){var C=Cb(),E=v(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return y(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 Rge=Ige,Lge=Rge,Bge=ka,Fge="Expected a function";function Wge(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Fge);return Bge(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Lge(e,t,{leading:r,maxWait:t,trailing:i})}var zge=Wge;const wB=Qe.getDefaultExportFromCjs(zge);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 Ok(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 kh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(I=wB(I,g,{trailing:!0,leading:!1}));var L=new ResizeObserver(I),F=_.current.getBoundingClientRect(),W=F.width,z=F.height;return $(W,z),L.observe(_.current),function(){L.disconnect()}},[$,g]);var N=O.useMemo(function(){var I=M.containerWidth,L=M.containerHeight;if(I<0||L<0)return null;mi(ss(a)||ss(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 F=ss(a)?I:a,W=ss(l)?L:l;n&&n>0&&(F?W=F/n:W&&(F=W*n),p&&W>p&&(W=p)),mi(F>0||W>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.`,F,W,a,l,f,d,n);var z=!Array.isArray(m)&&_o(m.type).endsWith("Chart");return O.Children.map(m,function(G){return O.isValidElement(G)?O.cloneElement(G,kh({width:F,height:W},z?{style:kh({height:"100%",width:"100%",maxHeight:W,maxWidth:F},G.props.style)}:{})):G})},[n,m,l,p,d,f,M,a]);return O.createElement("div",{id:v?"".concat(v):void 0,className:Ue("recharts-responsive-container",x),style:kh(kh({},A),{},{width:a,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:_},N)}),L_=function(t){return null};L_.displayName="Cell";function gf(e){"@babel/helpers - typeof";return gf=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},gf(e)}function Ak(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 P0(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gi.isSsr)return{width:0,height:0};var r=nye(n),i=JSON.stringify({text:t,copyStyle:r});if(ol.widthCache[i])return ol.widthCache[i];try{var o=document.getElementById(Pk);o||(o=document.createElement("span"),o.setAttribute("id",Pk),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=P0(P0({},tye),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return ol.widthCache[i]=l,++ol.cacheCount>eye&&(ol.cacheCount=0,ol.widthCache={}),l}catch{return{width:0,height:0}}},rye=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yf(e){"@babel/helpers - typeof";return yf=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},yf(e)}function Kp(e,t){return sye(e)||aye(e,t)||oye(e,t)||iye()}function iye(){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 oye(e,t){if(e){if(typeof e=="string")return Tk(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 Tk(e,t)}}function Tk(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 wye(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 $k(e,t){return Cye(e)||Oye(e,t)||Sye(e,t)||_ye()}function _ye(){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 Sye(e,t){if(e){if(typeof e=="string")return Dk(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 Dk(e,t)}}function Dk(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 F.reduce(function(W,z){var G=z.word,U=z.width,V=W[W.length-1];if(V&&(i==null||o||V.width+U+rz.width?W:z})};if(!f)return m;for(var g="…",v=function(F){var W=d.slice(0,F),z=CB({breakAll:c,style:l,children:W+g}).wordsWithComputedWidth,G=p(z),U=G.length>a||y(G).width>Number(i);return[U,G]},x=0,w=d.length-1,S=0,A;x<=w&&S<=d.length-1;){var _=Math.floor((x+w)/2),C=_-1,E=v(C),k=$k(E,2),M=k[0],D=k[1],$=v(_),N=$k($,1),I=N[0];if(!M&&!I&&(x=_+1),M&&I&&(w=_-1),!M&&I){A=D;break}S++}return A||m},Ik=function(t){var n=Fe(t)?[]:t.toString().split(OB);return[{words:n}]},Pye=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,c,f=CB({breakAll:a,children:i,style:o});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,c=p}else return Ik(i);return Aye({breakAll:a,children:i,maxLines:s,style:o},l,c,n,r)}return Ik(i)},Rk="#808080",Ps=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,c=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,m=p===void 0?"start":p,y=t.verticalAnchor,g=y===void 0?"end":y,v=t.fill,x=v===void 0?Rk:v,w=Nk(t,bye),S=O.useMemo(function(){return Pye({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=Nk(w,xye);if(!fn(r)||!fn(o))return null;var D=r+(ye(A)?A:0),$=o+(ye(_)?_:0),N;switch(g){case"start":N=Ab("calc(".concat(c,")"));break;case"middle":N=Ab("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=Ab("calc(".concat(S.length-1," * -").concat(s,")"));break}var I=[];if(d){var L=S[0].width,F=w.width;I.push("scale(".concat((ye(F)?F/L:1)/L,")"))}return C&&I.push("rotate(".concat(C,", ").concat(D,", ").concat($,")")),I.length&&(M.transform=I.join(" ")),O.createElement("text",T0({},Te(M,!0),{x:D,y:$,className:Ue("recharts-text",E),textAnchor:m,fill:x.includes("url")?Rk:x}),S.map(function(W,z){var G=W.words.join(k?"":" ");return O.createElement("tspan",{x:D,dy:z===0?N:s,key:"".concat(G,"-").concat(z)},G)}))};function ma(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Tye(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function B_(e){let t,n,r;e.length!==2?(t=ma,n=(s,l)=>ma(e(s),l),r=(s,l)=>e(s)-l):(t=e===ma||e===Tye?e:Eye,n=e,r=e);function i(s,l,c=0,f=s.length){if(c>>1;n(s[d],l)<0?c=d+1:f=d}while(c>>1;n(s[d],l)<=0?c=d+1:f=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function Eye(){return 0}function AB(e){return e===null?NaN:+e}function*kye(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Mye=B_(ma),pd=Mye.right;B_(AB).center;class Lk extends Map{constructor(t,n=$ye){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(Bk(this,t))}has(t){return super.has(Bk(this,t))}set(t,n){return super.set(jye(this,t),n)}delete(t){return super.delete(Nye(this,t))}}function Bk({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function jye({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Nye({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $ye(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Dye(e=ma){if(e===ma)return PB;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 PB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Iye=Math.sqrt(50),Rye=Math.sqrt(10),Lye=Math.sqrt(2);function Gp(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>=Iye?10:o>=Rye?5:o>=Lye?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--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 c=0;c=r)&&(n=r);return n}function Wk(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TB(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?PB:Dye(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*d/l+p)),y=Math.min(r,Math.floor(t+(l-c)*d/l+p));TB(e,t,m,y,i)}const o=e[t];let a=n,s=r;for(hu(e,n,t),i(e[r],o)>0&&hu(e,n,r);a0;)--s}i(e[n],o)===0?hu(e,n,s):(++s,hu(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function hu(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Bye(e,t,n){if(e=Float64Array.from(kye(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Wk(e);if(t>=1)return Fk(e);var r,i=(r-1)*t,o=Math.floor(i),a=Fk(TB(e,o).subarray(0,o+1)),s=Wk(e.subarray(o+1));return a+(s-a)*(i-o)}}function Fye(e,t,n=AB){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 Wye(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?jh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?jh(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=Vye.exec(e))?new cr(t[1],t[2],t[3],1):(t=Uye.exec(e))?new cr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Hye.exec(e))?jh(t[1],t[2],t[3],t[4]):(t=Kye.exec(e))?jh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gye.exec(e))?Yk(t[1],t[2]/100,t[3]/100,1):(t=Yye.exec(e))?Yk(t[1],t[2]/100,t[3]/100,t[4]):zk.hasOwnProperty(e)?Hk(zk[e]):e==="transparent"?new cr(NaN,NaN,NaN,0):null}function Hk(e){return new cr(e>>16&255,e>>8&255,e&255,1)}function jh(e,t,n,r){return r<=0&&(e=t=n=NaN),new cr(e,t,n,r)}function Zye(e){return e instanceof md||(e=wf(e)),e?(e=e.rgb(),new cr(e.r,e.g,e.b,e.opacity)):new cr}function N0(e,t,n,r){return arguments.length===1?Zye(e):new cr(e,t,n,r??1)}function cr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}W_(cr,N0,kB(md,{brighter(e){return e=e==null?Yp:Math.pow(Yp,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bf:Math.pow(bf,e),new cr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new cr(gs(this.r),gs(this.g),gs(this.b),qp(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:Kk,formatHex:Kk,formatHex8:Jye,formatRgb:Gk,toString:Gk}));function Kk(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}`}function Jye(){return`#${ls(this.r)}${ls(this.g)}${ls(this.b)}${ls((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gk(){const e=qp(this.opacity);return`${e===1?"rgb(":"rgba("}${gs(this.r)}, ${gs(this.g)}, ${gs(this.b)}${e===1?")":`, ${e})`}`}function qp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gs(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ls(e){return e=gs(e),(e<16?"0":"")+e.toString(16)}function Yk(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 MB(e){if(e instanceof di)return new di(e.h,e.s,e.l,e.opacity);if(e instanceof md||(e=wf(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 Qye(e,t,n,r){return arguments.length===1?MB(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}W_(di,Qye,kB(md,{brighter(e){return e=e==null?Yp:Math.pow(Yp,e),new di(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bf:Math.pow(bf,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 cr(Pb(e>=240?e-240:e+120,i,r),Pb(e,i,r),Pb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new di(qk(this.h),Nh(this.s),Nh(this.l),qp(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=qp(this.opacity);return`${e===1?"hsl(":"hsla("}${qk(this.h)}, ${Nh(this.s)*100}%, ${Nh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qk(e){return e=(e||0)%360,e<0?e+360:e}function Nh(e){return Math.max(0,Math.min(1,e||0))}function Pb(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 z_=e=>()=>e;function eve(e,t){return function(n){return e+n*t}}function tve(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 nve(e){return(e=+e)==1?jB:function(t,n){return n-t?tve(t,n,e):z_(isNaN(t)?n:t)}}function jB(e,t){var n=t-e;return n?eve(e,n):z_(isNaN(e)?t:e)}const Xk=function e(t){var n=nve(t);function r(i,o){var a=n((i=N0(i)).r,(o=N0(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=jB(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=c(f),i+""}}return r.gamma=e,r}(1);function rve(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:Xp(r,i)})),n=Tb.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function pve(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?mve:pve,l=c=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((c||(c=s(t,e.map(r),Xp)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Zp),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=V_,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 U_(){return Hg()(er,er)}function gve(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jp(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 Gl(e){return e=Jp(Math.abs(e)),e?e[1]:NaN}function yve(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 vve(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var bve=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _f(e){if(!(t=bve.exec(e)))throw new Error("invalid format: "+e);var t;return new H_({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]})}_f.prototype=H_.prototype;function H_(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+""}H_.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 xve(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 NB;function wve(e,t){var n=Jp(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(NB=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")+Jp(e,Math.max(0,t+o-1))[0]}function Jk(e,t){var n=Jp(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 Qk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:gve,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)=>Jk(e*100,t),r:Jk,s:wve,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function eM(e){return e}var tM=Array.prototype.map,nM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _ve(e){var t=e.grouping===void 0||e.thousands===void 0?eM:yve(tM.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?eM:vve(tM.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 c(d){d=_f(d);var p=d.fill,m=d.align,y=d.sign,g=d.symbol,v=d.zero,x=d.width,w=d.comma,S=d.precision,A=d.trim,_=d.type;_==="n"?(w=!0,_="g"):Qk[_]||(S===void 0&&(S=12),A=!0,_="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var C=g==="$"?n:g==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",E=g==="$"?r:/[%p]/.test(_)?a:"",k=Qk[_],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,I=E,L,F,W;if(_==="c")I=k($)+I,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?l:k(Math.abs($),S),A&&($=xve($)),z&&+$==0&&y!=="+"&&(z=!1),N=(z?y==="("?y:s:y==="-"||y==="("?"":y)+N,I=(_==="s"?nM[8+NB/3]:"")+I+(z&&y==="("?")":""),M){for(L=-1,F=$.length;++LW||W>57){I=(W===46?i+$.slice(L+1):$.slice(L))+I,$=$.slice(0,L);break}}}w&&!v&&($=t($,1/0));var G=N.length+$.length+I.length,U=G>1)+N+$+I+U.slice(G);break;default:$=U+N+$+I;break}return o($)}return D.toString=function(){return d+""},D}function f(d,p){var m=c((d=_f(d),d.type="f",d)),y=Math.max(-8,Math.min(8,Math.floor(Gl(p)/3)))*3,g=Math.pow(10,-y),v=nM[8+y/3];return function(x){return m(g*x)+v}}return{format:c,formatPrefix:f}}var $h,K_,$B;Sve({thousands:",",grouping:[3],currency:["$",""]});function Sve(e){return $h=_ve(e),K_=$h.format,$B=$h.formatPrefix,$h}function Ove(e){return Math.max(0,-Gl(Math.abs(e)))}function Cve(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gl(t)/3)))*3-Gl(Math.abs(e)))}function Ave(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gl(t)-Gl(e))+1}function DB(e,t,n,r){var i=M0(e,t,n),o;switch(r=_f(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Cve(i,a))&&(r.precision=o),$B(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Ave(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Ove(i))&&(r.precision=o-(r.type==="%")*2);break}}return K_(r)}function Ma(e){var t=e.domain;return e.ticks=function(n){var r=t();return E0(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return DB(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,c,f=10;for(s0;){if(c=k0(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Qp(){var e=U_();return e.copy=function(){return gd(e,Qp())},Qr.apply(e,arguments),Ma(e)}function IB(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,Zp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return IB(e).unknown(t)},e=arguments.length?Array.from(e,Zp):[0,1],Ma(n)}function RB(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 Mve(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 oM(e){return(t,n)=>-e(-t,n)}function G_(e){const t=e(rM,iM),n=t.domain;let r=10,i,o;function a(){return i=Mve(r),o=kve(r),n()[0]<0?(i=oM(i),o=oM(o),e(Pve,Tve)):e(rM,iM),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 c=l[0],f=l[l.length-1];const d=f0){for(;p<=m;++p)for(y=1;yf)break;x.push(g)}}else for(;p<=m;++p)for(y=r-1;y>=1;--y)if(g=p>0?y/o(-p):y*o(p),!(gf)break;x.push(g)}x.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=_f(l)).precision==null&&(l.trim=!0),l=K_(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(RB(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function LB(){const e=G_(Hg()).domain([1,10]);return e.copy=()=>gd(e,LB()).base(e.base()),Qr.apply(e,arguments),e}function aM(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function sM(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Y_(e){var t=1,n=e(aM(t),sM(t));return n.constant=function(r){return arguments.length?e(aM(t=+r),sM(t)):t},Ma(n)}function BB(){var e=Y_(Hg());return e.copy=function(){return gd(e,BB()).constant(e.constant())},Qr.apply(e,arguments)}function lM(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function jve(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Nve(e){return e<0?-e*e:e*e}function q_(e){var t=e(er,er),n=1;function r(){return n===1?e(er,er):n===.5?e(jve,Nve):e(lM(n),lM(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ma(t)}function X_(){var e=q_(Hg());return e.copy=function(){return gd(e,X_()).exponent(e.exponent())},Qr.apply(e,arguments),e}function $ve(){return X_.apply(null,arguments).exponent(.5)}function cM(e){return Math.sign(e)*e*e}function Dve(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function FB(){var e=U_(),t=[0,1],n=!1,r;function i(o){var a=Dve(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(cM(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,Zp)).map(cM)),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 FB(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Qr.apply(i,arguments),Ma(i)}function WB(){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[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return zB().domain([e,t]).range(i).unknown(o)},Qr.apply(Ma(a),arguments)}function VB(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[pd(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 VB().domain(e).range(t).unknown(n)},Qr.apply(i,arguments)}const Eb=new Date,kb=new Date;function pn(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 c;do l.push(c=new Date(+o)),t(o,s),e(o);while(cpn(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)=>(Eb.setTime(+o),kb.setTime(+a),e(Eb),e(kb),Math.floor(n(Eb,kb))),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 em=pn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);em.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?pn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):em);em.range;const po=1e3,Zr=po*60,mo=Zr*60,ko=mo*24,Z_=ko*7,uM=ko*30,Mb=ko*365,cs=pn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*po)},(e,t)=>(t-e)/po,e=>e.getUTCSeconds());cs.range;const J_=pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*po)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getMinutes());J_.range;const Q_=pn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Zr)},(e,t)=>(t-e)/Zr,e=>e.getUTCMinutes());Q_.range;const eS=pn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*po-e.getMinutes()*Zr)},(e,t)=>{e.setTime(+e+t*mo)},(e,t)=>(t-e)/mo,e=>e.getHours());eS.range;const tS=pn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*mo)},(e,t)=>(t-e)/mo,e=>e.getUTCHours());tS.range;const yd=pn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Zr)/ko,e=>e.getDate()-1);yd.range;const Kg=pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ko,e=>e.getUTCDate()-1);Kg.range;const UB=pn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ko,e=>Math.floor(e/ko));UB.range;function Bs(e){return pn(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)/Z_)}const Gg=Bs(0),tm=Bs(1),Ive=Bs(2),Rve=Bs(3),Yl=Bs(4),Lve=Bs(5),Bve=Bs(6);Gg.range;tm.range;Ive.range;Rve.range;Yl.range;Lve.range;Bve.range;function Fs(e){return pn(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)/Z_)}const Yg=Fs(0),nm=Fs(1),Fve=Fs(2),Wve=Fs(3),ql=Fs(4),zve=Fs(5),Vve=Fs(6);Yg.range;nm.range;Fve.range;Wve.range;ql.range;zve.range;Vve.range;const nS=pn(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());nS.range;const rS=pn(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());rS.range;const Mo=pn(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());Mo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pn(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)});Mo.range;const jo=pn(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());jo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:pn(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)});jo.range;function HB(e,t,n,r,i,o){const a=[[cs,1,po],[cs,5,5*po],[cs,15,15*po],[cs,30,30*po],[o,1,Zr],[o,5,5*Zr],[o,15,15*Zr],[o,30,30*Zr],[i,1,mo],[i,3,3*mo],[i,6,6*mo],[i,12,12*mo],[r,1,ko],[r,2,2*ko],[n,1,Z_],[t,1,uM],[t,3,3*uM],[e,1,Mb]];function s(c,f,d){const p=fv).right(a,p);if(m===a.length)return e.every(M0(c/Mb,f/Mb,d));if(m===0)return em.every(Math.max(M0(c,f,d),1));const[y,g]=a[p/a[m-1][2]53)return null;"w"in X||(X.w=1),"Z"in X?(he=Nb(pu(X.y,0,1)),Ee=he.getUTCDay(),he=Ee>4||Ee===0?nm.ceil(he):nm(he),he=Kg.offset(he,(X.V-1)*7),X.y=he.getUTCFullYear(),X.m=he.getUTCMonth(),X.d=he.getUTCDate()+(X.w+6)%7):(he=jb(pu(X.y,0,1)),Ee=he.getDay(),he=Ee>4||Ee===0?tm.ceil(he):tm(he),he=yd.offset(he,(X.V-1)*7),X.y=he.getFullYear(),X.m=he.getMonth(),X.d=he.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),Ee="Z"in X?Nb(pu(X.y,0,1)).getUTCDay():jb(pu(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(Ee+5)%7:X.w+X.U*7-(Ee+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,Nb(X)):jb(X)}}function k(J,fe,ve,X){for(var je=0,he=fe.length,Ee=ve.length,Ze,tt;je=Ee)return-1;if(Ze=fe.charCodeAt(je++),Ze===37){if(Ze=fe.charAt(je++),tt=_[Ze in fM?fe.charAt(je++):Ze],!tt||(X=tt(J,ve,X))<0)return-1}else if(Ze!=ve.charCodeAt(X++))return-1}return X}function M(J,fe,ve){var X=c.exec(fe.slice(ve));return X?(J.p=f.get(X[0].toLowerCase()),ve+X[0].length):-1}function D(J,fe,ve){var X=m.exec(fe.slice(ve));return X?(J.w=y.get(X[0].toLowerCase()),ve+X[0].length):-1}function $(J,fe,ve){var X=d.exec(fe.slice(ve));return X?(J.w=p.get(X[0].toLowerCase()),ve+X[0].length):-1}function N(J,fe,ve){var X=x.exec(fe.slice(ve));return X?(J.m=w.get(X[0].toLowerCase()),ve+X[0].length):-1}function I(J,fe,ve){var X=g.exec(fe.slice(ve));return X?(J.m=v.get(X[0].toLowerCase()),ve+X[0].length):-1}function L(J,fe,ve){return k(J,t,fe,ve)}function F(J,fe,ve){return k(J,n,fe,ve)}function W(J,fe,ve){return k(J,r,fe,ve)}function z(J){return a[J.getDay()]}function G(J){return o[J.getDay()]}function U(J){return l[J.getMonth()]}function V(J){return s[J.getMonth()]}function Y(J){return i[+(J.getHours()>=12)]}function ee(J){return 1+~~(J.getMonth()/3)}function ie(J){return a[J.getUTCDay()]}function re(J){return o[J.getUTCDay()]}function le(J){return l[J.getUTCMonth()]}function ae(J){return s[J.getUTCMonth()]}function ue(J){return i[+(J.getUTCHours()>=12)]}function ne(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var fe=C(J+="",S);return fe.toString=function(){return J},fe},parse:function(J){var fe=E(J+="",!1);return fe.toString=function(){return J},fe},utcFormat:function(J){var fe=C(J+="",A);return fe.toString=function(){return J},fe},utcParse:function(J){var fe=E(J+="",!0);return fe.toString=function(){return J},fe}}}var fM={"-":"",_:" ",0:"0"},On=/^\s*\d+/,qve=/^%/,Xve=/[\\^$*+?|[\]().{}]/g;function ot(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function Jve(e,t,n){var r=On.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qve(e,t,n){var r=On.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ebe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function tbe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function nbe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function dM(e,t,n){var r=On.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hM(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rbe(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 ibe(e,t,n){var r=On.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function obe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function pM(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function abe(e,t,n){var r=On.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function mM(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sbe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function lbe(e,t,n){var r=On.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cbe(e,t,n){var r=On.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ube(e,t,n){var r=On.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fbe(e,t,n){var r=qve.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dbe(e,t,n){var r=On.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function hbe(e,t,n){var r=On.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function gM(e,t){return ot(e.getDate(),t,2)}function pbe(e,t){return ot(e.getHours(),t,2)}function mbe(e,t){return ot(e.getHours()%12||12,t,2)}function gbe(e,t){return ot(1+yd.count(Mo(e),e),t,3)}function KB(e,t){return ot(e.getMilliseconds(),t,3)}function ybe(e,t){return KB(e,t)+"000"}function vbe(e,t){return ot(e.getMonth()+1,t,2)}function bbe(e,t){return ot(e.getMinutes(),t,2)}function xbe(e,t){return ot(e.getSeconds(),t,2)}function wbe(e){var t=e.getDay();return t===0?7:t}function _be(e,t){return ot(Gg.count(Mo(e)-1,e),t,2)}function GB(e){var t=e.getDay();return t>=4||t===0?Yl(e):Yl.ceil(e)}function Sbe(e,t){return e=GB(e),ot(Yl.count(Mo(e),e)+(Mo(e).getDay()===4),t,2)}function Obe(e){return e.getDay()}function Cbe(e,t){return ot(tm.count(Mo(e)-1,e),t,2)}function Abe(e,t){return ot(e.getFullYear()%100,t,2)}function Pbe(e,t){return e=GB(e),ot(e.getFullYear()%100,t,2)}function Tbe(e,t){return ot(e.getFullYear()%1e4,t,4)}function Ebe(e,t){var n=e.getDay();return e=n>=4||n===0?Yl(e):Yl.ceil(e),ot(e.getFullYear()%1e4,t,4)}function kbe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ot(t/60|0,"0",2)+ot(t%60,"0",2)}function yM(e,t){return ot(e.getUTCDate(),t,2)}function Mbe(e,t){return ot(e.getUTCHours(),t,2)}function jbe(e,t){return ot(e.getUTCHours()%12||12,t,2)}function Nbe(e,t){return ot(1+Kg.count(jo(e),e),t,3)}function YB(e,t){return ot(e.getUTCMilliseconds(),t,3)}function $be(e,t){return YB(e,t)+"000"}function Dbe(e,t){return ot(e.getUTCMonth()+1,t,2)}function Ibe(e,t){return ot(e.getUTCMinutes(),t,2)}function Rbe(e,t){return ot(e.getUTCSeconds(),t,2)}function Lbe(e){var t=e.getUTCDay();return t===0?7:t}function Bbe(e,t){return ot(Yg.count(jo(e)-1,e),t,2)}function qB(e){var t=e.getUTCDay();return t>=4||t===0?ql(e):ql.ceil(e)}function Fbe(e,t){return e=qB(e),ot(ql.count(jo(e),e)+(jo(e).getUTCDay()===4),t,2)}function Wbe(e){return e.getUTCDay()}function zbe(e,t){return ot(nm.count(jo(e)-1,e),t,2)}function Vbe(e,t){return ot(e.getUTCFullYear()%100,t,2)}function Ube(e,t){return e=qB(e),ot(e.getUTCFullYear()%100,t,2)}function Hbe(e,t){return ot(e.getUTCFullYear()%1e4,t,4)}function Kbe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ql(e):ql.ceil(e),ot(e.getUTCFullYear()%1e4,t,4)}function Gbe(){return"+0000"}function vM(){return"%"}function bM(e){return+e}function xM(e){return Math.floor(+e/1e3)}var al,XB,ZB;Ybe({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 Ybe(e){return al=Yve(e),XB=al.format,al.parse,ZB=al.utcFormat,al.utcParse,al}function qbe(e){return new Date(e)}function Xbe(e){return e instanceof Date?+e:+new Date(+e)}function iS(e,t,n,r,i,o,a,s,l,c){var f=U_(),d=f.invert,p=f.domain,m=c(".%L"),y=c(":%S"),g=c("%I:%M"),v=c("%I %p"),x=c("%a %d"),w=c("%b %d"),S=c("%B"),A=c("%Y");function _(C){return(l(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Bye(e,o/r))},n.copy=function(){return tF(t).domain(e)},Bo.apply(n,arguments)}function Xg(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=er,f,d=!1,p;function m(g){return isNaN(g=+g)?p:(g=.5+((g=+f(g))-o)*(r*gt}var oF=rxe,ixe=Zg,oxe=oF,axe=$c;function sxe(e){return e&&e.length?ixe(e,axe,oxe):void 0}var lxe=sxe;const ca=Qe.getDefaultExportFromCjs(lxe);function cxe(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 Oo(this,new this.constructor(e))};Ae.dividedToIntegerBy=Ae.idiv=function(e){var t=this,n=t.constructor;return St(Oo(t,new n(e),0,1),n.precision)};Ae.equals=Ae.eq=function(e){return!this.cmp(e)};Ae.exponent=function(){return nn(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=Oo(Sf(n,o),Sf(e,o),o),Rt=!0,St(t,i))};Ae.minus=Ae.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uF(t,e):lF(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=Oo(n,e,0,1).times(e),Rt=!0,n.minus(t)):St(new r(n),i)};Ae.naturalExponential=Ae.exp=function(){return cF(this)};Ae.naturalLogarithm=Ae.ln=function(){return Sf(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?lF(t,e):uF(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(ys+e);if(t=nn(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=nn(s),Rt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Ti(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Rc((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(Oo(s,o,a+2)).times(.5),Ti(o.d).slice(0,a)===(t=Ti(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(St(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Rt=!0,St(r,n)};Ae.times=Ae.mul=function(e){var t,n,r,i,o,a,s,l,c,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,c=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%vn|0,t=s/vn|0;o[i]=(o[i]+t)%vn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Rt?St(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:(Fi(e,0,Ic),t===void 0?t=r.rounding:Fi(t,0,8),St(n,e+nn(n)+1,t))};Ae.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Es(r,!0):(Fi(e,0,Ic),t===void 0?t=i.rounding:Fi(t,0,8),r=St(new i(r),e+1,t),n=Es(r,!0,e+1)),n};Ae.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Es(i):(Fi(e,0,Ic),t===void 0?t=o.rounding:Fi(t,0,8),r=St(new o(i),e+nn(i)+1,t),n=Es(r.abs(),!1,e+nn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ae.toInteger=Ae.toint=function(){var e=this,t=e.constructor;return St(new t(e),nn(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,c=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 St(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=f<0?-f:f)<=sF){for(i=new l(Tr),t=Math.ceil(r/jt+4),Rt=!1;n%2&&(i=i.times(s),SM(i.d,t)),n=Rc(n/2),n!==0;)s=s.times(s),SM(s.d,t);return Rt=!0,e.s<0?new l(Tr).div(i):St(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(Sf(s,r+c)),Rt=!0,i=cF(i),i.s=o,i};Ae.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=nn(i),r=Es(i,n<=o.toExpNeg||n>=o.toExpPos)):(Fi(e,1,Ic),t===void 0?t=o.rounding:Fi(t,0,8),i=St(new o(i),e,t),n=nn(i),r=Es(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):(Fi(e,1,Ic),t===void 0?t=r.rounding:Fi(t,0,8)),St(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=nn(e),n=e.constructor;return Es(e,t<=n.toExpNeg||t>=n.toExpPos)};function lF(e,t){var n,r,i,o,a,s,l,c,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Rt?St(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,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=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/vn|0,l[o]%=vn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Rt?St(t,d):t}function Fi(e,t,n){if(e!==~~e||en)throw Error(ys+e)}function Ti(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,c,f,d,p,m,y,g,v,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),y=m.d=[],c=0;N[c]==($[c]||0);)++c;if(N[c]>($[c]||0)&&--l,o==null?w=o=M.precision:a?w=o+(nn(r)-nn(i))+1:w=o,w<0)return new M(0);if(w=w/jt+2|0,c=0,E==1)for(f=0,N=N[0],w++;(c<_||f)&&w--;c++)S=f*vn+($[c]||0),y[c]=S/N|0,f=S%N|0;else{for(f=vn/(N[0]+1)|0,f>1&&(N=e(N,f),$=e($,f),E=N.length,_=$.length),A=E,g=$.slice(0,E),v=g.length;v=vn/2&&++C;do f=0,s=t(N,g,E,v),s<0?(x=g[0],E!=v&&(x=x*vn+(g[1]||0)),f=x/C|0,f>1?(f>=vn&&(f=vn-1),d=e(N,f),p=d.length,v=g.length,s=t(d,g,p,v),s==1&&(f--,n(d,E16)throw Error(sS+nn(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),c+=5;for(r=Math.log(rs(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new f(Tr),f.precision=s;;){if(i=St(i.times(e),s),n=n.times(++l),a=o.plus(Oo(i,n,s)),Ti(a.d).slice(0,s)===Ti(o.d).slice(0,s)){for(;c--;)o=St(o.times(o),s);return f.precision=d,t==null?(Rt=!0,St(o,d)):o}o=a}}function nn(e){for(var t=e.e*jt,n=e.d[0];n>=10;n/=10)t++;return t}function $b(e,t,n){if(t>e.LN10.sd())throw Rt=!0,n&&(e.precision=n),Error(Jr+"LN10 precision limit exceeded");return St(new e(e.LN10),t)}function oa(e){for(var t="";e--;)t+="0";return t}function Sf(e,t){var n,r,i,o,a,s,l,c,f,d=1,p=10,m=e,y=m.d,g=m.constructor,v=g.precision;if(m.s<1)throw Error(Jr+(m.s?"NaN":"-Infinity"));if(m.eq(Tr))return new g(0);if(t==null?(Rt=!1,c=v):c=t,m.eq(10))return t==null&&(Rt=!0),$b(g,c);if(c+=p,g.precision=c,n=Ti(y),r=n.charAt(0),o=nn(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Ti(m.d),r=n.charAt(0),d++;o=nn(m),r>1?(m=new g("0."+n),o++):m=new g(r+"."+n.slice(1))}else return l=$b(g,c+2,v).times(o+""),m=Sf(new g(r+"."+n.slice(1)),c-p).plus(l),g.precision=v,t==null?(Rt=!0,St(m,v)):m;for(s=a=m=Oo(m.minus(Tr),m.plus(Tr),c),f=St(m.times(m),c),i=3;;){if(a=St(a.times(f),c),l=s.plus(Oo(a,new g(i),c)),Ti(l.d).slice(0,c)===Ti(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus($b(g,c+2,v).times(o+""))),s=Oo(s,new g(d),c),g.precision=v,t==null?(Rt=!0,St(s,v)):s;s=l,i+=2}}function _M(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=Rc(n/jt),e.d=[],r=(n+1)%jt,n<0&&(r+=jt),rrm||e.e<-rm))throw Error(sS+n)}else e.s=0,e.e=0,e.d=[0];return e}function St(e,t,n){var r,i,o,a,s,l,c,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,c=d[f=0];else{if(f=Math.ceil((r+1)/jt),o=d.length,f>=o)return e;for(c=o=d[f],a=1;o>=10;o/=10)a++;r%=jt,i=r-jt+a}if(n!==void 0&&(o=rs(10,a-i-1),s=c/o%10|0,l=t<0||d[f+1]!==void 0||c%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?c/rs(10,a-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=nn(e),d.length=1,t=t-o-1,d[0]=rs(10,(jt-t%jt)%jt),e.e=Rc(-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=rs(10,jt-r),d[f]=i>0?(c/rs(10,a-i)%rs(10,i)|0)*o:0),l)for(;;)if(f==0){(d[0]+=o)==vn&&(d[0]=1,++e.e);break}else{if(d[f]+=o,d[f]!=vn)break;d[f--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Rt&&(e.e>rm||e.e<-rm))throw Error(sS+nn(e));return e}function uF(e,t){var n,r,i,o,a,s,l,c,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?St(t,m):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(f=a<0,f?(n=l,a=-a,s=d.length):(n=d,r=c,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)+oa(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+oa(-i-1)+o,n&&(r=n-a)>0&&(o+=oa(r))):i>=a?(o+=oa(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+oa(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=oa(r))),e.s<0?"-"+o:o}function SM(e,t){if(e.length>t)return e.length=t,!0}function fF(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(ys+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 _M(a,o.toString())}else if(typeof o!="string")throw Error(ys+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,kxe.test(o))_M(a,o);else throw Error(ys+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=fF,i.config=i.set=Mxe,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(ys+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ys+n+": "+r);return this}var lS=fF(Exe);Tr=new lS(1);const vt=lS;function jxe(e){return Ixe(e)||Dxe(e)||$xe(e)||Nxe()}function Nxe(){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 $xe(e,t){if(e){if(typeof e=="string")return I0(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 I0(e,t)}}function Dxe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Ixe(e){if(Array.isArray(e))return I0(e)}function I0(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,OM(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.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 Zxe(e){if(Array.isArray(e))return e}function gF(e){var t=Of(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function yF(e,t,n){if(e.lte(0))return new vt(0);var r=ey.getDigitCount(e.toNumber()),i=new vt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new vt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new vt(Math.ceil(l))}function Jxe(e,t,n){var r=1,i=new vt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new vt(10).pow(ey.getDigitCount(e)-1),i=new vt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new vt(Math.floor(e)))}else e===0?i=new vt(Math.floor((t-1)/2)):n||(i=new vt(Math.floor(e)));var a=Math.floor((t-1)/2),s=Fxe(Bxe(function(l){return i.add(new vt(l-a).mul(r)).toNumber()}),R0);return s(0,t)}function vF(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 vt(0),tickMin:new vt(0),tickMax:new vt(0)};var o=yF(new vt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new vt(0):(a=new vt(e).add(t).div(2),a=a.sub(new vt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new vt(t).sub(a).div(o).toNumber()),c=s+l+1;return c>n?vF(e,t,n,r,i+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:o,tickMin:a.sub(new vt(s).mul(o)),tickMax:a.add(new vt(l).mul(o))})}function Qxe(e){var t=Of(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=gF([n,r]),l=Of(s,2),c=l[0],f=l[1];if(c===-1/0||f===1/0){var d=f===1/0?[c].concat(B0(R0(0,i-1).map(function(){return 1/0}))):[].concat(B0(R0(0,i-1).map(function(){return-1/0})),[f]);return n>r?L0(d):d}if(c===f)return Jxe(c,i,o);var p=vF(c,f,a,o),m=p.step,y=p.tickMin,g=p.tickMax,v=ey.rangeStep(y,g.add(new vt(.1).mul(m)),m);return n>r?L0(v):v}function e0e(e,t){var n=Of(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=gF([r,i]),s=Of(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var f=Math.max(t,2),d=yF(new vt(c).sub(l).div(f-1),o,0),p=[].concat(B0(ey.rangeStep(new vt(l),new vt(c).sub(new vt(.99).mul(d)),d)),[c]);return r>i?L0(p):p}var t0e=pF(Qxe),n0e=pF(e0e),r0e=process.env.NODE_ENV==="production",Db="Invariant failed";function ur(e,t){if(r0e)throw new Error(Db);var n=typeof t=="function"?t():t,r=n?"".concat(Db,": ").concat(n):Db;throw new Error(r)}var i0e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Xl(e){"@babel/helpers - typeof";return Xl=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},Xl(e)}function im(){return im=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 f0e(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 d0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h0e(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,c=0;c0?i[c-1].coordinate:i[s-1].coordinate,d=i[c].coordinate,p=c>=s-1?i[0].coordinate:i[c+1].coordinate,m=void 0;if(Jn(d-f)!==Jn(p-d)){var y=[];if(Jn(p-d)===Jn(l[1]-l[0])){m=p;var g=d+l[1]-l[0];y[0]=Math.min(g,(g+f)/2),y[1]=Math.max(g,(g+f)/2)}else{m=f;var v=p+l[1]-l[0];y[0]=Math.min(d,(v+d)/2),y[1]=Math.max(d,(v+d)/2)}var x=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>x[0]&&t<=x[1]||t>=y[0]&&t<=y[1]){a=i[c].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[c].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},cS=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},k0e=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,c=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[v];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},M0e=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 c=Qn(n,i,0,!0),f,d=[];if(a[0].barSize===+a[0].barSize){var p=!1,m=i/l,y=a.reduce(function(A,_){return A+_.barSize||0},0);y+=(l-1)*c,y>=i&&(y-=(l-1)*c,c=0),y>=i&&m>0&&(p=!0,m*=.9,y=l*m);var g=(i-y)/2>>0,v={offset:g-c,size:0};f=a.reduce(function(A,_){var C={item:_.item,position:{offset:v.offset+v.size+c,size:p?m:_.barSize}},E=[].concat(PM(A),[C]);return v=E[E.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(k){E.push({item:k,position:v})}),E},d)}else{var x=Qn(r,i,0,!0);i-2*x-(l-1)*c<=0&&(c=0);var w=(i-2*x-(l-1)*c)/l;w>1&&(w>>=0);var S=s===+s?Math.min(w,s):w;f=a.reduce(function(A,_,C){var E=[].concat(PM(A),[{item:_.item,position:{offset:x+(w+c)*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},j0e=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=_F({children:o,legendWidth:l});if(c){var f=i||{},d=f.width,p=f.height,m=c.align,y=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&y==="middle")&&m!=="center"&&ye(t[m]))return Ut(Ut({},t),{},jl({},m,t[m]+(d||0)));if((g==="horizontal"||g==="vertical"&&m==="center")&&y!=="middle"&&ye(t[y]))return Ut(Ut({},t),{},jl({},y,t[y]+(p||0)))}return t},N0e=function(t,n,r){return Fe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},SF=function(t,n,r,i,o){var a=n.props.children,s=kr(a,vd).filter(function(c){return N0e(i,o,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,f){var d=qt(f,r);if(Fe(d))return c;var p=Array.isArray(d)?[Jg(d),ca(d)]:[d,d],m=l.reduce(function(y,g){var v=qt(f,g,0),x=p[0]-Math.abs(Array.isArray(v)?v[0]:v),w=p[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(x,y[0]),Math.max(w,y[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},$0e=function(t,n,r,i,o){var a=n.map(function(s){return SF(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},OF=function(t,n,r,i,o){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&SF(t,l,c,i)||Wu(t,c,r,o)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var f=0,d=c.length;f=2?Jn(s[0]-s[1])*2*c:c,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)+c,value:d,offset:c}});return f.filter(function(d){return!Mc(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+c,value:d,index:p,offset:c}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+c,value:d,offset:c}}):i.domain().map(function(d,p){return{coordinate:i(d)+c,value:o?o[d]:d,index:p,offset:c}})},Ib=new WeakMap,Dh=function(t,n){if(typeof n!="function")return t;Ib.has(t)||Ib.set(t,new WeakMap);var r=Ib.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},PF=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:vf(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Qp(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Fu(),realScaleType:"point"}:o==="category"?{scale:vf(),realScaleType:"band"}:{scale:Qp(),realScaleType:"linear"};if(dd(i)){var l="scale".concat(Lg(i));return{scale:(wM[l]||Fu)(),realScaleType:wM[l]?l:"point"}}return Be(i)?{scale:i}:{scale:Fu(),realScaleType:"point"}},EM=1e-4,TF=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])-EM,a=Math.max(i[0],i[1])+EM,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},D0e=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])}},L0e=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)}},B0e={sign:R0e,expand:ile,none:zl,silhouette:ole,wiggle:ale,positive:L0e},F0e=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=B0e[r],a=rle().keys(i).value(function(s,l){return+qt(s,l,0)}).order(h0).offset(o);return a(t)},W0e=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,p){var m,y=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Ut(Ut({},p.type.defaultProps),p.props):p.props,g=y.stackId,v=y.hide;if(v)return d;var x=y[r],w=d[x]||{hasStack:!1,stackGroups:{}};if(fn(g)){var S=w.stackGroups[g]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(p),w.hasStack=!0,w.stackGroups[g]=S}else w.stackGroups[Ls("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Ut(Ut({},d),{},jl({},x,w))},l),f={};return Object.keys(c).reduce(function(d,p){var m=c[p];if(m.hasStack){var y={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(g,v){var x=m.stackGroups[v];return Ut(Ut({},g),{},jl({},v,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:F0e(t,x.items,o)}))},y)}return Ut(Ut({},d),{},jl({},p,m))},f)},EF=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 c=t.domain();if(!c.length)return null;var f=t0e(c,o,s);return t.domain([Jg(f),ca(f)]),{niceTicks:f}}if(o&&i==="number"){var d=t.domain(),p=n0e(d,o,s);return{niceTicks:p}}return null};function am(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=jp(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=qt(i,Fe(a)?t.dataKey:a);return Fe(l)?null:t.scale(l)}var kM=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=qt(a,n.dataKey,n.domain[s]);return Fe(l)?null:n.scale(l)-o/2+i},z0e=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]},V0e=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},U0e=function(t){return t.reduce(function(n,r){return[Jg(r.concat([n[0]]).filter(ye)),ca(r.concat([n[1]]).filter(ye))]},[1/0,-1/0])},kF=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(c,f){var d=U0e(f.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[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})},MM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,jM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,V0=function(t,n,r){if(Be(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ye(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(MM.test(t[0])){var o=+MM.exec(t[0])[1];i[0]=n[0]-o}else Be(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ye(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(jM.test(t[1])){var a=+jM.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},sm=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=D_(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},Q0e=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,f=Qn(t.cx,a,a/2),d=Qn(t.cy,s,s/2),p=NF(a,s,r),m=Qn(t.innerRadius,p,0),y=Qn(t.outerRadius,p,p*.8),g=Object.keys(n);return g.reduce(function(v,x){var w=n[x],S=w.domain,A=w.reversed,_;if(Fe(w.range))i==="angleAxis"?_=[l,c]:i==="radiusAxis"&&(_=[m,y]),A&&(_=[_[1],_[0]]);else{_=w.range;var C=_,E=G0e(C,2);l=E[0],c=E[1]}var k=PF(w,o),M=k.realScaleType,D=k.scale;D.domain(S).range(_),TF(D);var $=EF(D,so(so({},w),{},{realScaleType:M})),N=so(so(so({},w),$),{},{range:_,radius:y,realScaleType:M,scale:D,cx:f,cy:d,innerRadius:m,outerRadius:y,startAngle:l,endAngle:c});return so(so({},v),{},jF({},x,N))},{})},ewe=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))},twe=function(t,n){var r=t.x,i=t.y,o=n.cx,a=n.cy,s=ewe({x:r,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(r-o)/s,c=Math.acos(l);return i>a&&(c=2*Math.PI-c),{radius:s,angle:J0e(c),angleInRadian:c}},nwe=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}},rwe=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},IM=function(t,n){var r=t.x,i=t.y,o=twe({x:r,y:i},n),a=o.radius,s=o.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var f=nwe(n),d=f.startAngle,p=f.endAngle,m=s,y;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 y?so(so({},n),{},{radius:a,angle:rwe(m,n)}):null},$F=function(t){return!O.isValidElement(t)&&!Be(t)&&typeof t!="boolean"?t.className:""};function Tf(e){"@babel/helpers - typeof";return Tf=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},Tf(e)}var iwe=["offset"];function owe(e){return cwe(e)||lwe(e)||swe(e)||awe()}function awe(){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 swe(e,t){if(e){if(typeof e=="string")return U0(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 U0(e,t)}}function lwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cwe(e){if(Array.isArray(e))return U0(e)}function U0(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 fwe(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 RM(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 sn(e){for(var t=1;t=0?1:-1,S,A;i==="insideStart"?(S=m+w*a,A=g):i==="insideEnd"?(S=y-w*a,A=!g):i==="end"&&(S=y+w*a,A=g),A=x<=0?A:!A;var _=Tt(c,f,v,S),C=Tt(c,f,v,S+(A?1:-1)*359),E="M".concat(_.x,",").concat(_.y,` + A`).concat(v,",").concat(v,",0,1,").concat(A?0:1,`, + `).concat(C.x,",").concat(C.y),k=Fe(t.id)?Ls("recharts-radial-line-"):t.id;return O.createElement("text",Ef({},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))},vwe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,l=o.innerRadius,c=o.outerRadius,f=o.startAngle,d=o.endAngle,p=(f+d)/2;if(i==="outside"){var m=Tt(a,s,c+r,p),y=m.x,g=m.y;return{x:y,y:g,textAnchor:y>=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 v=(l+c)/2,x=Tt(a,s,v,p),w=x.x,S=x.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},bwe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,l=a.y,c=a.width,f=a.height,d=f>=0?1:-1,p=d*i,m=d>0?"end":"start",y=d>0?"start":"end",g=c>=0?1:-1,v=g*i,x=g>0?"end":"start",w=g>0?"start":"end";if(o==="top"){var S={x:s+c/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return sn(sn({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(o==="bottom"){var A={x:s+c/2,y:l+f+p,textAnchor:"middle",verticalAnchor:y};return sn(sn({},A),r?{height:Math.max(r.y+r.height-(l+f),0),width:c}:{})}if(o==="left"){var _={x:s-v,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return sn(sn({},_),r?{width:Math.max(_.x-r.x,0),height:f}:{})}if(o==="right"){var C={x:s+c+v,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return sn(sn({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:f}:{})}var E=r?{width:c,height:f}:{};return o==="insideLeft"?sn({x:s+v,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},E):o==="insideRight"?sn({x:s+c-v,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},E):o==="insideTop"?sn({x:s+c/2,y:l+p,textAnchor:"middle",verticalAnchor:y},E):o==="insideBottom"?sn({x:s+c/2,y:l+f-p,textAnchor:"middle",verticalAnchor:m},E):o==="insideTopLeft"?sn({x:s+v,y:l+p,textAnchor:w,verticalAnchor:y},E):o==="insideTopRight"?sn({x:s+c-v,y:l+p,textAnchor:x,verticalAnchor:y},E):o==="insideBottomLeft"?sn({x:s+v,y:l+f-p,textAnchor:w,verticalAnchor:m},E):o==="insideBottomRight"?sn({x:s+c-v,y:l+f-p,textAnchor:x,verticalAnchor:m},E):Pc(o)&&(ye(o.x)||ss(o.x))&&(ye(o.y)||ss(o.y))?sn({x:s+Qn(o.x,c),y:l+Qn(o.y,f),textAnchor:"end",verticalAnchor:"end"},E):sn({x:s+c/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},E)},xwe=function(t){return"cx"in t&&ye(t.cx)};function un(e){var t=e.offset,n=t===void 0?5:t,r=uwe(e,iwe),i=sn({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,c=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!o||Fe(s)&&Fe(l)&&!O.isValidElement(c)&&!Be(c))return null;if(O.isValidElement(c))return O.cloneElement(c,i);var m;if(Be(c)){if(m=O.createElement(c,i),O.isValidElement(m))return m}else m=mwe(i);var y=xwe(o),g=Te(i,!0);if(y&&(a==="insideStart"||a==="insideEnd"||a==="end"))return ywe(i,m,g);var v=y?vwe(i):bwe(i);return O.createElement(Ps,Ef({className:Ue("recharts-label",d)},g,v,{breakAll:p}),m)}un.displayName="Label";var DF=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,m=t.top,y=t.left,g=t.width,v=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(ye(g)&&ye(v)){if(ye(d)&&ye(p))return{x:d,y:p,width:g,height:v};if(ye(m)&&ye(y))return{x:m,y,width:g,height:v}}return ye(d)&&ye(p)?{x:d,y:p,width:0,height:0}:ye(n)&&ye(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:c||0,outerRadius:f||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},wwe=function(t,n){return t?t===!0?O.createElement(un,{key:"label-implicit",viewBox:n}):fn(t)?O.createElement(un,{key:"label-implicit",viewBox:n,value:t}):O.isValidElement(t)?t.type===un?O.cloneElement(t,{key:"label-implicit",viewBox:n}):O.createElement(un,{key:"label-implicit",content:t,viewBox:n}):Be(t)?O.createElement(un,{key:"label-implicit",content:t,viewBox:n}):Pc(t)?O.createElement(un,Ef({viewBox:n},t,{key:"label-implicit"})):null:null},_we=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=DF(t),a=kr(i,un).map(function(l,c){return O.cloneElement(l,{viewBox:n||o,key:"label-".concat(c)})});if(!r)return a;var s=wwe(t.label,n||o);return[s].concat(owe(a))};un.parseViewBox=DF;un.renderCallByParent=_we;function Swe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Owe=Swe;const Cwe=Qe.getDefaultExportFromCjs(Owe);function kf(e){"@babel/helpers - typeof";return kf=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},kf(e)}var Awe=["valueAccessor"],Pwe=["data","dataKey","clockWise","id","textBreakAll"];function Twe(e){return jwe(e)||Mwe(e)||kwe(e)||Ewe()}function Ewe(){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 kwe(e,t){if(e){if(typeof e=="string")return H0(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 H0(e,t)}}function Mwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jwe(e){if(Array.isArray(e))return H0(e)}function H0(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 Iwe(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 Rwe=function(t){return Array.isArray(t.value)?Cwe(t.value):t.value};function Ii(e){var t=e.valueAccessor,n=t===void 0?Rwe:t,r=FM(e,Awe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=FM(r,Pwe);return!i||!i.length?null:O.createElement(et,{className:"recharts-label-list"},i.map(function(f,d){var p=Fe(o)?n(f,d):qt(f&&f.payload,o),m=Fe(s)?{}:{id:"".concat(s,"-").concat(d)};return O.createElement(un,cm({},Te(f,!0),c,m,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:un.parseViewBox(Fe(a)?f:BM(BM({},f),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Ii.displayName="LabelList";function Lwe(e,t){return e?e===!0?O.createElement(Ii,{key:"labelList-implicit",data:t}):O.isValidElement(e)||Be(e)?O.createElement(Ii,{key:"labelList-implicit",data:t,content:e}):Pc(e)?O.createElement(Ii,cm({data:t},e,{key:"labelList-implicit"})):null:null}function Bwe(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,Ii).map(function(a,s){return O.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=Lwe(e.label,t);return[o].concat(Twe(i))}Ii.renderCallByParent=Bwe;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 K0(){return K0=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>c),`, + `).concat(d.x,",").concat(d.y,` + `);if(i>0){var m=Tt(n,r,i,a),y=Tt(n,r,i,c);p+="L ".concat(y.x,",").concat(y.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`, + `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},Uwe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,f=t.endAngle,d=Jn(f-c),p=Ih({cx:n,cy:r,radius:o,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),m=p.circleTangency,y=p.lineTangency,g=p.theta,v=Ih({cx:n,cy:r,radius:o,angle:f,sign:-d,cornerRadius:a,cornerIsExternal:l}),x=v.circleTangency,w=v.lineTangency,S=v.theta,A=l?Math.abs(c-f):Math.abs(c-f)-g-S;if(A<0)return s?"M ".concat(y.x,",").concat(y.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 + `):IF({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:f});var _="M ".concat(y.x,",").concat(y.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=Ih({cx:n,cy:r,radius:i,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),E=C.circleTangency,k=C.lineTangency,M=C.theta,D=Ih({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),$=D.circleTangency,N=D.lineTangency,I=D.theta,L=l?Math.abs(c-f):Math.abs(c-f)-M-I;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 _},Hwe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},RF=function(t){var n=zM(zM({},Hwe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(a0&&Math.abs(f-d)<360?v=Uwe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(g,y/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:d}):v=IF({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:d}),O.createElement("path",K0({},Te(n,!0),{className:m,d:v,role:"img"}))};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 G0(){return G0=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(ee,ie,re,le,ae){for(var ue=ee[ie],ne=0;ne0?", expected one of type ["+J.join(", ")+"]":"";return new g("Invalid "+ue+" `"+ne+"` supplied to "+("`"+ae+"`"+je+"."))}return v(ie)}function D(){function V(Y,ee,ie,re,le){return L(Y[ee])?null:new g("Invalid "+re+" `"+le+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return v(V)}function $(V,Y,ee,ie,re){return new g((V||"React class")+": "+Y+" type `"+ee+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+re+"`.")}function N(V){function Y(ee,ie,re,le,ae){var ue=ee[ie],ne=W(ue);if(ne!=="object")return new g("Invalid "+le+" `"+ae+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));for(var J in V){var fe=V[J];if(typeof fe!="function")return $(re,le,ae,J,z(fe));var ve=fe(ue,J,re,le,ae+"."+J,n);if(ve)return ve}return null}return v(Y)}function I(V){function Y(ee,ie,re,le,ae){var ue=ee[ie],ne=W(ue);if(ne!=="object")return new g("Invalid "+le+" `"+ae+"` of type `"+ne+"` "+("supplied to `"+re+"`, expected `object`."));var J=t({},ee[ie],V);for(var fe in J){var ve=V[fe];if(r(V,fe)&&typeof ve!="function")return $(re,le,ae,fe,z(ve));if(!ve)return new g("Invalid "+le+" `"+ae+"` key `"+fe+"` supplied to `"+re+"`.\nBad object: "+JSON.stringify(ee[ie],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(V),null," "));var X=ve(ue,fe,re,le,ae+"."+fe,n);if(X)return X}return null}return v(Y)}function L(V){switch(typeof V){case"number":case"string":case"undefined":return!0;case"boolean":return!V;case"object":if(Array.isArray(V))return V.every(L);if(V===null||s(V))return!0;var Y=d(V);if(Y){var ee=Y.call(V),ie;if(Y!==V.entries){for(;!(ie=ee.next()).done;)if(!L(ie.value))return!1}else for(;!(ie=ee.next()).done;){var re=ie.value;if(re&&!L(re[1]))return!1}}else return!1;return!0;default:return!1}}function F(V,Y){return V==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function W(V){var Y=typeof V;return Array.isArray(V)?"array":V instanceof RegExp?"object":F(Y,V)?"symbol":Y}function z(V){if(typeof V>"u"||V===null)return""+V;var Y=W(V);if(Y==="object"){if(V instanceof Date)return"date";if(V instanceof RegExp)return"regexp"}return Y}function G(V){var Y=z(V);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function U(V){return!V.constructor||!V.constructor.name?p:V.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},Wb}var zb,ej;function n1e(){if(ej)return zb;ej=1;var e=uS();function t(){}function n(){}return n.resetWarningCache=t,zb=function(){function r(a,s,l,c,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},zb}if(process.env.NODE_ENV!=="production"){var r1e=LF(),i1e=!0;Y0.exports=t1e()(r1e.isElement,i1e)}else Y0.exports=n1e()();var o1e=Y0.exports;const Ge=Qe.getDefaultExportFromCjs(o1e);var a1e=Object.getOwnPropertyNames,s1e=Object.getOwnPropertySymbols,l1e=Object.prototype.hasOwnProperty;function tj(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Bh(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 nj(e){return a1e(e).concat(s1e(e))}var FF=Object.hasOwn||function(e,t){return l1e.call(e,t)};function Lc(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var WF="_owner",rj=Object.getOwnPropertyDescriptor,ij=Object.keys;function c1e(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 u1e(e,t){return Lc(e.getTime(),t.getTime())}function oj(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(),c=!1,f=0;(s=l.next())&&!s.done;){var d=a.value,p=d[0],m=d[1],y=s.value,g=y[0],v=y[1];!c&&!r[f]&&(c=n.equals(p,g,o,f,e,t,n)&&n.equals(m,v,p,g,e,t,n))&&(r[f]=!0),f++}if(!c)return!1;o++}return!0}function f1e(e,t,n){var r=ij(e),i=r.length;if(ij(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===WF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function bu(e,t,n){var r=nj(e),i=r.length;if(nj(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===WF&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!FF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=rj(e,o),s=rj(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function d1e(e,t){return Lc(e.valueOf(),t.valueOf())}function h1e(e,t){return e.source===t.source&&e.flags===t.flags}function aj(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,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function p1e(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 m1e="[object Arguments]",g1e="[object Boolean]",y1e="[object Date]",v1e="[object Map]",b1e="[object Number]",x1e="[object Object]",w1e="[object RegExp]",_1e="[object Set]",S1e="[object String]",O1e=Array.isArray,sj=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,lj=Object.assign,C1e=Object.prototype.toString.call.bind(Object.prototype.toString);function A1e(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(O1e(f))return t(f,d,p);if(sj!=null&&sj(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 y=C1e(f);return y===y1e?n(f,d,p):y===w1e?a(f,d,p):y===v1e?r(f,d,p):y===_1e?s(f,d,p):y===x1e?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,p):y===m1e?i(f,d,p):y===g1e||y===b1e||y===S1e?o(f,d,p):!1}}function P1e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?bu:c1e,areDatesEqual:u1e,areMapsEqual:r?tj(oj,bu):oj,areObjectsEqual:r?bu:f1e,arePrimitiveWrappersEqual:d1e,areRegExpsEqual:h1e,areSetsEqual:r?tj(aj,bu):aj,areTypedArraysEqual:r?bu:p1e};if(n&&(i=lj({},i,n(i))),t){var o=Bh(i.areArraysEqual),a=Bh(i.areMapsEqual),s=Bh(i.areObjectsEqual),l=Bh(i.areSetsEqual);i=lj({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function T1e(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function E1e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(l,c){var f=r(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(l,c,{cache:p,equals:i,meta:m,strict:o})};if(t)return function(l,c){return n(l,c,{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,c){return n(l,c,a)}}var k1e=Na();Na({strict:!0});Na({circular:!0});Na({circular:!0,strict:!0});Na({createInternalComparator:function(){return Lc}});Na({strict:!0,createInternalComparator:function(){return Lc}});Na({circular:!0,createInternalComparator:function(){return Lc}});Na({circular:!0,createInternalComparator:function(){return Lc},strict:!0});function Na(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=P1e(e),l=A1e(s),c=r?r(l):T1e(l);return E1e({circular:n,comparator:l,createState:i,equals:c,strict:a})}function M1e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function cj(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):M1e(i)};requestAnimationFrame(r)}function q0(e){"@babel/helpers - typeof";return q0=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},q0(e)}function j1e(e){return I1e(e)||D1e(e)||$1e(e)||N1e()}function N1e(){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 $1e(e,t){if(e){if(typeof e=="string")return uj(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 uj(e,t)}}function uj(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&&v<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var d=pj(i,a),p=pj(o,s),m=J1e(i,a),y=function(x){return x>1?1:x<0?0:x},g=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,y=p*o,g=p+(m-y)*s/1e3,v=p*s/1e3+f;return Math.abs(v-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 p_e(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 Vb(e){return v_e(e)||y_e(e)||g_e(e)||m_e()}function m_e(){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 g_e(e,t){if(e){if(typeof e=="string")return ew(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 ew(e,t)}}function y_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v_e(e){if(Array.isArray(e))return ew(e)}function ew(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 hm(e){return hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hm(e)}var vi=function(e){S_e(n,e);var t=O_e(n);function n(r,i){var o;b_e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,c=a.from,f=a.to,d=a.steps,p=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(rw(o)),o.changeStyle=o.changeStyle.bind(rw(o)),!s||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:f}),nw(o);if(d&&d.length)o.state={style:d[0].style};else if(c){if(typeof p=="function")return o.state={style:c},nw(o);o.state={style:l?Pu({},l,c):c}}else o.state={style:{}};return o}return w_e(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,c=o.shouldReAnimate,f=o.to,d=o.from,p=this.state.style;if(s){if(!a){var m={style:l?Pu({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(m);return}if(!(k1e(i.to,f)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=y||c?d:i.to;if(this.state&&p){var v={style:l?Pu({},l,g):g};(l&&p[l]!==g||!l&&p!==g)&&this.setState(v)}this.runAnimation(ii(ii({},this.props),{},{from:g,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,c=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,m=f_e(a,s,e_e(c),l,this.changeStyle),y=function(){o.stopJSAnimation=m()};this.manager.start([p,f,y,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,c=a[0],f=c.style,d=c.duration,p=d===void 0?0:d,m=function(g,v,x){if(x===0)return g;var w=v.duration,S=v.easing,A=S===void 0?"ease":S,_=v.style,C=v.properties,E=v.onAnimationEnd,k=x>0?a[x-1]:v,M=C||Object.keys(_);if(typeof A=="function"||A==="spring")return[].concat(Vb(g),[o.runJSAnimation.bind(o,{from:k.style,to:_,duration:w,easing:A}),w]);var D=hj(M,w,A),$=ii(ii(ii({},k.style),_),{},{transition:D});return[].concat(Vb(g),[$,w,E]).filter(W1e)};return this.manager.start([l].concat(Vb(a.reduce(m,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=R1e());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,c=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,m=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var g=s?Pu({},s,l):l,v=hj(Object.keys(g),a,c);y.start([f,o,ii(ii({},g),{},{transition:v}),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=h_e(i,d_e),c=O.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!s||c===0||a<=0)return o;var d=function(m){var y=m.props,g=y.style,v=g===void 0?{}:g,x=y.className,w=O.cloneElement(m,ii(ii({},l),{},{style:ii(ii({},v),f),className:x}));return w};return c===1?d(O.Children.only(o)):O.createElement("div",null,O.Children.map(o,function(p){return d(p)}))}}]),n}(O.PureComponent);vi.displayName="Animate";vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};vi.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 Df(e){"@babel/helpers - typeof";return Df=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},Df(e)}function pm(){return pm=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,c=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(c,",").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(c,`, + `).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(c,`, + `).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(c,`, + `).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var y=Math.min(a,o);f="M ".concat(t,",").concat(n+s*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+l*y,",").concat(n,` + L `).concat(t+r-l*y,",").concat(n,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+r,",").concat(n+s*y,` + L `).concat(t+r,",").concat(n+i-s*y,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+r-l*y,",").concat(n+i,` + L `).concat(t+l*y,",").concat(n+i,` + A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*y," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},$_e=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 c=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>=c&&r<=f&&i>=d&&i<=p}return!1},D_e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fS=function(t){var n=wj(wj({},D_e),t),r=O.useRef(),i=O.useState(-1),o=A_e(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,c=n.y,f=n.width,d=n.height,p=n.radius,m=n.className,y=n.animationEasing,g=n.animationDuration,v=n.animationBegin,x=n.isAnimationActive,w=n.isUpdateAnimationActive;if(l!==+l||c!==+c||f!==+f||d!==+d||f===0||d===0)return null;var S=Ue("recharts-rectangle",m);return w?O.createElement(vi,{canBegin:a>0,from:{width:f,height:d,x:l,y:c},to:{width:f,height:d,x:l,y:c},duration:g,animationEasing:y,isActive:w},function(A){var _=A.width,C=A.height,E=A.x,k=A.y;return O.createElement(vi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:x,easing:y},O.createElement("path",pm({},Te(n,!0),{className:S,d:_j(E,k,_,C,p),ref:r})))}):O.createElement("path",pm({},Te(n,!0),{className:S,d:_j(l,c,f,d,p)}))},I_e=["points","className","baseLinePoints","connectNulls"];function wl(){return wl=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 L_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 Sj(e){return z_e(e)||W_e(e)||F_e(e)||B_e()}function B_e(){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 F_e(e,t){if(e){if(typeof e=="string")return iw(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 iw(e,t)}}function W_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function z_e(e){if(Array.isArray(e))return iw(e)}function iw(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){Oj(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Oj(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Vu=function(t,n){var r=V_e(t);n&&(r=[r.reduce(function(o,a){return[].concat(Sj(o),Sj(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},U_e=function(t,n,r){var i=Vu(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Vu(n.reverse(),r).slice(1))},H_e=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=R_e(t,I_e);if(!n||!n.length)return null;var s=Ue("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",c=U_e(n,i,o);return O.createElement("g",{className:s},O.createElement("path",wl({},Te(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?O.createElement("path",wl({},Te(a,!0),{fill:"none",d:Vu(n,o)})):null,l?O.createElement("path",wl({},Te(a,!0),{fill:"none",d:Vu(i,o)})):null)}var f=Vu(n,o);return O.createElement("path",wl({},Te(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",className:s,d:f}))};function ow(){return ow=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 J_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 Q_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)},eSe=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,c=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,m=p===void 0?0:p,y=t.className,g=Z_e(t,K_e),v=G_e({x:r,y:o,top:s,left:c,width:d,height:m},g);return!ye(r)||!ye(o)||!ye(d)||!ye(m)||!ye(s)||!ye(c)?null:O.createElement("path",aw({},Te(v,!0),{className:Ue("recharts-cross",y),d:Q_e(r,o,d,m,s,c)}))},tSe=Zg,nSe=oF,rSe=Gi;function iSe(e,t){return e&&e.length?tSe(e,rSe(t),nSe):void 0}var oSe=iSe;const aSe=Qe.getDefaultExportFromCjs(oSe);var sSe=Zg,lSe=Gi,cSe=aF;function uSe(e,t){return e&&e.length?sSe(e,lSe(t),cSe):void 0}var fSe=uSe;const dSe=Qe.getDefaultExportFromCjs(fSe);var hSe=["cx","cy","angle","ticks","axisLine"],pSe=["ticks","tick","angle","tickFormatter","stroke"];function Jl(e){"@babel/helpers - typeof";return Jl=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},Jl(e)}function Uu(){return Uu=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 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 gSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tj(e,t){for(var n=0;nMj?a=i==="outer"?"start":"end":o<-Mj?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,c=Xa(Xa({},Te(this.props,!1)),{},{fill:"none"},Te(s,!1));if(l==="circle")return O.createElement(bd,is({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:o,r:a}));var f=this.props.ticks,d=f.map(function(p){return Tt(i,o,a,p.coordinate)});return O.createElement(H_e,is({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,c=i.stroke,f=Te(this.props,!1),d=Te(a,!1),p=Xa(Xa({},f),{},{fill:"none"},Te(s,!1)),m=o.map(function(y,g){var v=r.getTickLineCoord(y),x=r.getTickTextAnchor(y),w=Xa(Xa(Xa({textAnchor:x},f),{},{stroke:"none",fill:c},d),{},{index:g,payload:y,x:v.x2,y:v.y2});return O.createElement(et,is({className:Ue("recharts-polar-angle-axis-tick",$F(a)),key:"tick-".concat(y.coordinate)},As(r.props,y,g)),s&&O.createElement("line",is({className:"recharts-polar-angle-axis-tick-line"},p,v)),a&&t.renderTickItem(a,w,l?l(y.value,g):y.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(Ps,is({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])}(O.PureComponent);ry(iy,"displayName","PolarAngleAxis");ry(iy,"axisType","angleAxis");ry(iy,"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 MSe=tB,jSe=MSe(Object.getPrototypeOf,Object),NSe=jSe,$Se=Ro,DSe=NSe,ISe=Lo,RSe="[object Object]",LSe=Function.prototype,BSe=Object.prototype,JF=LSe.toString,FSe=BSe.hasOwnProperty,WSe=JF.call(Object);function zSe(e){if(!ISe(e)||$Se(e)!=RSe)return!1;var t=DSe(e);if(t===null)return!0;var n=FSe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&JF.call(n)==WSe}var VSe=zSe;const USe=Qe.getDefaultExportFromCjs(VSe);var HSe=Ro,KSe=Lo,GSe="[object Boolean]";function YSe(e){return e===!0||e===!1||KSe(e)&&HSe(e)==GSe}var qSe=YSe;const XSe=Qe.getDefaultExportFromCjs(qSe);function Rf(e){"@babel/helpers - typeof";return Rf=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},Rf(e)}function ym(){return ym=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:c},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:c},duration:g,animationEasing:y,isActive:x},function(S){var A=S.upperWidth,_=S.lowerWidth,C=S.height,E=S.x,k=S.y;return O.createElement(vi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:y},O.createElement("path",ym({},Te(n,!0),{className:w,d:Dj(E,k,A,_,C),ref:r})))}):O.createElement("g",null,O.createElement("path",ym({},Te(n,!0),{className:w,d:Dj(l,c,f,d,p)})))},sOe=["option","shapeType","propTransformer","activeClassName","isActive"];function Lf(e){"@babel/helpers - typeof";return Lf=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},Lf(e)}function lOe(e,t){if(e==null)return{};var n=cOe(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 cOe(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 Ij(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 vm(e){for(var t=1;t0?Er(S,"paddingAngle",0):0;if(_){var E=cn(_.endAngle-_.startAngle,S.endAngle-S.startAngle),k=Ct(Ct({},S),{},{startAngle:w+C,endAngle:w+E(g)+C});v.push(k),w=k.endAngle}else{var M=S.endAngle,D=S.startAngle,$=cn(0,M-D),N=$(g),I=Ct(Ct({},S),{},{startAngle:w+C,endAngle:w+N+C});v.push(I),w=I.endAngle}}),O.createElement(et,null,r.renderSectorsStatically(v))})}},{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||!Ts(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,c=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,y=this.state.isAnimationFinished;if(o||!a||!a.length||!ye(c)||!ye(f)||!ye(d)||!ye(p))return null;var g=Ue("recharts-pie",s);return O.createElement(et,{tabIndex:this.props.rootTabIndex,className:g,ref:function(x){r.pieRef=x}},this.renderSectors(),l&&this.renderLabels(a),un.renderCallByParent(this.props,null,!1),(!m||y)&&Ii.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=v-w*m-S,_=i.reduce(function(k,M){var D=qt(M,x,0);return k+(ye(D)?D:0)},0),C;if(_>0){var E;C=i.map(function(k,M){var D=qt(k,x,0),$=qt(k,f,M),N=(ye(D)?D:0)/_,I;M?I=E.endAngle+Jn(g)*l*(D!==0?1:0):I=a;var L=I+Jn(g)*((D!==0?m:0)+N*A),F=(I+L)/2,W=(y.innerRadius+y.outerRadius)/2,z=[{name:$,value:D,payload:k,dataKey:x,type:p}],G=Tt(y.cx,y.cy,W,F);return E=Ct(Ct(Ct({percent:N,cornerRadius:o,name:$,tooltipPayload:z,midAngle:F,middleRadius:W,tooltipPosition:G},k),y),{},{value:qt(k,x),startAngle:I,endAngle:L,payload:k,paddingAngle:Jn(g)*l}),E})}return Ct(Ct({},y),{},{sectors:C,data:i})});var kOe=Math.ceil,MOe=Math.max;function jOe(e,t,n,r){for(var i=-1,o=MOe(kOe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var NOe=jOe,$Oe=xB,Fj=1/0,DOe=17976931348623157e292;function IOe(e){if(!e)return e===0?e:0;if(e=$Oe(e),e===Fj||e===-Fj){var t=e<0?-1:1;return t*DOe}return e===e?e:0}var nW=IOe,ROe=NOe,LOe=Ug,Ub=nW;function BOe(e){return function(t,n,r){return r&&typeof r!="number"&&LOe(t,n,r)&&(n=r=void 0),t=Ub(t),n===void 0?(n=t,t=0):n=Ub(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=Hj(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 QOe(t,e),qOe(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,c=s.data,f=c.length-1,d=Math.min(i,o),p=Math.max(i,o),m=t.getIndexInRange(a,d),y=t.getIndexInRange(a,p);return{startIndex:m-m%l,endIndex:y===f?f:y-y%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=qt(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,c=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,m=l.endIndex,y=l.onChange,g=r.pageX-o;g>0?g=Math.min(g,c+f-d-s,c+f-d-a):g<0&&(g=Math.max(g,c-a,c-s));var v=this.getIndex({startX:a+g,endX:s+g});(v.startIndex!==p||v.endIndex!==m)&&y&&y(v),this.setState({startX:a+g,endX:s+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=Hj(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,c=this.state[a],f=this.props,d=f.x,p=f.width,m=f.travellerWidth,y=f.onChange,g=f.gap,v=f.data,x={startX:this.state.startX,endX:this.state.endX},w=r.pageX-o;w>0?w=Math.min(w,d+p-m-c):w<0&&(w=Math.max(w,d-c)),x[a]=c+w;var S=this.getIndex(x),A=S.startIndex,_=S.endIndex,C=function(){var k=v.length-1;return a==="startX"&&(s>l?A%g===0:_%g===0)||sl?_%g===0:A%g===0)||s>l&&_===k};this.setState(Sr(Sr({},a,c+w),"brushMoveStartX",r.pageX),function(){y&&C()&&y(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,c=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>=c||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,c=r.stroke;return O.createElement("rect",{stroke:c,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,c=r.children,f=r.padding,d=O.Children.only(c);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,c=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,m=l.ariaLabel,y=l.data,g=l.startIndex,v=l.endIndex,x=Math.max(r,this.props.x),w=Hb(Hb({},Te(this.props,!1)),{},{x,y:c,width:f,height:d}),S=m||"Min value: ".concat((o=y[g])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=y[v])===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,c=o.travellerWidth,f=Math.min(r,i)+c,d=Math.max(Math.abs(i-r)-c,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,c=r.stroke,f=this.state,d=f.startX,p=f.endX,m=5,y={pointerEvents:"none",fill:c};return O.createElement(et,{className:"recharts-brush-texts"},O.createElement(Ps,wm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-m,y:a+s/2},y),this.getTextOfTick(i)),O.createElement(Ps,wm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+m,y:a+s/2},y),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,c=r.width,f=r.height,d=r.alwaysShowText,p=this.state,m=p.startX,y=p.endX,g=p.isTextActive,v=p.isSlideMoving,x=p.isTravellerMoving,w=p.isTravellerFocused;if(!i||!i.length||!ye(s)||!ye(l)||!ye(c)||!ye(f)||c<=0||f<=0)return null;var S=Ue("recharts-brush",o),A=O.Children.count(a)===1,_=GOe("userSelect","none");return O.createElement(et,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(m,y),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(y,"endX"),(g||v||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,c=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:c,x2:i+a-1,y2:c,fill:"none",stroke:"#fff"}),O.createElement("line",{x1:i+1,y1:c+2,x2:i+a-1,y2:c+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,c=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return Hb({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},o&&o.length?tCe({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:c,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(nc,"displayName","Brush");Sr(nc,"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 nCe=$_;function rCe(e,t){var n;return nCe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var iCe=rCe,oCe=GL,aCe=Gi,sCe=iCe,lCe=hr,cCe=Ug;function uCe(e,t,n){var r=lCe(e)?oCe:sCe;return n&&cCe(e,t,n)&&(t=void 0),r(e,aCe(t))}var fCe=uCe;const dCe=Qe.getDefaultExportFromCjs(fCe);var Ri=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},Kj=mB;function hCe(e,t,n){t=="__proto__"&&Kj?Kj(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var pCe=hCe,mCe=pCe,gCe=hB,yCe=Gi;function vCe(e,t){var n={};return t=yCe(t),gCe(e,function(r,i,o){mCe(n,i,t(r,i,o))}),n}var bCe=vCe;const xCe=Qe.getDefaultExportFromCjs(bCe);function wCe(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 LCe(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 BCe(e,t){var n=e.x,r=e.y,i=RCe(e,NCe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),f=parseInt(c,10),d="".concat(t.width||i.width),p=parseInt(d,10);return xu(xu(xu(xu(xu({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function Yj(e){return O.createElement(QF,fw({shapeType:"rectangle",propTransformer:BCe,activeClassName:"recharts-active-bar"},e))}var FCe=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"?ur(!1,"minPointSize callback function received a value with type of ".concat(rc(r),". Currently only numbers are supported.")):ur()),n)}},WCe=["value","background"],sW;function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function zCe(e,t){if(e==null)return{};var n=VCe(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 VCe(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 Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(F)0&&Math.abs(L)0&&(I=Math.min((re||0)-(L[le-1]||0),I))}),Number.isFinite(I)){var F=I/N,W=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(E=F*W/2),g.padding==="no-gap"){var z=Qn(t.barCategoryGap,F*W),G=F*W/2;E=G-z-(G-z)/W*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=g.range,_&&(k=[k[1],k[0]]);var U=PF(g,o,p),V=U.scale,Y=U.realScaleType;V.domain(x).range(k),TF(V);var ee=EF(V,li(li({},g),{},{realScaleType:Y}));i==="xAxis"?($=v==="top"&&!A||v==="bottom"&&A,M=r.left,D=d[C]-$*g.height):i==="yAxis"&&($=v==="left"&&!A||v==="right"&&A,M=d[C]-$*g.width,D=r.top);var ie=li(li(li({},g),ee),{},{realScaleType:Y,x:M,y:D,scale:V,width:i==="xAxis"?r.width:g.width,height:i==="yAxis"?r.height:g.height});return ie.bandSize=sm(ie,ee),!g.hide&&i==="xAxis"?d[C]+=($?-1:1)*ie.height:g.hide||(d[C]+=($?-1:1)*ie.width),li(li({},m),{},sy({},y,ie))},{})},fW=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)}},eAe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return fW({x:n,y:r},{x:i,y:o})},dW=function(){function e(t){ZCe(this,e),this.scale=t}return JCe(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)}}])}();sy(dW,"EPS",1e-4);var hS=function(t){var n=Object.keys(t).reduce(function(r,i){return li(li({},r),{},sy({},i,dW.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 xCe(i,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return aW(i,function(o,a){return n[a].isInRange(o)})}})};function tAe(e){return(e%180+180)%180}var nAe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=tAe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var sAe=aAe,lAe=nW;function cAe(e){var t=lAe(e),n=t%1;return t===t?n?t-n:t:0}var uAe=cAe,fAe=sB,dAe=Gi,hAe=uAe,pAe=Math.max;function mAe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:hAe(n);return i<0&&(i=pAe(r+i,0)),fAe(e,dAe(t),i)}var gAe=mAe,yAe=sAe,vAe=gAe,bAe=yAe(vAe),xAe=bAe;const wAe=Qe.getDefaultExportFromCjs(xAe);var _Ae=_oe(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 Cm(e){"@babel/helpers - typeof";return Cm=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},Cm(e)}var pS=O.createContext(void 0),mS=O.createContext(void 0),hW=O.createContext(void 0),pW=O.createContext({}),mW=O.createContext(void 0),gW=O.createContext(0),yW=O.createContext(0),Qj=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,f=_Ae(o);return O.createElement(pS.Provider,{value:r},O.createElement(mS.Provider,{value:i},O.createElement(pW.Provider,{value:o},O.createElement(hW.Provider,{value:f},O.createElement(mW.Provider,{value:a},O.createElement(gW.Provider,{value:c},O.createElement(yW.Provider,{value:l},s)))))))},SAe=function(){return O.useContext(mW)};function vW(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var bW=function(t){var n=O.useContext(pS);n==null&&(process.env.NODE_ENV!=="production"?ur(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ur());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?ur(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(Cm(t),"]. ").concat(vW(n))):ur()),r},OAe=function(){var t=O.useContext(pS);return aa(t)},CAe=function(){var t=O.useContext(mS),n=wAe(t,function(r){return aW(r.domain,Number.isFinite)});return n||aa(t)},xW=function(t){var n=O.useContext(mS);n==null&&(process.env.NODE_ENV!=="production"?ur(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ur());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?ur(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(Cm(t),"]. ").concat(vW(n))):ur()),r},AAe=function(){var t=O.useContext(hW);return t},PAe=function(){return O.useContext(pW)},gS=function(){return O.useContext(yW)},yS=function(){return O.useContext(gW)};function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function TAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EAe(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 uPe(e,t){return PW(e,t+1)}function fPe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,f=a,d=function(){var y=r==null?void 0:r[l];if(y===void 0)return{v:PW(r,c)};var g=l,v,x=function(){return v===void 0&&(v=n(y,g)),v},w=y.coordinate,S=l===0||Em(e,w,x,f,s);S||(l=0,f=a,c+=1),S&&(f=w+e*(x()/2+i),l+=c)},p;c<=o.length;)if(p=d(),p)return p.v;return[]}function zf(e){"@babel/helpers - typeof";return zf=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},zf(e)}function sN(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 zn(e){for(var t=1;t0?m.coordinate-v*e:m.coordinate})}else o[p]=m=zn(zn({},m),{},{tickCoord:m.coordinate});var x=Em(e,m.tickCoord,g,s,l);x&&(l=m.tickCoord-e*(g()/2+i),o[p]=zn(zn({},m),{},{isShow:!0}))},f=a-1;f>=0;f--)c(f);return o}function gPe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-c);a[s-1]=f=zn(zn({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var m=Em(e,f.tickCoord,function(){return d},l,c);m&&(c=f.tickCoord-e*(d/2+i),a[s-1]=zn(zn({},f),{},{isShow:!0}))}for(var y=o?s-1:s,g=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=zn(zn({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[w]=S=zn(zn({},S),{},{tickCoord:S.coordinate});var E=Em(e,S.tickCoord,_,l,c);E&&(l=S.tickCoord+e*(_()/2+i),a[w]=zn(zn({},S),{},{isShow:!0}))},v=0;v=2?Jn(i[1].coordinate-i[0].coordinate):1,x=cPe(o,v,m);return l==="equidistantPreserveStart"?fPe(v,x,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=gPe(v,x,g,i,a,l==="preserveStartEnd"):p=mPe(v,x,g,i,a),p.filter(function(w){return w.isShow}))}var yPe=["viewBox"],vPe=["viewBox"],bPe=["ticks"];function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function Sl(){return Sl=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 xPe(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 wPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cN(e,t){for(var n=0;n0?l(this.props):l(m)),a<=0||s<=0||!y||!y.length?null:O.createElement(et,{className:Ue("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},o&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),un.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(Ps,Sl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(O.Component);wS(Bc,"displayName","CartesianAxis");wS(Bc,"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 TPe=["x1","y1","x2","y2","key"],EPe=["offset"];function ks(e){"@babel/helpers - typeof";return ks=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},ks(e)}function uN(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 NPe(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 $Pe=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 kW(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=fN(t,TPe),c=Te(l,!1);c.offset;var f=fN(c,EPe);n=O.createElement("line",us({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function DPe(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 c=Vn(Vn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return kW(i,c)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function IPe(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 c=Vn(Vn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return kW(i,c)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function RPe(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,c=l===void 0?!0:l;if(!c||!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 y=!f[m+1],g=y?i+a-p:f[m+1]-p;if(g<=0)return null;var v=m%t.length;return O.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:g,width:o,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function LPe(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,c=e.verticalPoints;if(!n||!r||!r.length)return null;var f=c.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 y=!f[m+1],g=y?o+s-p:f[m+1]-p;if(g<=0)return null;var v=m%r.length;return O.createElement("rect",{key:"react-".concat(m),x:p,y:a,width:g,height:l,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var BPe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return AF(xS(Vn(Vn(Vn({},Bc.defaultProps),r),{},{ticks:go(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},FPe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return AF(xS(Vn(Vn(Vn({},Bc.defaultProps),r),{},{ticks:go(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},sl={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function dy(e){var t,n,r,i,o,a,s=gS(),l=yS(),c=PAe(),f=Vn(Vn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:sl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:sl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:sl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:sl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:sl.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:sl.verticalFill,x:ye(e.x)?e.x:c.left,y:ye(e.y)?e.y:c.top,width:ye(e.width)?e.width:c.width,height:ye(e.height)?e.height:c.height}),d=f.x,p=f.y,m=f.width,y=f.height,g=f.syncWithTicks,v=f.horizontalValues,x=f.verticalValues,w=OAe(),S=CAe();if(!ye(m)||m<=0||!ye(y)||y<=0||!ye(d)||d!==+d||!ye(p)||p!==+p)return null;var A=f.verticalCoordinatesGenerator||BPe,_=f.horizontalCoordinatesGenerator||FPe,C=f.horizontalPoints,E=f.verticalPoints;if((!C||!C.length)&&Be(_)){var k=v&&v.length,M=_({yAxis:S?Vn(Vn({},S),{},{ticks:k?v:S.ticks}):void 0,width:s,height:l,offset:c},k?!0:g);mi(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(ks(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:c},D?!0:g);mi(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(ks($),"]")),Array.isArray($)&&(E=$)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement($Pe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),O.createElement(DPe,us({},f,{offset:c,horizontalPoints:C,xAxis:w,yAxis:S})),O.createElement(IPe,us({},f,{offset:c,verticalPoints:E,xAxis:w,yAxis:S})),O.createElement(RPe,us({},f,{horizontalPoints:C})),O.createElement(LPe,us({},f,{verticalPoints:E})))}dy.displayName="CartesianGrid";var WPe=["type","layout","connectNulls","ref"],zPe=["key"];function cc(e){"@babel/helpers - typeof";return cc=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},cc(e)}function dN(e,t){if(e==null)return{};var n=VPe(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 VPe(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 Hu(){return Hu=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(ll(l.slice(0,y)),[d-g]);break}var v=m.length%2===0?[0,p]:[p];return[].concat(ll(t.repeat(l,f)),ll(m),v).map(function(x){return"".concat(x,"px")}).join(", ")}),ci(n,"id",Ls("recharts-line-")),ci(n,"pathRef",function(a){n.mainCurve=a}),ci(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),ci(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return QPe(t,e),qPe(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,c=o.layout,f=o.children,d=kr(f,vd);if(!d)return null;var p=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:qt(g.payload,v)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return O.createElement(et,m,d.map(function(y){return O.cloneElement(y,{key:"bar-".concat(y.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,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,c=s.points,f=s.dataKey,d=Te(this.props,!1),p=Te(l,!0),m=c.map(function(g,v){var x=_r(_r(_r({key:"dot-".concat(v),r:3},d),p),{},{value:g.value,dataKey:f,cx:g.x,cy:g.y,index:v,payload:g.payload});return t.renderDotItem(l,x)}),y={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return O.createElement(et,Hu({className:"recharts-line-dots",key:"dots"},y),m)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,c=s.layout,f=s.connectNulls;s.ref;var d=dN(s,WPe),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:c,connectNulls:f});return O.createElement(vs,Hu({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,m=a.animationId,y=a.animateNewValues,g=a.width,v=a.height,x=this.state,w=x.prevPoints,S=x.totalLength;return O.createElement(vi,{begin:f,duration:d,isActive:c,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,I){var L=Math.floor(I*C);if(w[L]){var F=w[L],W=cn(F.x,N.x),z=cn(F.y,N.y);return _r(_r({},N),{},{x:W(_),y:z(_)})}if(y){var G=cn(g*2,N.x),U=cn(v/2,N.y);return _r(_r({},N),{},{x:G(_),y:U(_)})}return _r(_r({},N),{},{x:N.x,y:N.y})});return o.renderCurveStatically(E,r,i)}var k=cn(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,c=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!c&&f>0||!Ts(c,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,c=i.xAxis,f=i.yAxis,d=i.top,p=i.left,m=i.width,y=i.height,g=i.isAnimationActive,v=i.id;if(o||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,S=Ue("recharts-line",l),A=c&&c.allowDataOverflow,_=f&&f.allowDataOverflow,C=A||_,E=Fe(v)?this.id:v,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:$,I=vL(a)?a:{},L=I.clipDot,F=L===void 0?!0:L,W=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-y/2,width:A?m:m*2,height:_?y:y*2})),!F&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:p-W/2,y:d-W/2,width:m+W,height:y+W}))):null,!w&&this.renderCurve(C,E),this.renderErrorBar(C,E),(w||a)&&this.renderDots(C,F,E),(!g||x)&&Ii.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(ll(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rTe(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 fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Ts(f,a)||!Ts(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,c=i.top,f=i.left,d=i.xAxis,p=i.yAxis,m=i.width,y=i.height,g=i.isAnimationActive,v=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(v)?this.id:v,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:$,I=vL(a)?a:{},L=I.clipDot,F=L===void 0?!0:L,W=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:_?c:c-y/2,width:A?m:m*2,height:_?y:y*2})),!F&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:f-W/2,y:c-W/2,width:m+W,height:y+W}))):null,w?null:this.renderArea(C,E),(a||w)&&this.renderDots(C,F,E),(!g||x)&&Ii.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);NW=$a;Ei($a,"displayName","Area");Ei($a,"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"});Ei($a,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(ye(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var f=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Ei($a,"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,c=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,m=t.layout,y=c&&c.length,g=NW.getBaseValue(t,n,r,i),v=m==="horizontal",x=!1,w=d.map(function(A,_){var C;y?C=c[f+_]:(C=qt(A,l),Array.isArray(C)?x=!0:C=[g,C]);var E=C[1]==null||y&&qt(A,l)==null;return v?{x:am({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:am({axis:i,ticks:a,bandSize:s,entry:A,index:_}),value:C,payload:A}}),S;return y||x?S=w.map(function(A){var _=Array.isArray(A.value)?A.value[0]:null;return v?{x:A.x,y:_!=null&&A.y!=null?i.scale(_):null}:{x:_!=null?r.scale(_):null,y:A.y}}):S=v?i.scale(g):r.scale(g),na({points:w,baseLine:S,layout:m,isRange:x},p)});Ei($a,"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=$W(t,nTe);n=O.createElement(bd,fs({},o,{key:i,className:r}))}return n});function fc(e){"@babel/helpers - typeof";return fc=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},fc(e)}function fTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dTe(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 JTe(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 QTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eEe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ye(i)&&ye(o)?t.slice(i,o+1):[]};function XW(e){return e==="number"?[0,"auto"]:void 0}var Mw=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=hy(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,c){var f,d=(f=c.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=jp(m,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(pc(l),[MF(c,p)]):l},[])},_N=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=dEe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,f=E0e(a,s,c,l);if(f>=0&&c){var d=c[f]&&c[f].value,p=Mw(t,n,f,d),m=hEe(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:m}}return null},pEe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,m=CF(f,o);return r.reduce(function(y,g){var v,x=g.type.defaultProps!==void 0?se(se({},g.type.defaultProps),g.props):g.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(y[M])return y;var D=hy(t.data,{graphicalItems:i.filter(function(ee){var ie,re=a in ee.props?ee.props[a]:(ie=ee.type.defaultProps)===null||ie===void 0?void 0:ie[a];return re===M}),dataStartIndex:l,dataEndIndex:c}),$=D.length,N,I,L;FTe(x.domain,A,w)&&(N=V0(x.domain,null,A),m&&(w==="number"||C!=="auto")&&(L=Wu(D,S,"category")));var F=XW(w);if(!N||N.length===0){var W,z=(W=x.domain)!==null&&W!==void 0?W:F;if(S){if(N=Wu(D,S,w),w==="category"&&m){var G=bae(N);_&&G?(I=N,N=xm(0,$)):_||(N=NM(z,N,g).reduce(function(ee,ie){return ee.indexOf(ie)>=0?ee:[].concat(pc(ee),[ie])},[]))}else if(w==="category")_?N=N.filter(function(ee){return ee!==""&&!Fe(ee)}):N=NM(z,N,g).reduce(function(ee,ie){return ee.indexOf(ie)>=0||ie===""||Fe(ie)?ee:[].concat(pc(ee),[ie])},[]);else if(w==="number"){var U=$0e(D,i.filter(function(ee){var ie,re,le=a in ee.props?ee.props[a]:(ie=ee.type.defaultProps)===null||ie===void 0?void 0:ie[a],ae="hide"in ee.props?ee.props.hide:(re=ee.type.defaultProps)===null||re===void 0?void 0:re.hide;return le===M&&(k||!ae)}),S,o,f);U&&(N=U)}m&&(w==="number"||C!=="auto")&&(L=Wu(D,S,"category"))}else m?N=xm(0,$):s&&s[M]&&s[M].hasStack&&w==="number"?N=p==="expand"?[0,1]:kF(s[M].stackGroups,l,c):N=OF(D,i.filter(function(ee){var ie=a in ee.props?ee.props[a]:ee.type.defaultProps[a],re="hide"in ee.props?ee.props.hide:ee.type.defaultProps.hide;return ie===M&&(k||!re)}),w,f,!0);if(w==="number")N=Tw(d,N,M,o,E),z&&(N=V0(z,N,A));else if(w==="category"&&z){var V=z,Y=N.every(function(ee){return V.indexOf(ee)>=0});Y&&(N=V)}}return se(se({},y),{},Le({},M,se(se({},x),{},{axisType:o,domain:N,categoricalDomain:L,duplicateDomain:I,originalDomain:(v=x.domain)!==null&&v!==void 0?v:F,isCategorical:m,layout:f})))},{})},mEe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,f=t.layout,d=t.children,p=hy(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=p.length,y=CF(f,o),g=-1;return r.reduce(function(v,x){var w=x.type.defaultProps!==void 0?se(se({},x.type.defaultProps),x.props):x.props,S=w[a],A=XW("number");if(!v[S]){g++;var _;return y?_=xm(0,m):s&&s[S]&&s[S].hasStack?(_=kF(s[S].stackGroups,l,c),_=Tw(d,_,S,o)):(_=V0(A,OF(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),_=Tw(d,_,S,o)),se(se({},v),{},Le({},S,se(se({axisType:o},i.defaultProps),{},{hide:!0,orientation:Er(uEe,"".concat(o,".").concat(g%2),null),domain:_,originalDomain:A,isCategorical:y,layout:f})))}return v},{})},gEe=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,c=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=kr(f,o),m={};return p&&p.length?m=pEe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(m=mEe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},yEe=function(t){var n=aa(t),r=go(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:D_(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:sm(n,r)}},SN=function(t){var n=t.children,r=t.defaultShowTooltip,i=Or(n,nc),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}},vEe=function(t){return!t||!t.length?!1:t.some(function(n){var r=_o(n&&n.type);return r&&r.indexOf("Bar")>=0})},ON=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"}},bEe=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,c=r.width,f=r.height,d=r.children,p=r.margin||{},m=Or(d,nc),y=Or(d,So),g=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}),v=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({},v),g),w=x.bottom;m&&(x.bottom+=m.props.height||nc.defaultProps.height),y&&n&&(x=j0e(x,i,r,n));var S=c-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)})},xEe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},py=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,c=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,I=x.maxBarSize,L=ON(D),F=L.numericAxisName,W=L.cateAxisName,z=vEe(S),G=[];return S.forEach(function(U,V){var Y=hy(x.data,{graphicalItems:[U],dataStartIndex:E,dataEndIndex:k}),ee=U.type.defaultProps!==void 0?se(se({},U.type.defaultProps),U.props):U.props,ie=ee.dataKey,re=ee.maxBarSize,le=ee["".concat(F,"Id")],ae=ee["".concat(W,"Id")],ue={},ne=l.reduce(function(Se,ze){var Lt,at,Wt=w["".concat(ze.axisType,"Map")],$r=ee["".concat(ze.axisType,"Id")];Wt&&Wt[$r]||ze.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ur(!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:"")):ur());var mn=Wt[$r];return se(se({},Se),{},Le(Le({},ze.axisType,mn),"".concat(ze.axisType,"Ticks"),go(mn)))},ue),J=ne[W],fe=ne["".concat(W,"Ticks")],ve=A&&A[le]&&A[le].hasStack&&V0e(U,A[le].stackGroups),X=_o(U.type).indexOf("Bar")>=0,je=sm(J,fe),he=[],Ee=z&&k0e({barSize:M,stackGroups:A,totalSize:xEe(ne,W)});if(X){var Ze,tt,Rn=Fe(re)?I:re,Ne=(Ze=(tt=sm(J,fe,!0))!==null&&tt!==void 0?tt:Rn)!==null&&Ze!==void 0?Ze:0;he=M0e({barGap:$,barCategoryGap:N,bandSize:Ne!==je?Ne:je,sizeList:Ee[ae],maxBarSize:Rn}),Ne!==je&&(he=he.map(function(Se){return se(se({},Se),{},{position:se(se({},Se.position),{},{offset:Se.position.offset-Ne/2})})}))}var nt=U&&U.type&&U.type.getComposedData;nt&&G.push({props:se(se({},nt(se(se({},ne),{},{displayedData:Y,props:x,dataKey:ie,item:U,bandSize:je,barPosition:he,offset:_,stackedData:ve,layout:D,dataStartIndex:E,dataEndIndex:k}))),{},Le(Le(Le({key:U.key||"item-".concat(V)},F,ne[F]),W,ne[W]),"animationId",C)),childIndex:kae(U,x.children),item:U})}),G},m=function(x,w){var S=x.props,A=x.dataStartIndex,_=x.dataEndIndex,C=x.updateId;if(!PE({props:S}))return null;var E=S.children,k=S.layout,M=S.stackOffset,D=S.data,$=S.reverseStackOrder,N=ON(k),I=N.numericAxisName,L=N.cateAxisName,F=kr(E,r),W=W0e(D,F,"".concat(I,"Id"),"".concat(L,"Id"),M,$),z=l.reduce(function(ee,ie){var re="".concat(ie.axisType,"Map");return se(se({},ee),{},Le({},re,gEe(S,se(se({},ie),{},{graphicalItems:F,stackGroups:ie.axisType===I&&W,dataStartIndex:A,dataEndIndex:_}))))},{}),G=bEe(se(se({},z),{},{props:S,graphicalItems:F}),w==null?void 0:w.legendBBox);Object.keys(z).forEach(function(ee){z[ee]=f(S,z[ee],G,ee.replace("Map",""),n)});var U=z["".concat(L,"Map")],V=yEe(U),Y=p(S,se(se({},z),{},{dataStartIndex:A,dataEndIndex:_,updateId:C,graphicalItems:F,stackGroups:W,offset:G}));return se(se({formattedGraphicalItems:Y,graphicalItems:F,offset:G,stackGroups:W},V),z)},y=function(v){function x(w){var S,A,_;return QTe(this,x),_=nEe(this,x,[w]),Le(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(_,"accessibilityManager",new BTe),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=Eae(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&&Gb.emit(Yb,_.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 I=C.chartX,L=C.chartY,F=C.activeTooltipIndex,W=_.state,z=W.offset,G=W.tooltipTicks;if(!z)return;if(typeof M=="function")F=M(G,C);else if(M==="value"){F=-1;for(var U=0;U=0){var ve,X;if(I.dataKey&&!I.allowDuplicatedCategory){var je=typeof I.dataKey=="function"?fe:"payload.".concat(I.dataKey.toString());ve=jp(U,je,F),X=V&&Y&&jp(Y,je,F)}else ve=U==null?void 0:U[L],X=V&&Y&&Y[L];if(ae||le){var he=C.props.activeIndex!==void 0?C.props.activeIndex:L;return[O.cloneElement(C,se(se(se({},M.props),ne),{},{activeIndex:he})),null,null]}if(!Fe(ve))return[J].concat(pc(_.renderActivePoints({item:M,activePoint:ve,basePoint:X,childIndex:L,isRange:V})))}else{var Ee,Ze=(Ee=_.getItemByXY(_.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:J},tt=Ze.graphicalItem,Rn=tt.item,Ne=Rn===void 0?C:Rn,nt=tt.childIndex,Se=se(se(se({},M.props),ne),{},{activeIndex:nt});return[O.cloneElement(Ne,Se),null,null]}return V?[J,null,null]:[J,null]}),Le(_,"renderCustomized",function(C,E,k){return O.cloneElement(C,se(se({key:"recharts-customized-".concat(k)},_.props),_.state))}),Le(_,"renderMap",{CartesianGrid:{handler:Wh,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Wh},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Wh},YAxis:{handler:Wh},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:Ls("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=wB(_.triggeredAfterMouseMove,(A=w.throttleDelay)!==null&&A!==void 0?A:1e3/60),_.state={},_}return oEe(x,v),tEe(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,$=Mw(this.state,_,M,D),N=this.state.tooltipTicks[M].coordinate,I=(this.state.offset.top+C)/2,L=E==="horizontal",F=L?{x:N,y:I}:{y:N,x:I},W=this.state.formattedGraphicalItems.find(function(G){var U=G.item;return U.type.name==="Scatter"});W&&(F=se(se({},F),W.props.points[M].tooltipPosition),$=W.props.points[M].tooltipPayload);var z={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:D,activePayload:$,activeCoordinate:F};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){i0([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=rye(_),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,I=this.getTooltipEventType();if(I!=="axis"&&$&&N){var L=aa($).scale,F=aa(N).scale,W=L&&L.invert?L.invert(E.chartX):null,z=F&&F.invert?F.invert(E.chartY):null;return se(se({},E),{},{xValue:W,yValue:z})}var G=_N(this.state,this.props.data,this.props.layout,M);return G?se(se({},E),G):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,I=$.radiusAxisMap;if(N&&I){var L=aa(N);return IM({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=Np(this.props,this.handleOuterEvent);return se(se({},E),C)}},{key:"addListener",value:function(){Gb.on(Yb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gb.removeListener(Yb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,_){for(var C=this.state.formattedGraphicalItems,E=0,k=C.length;En.length?P.jsx("div",{ref:a,className:K("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>P.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&P.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),P.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);ZW.displayName="ChartLegendContent";const 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:c,color:f,nameKey:d="name",labelKey:p},m)=>{const y=()=>{if(i||!(t!=null&&t.length))return null;const[v]=t,x=s?s(a||""):v[p]||a;return x?P.jsx("div",{className:K("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const g=t.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:K("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:[g?null:y(),P.jsx("div",{className:"grid gap-1.5",children:t.map((v,x)=>{const w=f||v.color||"#000";return P.jsxs("div",{className:K("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&P.jsx("div",{className:K({"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:""}}),P.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[P.jsx("span",{children:v[d]||v.dataKey}),P.jsx("span",{className:"font-mono font-medium",children:c?c(v.value??""):v.value??""})]})]},v.dataKey||x)})})]})});JW.displayName="ChartTooltipContent";const CEe=({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:c,showLegend:f=!1,showCartesianGrid:d=!0,xTickFormatter:p,yTickFormatter:m,xAxisDataKey:y,yAxisDataKey:g,xAxisFontSize:v="sm",xAxisFontColor:x="#6B7280",yAxisFontColor:w="#6B7280",chartWidth:S=350,chartHeight:A=200,borderRadius:_=8,xAxisProps:C,yAxisProps:E,tooltipProps:k,activeBar:M})=>{const D=[{fill:"#7DD3FC"},{fill:"#2563EB"}],$=n.length>0?n:D,N={sm:"12px",md:"14px",lg:"16px"},I=N[v]||N.sm;return!e||e.length===0?P.jsx(yi,{size:"sm",variant:"help",children:"No data available"}):P.jsx(R_,{width:S,height:A,children:P.jsxs(_Ee,{data:e,margin:{left:14,right:14},layout:r,children:[d&&P.jsx(dy,{vertical:!1}),r==="horizontal"&&o&&P.jsx(No,{...C,dataKey:y,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:p,tick:{fontSize:I,fill:x}}),r==="horizontal"&&a&&P.jsx(Li,{...E,dataKey:g,tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:m,tick:{fontSize:I,fill:w}}),r==="vertical"&&P.jsxs(P.Fragment,{children:[P.jsx(No,{...C,type:"number",dataKey:y,hide:!0}),P.jsx(Li,{...E,dataKey:g,type:"category",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:p,tick:{fontSize:I,fill:w}})]}),a&&P.jsx(Li,{dataKey:g}),s&&P.jsx(Cr,{...k,content:P.jsx(JW,{indicator:l,labelKey:c})}),f&&P.jsx(So,{content:P.jsx(ZW,{fontSizeVariant:I})}),t.map((L,F)=>{var z;let W;return i?F===0?W=[0,0,4,4]:F===t.length-1?W=[4,4,0,0]:W=0:W=_,P.jsx(Ws,{dataKey:L,fill:(z=$[F])==null?void 0:z.fill,radius:W,stackId:i?"a":void 0,activeBar:M},L)})]})})},QW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},m)=>{const y=()=>{if(i||!(t!=null&&t.length))return null;const[v]=t,x=s?s(a||""):v[p]||a;return x?P.jsx("div",{className:K("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const g=t.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:K("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:[g?null:y(),P.jsx("div",{className:"grid gap-1.5",children:t.map((v,x)=>{const w=f||v.color||"#000";return P.jsxs("div",{className:K("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&P.jsx("div",{className:K({"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:""}}),P.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[P.jsx("span",{children:v[d]||v.dataKey}),P.jsx("span",{className:"font-mono font-medium",children:c?c(v.value??""):v.value??""})]})]},v.dataKey||x)})})]})});QW.displayName="ChartTooltipContent";const AEe=({data:e,dataKeys:t=[],colors:n=[],showXAxis:r=!1,showYAxis:i=!1,showTooltip:o=!0,tooltipIndicator:a="dot",tooltipLabelKey:s,showCartesianGrid:l=!0,tickFormatter:c,xAxisDataKey:f,yAxisDataKey:d,xAxisFontSize:p="sm",xAxisFontColor:m="#6B7280",yAxisFontColor:y="#6B7280",chartWidth:g=350,chartHeight:v=200,withDots:x=!1,lineChartWrapperProps:w,strokeDasharray:S="3 3",gridColor:A="#E5E7EB"})=>{const _=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],C=n.length>0?n:_,E={sm:"12px",md:"14px",lg:"16px"},k=E[p]||E.sm;return!e||e.length===0?P.jsx(yi,{size:"sm",variant:"help",children:"No data available"}):P.jsx(R_,{width:g,height:v,children:P.jsxs(wEe,{...w,data:e,children:[l&&P.jsx(dy,{strokeDasharray:S,horizontal:!1,stroke:A}),P.jsx(No,{dataKey:f,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:c,tick:{fontSize:k,fill:m},hide:!r}),P.jsx(Li,{dataKey:d,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:k,fill:y},hide:!i}),o&&P.jsx(Cr,{content:P.jsx(QW,{indicator:a,labelKey:s})}),t.map((M,D)=>P.jsx(xd,{type:"natural",dataKey:M,stroke:C[D].stroke,fill:C[D].stroke,strokeWidth:2,dot:x},M))]})})},ez=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},m)=>{const y=()=>{if(i||!(t!=null&&t.length))return null;const[v]=t,x=s?s(a||""):v[p]||a;return x?P.jsx("div",{className:K("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const g=t.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:K("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:[g?null:y(),P.jsx("div",{className:"grid gap-1.5",children:t.map((v,x)=>{var S;const w=v.color||((S=v.payload)==null?void 0:S.fill)||f||"#000";return P.jsxs("div",{className:K("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&P.jsx("div",{className:K({"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:""}}),P.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[P.jsx("span",{children:v[d]||v.dataKey}),P.jsx("span",{className:"font-mono font-medium",children:c?c(v.value??""):v.value??""})]})]},v.dataKey||x)})})]})});ez.displayName="ChartTooltipContent";const tz=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value"},o)=>n.length?P.jsx("div",{ref:o,className:K("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(a=>P.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&P.jsx("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:a.color}}),P.jsx("span",{className:"capitalize",children:a[i]})]},a.value))}):null);tz.displayName="ChartLegendContent";const PEe=({data:e,dataKey:t,type:n="simple",showTooltip:r=!0,tooltipIndicator:i="dot",tooltipLabelKey:o,label:a=!1,labelName:s="",labelNameColor:l="#6B7280",labelValue:c,showLegend:f=!1,chartWidth:d=300,pieOuterRadius:p=90,pieInnerRadius:m=60})=>{const y=n==="donut",g=p,v=y?m:0;return!e||e.length===0?P.jsx(yi,{size:"sm",variant:"help",children:"No data available"}):P.jsxs(SEe,{width:d,height:d,children:[r&&P.jsx(Cr,{content:P.jsx(ez,{indicator:i,labelKey:o})}),f&&P.jsx(So,{content:P.jsx(tz,{})}),P.jsx(Fo,{data:e,cx:"50%",cy:"50%",innerRadius:v,outerRadius:g,dataKey:t,children:y&&a&&P.jsx(un,{content:({viewBox:x})=>{if(x&&"cx"in x&&"cy"in x)return P.jsxs("text",{x:x.cx,y:x.cy,textAnchor:"middle",dominantBaseline:"middle",className:"space-y-3",children:[P.jsx("tspan",{x:x.cx,dy:"-4",className:"fill-foreground text-xl font-bold",children:c}),P.jsx("tspan",{x:x.cx,dy:"24",className:"text-sm",style:{fill:l},children:s})]})}})})]})},nz=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value",fontSizeVariant:o},a)=>n.length?P.jsx("div",{ref:a,className:K("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>P.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&P.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),P.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);nz.displayName="ChartLegendContent";const rz=O.forwardRef(({active:e,payload:t,className:n,indicator:r,hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},m)=>{const y=O.useMemo(()=>{if(i||!(t!=null&&t.length))return null;const[v]=t,x=s?s(a||""):v[p]||a;return x?P.jsx("div",{className:K("font-medium",l),children:x}):null},[a,s,t,i,l,p]);if(!e||!(t!=null&&t.length))return null;const g=t.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:K("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:[g?null:y,P.jsx("div",{className:"grid gap-1.5",children:t.map((v,x)=>{const w=f||v.color||"#000";return P.jsxs("div",{className:K("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&P.jsx("div",{className:K({"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:""}}),P.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[P.jsx("span",{children:v[d]||v.dataKey}),P.jsx("span",{className:"font-mono font-medium",children:c?c(v.value??""):v.value??""})]})]},v.dataKey||x)})})]})});rz.displayName="ChartTooltipContent";const TEe=({data:e,dataKeys:t,colors:n=[],variant:r="solid",showXAxis:i=!0,showYAxis:o=!0,showTooltip:a=!0,tooltipIndicator:s="dot",tooltipLabelKey:l,showLegend:c=!0,showCartesianGrid:f=!0,tickFormatter:d,xAxisDataKey:p,yAxisDataKey:m,xAxisFontSize:y="sm",xAxisFontColor:g="#6B7280",chartWidth:v=350,chartHeight:x=200})=>{const[w,S]=O.useState(v),[A,_]=O.useState(x),C=[{stroke:"#2563EB",fill:"#BFDBFE"},{stroke:"#38BDF8",fill:"#BAE6FD"}],E=n.length>0?n:C;O.useEffect(()=>{S(v),_(x)},[v,x]);const k={sm:"12px",md:"14px",lg:"16px"},M=k[y]||k.sm,D=()=>P.jsx("defs",{children:E.map(($,N)=>P.jsxs("linearGradient",{id:`fill${N}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[P.jsx("stop",{offset:"5%",stopColor:$.fill,stopOpacity:.8}),P.jsx("stop",{offset:"95%",stopColor:$.fill,stopOpacity:.1})]},`gradient${N}`))});return!e||e.length===0?P.jsx(yi,{size:"sm",variant:"help",children:"No data available"}):P.jsx(R_,{width:w,height:A,children:P.jsxs(OEe,{data:e,margin:{left:14,right:14},children:[f&&P.jsx(dy,{vertical:!1}),i&&P.jsx(No,{dataKey:p,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:d,tick:{fontSize:M,fill:g}}),o&&P.jsx(Li,{dataKey:m,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:M,fill:g}}),a&&P.jsx(Cr,{content:P.jsx(rz,{indicator:s,labelKey:l})}),c&&P.jsx(So,{content:P.jsx(nz,{fontSizeVariant:M})}),r==="gradient"&&D(),t.map(($,N)=>P.jsx($a,{type:"monotone",dataKey:$,stroke:E[N%E.length].stroke,fill:r==="gradient"?`url(#fill${N})`:E[N%E.length].fill,stackId:"1"},$))]})})},iz=O.createContext(null),EEe=()=>O.useContext(iz),kEe=()=>{const{file:e,removeFile:t,isLoading:n,error:r,errorText:i}=EEe(),o=O.useMemo(()=>P.jsx("span",{className:"inline-flex self-start p-0.5",children:P.jsx(MH,{className:"size-5 text-icon-primary"})}),[e]);return e?P.jsx("div",{className:K("border border-solid border-transparent flex items-start justify-between rounded mt-2 bg-field-primary-background p-3 gap-3",r&&"border-alert-border-danger bg-alert-background-danger"),children:P.jsxs("div",{className:"flex items-center gap-3 w-full",children:[n&&o,!n&&(e.type.startsWith("image/")?P.jsx("div",{className:K("size-10 rounded-sm flex items-center justify-center shrink-0",r&&"bg-gray-200 "),children:r?P.jsx(jH,{className:"size-6 text-field-helper"}):P.jsx("img",{src:URL.createObjectURL(e),alt:"Preview",className:"w-full h-10 object-contain"})}):o),P.jsxs("div",{className:"text-left flex flex-col gap-1 w-[calc(100%_-_5.5rem)]",children:[P.jsx("span",{className:"text-sm font-medium text-field-label truncate",children:n?"Loading...":e.name}),!n&&P.jsx("span",{className:K("text-xs text-field-helper",r&&"text-support-error"),children:r?i:wH(e.size)})]}),n?P.jsx("span",{className:"inline-flex ml-auto p-0.5",children:P.jsx(Yw,{className:"inline-flex"})}):P.jsx("button",{onClick:t,className:"inline-flex cursor-pointer bg-transparent border-0 p-1 my-0 ml-auto mr-0 ring-0 focus:outline-none self-start",children:P.jsx(RH,{className:"size-4 text-support-error"})})]})}):null},oz=({onFileUpload:e,inlineIcon:t=!1,label:n="Drag and drop or browse files",helpText:r="Help Text",size:i="sm",disabled:o=!1,error:a=!1,errorText:s="Upload failed, please try again."})=>{const[l,c]=O.useState(!1),[f,d]=O.useState(null),[p,m]=O.useState(!1),y=_=>{if(o)return;c(!0),_.preventDefault(),_.stopPropagation(),m(!1);const C=_.dataTransfer.files[0];C&&(d(C),e&&e(C)),c(!1)},g=_=>{o||(_.preventDefault(),m(!0))},v=()=>{o||m(!1)},x=_=>{if(o)return;c(!0);const C=_.target.files;if(!C)return;const E=C[0];E&&(d(E),e&&e(E)),c(!1)},w=()=>{d(null)},S={sm:{label:"text-sm",helpText:"text-xs",icon:"size-5",padding:t?"p-3":"p-5",gap:"gap-2.5"},md:{label:"text-sm",helpText:"text-xs",icon:"size-5",padding:t?"p-4":"p-6",gap:"gap-3"},lg:{label:"text-base",helpText:"text-sm",icon:"size-6",padding:t?"p-4":"p-6",gap:"gap-3"}},A=O.useRef(`fui-file-upload-${Wi()}`);return P.jsx(iz.Provider,{value:{file:f,removeFile:w,isLoading:l,error:a,errorText:s},children:P.jsxs("div",{children:[P.jsx("label",{htmlFor:A.current,children:P.jsxs("div",{className:K("min-w-80 cursor-pointer mx-auto border-dashed border rounded-md text-center hover:border-field-dropzone-color hover:bg-field-dropzone-background-hover focus:outline-none focus:ring focus:ring-toggle-on focus:ring-offset-2 transition duration-200 ease-in-out",p?"border-field-dropzone-color bg-field-dropzone-background-hover":"border-field-border",o&&"border-field-border bg-field-background-disabled cursor-not-allowed hover:border-field-border",S[i].padding),onDragOver:g,onDragLeave:v,onDrop:y,children:[P.jsxs("div",{className:K("flex flex-col items-center justify-center",t&&`flex-row items-start ${S[i].gap}`),children:[P.jsx("div",{children:P.jsx(EH,{className:K("text-field-dropzone-color size-6",S[i].icon,o&&"text-field-color-disabled")})}),P.jsxs("div",{className:"flex flex-col",children:[P.jsx("span",{className:K("mt-1 text-center font-medium text-field-label",t&&"text-left mt-0",S[i].label,o&&"text-field-color-disabled"),children:n}),r&&P.jsx("span",{className:K("mt-1 text-center font-medium text-field-helper",t&&"text-left",S[i].helpText,o&&"text-field-color-disabled"),children:r})]})]}),P.jsx("input",{id:A.current,type:"file",className:"sr-only",onChange:x,disabled:o})]})}),P.jsx(kEe,{})]})})};oz.displayName="Dropzone";const az=O.createContext(void 0),_S=()=>{const e=O.useContext(az);if(!e)throw new Error("Table components must be used within Table component");return e},Da=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const i={checkboxSelection:n},o=O.Children.toArray(e).find(s=>O.isValidElement(s)&&s.type===Im),a=O.Children.toArray(e).filter(s=>O.isValidElement(s)&&s.type!==Im);return P.jsx(az.Provider,{value:i,children:P.jsxs("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[P.jsx("div",{className:"overflow-x-auto w-full",children:P.jsx("div",{className:"relative",children:P.jsx("table",{className:K("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:a})})}),o]})})},sz=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:i,disabled:o,...a})=>{const{checkboxSelection:s}=_S(),l=c=>{typeof r=="function"&&r(c)};return P.jsx("thead",{className:K("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:P.jsxs("tr",{children:[s&&P.jsx("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:P.jsx("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:P.jsx(Lm,{size:"sm",checked:n,indeterminate:i,disabled:o,onChange:l,"aria-label":n?"Deselect all":"Select all"})})}),e]})})},lz=({children:e,className:t,...n})=>P.jsx("th",{scope:"col",className:K("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),cz=({children:e,className:t,...n})=>P.jsx("tbody",{className:K("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),uz=({children:e,selected:t,value:n,className:r,onChangeSelection:i,...o})=>{const{checkboxSelection:a}=_S(),s=l=>{typeof i=="function"&&i(l,n)};return P.jsxs("tr",{className:K("hover:bg-background-secondary",t&&"bg-background-secondary",r),...o,children:[a&&P.jsx("td",{className:"relative px-5.5 w-11 overflow-hidden",children:P.jsx("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:P.jsx(Lm,{size:"sm",checked:t,onChange:s,"aria-label":"Select row"})})}),e]})},fz=({children:e,className:t,...n})=>P.jsx("td",{className:K("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),Im=({children:e,className:t,...n})=>{const{checkboxSelection:r}=_S();return P.jsx("div",{className:K("px-3 py-3",r&&"px-4",t),...n,children:e})};Da.displayName="Table";sz.displayName="Table.Head";lz.displayName="Table.HeadCell";cz.displayName="Table.Body";uz.displayName="Table.Row";fz.displayName="Table.Cell";Im.displayName="Table.Footer";Da.Head=sz;Da.HeadCell=lz;Da.Body=cz;Da.Row=uz;Da.Cell=fz;Da.Footer=Im;exports.Accordion=Bne;exports.Alert=QX;exports.AreaChart=TEe;exports.Avatar=UG;exports.Badge=Xf;exports.BarChart=CEe;exports.Breadcrumb=Ta;exports.Button=bn;exports.ButtonGroup=XG;exports.Checkbox=Lm;exports.Container=T1;exports.DatePicker=Lne;exports.Dialog=Vi;exports.Drawer=Hi;exports.DropdownMenu=Ea;exports.Dropzone=oz;exports.EditorInput=xR;exports.HamburgerMenu=sd;exports.Input=v$;exports.Label=yi;exports.LineChart=AEe;exports.Loader=Yw;exports.Menu=Do;exports.Pagination=Ds;exports.PieChart=PEe;exports.ProgressBar=GG;exports.ProgressSteps=wR;exports.RadioButton=zG;exports.SearchBox=Ui;exports.Select=xc;exports.Sidebar=DQ;exports.Skeleton=$Q;exports.Switch=Nw;exports.Table=Da;exports.Tabs=ug;exports.TextArea=y$;exports.Title=KG;exports.Toaster=FX;exports.Tooltip=tg;exports.Topbar=Oc;exports.toast=IX; diff --git a/dist/force-ui.d.ts b/dist/force-ui.d.ts new file mode 100644 index 00000000..d432d311 --- /dev/null +++ b/dist/force-ui.d.ts @@ -0,0 +1,2794 @@ +/// + +import { AriaAttributes } from 'react'; +import { BarProps } from 'recharts'; +import { Boundary } from '@floating-ui/react'; +import { CategoricalChartProps } from 'recharts/types/chart/generateCategoricalChart'; +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 { PropsBase } from 'react-day-picker'; +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?: ReactNode; + /** + * 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; + /** + * Disable hover effect. + * @default false + */ + disableHover?: boolean; + /** + * 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, xTickFormatter, yTickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, yAxisFontColor, chartWidth, chartHeight, borderRadius, xAxisProps, yAxisProps, tooltipProps, activeBar, }: 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 );``` */ + xTickFormatter?: (value: string) => string; + /** A function used to format the ticks on the y-axis. */ + yTickFormatter?: (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; + /** + * xAxis related props. + * + * @see https://recharts.org/en-US/api/XAxis + */ + xAxisProps?: Record; + /** + * yAxis related props. + * + * @see https://recharts.org/en-US/api/YAxis + */ + yAxisProps?: Record; + /** + * Tooltip related props. + * + * @see https://recharts.org/en-US/api/Tooltip + */ + tooltipProps?: Record; + /** + * Active bar index. + * + * @see https://recharts.org/en-US/api/Bar#activeBar + */ + activeBar?: BarProps['activeBar']; +} + +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; +} + +/** + * Interface for base table props. + */ +declare interface BaseTableProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Child components to render within the table. + * + * @default undefined + */ + children?: ReactNode; + /** + * Whether to show checkboxes for row selection. + */ + checkboxSelection?: boolean; +} + +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, selected, disabled, ...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 | undefined) => 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; + /** Selected date value. */ + selected?: Date | Date[] | TDateRange | undefined; + /** + * Disable the date picker based on the condition. + * Example: + * To disable future dates, set the condition as: + * ```jsx + * disabled={{ after: new Date(), before:"" }} + * ``` + * @default undefined + */ + disabled?: PropsBase['disabled']; +} + +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; + }; + 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' | 'footer-bordered'; + /** 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, 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: { + ({ children, as: Tag, ...props }: DropdownMenuItemProps): JSX_2.Element | null; + displayName: string; + }; + Separator: { + (props: DropdownMenuSeparatorProps): JSX_2.Element; + displayName: string; + }; + Portal: { + ({ children, className, root, id, }: DropdownPortalProps): false | 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; + /** Additional class name */ + className?: string; +} + +declare type DropdownMenuSeparatorProps = MenuSeparatorProps; + +declare interface DropdownPortalProps extends DropdownCommonProps { + /** + * The ID of the portal where the dropdown will be rendered. + * @default undefined + */ + id?: FloatingPortalProps['id']; + /** + * The root element where the dropdown will be rendered. + * @default undefined + */ + root?: FloatingPortalProps['root']; +} + +export declare const Dropzone: { + ({ onFileUpload, inlineIcon, label, helpText, size, disabled, error, errorText, }: DropzoneProps): JSX_2.Element; + displayName: string; +}; + +declare interface DropzoneProps { + /** Callback function when a file is uploaded */ + onFileUpload?: (file: File) => void; + /** Determines if the icon should be inline */ + inlineIcon?: boolean; + /** Label for the dropzone */ + label?: string; + /** Help text for the dropzone */ + helpText?: string; + /** Size variant of the dropzone */ + size?: 'sm' | 'md' | 'lg'; + /** Indicates if the component is disabled */ + disabled?: boolean; + /** Indicates if the component is in error state */ + error?: boolean; + /** Error text to display */ + errorText?: string; +} + +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 HamburgerMenu: { + ({ className, children }: HamburgerMenuProps): JSX_2.Element; + displayName: string; + Options: default_2.FC; + Option: MenuOptionComponent; + Toggle: { + ({ className }: MenuToggleProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface HamburgerMenuProps { + /** + * The class name to apply to the hamburger menu root container. + */ + className?: string; + /** + * The children to render in the menu options. + */ + children: default_2.ReactNode; +} + +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; + /** Indicates whether the input is required. */ + required?: boolean; +} + +export declare const Label: (props: LabelProps & T, ref: default_2.Ref) => default_2.ReactNode; + +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, lineChartWrapperProps, strokeDasharray, gridColor, }: 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 | string; + /** Height of the chart container. */ + chartHeight?: number | string; + /** Determines whether dots are shown on each data point. */ + withDots?: boolean; + /** + * Line chart Wrapper props to apply additional props to the wrapper component. Ex. `margin`, or `onClick` etc. + * @see https://recharts.org/en-US/api/LineChart + */ + lineChartWrapperProps?: Omit; + /** + * The stroke dasharray for the Cartesian grid. + * @default '3 3' + * @see https://recharts.org/en-US/api/CartesianGrid + */ + strokeDasharray?: string; + /** + * The color of the Cartesian grid lines. + * @default '#E5E7EB' + */ + gridColor?: string; +} + +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 type MenuOptionComponent = (props: MenuOptionProps & Omit, keyof MenuOptionProps>) => default_2.ReactElement | null; + +declare interface MenuOptionProps { + /** + * The tag or component to render the option as. + */ + tag?: T; + /** + * Whether the option is active. + */ + active?: boolean; + /** + * Icon component to display. + */ + icon?: default_2.ReactElement; + /** + * Position of the icon. + */ + iconPosition?: 'left' | 'right'; + /** + * Additional class name for styling. + */ + className?: string; + /** + * Children elements. + */ + children?: ReactNode; +} + +declare interface MenuOptionsProps { + /** + * The children to render in the menu options. + */ + children: default_2.ReactNode; + /** + * The class name to apply to the menu options container. + */ + className?: string; +} + +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 interface MenuToggleProps { + /** + * The class name to apply to the hamburger menu toggle button. + */ + className?: string; +} + +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 { + /** 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, PaginationButtonProps { + /** 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, searchPlaceholder, }: SelectProps): JSX_2.Element; + Portal: typeof SelectPortal; + Button: typeof SelectButton; + Options: typeof SelectOptions; + Option: typeof SelectItem; + OptionGroup: typeof SelectOptionGroup; +}; + +declare function SelectButton({ children, icon, // Icon to show in the select button. + placeholder, // Placeholder text. + optionIcon, // Icon to show in the selected option. + render, label, // Label for the select component. + className, ...props }: SelectButtonProps): JSX_2.Element; + +declare namespace SelectButton { + var displayName: string; +} + +declare interface SelectButtonProps extends AriaAttributes { + /** 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; + /** + * Render function to display the selected option (Must use for multi-select mode). + * For multi-select mode, the selected option will be displayed as a badge but the render function will be used to display the selected options. + * For single-select mode, the render function will be used to display the selected option. + */ + render?: (selected: SelectOptionValue) => ReactNode | 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 function SelectOptionGroup({ label, children, className, ...props }: SelectOptionGroupProps): JSX_2.Element; + +declare namespace SelectOptionGroup { + var displayName: string; +} + +declare interface SelectOptionGroupProps { + /** Label for the option group */ + label: string; + /** Children options */ + children: ReactNode; + /** Additional class name for the option group */ + className?: string; +} + +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, className, }: SelectOptionsProps): JSX_2.Element; + +declare namespace SelectOptions { + var displayName: string; +} + +declare interface SelectOptionsProps { + /** Expects the `Select.Option` or `Select.OptionGroup` children */ + children: React.ReactNode; + /** 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[]; + /** Placeholder text for search box. */ + searchPlaceholder?: string; +}; + +declare type SelectSizes = 'sm' | 'md' | 'lg'; + +export declare const Sidebar: { + ({ children, className, onCollapseChange, collapsible, 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; + /** 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'). + * @default 'sm' + */ + size?: 'sm' | 'md'; + /** 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; +} + +export declare const Table: { + ({ children, className, checkboxSelection, ...props }: BaseTableProps): JSX_2.Element; + displayName: string; + Head: default_2.FC; + HeadCell: default_2.FC; + Body: default_2.FC; + Row: { + ({ children, selected, value, className, onChangeSelection, ...props }: TableRowProps): JSX_2.Element; + displayName: string; + }; + Cell: default_2.FC; + Footer: default_2.FC; +}; + +/** + * Interface for table body props. + */ +declare interface TableBodyProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Child components to render within the table body. + */ + children?: ReactNode; +} + +/** + * Interface for table cell props. + */ +declare interface TableCellProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Content to display in the table cell. + */ + children?: ReactNode; +} + +/** + * Common props for all table components. + */ +declare interface TableCommonProps { + /** + * Children to render within the component. + */ + children?: ReactNode; + /** + * Class name to apply to the component. + */ + className?: string; +} + +/** + * Interface for table footer props. + */ +declare interface TableFooterProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Child components to render within the table footer. + */ + children?: ReactNode; +} + +/** + * Interface for table head cell props. + */ +declare interface TableHeadCellProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Content to display in the header cell. + */ + children?: ReactNode; +} + +/** + * Interface for table head props. + */ +declare interface TableHeadProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Child components to render within the table head. + */ + children?: ReactNode; + /** + * Whether any of the rows are selected. + */ + selected?: boolean; + /** + * Whether the checkbox is indeterminate. + */ + indeterminate?: boolean; + /** + * Whether the checkbox is disabled. + */ + disabled?: boolean; + /** + * On checkbox change for bulk selection/deselection. + * + * @default undefined + */ + onChangeSelection?: (checked: boolean) => void; +} + +/** + * Interface for table row props. + */ +declare interface TableRowProps extends TableCommonProps, Omit, 'className' | 'children'> { + /** + * Child components to render within the table row. + */ + children?: ReactNode; + /** + * value of the row. + */ + value?: T | undefined; + /** + * Whether the row is selected. + */ + selected?: boolean; + /** + * On checkbox selection change. + */ + onChangeSelection?: (checked: boolean, value: T) => void; + /** + * Whether the row is disabled. + */ + disabled?: boolean; +} + +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 | undefined; + to: Date | undefined; +}; + +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; + displayName: string; +}; + +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: { + 4.5: string; + 5.5: string; + 120: string; + 95: string; + 141.5: string; + 188: string; + }; + let zIndex: { + 999999: string; + }; + let borderWidth: { + 0.5: 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; + namespace a11y { + namespace config { + let rules: { + selector: string; + id: string; + enabled: boolean; + }[]; + } + } + } + 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..e1b84b8d --- /dev/null +++ b/dist/force-ui.js @@ -0,0 +1,48432 @@ +"use client"; +var tH = Object.defineProperty; +var hT = (e) => { + throw TypeError(e); +}; +var nH = (e, t, n) => t in e ? tH(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var da = (e, t, n) => nH(e, typeof t != "symbol" ? t + "" : t, n), pT = (e, t, n) => t.has(e) || hT("Cannot " + n); +var Dr = (e, t, n) => (pT(e, t, "read from private field"), n ? n.call(e) : t.get(e)), zv = (e, t, n) => t.has(e) ? hT("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), os = (e, t, n, r) => (pT(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n); +import { jsxs as he, jsx as E, Fragment as Ut } from "react/jsx-runtime"; +import * as te from "react"; +import I, { forwardRef as Dt, Fragment as Ur, useMemo as Fe, useState as Me, useCallback as qe, isValidElement as rt, createElement as ql, useLayoutEffect as di, useEffect as Xe, useRef as ut, cloneElement as ht, createContext as dt, useContext as Ve, useId as Kw, Component as Gw, useInsertionEffect as z$, Children as Yt, memo as rH, Suspense as iH, startTransition as oH, PureComponent as pi, useImperativeHandle as aH } from "react"; +import * as V$ from "react-dom"; +import { flushSync as U$, createPortal as Yw } from "react-dom"; +import { c as So, g as kt } from "./_commonjsHelpers-DaMA6jEr.js"; +const qw = "-", sH = (e) => { + const t = cH(e), { + conflictingClassGroups: n, + conflictingClassGroupModifiers: r + } = e; + return { + getClassGroupId: (a) => { + const s = a.split(qw); + return s[0] === "" && s.length !== 1 && s.shift(), H$(s, t) || lH(a); + }, + getConflictingClassGroupIds: (a, s) => { + const l = n[a] || []; + return s && r[a] ? [...l, ...r[a]] : l; + } + }; +}, H$ = (e, t) => { + var a; + if (e.length === 0) + return t.classGroupId; + const n = e[0], r = t.nextPart.get(n), i = r ? H$(e.slice(1), r) : void 0; + if (i) + return i; + if (t.validators.length === 0) + return; + const o = e.join(qw); + return (a = t.validators.find(({ + validator: s + }) => s(o))) == null ? void 0 : a.classGroupId; +}, mT = /^\[(.+)\]$/, lH = (e) => { + if (mT.test(e)) { + const t = mT.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); + if (n) + return "arbitrary.." + n; + } +}, cH = (e) => { + const { + theme: t, + prefix: n + } = e, r = { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }; + return fH(Object.entries(e.classGroups), n).forEach(([o, a]) => { + u0(a, r, o, t); + }), r; +}, u0 = (e, t, n, r) => { + e.forEach((i) => { + if (typeof i == "string") { + const o = i === "" ? t : gT(t, i); + o.classGroupId = n; + return; + } + if (typeof i == "function") { + if (uH(i)) { + u0(i(r), t, n, r); + return; + } + t.validators.push({ + validator: i, + classGroupId: n + }); + return; + } + Object.entries(i).forEach(([o, a]) => { + u0(a, gT(t, o), n, r); + }); + }); +}, gT = (e, t) => { + let n = e; + return t.split(qw).forEach((r) => { + n.nextPart.has(r) || n.nextPart.set(r, { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }), n = n.nextPart.get(r); + }), n; +}, uH = (e) => e.isThemeGetter, fH = (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, dH = (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); + } + }; +}, K$ = "!", hH = (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 v = 0; v < s.length; v++) { + let x = s[v]; + if (c === 0) { + if (x === i && (r || s.slice(v, v + o) === t)) { + l.push(s.slice(f, v)), f = v + o; + continue; + } + if (x === "/") { + d = v; + continue; + } + } + x === "[" ? c++ : x === "]" && c--; + } + const p = l.length === 0 ? s : s.substring(f), m = p.startsWith(K$), y = m ? p.substring(1) : p, g = d && d > f ? d - f : void 0; + return { + modifiers: l, + hasImportantModifier: m, + baseClassName: y, + maybePostfixModifierPosition: g + }; + }; + return n ? (s) => n({ + className: s, + parseClassName: a + }) : a; +}, pH = (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; +}, mH = (e) => ({ + cache: dH(e.cacheSize), + parseClassName: hH(e), + ...sH(e) +}), gH = /\s+/, yH = (e, t) => { + const { + parseClassName: n, + getClassGroupId: r, + getConflictingClassGroupIds: i + } = t, o = [], a = e.trim().split(gH); + 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 y = !!m, g = r(y ? p.substring(0, m) : p); + if (!g) { + if (!y) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + if (g = r(p), !g) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + y = !1; + } + const v = pH(f).join(":"), x = d ? v + K$ : v, w = x + g; + if (o.includes(w)) + continue; + o.push(w); + const S = i(g, y); + for (let A = 0; A < S.length; ++A) { + const _ = S[A]; + o.push(x + _); + } + s = c + (s.length > 0 ? " " + s : s); + } + return s; +}; +function vH() { + let e = 0, t, n, r = ""; + for (; e < arguments.length; ) + (t = arguments[e++]) && (n = G$(t)) && (r && (r += " "), r += n); + return r; +} +const G$ = (e) => { + if (typeof e == "string") + return e; + let t, n = ""; + for (let r = 0; r < e.length; r++) + e[r] && (t = G$(e[r])) && (n && (n += " "), n += t); + return n; +}; +function bH(e, ...t) { + let n, r, i, o = a; + function a(l) { + const c = t.reduce((f, d) => d(f), e()); + return n = mH(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 = yH(l, n); + return i(l, f), f; + } + return function() { + return o(vH.apply(null, arguments)); + }; +} +const Wt = (e) => { + const t = (n) => n[e] || []; + return t.isThemeGetter = !0, t; +}, Y$ = /^\[(?:([a-z-]+):)?(.+)\]$/i, xH = /^\d+\/\d+$/, wH = /* @__PURE__ */ new Set(["px", "full", "screen"]), _H = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, SH = /\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$/, OH = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, AH = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, TH = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, vo = (e) => Wl(e) || wH.has(e) || xH.test(e), ha = (e) => Mc(e, "length", DH), Wl = (e) => !!e && !Number.isNaN(Number(e)), Vv = (e) => Mc(e, "number", Wl), vu = (e) => !!e && Number.isInteger(Number(e)), PH = (e) => e.endsWith("%") && Wl(e.slice(0, -1)), Je = (e) => Y$.test(e), pa = (e) => _H.test(e), CH = /* @__PURE__ */ new Set(["length", "size", "percentage"]), EH = (e) => Mc(e, CH, q$), kH = (e) => Mc(e, "position", q$), MH = /* @__PURE__ */ new Set(["image", "url"]), NH = (e) => Mc(e, MH, RH), $H = (e) => Mc(e, "", IH), bu = () => !0, Mc = (e, t, n) => { + const r = Y$.exec(e); + return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; +}, DH = (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. + SH.test(e) && !OH.test(e) +), q$ = () => !1, IH = (e) => AH.test(e), RH = (e) => TH.test(e), jH = () => { + const e = Wt("colors"), t = Wt("spacing"), n = Wt("blur"), r = Wt("brightness"), i = Wt("borderColor"), o = Wt("borderRadius"), a = Wt("borderSpacing"), s = Wt("borderWidth"), l = Wt("contrast"), c = Wt("grayscale"), f = Wt("hueRotate"), d = Wt("invert"), p = Wt("gap"), m = Wt("gradientColorStops"), y = Wt("gradientColorStopPositions"), g = Wt("inset"), v = Wt("margin"), x = Wt("opacity"), w = Wt("padding"), S = Wt("saturate"), A = Wt("scale"), _ = Wt("sepia"), O = Wt("skew"), P = Wt("space"), C = Wt("translate"), k = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", Je, t], N = () => [Je, t], R = () => ["", vo, ha], L = () => ["auto", Wl, Je], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], W = () => ["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"], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", Je], V = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [Wl, Je]; + return { + cacheSize: 500, + separator: ":", + theme: { + colors: [bu], + spacing: [vo, ha], + blur: ["none", "", pa, Je], + brightness: Y(), + borderColor: [e], + borderRadius: ["none", "", "full", pa, Je], + borderSpacing: N(), + borderWidth: R(), + contrast: Y(), + grayscale: U(), + hueRotate: Y(), + invert: U(), + gap: N(), + gradientColorStops: [e], + gradientColorStopPositions: [PH, ha], + 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", Je] + }], + /** + * Container + * @see https://tailwindcss.com/docs/container + */ + container: ["container"], + /** + * Columns + * @see https://tailwindcss.com/docs/columns + */ + columns: [{ + columns: [pa] + }], + /** + * Break After + * @see https://tailwindcss.com/docs/break-after + */ + "break-after": [{ + "break-after": V() + }], + /** + * Break Before + * @see https://tailwindcss.com/docs/break-before + */ + "break-before": [{ + "break-before": V() + }], + /** + * 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: [...F(), Je] + }], + /** + * 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: k() + }], + /** + * Overscroll Behavior X + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-x": [{ + "overscroll-x": k() + }], + /** + * Overscroll Behavior Y + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-y": [{ + "overscroll-y": k() + }], + /** + * 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: [g] + }], + /** + * Right / Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-x": [{ + "inset-x": [g] + }], + /** + * Top / Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-y": [{ + "inset-y": [g] + }], + /** + * Start + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + start: [{ + start: [g] + }], + /** + * End + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + end: [{ + end: [g] + }], + /** + * Top + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + top: [{ + top: [g] + }], + /** + * Right + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + right: [{ + right: [g] + }], + /** + * Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + bottom: [{ + bottom: [g] + }], + /** + * Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + left: [{ + left: [g] + }], + /** + * Visibility + * @see https://tailwindcss.com/docs/visibility + */ + visibility: ["visible", "invisible", "collapse"], + /** + * Z-Index + * @see https://tailwindcss.com/docs/z-index + */ + z: [{ + z: ["auto", vu, Je] + }], + // 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", Je] + }], + /** + * 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", vu, Je] + }], + /** + * Grid Template Columns + * @see https://tailwindcss.com/docs/grid-template-columns + */ + "grid-cols": [{ + "grid-cols": [bu] + }], + /** + * Grid Column Start / End + * @see https://tailwindcss.com/docs/grid-column + */ + "col-start-end": [{ + col: ["auto", { + span: ["full", vu, Je] + }, Je] + }], + /** + * 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": [bu] + }], + /** + * Grid Row Start / End + * @see https://tailwindcss.com/docs/grid-row + */ + "row-start-end": [{ + row: ["auto", { + span: [vu, Je] + }, Je] + }], + /** + * 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", Je] + }], + /** + * Grid Auto Rows + * @see https://tailwindcss.com/docs/grid-auto-rows + */ + "auto-rows": [{ + "auto-rows": ["auto", "min", "max", "fr", Je] + }], + /** + * 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", ...G()] + }], + /** + * 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", ...G(), "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": [...G(), "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: [v] + }], + /** + * Margin X + * @see https://tailwindcss.com/docs/margin + */ + mx: [{ + mx: [v] + }], + /** + * Margin Y + * @see https://tailwindcss.com/docs/margin + */ + my: [{ + my: [v] + }], + /** + * Margin Start + * @see https://tailwindcss.com/docs/margin + */ + ms: [{ + ms: [v] + }], + /** + * Margin End + * @see https://tailwindcss.com/docs/margin + */ + me: [{ + me: [v] + }], + /** + * Margin Top + * @see https://tailwindcss.com/docs/margin + */ + mt: [{ + mt: [v] + }], + /** + * Margin Right + * @see https://tailwindcss.com/docs/margin + */ + mr: [{ + mr: [v] + }], + /** + * Margin Bottom + * @see https://tailwindcss.com/docs/margin + */ + mb: [{ + mb: [v] + }], + /** + * Margin Left + * @see https://tailwindcss.com/docs/margin + */ + ml: [{ + ml: [v] + }], + /** + * Space Between X + * @see https://tailwindcss.com/docs/space + */ + "space-x": [{ + "space-x": [P] + }], + /** + * 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": [P] + }], + /** + * 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", Je, t] + }], + /** + * Min-Width + * @see https://tailwindcss.com/docs/min-width + */ + "min-w": [{ + "min-w": [Je, t, "min", "max", "fit"] + }], + /** + * Max-Width + * @see https://tailwindcss.com/docs/max-width + */ + "max-w": [{ + "max-w": [Je, t, "none", "full", "min", "max", "fit", "prose", { + screen: [pa] + }, pa] + }], + /** + * Height + * @see https://tailwindcss.com/docs/height + */ + h: [{ + h: [Je, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Min-Height + * @see https://tailwindcss.com/docs/min-height + */ + "min-h": [{ + "min-h": [Je, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Max-Height + * @see https://tailwindcss.com/docs/max-height + */ + "max-h": [{ + "max-h": [Je, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Size + * @see https://tailwindcss.com/docs/size + */ + size: [{ + size: [Je, t, "auto", "min", "max", "fit"] + }], + // Typography + /** + * Font Size + * @see https://tailwindcss.com/docs/font-size + */ + "font-size": [{ + text: ["base", pa, ha] + }], + /** + * 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", Vv] + }], + /** + * Font Family + * @see https://tailwindcss.com/docs/font-family + */ + "font-family": [{ + font: [bu] + }], + /** + * 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", Je] + }], + /** + * Line Clamp + * @see https://tailwindcss.com/docs/line-clamp + */ + "line-clamp": [{ + "line-clamp": ["none", Wl, Vv] + }], + /** + * Line Height + * @see https://tailwindcss.com/docs/line-height + */ + leading: [{ + leading: ["none", "tight", "snug", "normal", "relaxed", "loose", vo, Je] + }], + /** + * List Style Image + * @see https://tailwindcss.com/docs/list-style-image + */ + "list-image": [{ + "list-image": ["none", Je] + }], + /** + * List Style Type + * @see https://tailwindcss.com/docs/list-style-type + */ + "list-style-type": [{ + list: ["none", "disc", "decimal", Je] + }], + /** + * 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: [...W(), "wavy"] + }], + /** + * Text Decoration Thickness + * @see https://tailwindcss.com/docs/text-decoration-thickness + */ + "text-decoration-thickness": [{ + decoration: ["auto", "from-font", vo, ha] + }], + /** + * Text Underline Offset + * @see https://tailwindcss.com/docs/text-underline-offset + */ + "underline-offset": [{ + "underline-offset": ["auto", vo, Je] + }], + /** + * 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", Je] + }], + /** + * 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", Je] + }], + // 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: [...F(), kH] + }], + /** + * 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", EH] + }], + /** + * Background Image + * @see https://tailwindcss.com/docs/background-image + */ + "bg-image": [{ + bg: ["none", { + "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] + }, NH] + }], + /** + * 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: [y] + }], + /** + * Gradient Color Stops Via Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-via-pos": [{ + via: [y] + }], + /** + * Gradient Color Stops To Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-to-pos": [{ + to: [y] + }], + /** + * 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: [...W(), "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: W() + }], + /** + * 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: ["", ...W()] + }], + /** + * Outline Offset + * @see https://tailwindcss.com/docs/outline-offset + */ + "outline-offset": [{ + "outline-offset": [vo, Je] + }], + /** + * Outline Width + * @see https://tailwindcss.com/docs/outline-width + */ + "outline-w": [{ + outline: [vo, ha] + }], + /** + * 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: R() + }], + /** + * 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": [vo, ha] + }], + /** + * 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", pa, $H] + }], + /** + * Box Shadow Color + * @see https://tailwindcss.com/docs/box-shadow-color + */ + "shadow-color": [{ + shadow: [bu] + }], + /** + * 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", pa, Je] + }], + /** + * 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", Je] + }], + /** + * 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", Je] + }], + /** + * 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", Je] + }], + // 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: [vu, Je] + }], + /** + * 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", Je] + }], + // 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", Je] + }], + /** + * 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", Je] + }], + // SVG + /** + * Fill + * @see https://tailwindcss.com/docs/fill + */ + fill: [{ + fill: [e, "none"] + }], + /** + * Stroke Width + * @see https://tailwindcss.com/docs/stroke-width + */ + "stroke-w": [{ + stroke: [vo, ha, Vv] + }], + /** + * 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"] + } + }; +}, LH = /* @__PURE__ */ bH(jH); +function X$(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 = X$(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 = X$(e)) && (r && (r += " "), r += t); + return r; +} +const K = (...e) => LH(Ye(...e)), lf = (...e) => (...t) => e.forEach((n) => n == null ? void 0 : n(...t)), Jm = (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; +}, BH = { + 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" +}, FH = () => { + 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; +}, WH = (e) => e < 1024 ? `${e} bytes` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`, Ru = { + set: (e, t) => { + if (!(typeof window > "u")) + try { + localStorage.setItem(e, JSON.stringify(t)); + } catch (n) { + console.error(n); + } + }, + get: (e) => { + if (typeof window > "u") + return null; + try { + const t = localStorage.getItem(e); + return t ? JSON.parse(t) : null; + } catch (t) { + return console.error(t), null; + } + }, + remove: (e) => { + if (!(typeof window > "u")) + try { + localStorage.removeItem(e); + } catch (t) { + console.error(t); + } + } +}, Hn = Dt( + (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, y = "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", g = p ? "opacity-50 disabled:cursor-not-allowed" : "", v = { + 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__ */ he( + o, + { + ref: t, + type: i, + className: K( + _, + y, + w, + v, + x, + g, + { + "cursor-default": l + }, + a + ), + disabled: l, + ...m, + children: [ + /* @__PURE__ */ E(Ur, { children: S }, "left-icon"), + s ? /* @__PURE__ */ E("span", { className: "px-1", children: s }) : null, + /* @__PURE__ */ E(Ur, { children: A }, "right-icon") + ] + } + ); + } +); +Hn.displayName = "Button"; +const zH = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; +let ro = (e = 21) => { + let t = "", n = crypto.getRandomValues(new Uint8Array(e)); + for (; e--; ) + t += zH[n[e] & 63]; + return t; +}; +const eo = Dt( + ({ + children: e = null, + tag: t = "label", + size: n = "sm", + // xs, sm, md + className: r = "", + variant: i = "neutral", + // neutral, help, error, disabled + required: o = !1, + ...a + }, s) => { + const l = "font-medium text-field-label flex items-center gap-0.5", c = { + 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" + }, d = { + neutral: "", + help: "font-normal", + error: "font-normal", + disabled: "" + }; + if (!e) + return null; + let p = ""; + return o && (p = "after:content-['*'] after:text-field-required after:ml-0.5"), /* @__PURE__ */ E( + t, + { + ref: s, + className: K( + l, + c[n], + f[i], + p, + d == null ? void 0 : d[i], + r + ), + ...a, + children: e + } + ); + } +); +eo.displayName = "Label"; +const VH = ({ + label: e, + switchId: t, + disabled: n = !1, + children: r, + size: i +}) => { + const o = { + sm: "text-sm leading-5 font-medium", + md: "text-base leading-6 font-medium" + }, a = { + sm: "text-sm leading-5 font-normal", + md: "text-sm leading-5 font-normal" + }, s = { + sm: "space-y-0.5", + md: "space-y-1" + }; + if (rt(e)) + return /* @__PURE__ */ he( + "div", + { + className: K("inline-flex items-center gap-3", "items-start"), + children: [ + r, + e + ] + } + ); + const c = () => { + const { heading: p = "", description: m = "" } = e || {}; + return /* @__PURE__ */ he("div", { className: K("space-y-0.5", s[i]), children: [ + p && /* @__PURE__ */ E( + eo, + { + htmlFor: t, + className: K("m-0", o[i]), + ...n && { variant: "disabled" }, + children: p + } + ), + m && /* @__PURE__ */ E( + eo, + { + tag: "p", + variant: "help", + className: K( + "text-sm font-normal leading-5 m-0", + a[i] + ), + ...n && { variant: "disabled" }, + children: m + } + ) + ] }); + }, f = !(e != null && e.heading) && !(e != null && e.description), d = !(e != null && e.heading) || !(e != null && e.description) ? "items-center" : "items-start"; + return f ? r : /* @__PURE__ */ he("div", { className: K("inline-flex", d, "gap-3"), children: [ + r, + c() + ] }); +}, UH = ({ + id: e, + onChange: t, + value: n, + defaultValue: r = !1, + size: i = "sm", + disabled: o = !1, + label: a = { heading: "", description: "" }, + name: s, + className: l, + ...c +}, f) => { + const d = i === "lg" ? "md" : i, p = Fe(() => typeof n < "u", [n]), m = Fe(() => e || `switch-${ro()}`, []), [y, g] = Me(r), v = "primary", x = qe( + () => p ? n : y, + [p, n, y] + ), w = (C) => { + if (o) + return; + const k = C.target.checked; + p || g(k), typeof t == "function" && t(k); + }, S = { + primary: { + input: "bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 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" + } + }, A = { + primary: { + input: "group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border" + } + }, _ = { + md: { + container: "w-11 h-6", + toggleDial: "size-4 peer-checked:translate-x-5" + }, + sm: { + container: "w-10 h-5", + toggleDial: "size-3 peer-checked:translate-x-5" + } + }, O = { + md: "group-hover/switch:size-5 group-focus-within/switch:size-5 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5", + sm: "group-hover/switch:size-4 group-focus-within/switch:size-4 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5" + }, P = { + 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__ */ E( + VH, + { + label: a, + switchId: m, + disabled: o, + size: d, + children: /* @__PURE__ */ he( + "div", + { + className: K( + "relative group/switch inline-block cursor-pointer rounded-full shrink-0", + _[d].container, + l + ), + children: [ + /* @__PURE__ */ E( + "input", + { + ref: f, + id: m, + type: "checkbox", + className: K( + "peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]", + S[v].input, + o && P.input, + !o && A[v].input + ), + checked: x(), + onChange: w, + disabled: o, + name: s, + ...c + } + ), + /* @__PURE__ */ E( + "label", + { + htmlFor: m, + className: K( + "peer/toggle-dial bg-white border 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", + _[d].toggleDial, + S[v].toggleDial, + o && P.toggleDial, + !o && O[d] + ) + } + ) + ] + } + ) + } + ); +}, Z$ = Dt(UH); +Z$.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 HH = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), J$ = (...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 KH = { + 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 GH = Dt( + ({ + color: e = "currentColor", + size: t = 24, + strokeWidth: n = 2, + absoluteStrokeWidth: r, + className: i = "", + children: o, + iconNode: a, + ...s + }, l) => ql( + "svg", + { + ref: l, + ...KH, + width: t, + height: t, + stroke: e, + strokeWidth: r ? Number(n) * 24 / Number(t) : n, + className: J$("lucide", i), + ...s + }, + [ + ...a.map(([c, f]) => ql(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 on = (e, t) => { + const n = Dt( + ({ className: r, ...i }, o) => ql(GH, { + ref: o, + iconNode: t, + className: J$(`lucide-${HH(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 ad = on("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 Xw = on("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 Q$ = on("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 = on("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 YH = on("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 qH = on("CloudUpload", [ + ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }], + ["path", { d: "M12 12v9", key: "192myk" }], + ["path", { d: "m16 16-4-4-4 4", key: "119tzi" }] +]); +/** + * @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 XH = on("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 ZH = on("File", [ + ["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }], + ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }] +]); +/** + * @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 JH = on("ImageOff", [ + ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }], + ["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }], + ["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }], + ["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }], + [ + "path", + { + d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59", + key: "mmje98" + } + ], + ["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }] +]); +/** + * @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 f0 = on("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 QH = on("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 eD = on("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 eK = on("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 tK = on("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 tD = on("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 nD = on("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 nK = on("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 rK = on("Trash", [ + ["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" }] +]); +/** + * @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 = on("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 yT = on("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 = on("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 Na = on("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, + ...c +}, f) => { + var O, P; + const d = Fe(() => e || `checkbox-${ro()}`, [e]), p = Fe( + () => typeof r < "u", + [r] + ), [m, y] = Me(n || !1), g = "primary", v = { + sm: { + checkbox: "size-4 rounded gap-1", + icon: "size-3", + text: "text-sm", + // text class for sm + description: "text-sm", + 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-2 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 = qe( + () => p ? r : m, + [p, r, m] + ), A = (C) => { + if (a) + return; + const k = C.target.checked; + p || y(k), typeof i == "function" && i(k); + }, _ = qe(() => rt(t) ? t : !(t != null && t.heading) && !(t != null && t.description) ? null : /* @__PURE__ */ he("div", { className: v[s].gap, children: [ + (t == null ? void 0 : t.heading) && /* @__PURE__ */ E( + eo, + { + className: K( + "text-text-primary font-medium leading-4 m-0", + v[s].text, + v[s].gap, + a && "text-text-disabled" + ), + htmlFor: d, + children: t == null ? void 0 : t.heading + } + ), + (t == null ? void 0 : t.description) && /* @__PURE__ */ E( + eo, + { + tag: "p", + className: K( + "font-normal leading-5 m-0", + v[s].description, + a && "text-text-disabled" + ), + variant: "help", + children: t == null ? void 0 : t.description + } + ) + ] }), [t, s, a]); + return /* @__PURE__ */ he( + "div", + { + className: K( + "inline-flex items-center justify-center gap-2", + !!t && "items-start", + a && "cursor-not-allowed" + ), + children: [ + /* @__PURE__ */ he( + "label", + { + className: K( + "relative flex items-center justify-center rounded-full p-0.5", + !a && "cursor-pointer" + ), + htmlFor: d, + children: [ + /* @__PURE__ */ E( + "input", + { + ref: f, + id: d, + type: "checkbox", + className: K( + "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[g].checkbox, + v[s].checkbox, + a && w.checkbox, + l + ), + checked: S(), + onChange: A, + disabled: a, + ...c + } + ), + /* @__PURE__ */ E( + "span", + { + className: K( + "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[g].icon, + a && w.icon + ), + children: o ? /* @__PURE__ */ E(eD, { className: K((O = v[s]) == null ? void 0 : O.icon) }) : /* @__PURE__ */ E(ad, { className: K((P = v[s]) == null ? void 0 : P.icon) }) + } + ) + ] + } + ), + !!t && _() + ] + } + ); +}, Jw = Dt(aK); +Jw.displayName = "Checkbox"; +const vT = { + 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-2 focus:ring-focus", + icon: "text-white" + } +}, bT = { + 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" +}, Uv = { + sm: { + checkbox: "size-4", + icon: "size-1.5", + info: "size-4" + }, + md: { + checkbox: "size-5", + icon: "size-2", + info: "size-5" + } +}, xT = { + 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" +}, cK = "border-0 border-r border-border-subtle border-solid", uK = "bg-background-primary text-primary cursor-pointer flex items-center justify-center", fK = "hover:bg-button-tertiary-hover", dK = "focus:outline-none"; +function Qm() { + return typeof window < "u"; +} +function Wa(e) { + return rD(e) ? (e.nodeName || "").toLowerCase() : "#document"; +} +function Or(e) { + var t; + return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; +} +function io(e) { + var t; + return (t = (rD(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement; +} +function rD(e) { + return Qm() ? e instanceof Node || e instanceof Or(e).Node : !1; +} +function Ct(e) { + return Qm() ? e instanceof Element || e instanceof Or(e).Element : !1; +} +function pn(e) { + return Qm() ? e instanceof HTMLElement || e instanceof Or(e).HTMLElement : !1; +} +function d0(e) { + return !Qm() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Or(e).ShadowRoot; +} +function sd(e) { + const { + overflow: t, + overflowX: n, + overflowY: r, + display: i + } = Hr(e); + return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i); +} +function hK(e) { + return ["table", "td", "th"].includes(Wa(e)); +} +function eg(e) { + return [":popover-open", ":modal"].some((t) => { + try { + return e.matches(t); + } catch { + return !1; + } + }); +} +function Qw(e) { + const t = tg(), n = Ct(e) ? Hr(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 = Bo(e); + for (; pn(t) && !$a(t); ) { + if (Qw(t)) + return t; + if (eg(t)) + return null; + t = Bo(t); + } + return null; +} +function tg() { + return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); +} +function $a(e) { + return ["html", "body", "#document"].includes(Wa(e)); +} +function Hr(e) { + return Or(e).getComputedStyle(e); +} +function ng(e) { + return Ct(e) ? { + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + } : { + scrollLeft: e.scrollX, + scrollTop: e.scrollY + }; +} +function Bo(e) { + if (Wa(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. + d0(e) && e.host || // Fallback. + io(e) + ); + return d0(t) ? t.host : t; +} +function iD(e) { + const t = Bo(e); + return $a(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : pn(t) && sd(t) ? t : iD(t); +} +function Pa(e, t, n) { + var r; + t === void 0 && (t = []), n === void 0 && (n = !0); + const i = iD(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Or(i); + if (o) { + const s = h0(a); + return t.concat(a, a.visualViewport || [], sd(i) ? i : [], s && n ? Pa(s) : []); + } + return t.concat(i, Pa(i, [], n)); +} +function h0(e) { + return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null; +} +function Ti(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 hn(e, t) { + if (!e || !t) + return !1; + const n = t.getRootNode == null ? void 0 : t.getRootNode(); + if (e.contains(t)) + return !0; + if (n && d0(n)) { + let r = t; + for (; r; ) { + if (e === r) + return !0; + r = r.parentNode || r.host; + } + } + return !1; +} +function oD() { + const e = navigator.userAgentData; + return e != null && e.platform ? e.platform : navigator.platform; +} +function aD() { + 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 sD(e) { + return e.mozInputSource === 0 && e.isTrusted ? !0 : p0() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType; +} +function e1(e) { + return mK() ? !1 : !p0() && e.width === 0 && e.height === 0 || p0() && 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 t1() { + return /apple/i.test(navigator.vendor); +} +function p0() { + const e = /android/i; + return e.test(oD()) || e.test(aD()); +} +function lD() { + return oD().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints; +} +function mK() { + return aD().includes("jsdom/"); +} +function cf(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 Kn(e) { + return (e == null ? void 0 : e.ownerDocument) || document; +} +function Hv(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 Oo(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 n1(e) { + return pn(e) && e.matches(vK); +} +function Un(e) { + e.preventDefault(), e.stopPropagation(); +} +function m0(e) { + return e ? e.getAttribute("role") === "combobox" && n1(e) : !1; +} +const Da = Math.min, Br = Math.max, hp = Math.round, Cl = Math.floor, Hi = (e) => ({ + x: e, + y: e +}), bK = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}, xK = { + start: "end", + end: "start" +}; +function g0(e, t, n) { + return Br(e, Da(t, n)); +} +function Nc(e, t) { + return typeof e == "function" ? e(t) : e; +} +function Ia(e) { + return e.split("-")[0]; +} +function $c(e) { + return e.split("-")[1]; +} +function cD(e) { + return e === "x" ? "y" : "x"; +} +function r1(e) { + return e === "y" ? "height" : "width"; +} +function $s(e) { + return ["top", "bottom"].includes(Ia(e)) ? "y" : "x"; +} +function i1(e) { + return cD($s(e)); +} +function wK(e, t, n) { + n === void 0 && (n = !1); + const r = $c(e), i = i1(e), o = r1(i); + let a = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top"; + return t.reference[o] > t.floating[o] && (a = pp(a)), [a, pp(a)]; +} +function _K(e) { + const t = pp(e); + return [y0(e), t, y0(t)]; +} +function y0(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 = $c(e); + let o = SK(Ia(e), n === "start", r); + return i && (o = o.map((a) => a + "-" + i), t && (o = o.concat(o.map(y0)))), o; +} +function pp(e) { + return e.replace(/left|right|bottom|top/g, (t) => bK[t]); +} +function AK(e) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...e + }; +} +function uD(e) { + return typeof e != "number" ? AK(e) : { + top: e, + right: e, + bottom: e, + left: e + }; +} +function mp(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 TK = ["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])"], gp = /* @__PURE__ */ TK.join(","), fD = typeof Element > "u", Xl = fD ? function() { +} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, yp = !fD && 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; +}, vp = 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"; +}, CK = function(t, n, r) { + if (vp(t)) + return []; + var i = Array.prototype.slice.apply(t.querySelectorAll(gp)); + return n && Xl.call(t, gp) && 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 (!vp(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 = Xl.call(a, gp); + 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 = !vp(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; +}, dD = function(t) { + return !isNaN(parseInt(t.getAttribute("tabindex"), 10)); +}, hD = function(t) { + if (!t) + throw new Error("No node provided"); + return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || PK(t)) && !dD(t) ? 0 : t.tabIndex; +}, kK = function(t, n) { + var r = hD(t); + return r < 0 && n && !dD(t) ? 0 : r; +}, MK = function(t, n) { + return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex; +}, pD = function(t) { + return t.tagName === "INPUT"; +}, NK = function(t) { + return pD(t) && t.type === "hidden"; +}, $K = function(t) { + var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) { + return r.tagName === "SUMMARY"; + }); + return n; +}, DK = function(t, n) { + for (var r = 0; r < t.length; r++) + if (t[r].checked && t[r].form === n) + return t[r]; +}, IK = function(t) { + if (!t.name) + return !0; + var n = t.form || yp(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 = DK(i, t.form); + return !o || o === t; +}, RK = function(t) { + return pD(t) && t.type === "radio"; +}, jK = function(t) { + return RK(t) && !IK(t); +}, LK = function(t) { + var n, r = t && yp(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 = yp(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; +}, wT = function(t) { + var n = t.getBoundingClientRect(), r = n.width, i = n.height; + return r === 0 && i === 0; +}, BK = function(t, n) { + var r = n.displayCheck, i = n.getShadowRoot; + if (getComputedStyle(t).visibility === "hidden") + return !0; + var o = Xl.call(t, "details>summary:first-of-type"), a = o ? t.parentElement : t; + if (Xl.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 = yp(t); + if (l && !l.shadowRoot && i(l) === !0) + return wT(t); + t.assignedSlot ? t = t.assignedSlot : !l && c !== t.ownerDocument ? t = c.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 wT(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 < n.children.length; r++) { + var i = n.children.item(r); + if (i.tagName === "LEGEND") + return Xl.call(n, "fieldset[disabled] *") ? !0 : !i.contains(t); + } + return !0; + } + n = n.parentElement; + } + return !1; +}, WK = 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`) + vp(n) || NK(n) || BK(n, t) || // For a details element with a summary, the summary element gets the focus + $K(n) || FK(n)); +}, v0 = function(t, n) { + return !(jK(n) || hD(n) < 0 || !WK(t, n)); +}, zK = function(t) { + var n = parseInt(t.getAttribute("tabindex"), 10); + return !!(isNaN(n) || n >= 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), 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(MK).reduce(function(i, o) { + return o.isScope ? i.push.apply(i, o.content) : i.push(o.content), i; + }, []).concat(n); +}, rg = function(t, n) { + n = n || {}; + var r; + return n.getShadowRoot ? r = EK([t], n.includeContainer, { + filter: v0.bind(null, n), + flatten: !1, + getShadowRoot: n.getShadowRoot, + shadowRootFilter: zK + }) : r = CK(t, n.includeContainer, v0.bind(null, n)), VK(r); +}, UK = function(t, n) { + if (n = n || {}, !t) + throw new Error("No node provided"); + return Xl.call(t, gp) === !1 ? !1 : v0(n, t); +}; +function _T(e, t, n) { + let { + reference: r, + floating: i + } = e; + const o = $s(t), a = i1(t), s = r1(a), l = Ia(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 ($c(t)) { + case "start": + m[a] -= p * (n && c ? -1 : 1); + break; + case "end": + m[a] += p * (n && c ? -1 : 1); + break; + } + return m; +} +const HK = 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 + } = _T(c, r, l), p = r, m = {}, y = 0; + for (let g = 0; g < s.length; g++) { + const { + name: v, + fn: x + } = s[g], { + 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, + [v]: { + ...m[v], + ...A + } + }, _ && y <= 50 && (y++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (c = _.rects === !0 ? await a.getElementRects({ + reference: e, + floating: t, + strategy: i + }) : _.rects), { + x: f, + y: d + } = _T(c, p, l)), g = -1); + } + return { + x: f, + y: d, + placement: p, + strategy: i, + middlewareData: m + }; +}; +async function o1(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 + } = Nc(t, e), y = uD(m), v = s[p ? d === "floating" ? "reference" : "floating" : d], x = mp(await o.getClippingRect({ + element: (n = await (o.isElement == null ? void 0 : o.isElement(v))) == null || n ? v : v.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 + }, _ = mp(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({ + elements: s, + rect: w, + offsetParent: S, + strategy: l + }) : w); + return { + top: (x.top - _.top + y.top) / A.y, + bottom: (_.bottom - x.bottom + y.bottom) / A.y, + left: (x.left - _.left + y.left) / A.x, + right: (_.right - x.right + y.right) / A.x + }; +} +const KK = (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 + } = Nc(e, t) || {}; + if (c == null) + return {}; + const d = uD(f), p = { + x: n, + y: r + }, m = i1(i), y = r1(m), g = await a.getDimensions(c), v = m === "y", x = v ? "top" : "left", w = v ? "bottom" : "right", S = v ? "clientHeight" : "clientWidth", A = o.reference[y] + o.reference[m] - p[m] - o.floating[y], _ = p[m] - o.reference[m], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c)); + let P = O ? O[S] : 0; + (!P || !await (a.isElement == null ? void 0 : a.isElement(O))) && (P = s.floating[S] || o.floating[y]); + const C = A / 2 - _ / 2, k = P / 2 - g[y] / 2 - 1, D = Da(d[x], k), $ = Da(d[w], k), N = D, R = P - g[y] - $, L = P / 2 - g[y] / 2 + C, F = g0(N, L, R), W = !l.arrow && $c(i) != null && L !== F && o.reference[y] / 2 - (L < N ? D : $) - g[y] / 2 < 0, z = W ? L < N ? L - N : L - R : 0; + return { + [m]: p[m] + z, + data: { + [m]: F, + centerOffset: L - F - z, + ...W && { + alignmentOffset: z + } + }, + reset: W + }; + } +}), GK = 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: y = "none", + flipAlignment: g = !0, + ...v + } = Nc(e, t); + if ((n = o.arrow) != null && n.alignmentOffset) + return {}; + const x = Ia(i), w = $s(s), S = Ia(s) === s, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), _ = p || (S || !g ? [pp(s)] : _K(s)), O = y !== "none"; + !p && O && _.push(...OK(s, g, y, A)); + const P = [s, ..._], C = await o1(t, v), k = []; + let D = ((r = o.flip) == null ? void 0 : r.overflows) || []; + if (f && k.push(C[x]), d) { + const L = wK(i, a, A); + k.push(C[L[0]], C[L[1]]); + } + if (D = [...D, { + placement: i, + overflows: k + }], !k.every((L) => L <= 0)) { + var $, N; + const L = ((($ = o.flip) == null ? void 0 : $.index) || 0) + 1, F = P[L]; + if (F) + return { + data: { + index: L, + overflows: D + }, + reset: { + placement: F + } + }; + let W = (N = D.filter((z) => z.overflows[0] <= 0).sort((z, G) => z.overflows[1] - G.overflows[1])[0]) == null ? void 0 : N.placement; + if (!W) + switch (m) { + case "bestFit": { + var R; + const z = (R = D.filter((G) => { + if (O) { + const U = $s(G.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((G) => [G.placement, G.overflows.filter((U) => U > 0).reduce((U, V) => U + V, 0)]).sort((G, U) => G[1] - U[1])[0]) == null ? void 0 : R[0]; + z && (W = z); + break; + } + case "initialPlacement": + W = s; + break; + } + if (i !== W) + return { + reset: { + placement: W + } + }; + } + 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 = Ia(n), s = $c(n), l = $s(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, f = o && l ? -1 : 1, d = Nc(t, e); + let { + mainAxis: p, + crossAxis: m, + alignmentAxis: y + } = typeof d == "number" ? { + mainAxis: d, + crossAxis: 0, + alignmentAxis: null + } : { + mainAxis: d.mainAxis || 0, + crossAxis: d.crossAxis || 0, + alignmentAxis: d.alignmentAxis + }; + return s && typeof y == "number" && (m = s === "end" ? y * -1 : y), l ? { + x: m * f, + y: p * c + } : { + x: p * c, + 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: (v) => { + let { + x, + y: w + } = v; + return { + x, + y: w + }; + } + }, + ...l + } = Nc(e, t), c = { + x: n, + y: r + }, f = await o1(t, l), d = $s(Ia(i)), p = cD(d); + let m = c[p], y = c[d]; + if (o) { + const v = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", w = m + f[v], S = m - f[x]; + m = g0(w, m, S); + } + if (a) { + const v = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", w = y + f[v], S = y - f[x]; + y = g0(w, y, S); + } + const g = s.fn({ + ...t, + [p]: m, + [d]: y + }); + return { + ...g, + data: { + x: g.x - n, + y: g.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 = () => { + }, + ...c + } = Nc(e, t), f = await o1(t, c), d = Ia(i), p = $c(i), m = $s(i) === "y", { + width: y, + height: g + } = o.floating; + let v, x; + d === "top" || d === "bottom" ? (v = d, x = p === (await (a.isRTL == null ? void 0 : a.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (x = d, v = p === "end" ? "top" : "bottom"); + const w = g - f.top - f.bottom, S = y - f.left - f.right, A = Da(g - f[v], w), _ = Da(y - f[x], S), O = !t.middlewareData.shift; + let P = A, C = _; + if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = S), (r = t.middlewareData.shift) != null && r.enabled.y && (P = w), O && !p) { + const D = Br(f.left, 0), $ = Br(f.right, 0), N = Br(f.top, 0), R = Br(f.bottom, 0); + m ? C = y - 2 * (D !== 0 || $ !== 0 ? D + $ : Br(f.left, f.right)) : P = g - 2 * (N !== 0 || R !== 0 ? N + R : Br(f.top, f.bottom)); + } + await l({ + ...t, + availableWidth: C, + availableHeight: P + }); + const k = await a.getDimensions(s.floating); + return y !== k.width || g !== k.height ? { + reset: { + rects: !0 + } + } : {}; + } + }; +}; +function mD(e) { + const t = Hr(e); + let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0; + const i = pn(e), o = i ? e.offsetWidth : n, a = i ? e.offsetHeight : r, s = hp(n) !== o || hp(r) !== a; + return s && (n = o, r = a), { + width: n, + height: r, + $: s + }; +} +function a1(e) { + return Ct(e) ? e : e.contextElement; +} +function zl(e) { + const t = a1(e); + if (!pn(t)) + return Hi(1); + const n = t.getBoundingClientRect(), { + width: r, + height: i, + $: o + } = mD(t); + let a = (o ? hp(n.width) : n.width) / r, s = (o ? hp(n.height) : n.height) / i; + return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), { + x: a, + y: s + }; +} +const JK = /* @__PURE__ */ Hi(0); +function gD(e) { + const t = Or(e); + return !tg() || !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 !== Or(e) ? !1 : t; +} +function Ds(e, t, n, r) { + t === void 0 && (t = !1), n === void 0 && (n = !1); + const i = e.getBoundingClientRect(), o = a1(e); + let a = Hi(1); + t && (r ? Ct(r) && (a = zl(r)) : a = zl(e)); + const s = QK(o, n, r) ? gD(o) : Hi(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 && Ct(r) ? Or(r) : r; + let y = p, g = h0(y); + for (; g && r && m !== y; ) { + const v = zl(g), x = g.getBoundingClientRect(), w = Hr(g), S = x.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, A = x.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y; + l *= v.x, c *= v.y, f *= v.x, d *= v.y, l += S, c += A, y = Or(g), g = h0(y); + } + } + return mp({ + width: f, + height: d, + x: l, + y: c + }); +} +function s1(e, t) { + const n = ng(e).scrollLeft; + return t ? t.left + n : Ds(io(e)).left + n; +} +function yD(e, t, n) { + n === void 0 && (n = !1); + const r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : ( + // RTL scrollbar. + s1(e, r) + )), o = r.top + t.scrollTop; + return { + x: i, + y: o + }; +} +function eG(e) { + let { + elements: t, + rect: n, + offsetParent: r, + strategy: i + } = e; + const o = i === "fixed", a = io(r), s = t ? eg(t.floating) : !1; + if (r === a || s && o) + return n; + let l = { + scrollLeft: 0, + scrollTop: 0 + }, c = Hi(1); + const f = Hi(0), d = pn(r); + if ((d || !d && !o) && ((Wa(r) !== "body" || sd(a)) && (l = ng(r)), pn(r))) { + const m = Ds(r); + c = zl(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop; + } + const p = a && !d && !o ? yD(a, l, !0) : Hi(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 tG(e) { + return Array.from(e.getClientRects()); +} +function nG(e) { + const t = io(e), n = ng(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 + s1(e); + const s = -n.scrollTop; + return Hr(r).direction === "rtl" && (a += Br(t.clientWidth, r.clientWidth) - i), { + width: i, + height: o, + x: a, + y: s + }; +} +function rG(e, t) { + const n = Or(e), r = io(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 = tg(); + (!c || c && t === "fixed") && (s = i.offsetLeft, l = i.offsetTop); + } + return { + width: o, + height: a, + x: s, + y: l + }; +} +function iG(e, t) { + const n = Ds(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = pn(e) ? zl(e) : Hi(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 ST(e, t, n) { + let r; + if (t === "viewport") + r = rG(e, n); + else if (t === "document") + r = nG(io(e)); + else if (Ct(t)) + r = iG(t, n); + else { + const i = gD(e); + r = { + x: t.x - i.x, + y: t.y - i.y, + width: t.width, + height: t.height + }; + } + return mp(r); +} +function vD(e, t) { + const n = Bo(e); + return n === t || !Ct(n) || $a(n) ? !1 : Hr(n).position === "fixed" || vD(n, t); +} +function oG(e, t) { + const n = t.get(e); + if (n) + return n; + let r = Pa(e, [], !1).filter((s) => Ct(s) && Wa(s) !== "body"), i = null; + const o = Hr(e).position === "fixed"; + let a = o ? Bo(e) : e; + for (; Ct(a) && !$a(a); ) { + const s = Hr(a), l = Qw(a); + !l && s.position === "fixed" && (i = null), (o ? !l && !i : !l && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || sd(a) && !l && vD(e, a)) ? r = r.filter((f) => f !== a) : i = s, a = Bo(a); + } + return t.set(e, r), r; +} +function aG(e) { + let { + element: t, + boundary: n, + rootBoundary: r, + strategy: i + } = e; + const a = [...n === "clippingAncestors" ? eg(t) ? [] : oG(t, this._c) : [].concat(n), r], s = a[0], l = a.reduce((c, f) => { + const d = ST(t, f, i); + return c.top = Br(d.top, c.top), c.right = Da(d.right, c.right), c.bottom = Da(d.bottom, c.bottom), c.left = Br(d.left, c.left), c; + }, ST(t, s, i)); + return { + width: l.right - l.left, + height: l.bottom - l.top, + x: l.left, + y: l.top + }; +} +function sG(e) { + const { + width: t, + height: n + } = mD(e); + return { + width: t, + height: n + }; +} +function lG(e, t, n) { + const r = pn(t), i = io(t), o = n === "fixed", a = Ds(e, !0, o, t); + let s = { + scrollLeft: 0, + scrollTop: 0 + }; + const l = Hi(0); + if (r || !r && !o) + if ((Wa(t) !== "body" || sd(i)) && (s = ng(t)), r) { + const p = Ds(t, !0, o, t); + l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop; + } else i && (l.x = s1(i)); + const c = i && !r && !o ? yD(i, s) : Hi(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 Kv(e) { + return Hr(e).position === "static"; +} +function OT(e, t) { + if (!pn(e) || Hr(e).position === "fixed") + return null; + if (t) + return t(e); + let n = e.offsetParent; + return io(e) === n && (n = n.ownerDocument.body), n; +} +function bD(e, t) { + const n = Or(e); + if (eg(e)) + return n; + if (!pn(e)) { + let i = Bo(e); + for (; i && !$a(i); ) { + if (Ct(i) && !Kv(i)) + return i; + i = Bo(i); + } + return n; + } + let r = OT(e, t); + for (; r && hK(r) && Kv(r); ) + r = OT(r, t); + return r && $a(r) && Kv(r) && !Qw(r) ? n : r || pK(e) || n; +} +const cG = async function(e) { + const t = this.getOffsetParent || bD, n = this.getDimensions, r = await n(e.floating); + return { + reference: lG(e.reference, await t(e.floating), e.strategy), + floating: { + x: 0, + y: 0, + width: r.width, + height: r.height + } + }; +}; +function uG(e) { + return Hr(e).direction === "rtl"; +} +const fG = { + convertOffsetParentRelativeRectToViewportRelativeRect: eG, + getDocumentElement: io, + getClippingRect: aG, + getOffsetParent: bD, + getElementRects: cG, + getClientRects: tG, + getDimensions: sG, + getScale: zl, + isElement: Ct, + isRTL: uG +}; +function dG(e, t) { + let n = null, r; + const i = io(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 = Cl(f), y = Cl(i.clientWidth - (c + d)), g = Cl(i.clientHeight - (f + p)), v = Cl(c), w = { + rootMargin: -m + "px " + -y + "px " + -g + "px " + -v + "px", + threshold: Br(0, Da(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