????
Current Path : /home/multihiv/www/store/wp-content/plugins/header-footer-elementor/build/ |
Current File : /home/multihiv/www/store/wp-content/plugins/header-footer-elementor/build/main.js |
/*! For license information please see main.js.LICENSE.txt */ (()=>{var e,t,n={20:(e,t,n)=>{"use strict";var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},67:(e,t)=>{"use strict";t.YW=function(e,t={}){const{decode:p=decodeURIComponent,delimiter:h=n}=t,{regexp:m,keys:y}=function(e,t={}){const{delimiter:p=n,end:h=!0,sensitive:m=!1,trailing:y=!0}=t,g=[],v=[],b=m?"":"i",x=(Array.isArray(e)?e:[e]).map((e=>e instanceof u?e:function(e,t={}){const{encodePath:n=r}=t,l=new c(function*(e){const t=[...e];let n=0;function r(){let e="";if(o.test(t[++n]))for(e+=t[n];i.test(t[++n]);)e+=t[n];else if('"'===t[n]){let r=n;for(;n<t.length;){if('"'===t[++n]){n++,r=0;break}e+="\\"===t[n]?t[++n]:t[n]}if(r)throw new TypeError(`Unterminated quote at ${r}: ${a}`)}if(!e)throw new TypeError(`Missing parameter name at ${n}: ${a}`);return e}for(;n<t.length;){const e=t[n],o=s[e];if(o)yield{type:o,index:n++,value:e};else if("\\"===e)yield{type:"ESCAPED",index:n++,value:t[n++]};else if(":"===e){const e=r();yield{type:"PARAM",index:n,value:e}}else if("*"===e){const e=r();yield{type:"WILDCARD",index:n,value:e}}else yield{type:"CHAR",index:n,value:t[n++]}}return{type:"END",index:n,value:""}}(e)),d=function e(t){const r=[];for(;;){const o=l.text();o&&r.push({type:"text",value:n(o)});const i=l.tryConsume("PARAM");if(i){r.push({type:"param",name:i});continue}const a=l.tryConsume("WILDCARD");if(a)r.push({type:"wildcard",name:a});else{if(!l.tryConsume("{"))return l.consume(t),r;r.push({type:"group",tokens:e("}")})}}}("END");return new u(d)}(e,t)));for(const{tokens:e}of x)for(const t of d(e,0,[])){const e=f(t,p,g);v.push(e)}let w=`^(?:${v.join("|")})`;return y&&(w+=`(?:${l(p)}$)?`),w+=h?"$":`(?=${l(p)}|$)`,{regexp:new RegExp(w,b),keys:g}}(e,t),g=y.map((e=>!1===p?r:"param"===e.type?p:e=>e.split(h).map(p)));return function(e){const t=m.exec(e);if(!t)return!1;const n=t[0],r=Object.create(null);for(let e=1;e<t.length;e++){if(void 0===t[e])continue;const n=y[e-1],o=g[e-1];r[n.name]=o(t[e])}return{path:n,params:r}}};const n="/",r=e=>e,o=/^[$_\p{ID_Start}]$/u,i=/^[$\u200c\u200d\p{ID_Continue}]$/u,a="https://git.new/pathToRegexpError",s={"{":"{","}":"}","(":"(",")":")","[":"[","]":"]","+":"+","?":"?","!":"!"};function l(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class c{constructor(e){this.tokens=e}peek(){if(!this._peek){const e=this.tokens.next();this._peek=e.value}return this._peek}tryConsume(e){const t=this.peek();if(t.type===e)return this._peek=void 0,t.value}consume(e){const t=this.tryConsume(e);if(void 0!==t)return t;const{type:n,index:r}=this.peek();throw new TypeError(`Unexpected ${n} at ${r}, expected ${e}: ${a}`)}text(){let e,t="";for(;e=this.tryConsume("CHAR")||this.tryConsume("ESCAPED");)t+=e;return t}}class u{constructor(e){this.tokens=e}}function*d(e,t,n){if(t===e.length)return yield n;const r=e[t];if("group"===r.type){const o=n.slice();for(const n of d(r.tokens,0,o))yield*d(e,t+1,n)}else n.push(r);yield*d(e,t+1,n)}function f(e,t,n){let r="",o="",i=!0;for(let s=0;s<e.length;s++){const c=e[s];if("text"!==c.type)if("param"!==c.type&&"wildcard"!==c.type);else{if(!i&&!o)throw new TypeError(`Missing text after "${c.name}": ${a}`);"param"===c.type?r+=`(${p(t,i?"":o)}+)`:r+="([\\s\\S]+)",n.push(c),o="",i=!1}else r+=l(c.value),o+=c.value,i||(i=c.value.includes(t))}return r}function p(e,t){return t.length<2?e.length<2?`[^${l(e+t)}]`:`(?:(?!${l(e)})[^${l(t)}])`:e.length<2?`(?:(?!${l(t)})[^${l(e)}])`:`(?:(?!${l(t)}|${l(e)})[\\s\\S])`}},338:(e,t,n)=>{"use strict";var r=n(795);t.H=r.createRoot,r.hydrateRoot},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},848:(e,t,n)=>{"use strict";e.exports=n(20)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,i(n)))}return e}function i(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},992:(e,t)=>{"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,i,a=[];for(i in"string"!=typeof t&&(t="?"),e)if(n.call(e,i)){if((r=e[i])||null!=r&&!isNaN(r)||(r=""),i=o(i),r=o(r),null===i||null===r)continue;a.push(i+"="+r)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,o={};t=n.exec(e);){var i=r(t[1]),a=r(t[2]);null===i||null===a||i in o||(o[i]=a)}return o}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=o(338);const t=window.wp.domReady;var n=o.n(t);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var s=o(609),l=o.t(s,2),c=o.n(s);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function m(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const y=window.wp.element;var g,v=o(992);function b(e){return{path:e.pathname,hash:e.hash,query:v.parse(e.search)}}function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(null,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(g||(g={}));var w="beforeunload";function _(e){e.preventDefault(),e.returnValue=""}function S(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}var k=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,r=n.history;function o(){var e=n.location,t=e.pathname,o=e.search,i=e.hash,a=r.state||{};return[a.idx,{pathname:t,search:o,hash:i,state:a.usr||null,key:a.key||"default"}]}var i=null;n.addEventListener("popstate",(function(){if(i)d.call(i),i=null;else{var e=g.Pop,t=o(),n=t[0],r=t[1];if(d.length){if(null!=n){var a=l-n;a&&(i={action:e,location:r,retry:function(){v(-1*a)}},v(a))}}else y(e)}}));var a=g.Pop,s=o(),l=s[0],c=s[1],u=S(),d=S();function f(e){return"string"==typeof e?e:(n=(t=e).pathname,r=void 0===n?"/":n,o=t.search,i=void 0===o?"":o,a=t.hash,s=void 0===a?"":a,i&&"?"!==i&&(r+="?"===i.charAt(0)?i:"?"+i),s&&"#"!==s&&(r+="#"===s.charAt(0)?s:"#"+s),r);var t,n,r,o,i,a,s}function p(e,t){return void 0===t&&(t=null),x({pathname:c.pathname,hash:"",search:""},"string"==typeof e?function(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(e):e,{state:t,key:Math.random().toString(36).substr(2,8)})}function h(e,t){return[{usr:e.state,key:e.key,idx:t},f(e)]}function m(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function y(e){a=e;var t=o();l=t[0],c=t[1],u.call({action:a,location:c})}function v(e){r.go(e)}null==l&&(l=0,r.replaceState(x({},r.state,{idx:l}),""));var b={get action(){return a},get location(){return c},createHref:f,push:function e(t,o){var i=g.Push,a=p(t,o);if(m(i,a,(function(){e(t,o)}))){var s=h(a,l+1),c=s[0],u=s[1];try{r.pushState(c,"",u)}catch(e){n.location.assign(u)}y(i)}},replace:function e(t,n){var o=g.Replace,i=p(t,n);if(m(o,i,(function(){e(t,n)}))){var a=h(i,l),s=a[0],c=a[1];r.replaceState(s,"",c),y(o)}},go:v,back:function(){v(-1)},forward:function(){v(1)},listen:function(e){return u.push(e)},block:function(e){var t=d.push(e);return 1===d.length&&n.addEventListener(w,_),function(){t(),d.length||n.removeEventListener(w,_)}}};return b}(),E=wp.element.createContext({route:b(k.location)}),O=o(67),j=wp.element.useContext,P="";function C(e){var t=e.path,n=e.onRoute,r=e.children,o=j(E).route,i=(0,O.YW)("".concat(t))("".concat(o.hash.substr(1)));return i?(n&&(P!==i.path&&n(),P=i.path),React.createElement("div",null,wp.element.cloneElement(r,{route:i}))):null}var T=o(942),A=o.n(T);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var M=wp.element.useContext;function D(e){var t=e.to,n=e.onClick,r=e.children,o=e.activeClassName,i=M(E).route,a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete a.activeClassName,React.createElement("a",x({},a,{className:A()(m({},o,(0,O.YW)("".concat(t))("".concat(i.hash.substr(1)))),e.className),onClick:function(e){if(e.preventDefault(),i.path!==t||e.target.classList.contains("hfe-user-icon"))if(n&&n(e),"elementor-hf"===t&&hfeSettingsData.header_footer_builder)window.location.href=hfeSettingsData.header_footer_builder;else{var r=k.location.search,o=window.location.hash;if(r.includes("admin.php?page=hfe")&&o.includes(t))if(t.includes("settings")){var a=r+"&tab=1";e.target.classList.contains("hfe-user-icon")&&window.location.hash.includes("settings")?window.location.href="".concat(a,"#").concat(t):k.push("".concat(r,"#").concat(t))}else{var s=r.replace(/&tab=[^&]*/,"");k.push("".concat(s,"#").concat(t))}else window.location.href="".concat(hfeSettingsData.hfe_settings_url,"#").concat(t)}}}),r)}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}var R=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t,n){return t=p(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}(this,t,[e]),m(n,"handleRouteChange",(function(e){localStorage.setItem("hfeSelectedItemId","1");var t=b(null==e?void 0:e.location);n.setState({route:t})})),n.routes=Object.keys(e.routes).map((function(t){return e.routes[t].path})),n.unlisten=k.listen(n.handleRouteChange);var r=b(k.location),o=k.location.search;return n.state={route:r,defaultRoute:null!=e&&e.defaultRoute?"".concat(o,"#").concat(null==e?void 0:e.defaultRoute):"".concat(o,"#/")},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(t,e),function(e,t){return t&&f(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.unlisten()}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.NotFound,this.state),r=n.route,o=n.defaultRoute;if(!r.hash)return k.push(o),React.createElement("div",null);var i=!1;(this.routes||[]).forEach((function(e){var t=(0,O.YW)(r.hash.substr(1))("".concat(r.hash.substr(1)));t&&(i={name:e,data:t})}));var a={route:r,matched:i},s=!i;return React.createElement(E.Provider,{value:a},s?React.createElement("div",null,"Not found"):t)}}])}(y.Component),L=o(848),F=o(795),z=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function B(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W=Object.defineProperty,V=e=>{throw TypeError(e)},U=(e,t,n)=>((e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),$=(e,t,n)=>t.has(e)||V("Cannot "+n),H=(e,t,n)=>($(e,t,"read from private field"),n?n.call(e):t.get(e)),q=(e,t,n)=>t.has(e)?V("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),K=(e,t,n,r)=>($(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);const Y=e=>{const t=J(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),X(n,t)||Z(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},X=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?X(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;const a=e.join("-");return null==(n=t.validators.find((({validator:e})=>e(a))))?void 0:n.classGroupId},G=/^\[(.+)\]$/,Z=e=>{if(G.test(e)){const t=G.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},J=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return ne(Object.entries(e.classGroups),n).forEach((([e,n])=>{Q(n,r,e,t)})),r},Q=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return te(e)?void Q(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{Q(o,ee(t,e),n,r)}))}else(""===e?t:ee(t,e)).classGroupId=n}))},ee=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},te=e=>e.isThemeGetter,ne=(e,t)=>t?e.map((([e,n])=>{const r=n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e));return[e,r]})):e,re=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},oe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},ie=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},ae=/\s+/;function se(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=le(e))&&(r&&(r+=" "),r+=t);return r}const le=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=le(e[r]))&&(n&&(n+=" "),n+=t);return n};function ce(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:re(e.cacheSize),parseClassName:oe(e),...Y(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(ae);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const h=ie(l).join(":"),m=c?h+"!":h,y=m+p;if(i.includes(y))continue;i.push(y);const g=o(p,f);for(let e=0;e<g.length;++e){const t=g[e];i.push(m+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(se.apply(null,arguments))}}const ue=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},de=/^\[(?:([a-z-]+):)?(.+)\]$/i,fe=/^\d+\/\d+$/,pe=new Set(["px","full","screen"]),he=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=/\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$/,ye=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ge=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=e=>we(e)||pe.has(e)||fe.test(e),xe=e=>De(e,"length",Ie),we=e=>!!e&&!Number.isNaN(Number(e)),_e=e=>De(e,"number",we),Se=e=>!!e&&Number.isInteger(Number(e)),ke=e=>e.endsWith("%")&&we(e.slice(0,-1)),Ee=e=>de.test(e),Oe=e=>he.test(e),je=new Set(["length","size","percentage"]),Pe=e=>De(e,je,Re),Ce=e=>De(e,"position",Re),Te=new Set(["image","url"]),Ae=e=>De(e,Te,Fe),Ne=e=>De(e,"",Le),Me=()=>!0,De=(e,t,n)=>{const r=de.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Ie=e=>me.test(e)&&!ye.test(e),Re=()=>!1,Le=e=>ge.test(e),Fe=e=>ve.test(e),ze=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),o=ue("borderColor"),i=ue("borderRadius"),a=ue("borderSpacing"),s=ue("borderWidth"),l=ue("contrast"),c=ue("grayscale"),u=ue("hueRotate"),d=ue("invert"),f=ue("gap"),p=ue("gradientColorStops"),h=ue("gradientColorStopPositions"),m=ue("inset"),y=ue("margin"),g=ue("opacity"),v=ue("padding"),b=ue("saturate"),x=ue("scale"),w=ue("sepia"),_=ue("skew"),S=ue("space"),k=ue("translate"),E=()=>["auto",Ee,t],O=()=>[Ee,t],j=()=>["",be,xe],P=()=>["auto",we,Ee],C=()=>["","0",Ee],T=()=>[we,Ee];return{cacheSize:500,separator:":",theme:{colors:[Me],spacing:[be,xe],blur:["none","",Oe,Ee],brightness:T(),borderColor:[e],borderRadius:["none","","full",Oe,Ee],borderSpacing:O(),borderWidth:j(),contrast:T(),grayscale:C(),hueRotate:T(),invert:C(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[ke,xe],inset:E(),margin:E(),opacity:T(),padding:O(),saturate:T(),scale:T(),sepia:C(),skew:T(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[Oe]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Ee]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Se,Ee]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",Se,Ee]}],"grid-cols":[{"grid-cols":[Me]}],"col-start-end":[{col:["auto",{span:["full",Se,Ee]},Ee]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[Me]}],"row-start-end":[{row:["auto",{span:[Se,Ee]},Ee]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ee,t]}],"min-w":[{"min-w":[Ee,t,"min","max","fit"]}],"max-w":[{"max-w":[Ee,t,"none","full","min","max","fit","prose",{screen:[Oe]},Oe]}],h:[{h:[Ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Oe,xe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_e]}],"font-family":[{font:[Me]}],"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",Ee]}],"line-clamp":[{"line-clamp":["none",we,_e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",be,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",be,xe]}],"underline-offset":[{"underline-offset":["auto",be,Ee]}],"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:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],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",Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Ce]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ae]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","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":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[be,Ee]}],"outline-w":[{outline:[be,xe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:j()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[be,xe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oe,Ne]}],"shadow-color":[{shadow:[Me]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Oe,Ee]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"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":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"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",Ee]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Se,Ee]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],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",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[be,xe,_e]}],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"]}}},Be=ce(ze);function We(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=We(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ve(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=We(e))&&(r&&(r+=" "),r+=t);return r}const Ue=(...e)=>Be(Ve(...e)),$e=(...e)=>(...t)=>e.forEach((e=>null==e?void 0:e(...t))),He=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},qe={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"},Ke=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},Ye=e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.error(e),null}},Xe=(0,s.forwardRef)(((e,t)=>{const{variant:n="primary",size:r="md",type:o="button",tag:i="button",className:a,children:l,disabled:c=!1,destructive:u=!1,icon:d=null,iconPosition:f="left",loading:p=!1,...h}=e,m=p?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],g=u&&!c?{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]:"",v={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 b,x=null,w="";return d&&(w="flex items-center justify-center","left"===f?b=d:x=d),(0,L.jsxs)(i,{ref:t,type:o,className:Ue(w,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",v,y,g,m,{"cursor-default":c},a),disabled:c,...h,children:[(0,L.jsx)(s.Fragment,{children:b},"left-icon"),l?(0,L.jsx)("span",{className:"px-1",children:l}):null,(0,L.jsx)(s.Fragment,{children:x},"right-icon")]})}));Xe.displayName="Button";let Ge=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const Ze=(0,s.forwardRef)((({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...a},s)=>{const l={neutral:"",help:"font-normal",error:"font-normal",disabled:""};if(!e)return null;let c="";return i&&(c="after:content-['*'] after:text-field-required after:ml-0.5"),(0,L.jsx)(t,{ref:s,className:Ue("font-medium text-field-label flex items-center gap-0.5",{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"}[n],{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"}[o],c,null==l?void 0:l[o],r),...a,children:e})}));Ze.displayName="Label";const Je=({label:e,switchId:t,disabled:n=!1,children:r,size:o})=>{const i={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"},l={sm:"space-y-0.5",md:"space-y-1"};if((0,s.isValidElement)(e))return(0,L.jsxs)("div",{className:Ue("inline-flex items-center gap-3","items-start"),children:[r,e]});const c=!(null!=e&&e.heading||null!=e&&e.description),u=null!=e&&e.heading&&null!=e&&e.description?"items-start":"items-center";return c?r:(0,L.jsxs)("div",{className:Ue("inline-flex",u,"gap-3"),children:[r,(()=>{const{heading:r="",description:s=""}=e||{};return(0,L.jsxs)("div",{className:Ue("space-y-0.5",l[o]),children:[r&&(0,L.jsx)(Ze,{htmlFor:t,className:Ue("m-0",i[o]),...n&&{variant:"disabled"},children:r}),s&&(0,L.jsx)(Ze,{tag:"p",variant:"help",className:Ue("text-sm font-normal leading-5 m-0",a[o]),...n&&{variant:"disabled"},children:s})]})})()]})},Qe=(0,s.forwardRef)((({id:e,onChange:t,value:n,defaultValue:r=!1,size:o="sm",disabled:i=!1,label:a={heading:"",description:""},name:l,className:c,...u},d)=>{const f="lg"===o?"md":o,p=(0,s.useMemo)((()=>typeof n<"u"),[n]),h=(0,s.useMemo)((()=>e||`switch-${Ge()}`),[]),[m,y]=(0,s.useState)(r),g="primary",v=(0,s.useCallback)((()=>p?n:m),[p,n,m]),b={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"}},x={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"}};return(0,L.jsx)(Je,{label:a,switchId:h,disabled:i,size:f,children:(0,L.jsxs)("div",{className:Ue("relative group/switch inline-block cursor-pointer rounded-full shrink-0",x[f].container,c),children:[(0,L.jsx)("input",{ref:d,id:h,type:"checkbox",className:Ue("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]",b[g].input,i&&"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled",!i&&{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"}}[g].input),checked:v(),onChange:e=>{if(i)return;const n=e.target.checked;p||y(n),"function"==typeof t&&t(n)},disabled:i,name:l,...u}),(0,L.jsx)("label",{htmlFor:h,className:Ue("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",x[f].toggleDial,b[g].toggleDial,i&&"peer-disabled:cursor-not-allowed",!i&&{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"}[f])})]})})}));Qe.displayName="Switch";const et=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tt=(...e)=>e.filter(((e,t,n)=>!!e&&n.indexOf(e)===t)).join(" ");var nt={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"};const rt=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...nt,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:tt("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),ot=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>(0,s.createElement)(rt,{ref:o,iconNode:t,className:tt(`lucide-${et(e)}`,n),...r})));return n.displayName=`${e}`,n},it=ot("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),at=ot("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),st=ot("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),lt=ot("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),ct=ot("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),ut=(ot("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"}]]),ot("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"}]])),dt=(ot("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"}]]),ot("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"}]]),ot("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])),ft=ot("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),pt=ot("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),ht=ot("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"}]]),mt=ot("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"}]]),yt=ot("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),gt=ot("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),vt=ot("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"}]]),bt=(ot("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"}]]),ot("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"}]])),xt=ot("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"}]]),wt=ot("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"}]]),_t=ot("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),St=(0,s.forwardRef)((({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:o,indeterminate:i,disabled:a,size:l="md",className:c,...u},d)=>{var f,p;const h=(0,s.useMemo)((()=>e||`checkbox-${Ge()}`),[e]),m=(0,s.useMemo)((()=>typeof r<"u"),[r]),[y,g]=(0,s.useState)(n||!1),v="primary",b={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=(0,s.useCallback)((()=>m?r:y),[m,r,y]),_=(0,s.useCallback)((()=>(0,s.isValidElement)(t)?t:null!=t&&t.heading||null!=t&&t.description?(0,L.jsxs)("div",{className:b[l].gap,children:[(null==t?void 0:t.heading)&&(0,L.jsx)(Ze,{className:Ue("text-text-primary font-medium leading-4 m-0",b[l].text,b[l].gap,a&&"text-text-disabled"),htmlFor:h,children:null==t?void 0:t.heading}),(null==t?void 0:t.description)&&(0,L.jsx)(Ze,{tag:"p",className:Ue("font-normal leading-5 m-0",b[l].description,a&&"text-text-disabled"),variant:"help",children:null==t?void 0:t.description})]}):null),[t,l,a]);return(0,L.jsxs)("div",{className:Ue("inline-flex items-center justify-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[(0,L.jsxs)("label",{className:Ue("relative flex items-center justify-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:h,children:[(0,L.jsx)("input",{ref:d,id:h,type:"checkbox",className:Ue("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",x[v].checkbox,b[l].checkbox,a&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",c),checked:w(),onChange:e=>{if(a)return;const t=e.target.checked;m||g(t),"function"==typeof o&&o(t)},disabled:a,...u}),(0,L.jsx)("span",{className:Ue("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",x[v].icon,a&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:i?(0,L.jsx)(pt,{className:Ue(null==(f=b[l])?void 0:f.icon)}):(0,L.jsx)(it,{className:Ue(null==(p=b[l])?void 0:p.icon)})})]}),!!t&&_()]})}));St.displayName="Checkbox";const kt={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"}},Et={sm:"text-sm leading-5",md:"text-base leading-6"},Ot={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},jt={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},Pt={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"};function Ct(){return typeof window<"u"}function Tt(e){return Mt(e)?(e.nodeName||"").toLowerCase():"#document"}function At(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Nt(e){var t;return null==(t=(Mt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Mt(e){return!!Ct()&&(e instanceof Node||e instanceof At(e).Node)}function Dt(e){return!!Ct()&&(e instanceof Element||e instanceof At(e).Element)}function It(e){return!!Ct()&&(e instanceof HTMLElement||e instanceof At(e).HTMLElement)}function Rt(e){return!(!Ct()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof At(e).ShadowRoot)}function Lt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Ft(e){return["table","td","th"].includes(Tt(e))}function zt(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function Bt(e){const t=Wt(),n=Dt(e)?Ut(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Wt(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Vt(e){return["html","body","#document"].includes(Tt(e))}function Ut(e){return At(e).getComputedStyle(e)}function $t(e){return Dt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ht(e){if("html"===Tt(e))return e;const t=e.assignedSlot||e.parentNode||Rt(e)&&e.host||Nt(e);return Rt(t)?t.host:t}function qt(e){const t=Ht(e);return Vt(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&Lt(t)?t:qt(t)}function Kt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=At(o);if(i){const e=Yt(a);return t.concat(a,a.visualViewport||[],Lt(o)?o:[],e&&n?Kt(e):[])}return t.concat(o,Kt(o,[],n))}function Yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xt(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Gt(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Rt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Zt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Jt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Qt(e){return!(0!==e.mozInputSource||!e.isTrusted)||(nn()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function en(e){return!Jt().includes("jsdom/")&&(!nn()&&0===e.width&&0===e.height||nn()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function tn(){return/apple/i.test(navigator.vendor)}function nn(){const e=/android/i;return e.test(Zt())||e.test(Jt())}function rn(){return Zt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function on(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function an(e){return(null==e?void 0:e.ownerDocument)||document}function sn(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}function cn(e){return It(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function un(e){e.preventDefault(),e.stopPropagation()}function dn(e){return!!e&&"combobox"===e.getAttribute("role")&&cn(e)}const fn=Math.min,pn=Math.max,hn=Math.round,mn=Math.floor,yn=e=>({x:e,y:e}),gn={left:"right",right:"left",bottom:"top",top:"bottom"},vn={start:"end",end:"start"};function bn(e,t,n){return pn(e,fn(t,n))}function xn(e,t){return"function"==typeof e?e(t):e}function wn(e){return e.split("-")[0]}function _n(e){return e.split("-")[1]}function Sn(e){return"x"===e?"y":"x"}function kn(e){return"y"===e?"height":"width"}function En(e){return["top","bottom"].includes(wn(e))?"y":"x"}function On(e){return Sn(En(e))}function jn(e){return e.replace(/start|end/g,(e=>vn[e]))}function Pn(e){return e.replace(/left|right|bottom|top/g,(e=>gn[e]))}function Cn(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Tn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var An=["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])"].join(","),Nn=typeof Element>"u",Mn=Nn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Dn=!Nn&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},In=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Rn=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!In(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{Mn.call(a,An)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!In(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var d=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Ln=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Fn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Ln(e)?0:e.tabIndex},zn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Bn=function(e){return"INPUT"===e.tagName},Wn=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Vn=function(e,t){return!(t.disabled||In(t)||function(e){return Bn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Mn.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Mn.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Wn(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Dn(e);if(a&&!a.shadowRoot&&!0===r(a))return Wn(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Dn(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Dn(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Mn.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Un=function(e,t){return!(function(e){return function(e){return Bn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Dn(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if(typeof window<"u"&&typeof window.CSS<"u"&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||Fn(t)<0||!Vn(e,t))},$n=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Hn=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=Fn(e);return n<0&&t&&!Ln(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(zn).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},qn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Rn([e],t.includeContainer,{filter:Un.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$n}):function(e,t,n){if(In(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(An));return t&&Mn.call(e,An)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Un.bind(null,t)),Hn(n)};function Kn(e,t,n){let{reference:r,floating:o}=e;const i=En(t),a=On(t),s=kn(a),l=wn(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(_n(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Yn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=xn(t,e),h=Cn(p),m=s[f?"floating"===d?"reference":"floating":d],y=Tn(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=Tn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function Xn(e){const t=Ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=It(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=hn(n)!==i||hn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Gn(e){return Dt(e)?e:e.contextElement}function Zn(e){const t=Gn(e);if(!It(t))return yn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xn(t);let a=(i?hn(n.width):n.width)/r,s=(i?hn(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Jn=yn(0);function Qn(e){const t=At(e);return Wt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Jn}function er(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Gn(e);let a=yn(1);t&&(r?Dt(r)&&(a=Zn(r)):a=Zn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==At(e))&&t}(i,n,r)?Qn(i):yn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=At(i),t=r&&Dt(r)?At(r):r;let n=e,o=Yt(n);for(;o&&r&&t!==n;){const e=Zn(o),t=o.getBoundingClientRect(),r=Ut(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=At(o),o=Yt(n)}}return Tn({width:u,height:d,x:l,y:c})}function tr(e,t){const n=$t(e).scrollLeft;return t?t.left+n:er(Nt(e)).left+n}function nr(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:tr(e,r)),y:r.top+t.scrollTop}}function rr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=At(e),r=Nt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Wt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Nt(e),n=$t(e),r=e.ownerDocument.body,o=pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tr(e);const s=-n.scrollTop;return"rtl"===Ut(r).direction&&(a+=pn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Nt(e));else if(Dt(t))r=function(e,t){const n=er(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=It(e)?Zn(e):yn(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Qn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Tn(r)}function or(e,t){const n=Ht(e);return!(n===t||!Dt(n)||Vt(n))&&("fixed"===Ut(n).position||or(n,t))}function ir(e,t){const n=t.get(e);if(n)return n;let r=Kt(e,[],!1).filter((e=>Dt(e)&&"body"!==Tt(e))),o=null;const i="fixed"===Ut(e).position;let a=i?Ht(e):e;for(;Dt(a)&&!Vt(a);){const t=Ut(a),n=Bt(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Lt(a)&&!n&&or(e,a))?r=r.filter((e=>e!==a)):o=t,a=Ht(a)}return t.set(e,r),r}function ar(e,t,n){const r=It(t),o=Nt(t),i="fixed"===n,a=er(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=yn(0);if(r||!r&&!i)if(("body"!==Tt(t)||Lt(o))&&(s=$t(t)),r){const e=er(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=tr(o));const c=!o||r||i?yn(0):nr(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function sr(e){return"static"===Ut(e).position}function lr(e,t){if(!It(e)||"fixed"===Ut(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Nt(e)===n&&(n=n.ownerDocument.body),n}function cr(e,t){const n=At(e);if(zt(e))return n;if(!It(e)){let t=Ht(e);for(;t&&!Vt(t);){if(Dt(t)&&!sr(t))return t;t=Ht(t)}return n}let r=lr(e,t);for(;r&&Ft(r)&&sr(r);)r=lr(r,t);return r&&Vt(r)&&sr(r)&&!Bt(r)?n:r||function(e){let t=Ht(e);for(;It(t)&&!Vt(t);){if(Bt(t))return t;if(zt(t))return null;t=Ht(t)}return null}(e)||n}const ur={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Nt(r),s=!!t&&zt(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=yn(1);const u=yn(0),d=It(r);if((d||!d&&!i)&&(("body"!==Tt(r)||Lt(a))&&(l=$t(r)),It(r))){const e=er(r);c=Zn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?yn(0):nr(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:Nt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?zt(t)?[]:ir(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=rr(t,n,o);return e.top=pn(r.top,e.top),e.right=fn(r.right,e.right),e.bottom=fn(r.bottom,e.bottom),e.left=pn(r.left,e.left),e}),rr(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:cr,getElementRects:async function(e){const t=this.getOffsetParent||cr,n=this.getDimensions,r=await n(e.floating);return{reference:ar(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Xn(e);return{width:t,height:n}},getScale:Zn,isElement:Dt,isRTL:function(e){return"rtl"===Ut(e).direction}};function dr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Gn(e),u=o||i?[...c?Kt(c):[],...Kt(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Nt(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-mn(u)+"px "+-mn(o.clientWidth-(c+d))+"px "+-mn(o.clientHeight-(u+f))+"px "+-mn(c)+"px",threshold:pn(0,fn(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let h,m=l?er(e):null;return l&&function t(){const r=er(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const fr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=wn(n),s=_n(n),l="y"===En(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=xn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},pr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xn(e,t),c={x:n,y:r},u=await Yn(t,l),d=En(wn(o)),f=Sn(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=bn(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=bn(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},hr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=xn(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=wn(o),v=En(s),b=wn(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Pn(s)]:function(e){const t=Pn(e);return[jn(e),t,jn(t)]}(s)),_="none"!==h;!f&&_&&w.push(...function(e,t,n,r){const o=_n(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(wn(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(jn)))),i}(s,m,h,x));const S=[s,...w],k=await Yn(t,y),E=[];let O=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&E.push(k[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=_n(e),o=On(e),i=kn(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Pn(a)),[a,Pn(a)]}(o,a,x);E.push(k[e[0]],k[e[1]])}if(O=[...O,{placement:o,overflows:E}],!E.every((e=>e<=0))){var j,P;const e=((null==(j=i.flip)?void 0:j.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(P=O.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=O.filter((e=>{if(_){const t=En(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},mr=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=xn(e,t),u=await Yn(t,c),d=wn(o),f=_n(o),p="y"===En(o),{width:h,height:m}=i.floating;let y,g;"top"===d||"bottom"===d?(y=d,g=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,y="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,x=fn(m-u[y],v),w=fn(h-u[g],b),_=!t.middlewareData.shift;let S=x,k=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(k=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),_&&!f){const e=pn(u.left,0),t=pn(u.right,0),n=pn(u.top,0),r=pn(u.bottom,0);p?k=h-2*(0!==e||0!==t?e+t:pn(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:pn(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:S});const E=await a.getDimensions(s.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}},yr=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=xn(e,t)||{};if(null==c)return{};const d=Cn(u),f={x:n,y:r},p=On(o),h=kn(p),m=await a.getDimensions(c),y="y"===p,g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-f[p]-i.floating[h],w=f[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=_?_[b]:0;(!S||!await(null==a.isElement?void 0:a.isElement(_)))&&(S=s.floating[b]||i.floating[h]);const k=x/2-w/2,E=S/2-m[h]/2-1,O=fn(d[g],E),j=fn(d[v],E),P=O,C=S-m[h]-j,T=S/2-m[h]/2+k,A=bn(P,T,C),N=!l.arrow&&null!=_n(o)&&T!==A&&i.reference[h]/2-(T<P?O:j)-m[h]/2<0,M=N?T<P?T-P:T-C:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:T-A-M,...N&&{alignmentOffset:M}},reset:N}}});var gr=typeof document<"u"?s.useLayoutEffect:s.useEffect;function vr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!vr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||vr(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function br(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xr(e,t){const n=br(e);return Math.round(t*n)/n}function wr(e){const t=s.useRef(e);return gr((()=>{t.current=e})),t}const _r=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?yr({element:n.current,padding:r}).fn(t):{}:n?yr({element:n,padding:r}).fn(t):{}}}),Sr=(e,t)=>({...fr(e),options:[e,t]}),kr=(e,t)=>({...pr(e),options:[e,t]}),Er=(e,t)=>({...hr(e),options:[e,t]}),Or=(e,t)=>({...mr(e),options:[e,t]}),jr=(e,t)=>({..._r(e),options:[e,t]}),Pr={...l},Cr=Pr.useInsertionEffect||(e=>e());function Tr(e){const t=s.useRef((()=>{}));return Cr((()=>{t.current=e})),s.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}const Ar="ArrowUp",Nr="ArrowDown",Mr="ArrowLeft",Dr="ArrowRight";function Ir(e,t,n){return Math.floor(e/t)!==n}function Rr(e,t){return t<0||t>=e.current.length}function Lr(e,t){return zr(e,{disabledIndices:t})}function Fr(e,t){return zr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function zr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&Vr(a,s,o));return s}function Br(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function Wr(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function Vr(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var Ur=typeof document<"u"?s.useLayoutEffect:s.useEffect;function $r(){return $r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$r.apply(this,arguments)}let Hr=!1,qr=0;const Kr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+qr++,Yr=Pr.useId||function(){const[e,t]=s.useState((()=>Hr?Kr():void 0));return Ur((()=>{null==e&&t(Kr())}),[]),s.useEffect((()=>{Hr=!0}),[]),e},Xr=s.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:h,...m}={},...y}=e,g=Yr(),[v,b]=s.useState(!1);if(Ur((()=>{r&&"rtl"===Ut(r).direction&&b(!0)}),[r]),!r)return null;const[x,w]=n.split("-"),_="top"===x||"bottom"===x;let S=d;(_&&null!=i&&i.x||!_&&null!=i&&i.y)&&(S=null);const k=2*u,E=k/2,O=a/2*(c/-8+1),j=l/2*c/4,P=!!p,C=S&&"end"===w?"bottom":"top";let T=S&&"end"===w?"right":"left";S&&v&&(T="end"===w?"left":"right");const A=null!=(null==o?void 0:o.x)?S||o.x:"",N=null!=(null==o?void 0:o.y)?S||o.y:"",M=p||"M0,0 H"+a+" L"+(a-O)+","+(l-j)+" Q"+a/2+","+l+" "+O+","+(l-j)+" Z",D={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[x];return s.createElement("svg",$r({},y,{"aria-hidden":!0,ref:t,width:P?a:a+k,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[T]:A,[C]:N,[x]:_||P?"100%":"calc(100% - "+k/2+"px)",transform:[D,h].filter((e=>!!e)).join(" "),...m}}),k>0&&s.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),s.createElement("path",{stroke:k&&!p?y.fill:"none",d:M}),s.createElement("clipPath",{id:g},s.createElement("rect",{x:-E,y:E*(P?-1:1),width:a+k,height:a})))})),Gr=s.createContext(null),Zr=s.createContext(null),Jr=()=>{var e;return(null==(e=s.useContext(Gr))?void 0:e.id)||null},Qr=()=>s.useContext(Zr);function eo(e){return"data-floating-ui-"+e}function to(e){const t=(0,s.useRef)(e);return Ur((()=>{t.current=e})),t}const no=eo("safe-polygon");function ro(e,t,n){return n&&!on(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let oo=0;function io(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(oo);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():oo=requestAnimationFrame(i)}function ao(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let so=new WeakMap,lo=new WeakSet,co={},uo=0;const fo=e=>e&&(e.host||fo(e.parentNode));function po(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=an(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map((t=>{if(e.contains(t))return t;const n=fo(t);return e.contains(n)?n:null})).filter((e=>null!=e)))(t,e),s=new Set,l=new Set(a),c=[];co[o]||(co[o]=new WeakMap);const u=co[o];return a.forEach((function e(t){!t||s.has(t)||(s.add(t),t.parentNode&&e(t.parentNode))})),function e(t){!t||l.has(t)||[].forEach.call(t.children,(t=>{if("script"!==Tt(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(so.get(t)||0)+1,a=(u.get(t)||0)+1;so.set(t,r),u.set(t,a),c.push(t),1===r&&n&&lo.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),uo++,()=>{c.forEach((e=>{const t=(so.get(e)||0)-1,n=(u.get(e)||0)-1;so.set(e,t),u.set(e,n),t||(!lo.has(e)&&i&&e.removeAttribute(i),lo.delete(e)),n||e.removeAttribute(o)})),uo--,uo||(so=new WeakMap,so=new WeakMap,lo=new WeakSet,co={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ho=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function mo(e,t){const n=qn(e,ho());"prev"===t&&n.reverse();const r=n.indexOf(Xt(an(e)));return n.slice(r+1)[0]}function yo(){return mo(document.body,"next")}function go(){return mo(document.body,"prev")}function vo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Gt(n,r)}function bo(e){qn(e,ho()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function xo(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const wo={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};function _o(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const So=s.forwardRef((function(e,t){const[n,r]=s.useState();Ur((()=>(tn()&&r("button"),document.addEventListener("keydown",_o),()=>{document.removeEventListener("keydown",_o)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[eo("focus-guard")]:"",style:wo};return s.createElement("span",$r({},e,o))})),ko=s.createContext(null),Eo=eo("portal");function Oo(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Yr(),o=jo(),[i,a]=s.useState(null),l=s.useRef(null);return Ur((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{l.current=null}))}),[i]),Ur((()=>{if(!r||l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Eo,""),e.appendChild(n),l.current=n,a(n)}),[t,r]),Ur((()=>{if(null===n||!r||l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Dt(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const s=document.createElement("div");s.id=r,s.setAttribute(Eo,""),e=i||e,e.appendChild(s),l.current=s,a(s)}),[t,n,r,o]),i}({id:n,root:r}),[a,l]=s.useState(null),c=s.useRef(null),u=s.useRef(null),d=s.useRef(null),f=s.useRef(null),p=null==a?void 0:a.modal,h=null==a?void 0:a.open,m=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return s.useEffect((()=>{if(i&&o&&!p)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&vo(e)&&("focusin"===e.type?xo:bo)(i)}}),[i,o,p]),s.useEffect((()=>{i&&(h||xo(i))}),[h,i]),s.createElement(ko.Provider,{value:s.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:i,setFocusManagerState:l})),[o,i])},m&&i&&s.createElement(So,{"data-type":"outside",ref:c,onFocus:e=>{if(vo(e,i)){var t;null==(t=d.current)||t.focus()}else{const e=go()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),m&&i&&s.createElement("span",{"aria-owns":i.id,style:wo}),i&&F.createPortal(t,i),m&&i&&s.createElement(So,{"data-type":"outside",ref:u,onFocus:e=>{if(vo(e,i)){var t;null==(t=f.current)||t.focus()}else{const t=yo()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),null!=a&&a.closeOnFocusOut&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const jo=()=>s.useContext(ko),Po="data-floating-ui-focusable";function Co(e){return e?e.hasAttribute(Po)?e:e.querySelector("["+Po+"]")||e:null}let To=[];function Ao(e){To=To.filter((e=>e.isConnected));let t=e;if(t&&"body"!==Tt(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Mn.call(e,An)&&Un(t,e)}(t,ho())){const e=qn(t,ho())[0];e&&(t=e)}To.push(t),To.length>20&&(To=To.slice(-20))}}function No(){return To.slice().reverse().find((e=>e.isConnected))}const Mo=s.forwardRef((function(e,t){return s.createElement("button",$r({},e,{type:"button",ref:t,tabIndex:-1,style:wo}))}));function Do(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:l=!0,restoreFocus:c=!1,modal:u=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:f=!0}=e,{open:p,refs:h,nodeId:m,onOpenChange:y,events:g,dataRef:v,floatingId:b,elements:{domReference:x,floating:w}}=t,_="number"==typeof a&&a<0,S=dn(x)&&_,k=!(typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype)||i,E=to(o),O=to(a),j=to(l),P=Qr(),C=jo(),T=s.useRef(null),A=s.useRef(null),N=s.useRef(!1),M=s.useRef(!1),D=s.useRef(-1),I=null!=C,R=Co(w),L=Tr((function(e){return void 0===e&&(e=R),e?qn(e,ho()):[]})),F=Tr((e=>{const t=L(e);return E.current.map((e=>x&&"reference"===e?x:R&&"floating"===e?R:t)).filter(Boolean).flat()}));function z(e){return!r&&d&&u?s.createElement(Mo,{ref:"start"===e?T:A,onClick:e=>y(!1,e.nativeEvent)},"string"==typeof d?d:"Dismiss"):null}s.useEffect((()=>{if(r||!u)return;function e(e){if("Tab"===e.key){Gt(R,Xt(an(R)))&&0===L().length&&!S&&un(e);const t=F(),n=ln(e);"reference"===E.current[0]&&n===x&&(un(e),e.shiftKey?io(t[t.length-1]):io(t[1])),"floating"===E.current[1]&&n===R&&e.shiftKey&&(un(e),io(t[0]))}}const t=an(R);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,x,R,u,E,S,L,F]),s.useEffect((()=>{if(!r&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=ln(e),n=L().indexOf(t);-1!==n&&(D.current=n)}}),[r,w,L]),s.useEffect((()=>{if(!r&&f)return w&&It(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){M.current=!0,setTimeout((()=>{M.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(Gt(x,t)||Gt(w,t)||Gt(t,w)||Gt(null==C?void 0:C.portalNode,t)||null!=t&&t.hasAttribute(eo("focus-guard"))||P&&(ao(P.nodesRef.current,m).find((e=>{var n,r;return Gt(null==(n=e.context)?void 0:n.elements.floating,t)||Gt(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(P.nodesRef.current,m).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(c&&n&&Xt(an(R))===an(R).body){It(R)&&R.focus();const e=D.current,t=L(),n=t[e]||t[t.length-1]||R;It(n)&&n.focus()}(S||!u)&&t&&n&&!M.current&&t!==No()&&(N.current=!0,y(!1,e,"focus-out"))}))}}),[r,x,w,R,u,m,P,C,y,f,c,L,S]),s.useEffect((()=>{var e;if(r)return;const t=Array.from((null==C||null==(e=C.portalNode)?void 0:e.querySelectorAll("["+eo("portal")+"]"))||[]);if(w){const e=[w,...t,T.current,A.current,E.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=u||S?po(e,k,!k):po(e);return()=>{n()}}}),[r,x,w,u,E,C,S,k]),Ur((()=>{if(r||!It(R))return;const e=Xt(an(R));queueMicrotask((()=>{const t=F(R),n=O.current,r=("number"==typeof n?t[n]:n.current)||R,o=Gt(R,e);!_&&!o&&p&&io(r,{preventScroll:r===R})}))}),[r,p,R,_,F,O]),Ur((()=>{if(r||!R)return;let e=!1;const t=an(R),n=Xt(t);let o=v.current.openEvent;function i(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&h.domReference.current&&Ao(h.domReference.current),"hover"===r&&"mouseleave"===i.type&&(N.current=!0),"outside-press"===r&&(a?(N.current=!1,e=!0):N.current=!(Qt(i)||en(i)))}Ao(n),g.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,wo),I&&x&&x.insertAdjacentElement("afterend",a),()=>{g.off("openchange",i);const n=Xt(t),r=Gt(w,n)||P&&ao(P.nodesRef.current,m).some((e=>{var t;return Gt(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o&&["click","mousedown"].includes(o.type))&&h.domReference.current&&Ao(h.domReference.current);const s="boolean"==typeof j.current?No()||a:j.current.current||a;queueMicrotask((()=>{j.current&&!N.current&&It(s)&&(!(s!==n&&n!==t.body)||r)&&s.focus({preventScroll:e}),a.remove()}))}}),[r,w,R,j,v,h,g,P,m,I,x]),s.useEffect((()=>{queueMicrotask((()=>{N.current=!1}))}),[r]),Ur((()=>{if(!r&&C)return C.setFocusManagerState({modal:u,closeOnFocusOut:f,open:p,onOpenChange:y,refs:h}),()=>{C.setFocusManagerState(null)}}),[r,C,u,p,y,h,f]),Ur((()=>{if(r||!R||"function"!=typeof MutationObserver||_)return;const e=()=>{const e=R.getAttribute("tabindex"),t=L(),n=Xt(an(w)),r=t.indexOf(n);-1!==r&&(D.current=r),E.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&R.setAttribute("tabindex","0"):"-1"!==e&&R.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(R,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,w,R,h,E,L,_]);const B=!r&&k&&(!u||!S)&&(I||u);return s.createElement(s.Fragment,null,B&&s.createElement(So,{"data-type":"inside",ref:null==C?void 0:C.beforeInsideRef,onFocus:e=>{if(u){const e=F();io("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=C&&C.preserveTabOrder&&C.portalNode)if(N.current=!1,vo(e,C.portalNode)){const e=yo()||x;null==e||e.focus()}else{var t;null==(t=C.beforeOutsideRef.current)||t.focus()}}}),!S&&z("start"),n,z("end"),B&&s.createElement(So,{"data-type":"inside",ref:null==C?void 0:C.afterInsideRef,onFocus:e=>{if(u)io(F()[0]);else if(null!=C&&C.preserveTabOrder&&C.portalNode)if(f&&(N.current=!0),vo(e,C.portalNode)){const e=go()||x;null==e||e.focus()}else{var t;null==(t=C.afterOutsideRef.current)||t.focus()}}}))}function Io(e){return It(e.target)&&"BUTTON"===e.target.tagName}function Ro(e){return cn(e)}function Lo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:f=!0}=t,p=s.useRef(),h=s.useRef(!1),m=s.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(on(t,!0)&&u||(!n||!c||o.current.openEvent&&f&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:on(t,!0)&&u||(!n||!c||o.current.openEvent&&f&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,!e.defaultPrevented&&d&&!Io(e)&&(" "===e.key&&!Ro(i)&&(e.preventDefault(),h.current=!0),"Enter"===e.key&&r(!(n&&c),e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Io(e)||Ro(i)||" "===e.key&&h.current&&(h.current=!1,r(!(n&&c),e.nativeEvent,"click"))}})),[o,i,l,u,d,r,n,f,c]);return s.useMemo((()=>a?{reference:m}:{}),[a,m])}const Fo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},zo={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Bo=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Wo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,y=Qr(),g=Tr("function"==typeof c?c:()=>!1),v="function"==typeof c?g:c,b=s.useRef(!1),x=s.useRef(!1),{escapeKey:w,outsidePress:_}=Bo(h),{escapeKey:S,outsidePress:k}=Bo(m),E=s.useRef(!1),O=Tr((e=>{var t;if(!n||!a||!l||"Escape"!==e.key||E.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,s=y?ao(y.nodesRef.current,o):[];if(!w&&(e.stopPropagation(),s.length>0)){let e=!0;if(s.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),j=Tr((e=>{var t;const n=()=>{var t;O(e),null==(t=ln(e))||t.removeEventListener("keydown",n)};null==(t=ln(e))||t.addEventListener("keydown",n)})),P=Tr((e=>{var t;const n=b.current;b.current=!1;const a=x.current;if(x.current=!1,"click"===u&&a||n||"function"==typeof v&&!v(e))return;const s=ln(e),l="["+eo("inert")+"]",c=an(o.floating).querySelectorAll(l);let d=Dt(s)?s:null;for(;d&&!Vt(d);){const e=Ht(d);if(Vt(e)||!Dt(e))break;d=e}if(c.length&&Dt(s)&&!function(e){return e.matches("html,body")}(s)&&!Gt(s,o.floating)&&Array.from(c).every((e=>!Gt(d,e))))return;if(It(s)&&A){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===Ut(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=y&&ao(y.nodesRef.current,f).some((t=>{var n;return sn(e,null==(n=t.context)?void 0:n.elements.floating)}));if(sn(e,o.floating)||sn(e,o.domReference)||p)return;const h=y?ao(y.nodesRef.current,f):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),C=Tr((e=>{var t;const n=()=>{var t;P(e),null==(t=ln(e))||t.removeEventListener(u,n)};null==(t=ln(e))||t.addEventListener(u,n)}));s.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=_;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function s(){window.clearTimeout(e),E.current=!0}function c(){e=window.setTimeout((()=>{E.current=!1}),Wt()?5:0)}const d=an(o.floating);l&&(d.addEventListener("keydown",S?j:O,S),d.addEventListener("compositionstart",s),d.addEventListener("compositionend",c)),v&&d.addEventListener(u,k?C:P,k);let f=[];return p&&(Dt(o.domReference)&&(f=Kt(o.domReference)),Dt(o.floating)&&(f=f.concat(Kt(o.floating))),!Dt(o.reference)&&o.reference&&o.reference.contextElement&&(f=f.concat(Kt(o.reference.contextElement)))),f=f.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),f.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{l&&(d.removeEventListener("keydown",S?j:O,S),d.removeEventListener("compositionstart",s),d.removeEventListener("compositionend",c)),v&&d.removeEventListener(u,k?C:P,k),f.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,l,v,u,n,r,p,a,w,_,O,S,j,P,k,C]),s.useEffect((()=>{b.current=!1}),[v,u]);const T=s.useMemo((()=>({onKeyDown:O,[Fo[f]]:e=>{d&&r(!1,e.nativeEvent,"reference-press")}})),[O,r,d,f]),A=s.useMemo((()=>({onKeyDown:O,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[zo[u]]:()=>{b.current=!0}})),[O,u]);return s.useMemo((()=>a?{reference:T,floating:A}:{}),[a,T,A])}function Vo(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Yr(),i=s.useRef({}),[a]=s.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=Jr(),[c,u]=s.useState(r.reference),d=Tr(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),f=s.useMemo((()=>({setPositionReference:u})),[]),p=s.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return s.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:a,floatingId:o,refs:f})),[t,d,p,a,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=s.useState(null),[l,c]=s.useState(null),u=(null==o?void 0:o.domReference)||i,d=s.useRef(null),f=Qr();Ur((()=>{u&&(d.current=u)}),[u]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=s.useState(r);vr(p,r)||h(r);const[m,y]=s.useState(null),[g,v]=s.useState(null),b=s.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),x=s.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=i||m,_=a||g,S=s.useRef(null),k=s.useRef(null),E=s.useRef(d),O=null!=c,j=wr(c),P=wr(o),C=wr(u),T=s.useCallback((()=>{if(!S.current||!k.current)return;const e={placement:t,strategy:n,middleware:p};P.current&&(e.platform=P.current),((e,t,n)=>{const r=new Map,o={platform:ur,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Kn(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:y,y:g,data:v,reset:b}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,d=g??d,p={...p,[i]:{...p[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Kn(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})})(S.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==C.current};A.current&&!vr(E.current,t)&&(E.current=t,F.flushSync((()=>{f(t)})))}))}),[p,t,n,P,C]);gr((()=>{!1===u&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const A=s.useRef(!1);gr((()=>(A.current=!0,()=>{A.current=!1})),[]),gr((()=>{if(w&&(S.current=w),_&&(k.current=_),w&&_){if(j.current)return j.current(w,_,T);T()}}),[w,_,T,j,O]);const N=s.useMemo((()=>({reference:S,floating:k,setReference:b,setFloating:x})),[b,x]),M=s.useMemo((()=>({reference:w,floating:_})),[w,_]),D=s.useMemo((()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=xr(M.floating,d.x),r=xr(M.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...br(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,M.floating,d.x,d.y]);return s.useMemo((()=>({...d,update:T,refs:N,elements:M,floatingStyles:D})),[d,T,N,M,D])}({...e,elements:{...o,...l&&{reference:l}}}),h=s.useCallback((e=>{const t=Dt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)}),[p.refs]),m=s.useCallback((e=>{(Dt(e)||null===e)&&(d.current=e,a(e)),(Dt(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Dt(e))&&p.refs.setReference(e)}),[p.refs]),y=s.useMemo((()=>({...p.refs,setReference:m,setPositionReference:h,domReference:d})),[p.refs,m,h]),g=s.useMemo((()=>({...p.elements,domReference:u})),[p.elements,u]),v=s.useMemo((()=>({...p,...r,refs:y,elements:g,nodeId:t})),[p,y,g,t,r]);return Ur((()=>{r.dataRef.current.floatingContext=v;const e=null==f?void 0:f.nodesRef.current.find((e=>e.id===t));e&&(e.context=v)})),s.useMemo((()=>({...p,context:v,refs:y,elements:g})),[p,y,g,v])}const Uo="active",$o="selected";function Ho(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Uo]:t,[$o]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[Po]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>(t&&Object.entries(t).forEach((t=>{let[n,i]=t;if(!o||![Uo,$o].includes(n))if(0===n.indexOf("on")){var a;r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})}else e[n]=i})),e)),{})}}function qo(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=s.useCallback((t=>Ho(t,e,"reference")),t),i=s.useCallback((t=>Ho(t,e,"floating")),n),a=s.useCallback((t=>Ho(t,e,"item")),r);return s.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}let Ko=!1;function Yo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Xo(e,t){return Yo(t,e===Ar||e===Nr,e===Mr||e===Dr)}function Go(e,t,n){return Yo(t,e===Nr,n?e===Mr:e===Dr)||"Enter"===e||" "===e||""===e}function Zo(e,t,n){return Yo(t,n?e===Dr:e===Mr,e===Ar)}const Jo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Qo(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,l=null!=(n=Jo.get(a))?n:a,c=Yr(),u=null!=Jr(),d=s.useMemo((()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[l,o,u,r,c,a]),f=s.useMemo((()=>{const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}}),[l,o,c,a]),p=s.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return s.useMemo((()=>i?{reference:d,floating:f,item:p}:{}),[i,d,f,p])}const ei=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function ti(e,t){return"function"==typeof e?e(t):e}function ni(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,l=e.placement,c=l.split("-")[0],u=s.useMemo((()=>({side:c,placement:l})),[c,l]),d="number"==typeof a,f=(d?a:a.open)||0,p=(d?a:a.close)||0,[h,m]=s.useState((()=>({...ti(i,u),...ti(n,u)}))),{isMounted:y,status:g}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,l]=s.useState("unmounted"),c=function(e,t){const[n,r]=s.useState(e);return e&&!n&&r(!0),s.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,i);return!c&&"close"===a&&l("unmounted"),Ur((()=>{if(r){if(n){l("initial");const e=requestAnimationFrame((()=>{l("open")}));return()=>{cancelAnimationFrame(e)}}l("close")}}),[n,r]),{isMounted:c,status:a}}(e,{duration:a}),v=to(n),b=to(r),x=to(o),w=to(i);return Ur((()=>{const e=ti(v.current,u),t=ti(x.current,u),n=ti(w.current,u),r=ti(b.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===g&&m((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===g&&m({transitionProperty:Object.keys(r).map(ei).join(","),transitionDuration:f+"ms",...n,...r}),"close"===g){const r=t||e;m({transitionProperty:Object.keys(r).map(ei).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,x,v,b,w,f,g,u]),{isMounted:y,styles:h}}function ri(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function oi(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:p,tree:h}=e;return function(e){function m(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:y,clientY:g}=e,v=[y,g],b=ln(e),x="mouseleave"===e.type,w=Gt(d.floating,b),_=Gt(d.domReference,b),S=d.domReference.getBoundingClientRect(),k=d.floating.getBoundingClientRect(),E=u.split("-")[0],O=n>k.right-k.width/2,j=c>k.bottom-k.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,S),C=k.width>S.width,T=k.height>S.height,A=(C?S:k).left,N=(C?S:k).right,M=(T?S:k).top,D=(T?S:k).bottom;if(w&&(i=!0,!x))return;if(_&&(i=!1),_&&!x)return void(i=!0);if(x&&Dt(e.relatedTarget)&&Gt(d.floating,e.relatedTarget)||h&&ao(h.nodesRef.current,p).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===E&&c>=S.bottom-1||"bottom"===E&&c<=S.top+1||"left"===E&&n>=S.right-1||"right"===E&&n<=S.left+1)return m();let I=[];switch(E){case"top":I=[[A,S.top+1],[A,k.bottom-1],[N,k.bottom-1],[N,S.top+1]];break;case"bottom":I=[[A,k.top+1],[A,S.bottom-1],[N,S.bottom-1],[N,k.top+1]];break;case"left":I=[[k.right-1,D],[k.right-1,M],[S.left+1,M],[S.left+1,D]];break;case"right":I=[[S.right-1,D],[S.right-1,M],[k.left+1,M],[k.left+1,D]]}if(!ri([y,g],I)){if(i&&!P)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i)/r;return a=e,s=t,l=n,c}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}ri([y,g],function(e){let[n,r]=e;switch(E){case"top":return[[C?n+t/2:O?n+4*t:n-4*t,r+t+1],[C?n-t/2:O?n+4*t:n-4*t,r+t+1],[k.left,O||C?k.bottom-t:k.top],[k.right,O?C?k.bottom-t:k.top:k.bottom-t]];case"bottom":return[[C?n+t/2:O?n+4*t:n-4*t,r-t],[C?n-t/2:O?n+4*t:n-4*t,r-t],[k.left,O||C?k.top+t:k.bottom],[k.right,O?C?k.top+t:k.bottom:k.top+t]];case"left":{const e=[n+t+1,T?r+t/2:j?r+4*t:r-4*t],o=[n+t+1,T?r-t/2:j?r+4*t:r-4*t];return[[j||T?k.right-t:k.left,k.top],[j?T?k.right-t:k.left:k.right-t,k.bottom],e,o]}case"right":return[[n-t,T?r+t/2:j?r+4*t:r-4*t],[n-t,T?r-t/2:j?r+4*t:r-4*t],[j||T?k.left+t:k.right,k.top],[j?T?k.left+t:k.right:k.left+t,k.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const ii="light",ai="neutral",si=({icon:e,theme:t=ii,variant:n=ai})=>{var r;const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=ii,variant:t=ai})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,s.isValidElement)(e))return(0,s.cloneElement)(e,{className:Ue(o,i,(null==(r=null==e?void 0:e.props)?void 0:r.className)??"")});const a={neutral:(0,L.jsx)(dt,{className:Ue(o,i)}),info:(0,L.jsx)(dt,{className:Ue(o,i)}),success:(0,L.jsx)(it,{className:Ue(o,i)}),warning:(0,L.jsx)(bt,{className:Ue(o,i)}),error:(0,L.jsx)(vt,{className:Ue(o,i)})};return a[n]||a.neutral},li=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=ii})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,L.jsx)(Xe,{variant:"outline",size:"xs",onClick:t,className:Ue("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,L.jsx)(Xe,{variant:"link",size:"xs",onClick:t,className:Ue(o,i),children:n});default:return null}},ci=({theme:e=ii,title:t="",inline:n=!1})=>t?(0,L.jsx)("span",{className:Ue("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,ui=({theme:e=ii,content:t="",inline:n=!1})=>t?(0,L.jsx)("span",{className:Ue({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t}):null,di=(...e)=>t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))},fi=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:o=!1,open:i,setOpen:a,children:l,className:c,tooltipPortalRoot:u,tooltipPortalId:d,boundary:f="clippingAncestors",strategy:p="fixed",offset:h=8,triggers:m=["hover","focus"],interactive:y=!1})=>{const g=(0,s.useMemo)((()=>"boolean"==typeof i&&"function"==typeof a),[i,a]),[v,b]=(0,s.useState)(!1),x=(0,s.useRef)(null),{refs:w,floatingStyles:_,context:S}=Vo({open:g?i:v,onOpenChange:g?a:b,placement:t,strategy:p,middleware:[Sr(h),Er({boundary:f}),kr({boundary:f}),jr({element:x})],whileElementsMounted:dr}),k=Lo(S,{enabled:!g&&m.includes("click")}),E=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,h=Qr(),m=Jr(),y=to(u),g=to(c),v=to(n),b=s.useRef(),x=s.useRef(-1),w=s.useRef(),_=s.useRef(-1),S=s.useRef(!0),k=s.useRef(!1),E=s.useRef((()=>{})),O=s.useRef(!1),j=s.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);s.useEffect((()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(_.current),S.current=!0,O.current=!1)}}),[l,i]),s.useEffect((()=>{if(!l||!y.current||!n)return;function e(e){j()&&r(!1,e,"hover")}const t=an(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,l,y,j]);const P=s.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=ro(g.current,"close",b.current);o&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(x.current),r(!1,e,n))}),[g,r]),C=Tr((()=>{E.current(),w.current=void 0})),T=Tr((()=>{if(k.current){const e=an(a.floating).body;e.style.pointerEvents="",e.removeAttribute(no),k.current=!1}})),A=Tr((()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)));s.useEffect((()=>{if(l&&Dt(a.domReference)){var e;const r=a.domReference;return n&&r.addEventListener("mouseleave",s),null==(e=a.floating)||e.addEventListener("mouseleave",s),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",i),()=>{var e;n&&r.removeEventListener("mouseleave",s),null==(e=a.floating)||e.removeEventListener("mouseleave",s),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",i)}}function t(e){if(clearTimeout(x.current),S.current=!1,d&&!on(b.current)||f>0&&!ro(g.current,"open"))return;const t=ro(g.current,"open",b.current);t?x.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):n||r(!0,e,"hover")}function i(e){if(A())return;E.current();const t=an(a.floating);if(clearTimeout(_.current),O.current=!1,y.current&&o.current.floatingContext){n||clearTimeout(x.current),w.current=y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),C(),A()||P(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(E.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Gt(a.floating,e.relatedTarget))&&P(e)}function s(e){A()||o.current.floatingContext&&(null==y.current||y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),C(),A()||P(e)}})(e))}}),[a,l,e,d,f,p,P,C,T,r,n,v,h,g,y,o,A]),Ur((()=>{var e;if(l&&n&&null!=(e=y.current)&&e.__options.blockPointerEvents&&j()){k.current=!0;const e=a.floating;if(Dt(a.domReference)&&e){var t;const n=an(a.floating).body;n.setAttribute(no,"");const r=a.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===m)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[l,n,m,a,h,y,j]),Ur((()=>{n||(b.current=void 0,O.current=!1,C(),T())}),[n,C,T]),s.useEffect((()=>()=>{C(),clearTimeout(x.current),clearTimeout(_.current),T()}),[l,a.domReference,C,T]);const N=s.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){!S.current&&!v.current&&r(!0,t,"hover")}d&&!on(b.current)||n||0===f||O.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(_.current),"touch"===b.current?o():(O.current=!0,_.current=window.setTimeout(o,f)))}}}),[d,r,n,v,f]),M=s.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){A()||P(e.nativeEvent,!1)}})),[P,A]);return s.useMemo((()=>l?{reference:N,floating:M}:{}),[l,N,M])}(S,{move:!1,enabled:!g&&m.includes("hover"),...y&&{handleClose:oi()}}),O=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=s.useRef(!1),d=s.useRef(),f=s.useRef(!0);s.useEffect((()=>{if(!l)return;const e=At(a.domReference);function t(){!n&&It(a.domReference)&&a.domReference===Xt(an(a.domReference))&&(u.current=!0)}function r(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,l]),s.useEffect((()=>{if(l)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(u.current=!0)}}),[o,l]),s.useEffect((()=>()=>{clearTimeout(d.current)}),[]);const p=s.useMemo((()=>({onPointerDown(e){en(e.nativeEvent)||(f.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=ln(e.nativeEvent);if(c&&Dt(t))try{if(tn()&&rn())throw Error();if(!t.matches(":focus-visible"))return}catch{if(!f.current&&!cn(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Dt(t)&&t.hasAttribute(eo("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout((()=>{var e;const s=Xt(a.domReference?a.domReference.ownerDocument:document);!t&&s===a.domReference||Gt(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||Gt(a.domReference,s)||o||r(!1,n,"focus")}))}})),[i,a.domReference,r,c]);return s.useMemo((()=>l?{reference:p}:{}),[l,p])}(S,{enabled:!g&&m.includes("focus")}),j=Wo(S),P=Qo(S,{role:"tooltip"}),{getReferenceProps:C,getFloatingProps:T}=qo([k,E,O,j,P]),{isMounted:A,styles:N}=ni(S,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),M={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],D="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,L.jsxs)(s.Fragment,{children:[(0,s.isValidElement)(l)&&(0,L.jsx)(s.Fragment,{children:(0,s.cloneElement)(l,{ref:di(l.ref,w.setReference),className:Ue(l.props.className),...C()})},"tooltip-reference"),(0,L.jsx)(Oo,{id:d,root:u,children:A&&(0,L.jsxs)("div",{className:Ue("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",M,"max-w-80 w-fit",c),ref:w.setFloating,style:{..._,...N},...T(),children:[(0,L.jsxs)("div",{children:[!!n&&(0,L.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,L.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),o&&(0,L.jsx)(Xr,{ref:x,context:S,className:Ue("fill-current",D)})]})})]})};fi.displayName="Tooltip";const pi=(0,s.createContext)({}),hi=()=>(0,s.useContext)(pi),mi=({children:e,name:t,style:n="simple",size:r="md",value:o,defaultValue:i,by:a="id",as:l="div",onChange:c,className:u,disableGroup:d=!1,vertical:f=!1,columns:p=4,multiSelection:h=!1,gapClassName:m="gap-2"})=>{const y=(0,s.useMemo)((()=>typeof o<"u"),[o]),g=(0,s.useMemo)((()=>t||`radio-button-group-${Ge()}`),[t]);let v;v=y?o:h?i??[]:i;const[b,x]=(0,s.useState)(v),w=(0,s.useCallback)((e=>{if(h)x((t=>{let n;return n=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter((t=>t!==e)):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof c&&c(n),n}));else{if(y||x(e),"function"!=typeof c)return;c(e)}}),[c]);u=Ue("grid grid-cols-4",qe[p],m,"tile"===n&&"gap-0",f&&"grid-cols-1",u);const _=Ue("tile"===n?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",u),S=()=>(0,L.jsx)(pi.Provider,{value:{name:g,value:y?o:b,by:a,onChange:w,isControlled:y,disableAll:d,style:n,columns:p,multiSelection:h,size:r},children:s.Children.map(e,(e=>(0,s.isValidElement)(e)?e:null))});return(0,L.jsx)(L.Fragment,{children:"tile"===n?(0,L.jsx)("div",{className:_,children:S()}):(0,L.jsx)(l,{...l===s.Fragment?{}:{className:u},children:S()})})};mi.displayName="RadioButton.Group";const yi=(0,s.forwardRef)((({id:e,label:t,value:n,children:r,disabled:o,icon:i=null,inlineIcon:a=!1,hideSelection:l=!1,reversePosition:c=!1,borderOn:u=!1,borderOnActive:d=!0,badgeItem:f=null,useSwitch:p=!1,info:h,minWidth:m=!0,...y},g)=>{var v,b;const{buttonWrapperClasses:x,...w}=y,_=hi(),{name:S,value:k,by:E,onChange:O,disableAll:j,checked:P,multiSelection:C,size:T="md"}=_,A="primary",N=(0,s.useMemo)((()=>e||`radio-button-${Ge()}`),[e]),M=(0,s.useMemo)((()=>j||o),[j,o]),D=(0,s.useMemo)((()=>C?Array.isArray(k)&&k.includes(n):typeof P<"u"?P:typeof k==typeof n&&("string"==typeof k?k===n:Array.isArray(k)?k.includes(n):k[E]===n[E])),[k,n,P]),I=(0,s.useCallback)((()=>(0,s.isValidElement)(t)?t:null!=t&&t.heading?(0,L.jsxs)("div",{className:Ue(!a&&"space-y-1.5 mt-[2px]",c&&(p?"ml-10":"ml-4"),a&&"flex gap-2",a&&!t.description&&"items-center"),children:[i&&(0,L.jsx)(L.Fragment,{children:i}),(0,L.jsxs)("div",{className:Ue("space-y-1.5"),children:[(0,L.jsx)("p",{className:Ue("text-text-primary font-medium m-0",Et[T],o&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,L.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null),[t]);if("tile"===_.style)return(0,L.jsx)(gi,{id:e,label:t,value:n,disabled:o,size:T,children:r});const R=()=>{M||(C?p&&O(n,!D):O(n))};return(0,L.jsxs)("label",{className:Ue("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",m&&"min-w-[180px]",u&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",d&&u&&D&&"ring-2 ring-border-interactive","sm"===T?"px-3 py-3":"px-4 py-4","pr-12",M&&"cursor-not-allowed opacity-40",x),htmlFor:N,onClick:R,children:[!!t&&(0,L.jsx)("label",{className:Ue("cursor-pointer",M&&"cursor-not-allowed"),htmlFor:N,children:I()}),!!h&&(0,L.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,L.jsx)(fi,{title:null==h?void 0:h.heading,content:null==h?void 0:h.description,children:(0,L.jsx)(dt,{className:Ue("text-text-primary",null==(v=Ot[T])?void 0:v.info)})})}),(0,L.jsxs)("label",{className:Ue("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",c&&"left-0",M&&"cursor-not-allowed",a&&"mr-3",p?jt[T].switch:jt[T].radio),onClick:R,children:[!!f&&f,!l&&(p?(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Qe,{defaultValue:!1,size:T,onChange:()=>{C?O(n,!D):O(n)},checked:D,...w,"aria-label":(null==t?void 0:t.heading)??"Switch"})}):(0,L.jsxs)("span",{className:"relative p-0.5",children:[(0,L.jsx)("input",{ref:g,id:N,type:C?"checkbox":"radio",className:Ue("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",!C&&"rounded-full",kt[A].checkbox,Ot[T].checkbox,M&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:S,value:n,onChange:e=>O(e.target.value),checked:D,disabled:M,...w}),(0,L.jsx)("span",{className:Ue("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",kt[A].icon,M&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:C?(0,L.jsx)(it,{className:"sm"===T?"size-3":"size-4"}):(0,L.jsx)("div",{className:Ue("rounded-full bg-current","sm"===T&&"mt-[0.5px]",null==(b=Ot[T])?void 0:b.icon)})})]}))]})]})}));yi.displayName="RadioButton.Button";const gi=({id:e,children:t,value:n,disabled:r,size:o="md",...i})=>{const a=hi(),{name:l,value:c,by:u,onChange:d,disableAll:f,checked:p}=a||{},h=(0,s.useMemo)((()=>e||`radio-button-${Ge()}`),[e]),m=(0,s.useMemo)((()=>f||r),[f,r]),y=(0,s.useMemo)((()=>typeof p<"u"?p:typeof c==typeof n&&("string"==typeof c?c===n:Array.isArray(c)?c.includes(n):!(!c||!u)&&c[u]===n[u])),[c,n,p,u]),g=Ue("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",m?"text-text-disabled cursor-not-allowed":"",Pt[o],"border-0 border-r border-border-subtle border-solid");return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)("button",{type:"button",id:h,"aria-label":"Radio Button",className:Ue(g,"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",y&&"bg-button-disabled"),onClick:()=>{d&&d(n)},disabled:m,...i,children:[(0,L.jsx)("input",{type:"hidden",value:n,name:l,checked:y,onChange:e=>null==d?void 0:d(e.target.value)}),t]})})},vi=(Object.assign(yi,{Group:mi,Button:yi}),(0,s.forwardRef)((({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:u=!1},d)=>{const f={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 p="",h="group relative justify-center flex items-center cursor-pointer";const m={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(p=f.disabled,h+=" cursor-not-allowed disabled"):p=f[o],e?(0,L.jsxs)("span",{className:Ue("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",{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"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",p,!u&&{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"}[o],n),ref:d,children:[i?(0,L.jsx)("span",{className:Ue("justify-center flex items-center",m[t]),children:i}):null,(0,L.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,L.jsxs)("span",{className:Ue(h,m[t]),onMouseDown:c,role:"button",tabIndex:0,...!a&&{onClick:s},children:[(0,L.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,L.jsx)(_t,{}),(0,L.jsx)("span",{className:"absolute -inset-1"})]})]}):null})));vi.displayName="Badge";const bi=(0,s.forwardRef)((({id:e,defaultValue:t="",value:n,size:r="sm",className:o="",disabled:i=!1,onChange:a=()=>{},error:l=!1,onError:c=()=>{},...u},d)=>{const f=(0,s.useMemo)((()=>e||`input-textarea-${Ge()}`),[e]),p=(0,s.useMemo)((()=>typeof n<"u"),[n]),[h,m]=(0,s.useState)(t),y=(0,s.useCallback)((()=>p?n:h),[p,n,h]),g=i?"hover:border-border-disabled":"hover:border-border-strong",v=l?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,L.jsx)("textarea",{ref:d,id:f,className:Ue("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",i?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[r],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",g,v,o),disabled:i,onChange:e=>{if(i)return;const t=e.target.value;p||m(t),"function"==typeof a&&a(t)},onInvalid:c,value:y(),...u})}));bi.displayName="TextArea",(0,s.forwardRef)((({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:o,children:i,className:a,...l},c)=>{const[u,d]=(0,s.useState)(!1),f={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],p={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],h={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[r&&"none"===n?"subtle":n],m=r?"object-cover object-center":"",y=!r||u,g=y?"div":"img";return(0,s.useEffect)((()=>{d(!1)}),[r]),(0,L.jsx)(g,{ref:c,className:Ue("rounded-full overflow-hidden flex items-center justify-center",y&&f,p,h,m,a),...y?{children:(()=>{var e,t,n;if(r&&u){if(o&&"string"==typeof o)return null==(e=null==o?void 0:o[0])?void 0:e.toUpperCase();if(i&&"string"==typeof i)return null==(t=null==i?void 0:i[0])?void 0:t.toUpperCase();if(!i&&!o)return(0,L.jsx)(wt,{})}return i?"string"==typeof i?null==(n=null==i?void 0:i[0])?void 0:n.toUpperCase():i:null})()}:{src:r,alt:o,onError:()=>{d(!0)}},...l})}));const xi=(0,s.forwardRef)((({id:e,type:t="text",defaultValue:n="",value:r,size:o="sm",className:i="",disabled:a=!1,onChange:l=()=>{},error:c=!1,onError:u=()=>{},prefix:d=null,suffix:f=null,label:p="",...h},m)=>{const y=(0,s.useRef)(null),g=(0,s.useMemo)((()=>e||`input-${t}-${Ge()}`),[e]),v=(0,s.useMemo)((()=>typeof r<"u"),[r]),[b,x]=(0,s.useState)(n),[w,_]=(0,s.useState)(null),S=(0,s.useCallback)((()=>v?r:b),[v,r,b]),k=e=>{if(a)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?_(n[0].name):_(null)):n=e.target.value,!v&&"file"!==t&&x(n),"function"==typeof l&&l(n)},E=()=>{_(null),y.current&&(y.current.value=""),l(null)},O="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",j={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"},P={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},C={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},T={sm:d?"pl-8":"",md:d?"pl-9":"",lg:d?"pl-10":""},A={sm:f?"pr-8":"",md:f?"pr-9":"",lg:f?"pr-10":""},N=a?"hover:outline-border-disabled":"hover:outline-border-strong",M="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",D=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",I=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",R=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",F=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",z="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",B=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",W={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},V=(0,s.useMemo)((()=>p?(0,L.jsx)(Ze,{className:Ue(P[o]),htmlFor:g,...(null==h?void 0:h.required)&&{required:!0},children:p}):null),[p,o,g]),U=w?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,L.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[V,(0,L.jsxs)("div",{className:Ue("w-full relative flex focus-within:z-10",i),children:[(0,L.jsx)("input",{ref:di(y,m),id:g,type:"file",className:Ue(O,F,j[o],C[o],M,N,I,U),disabled:a,onChange:k,onInvalid:u,...h}),(0,L.jsx)("div",{className:Ue(B,"right-0 pr-3",W[o]),children:(0,L.jsx)(xt,{})})]})]}):(0,L.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[V,(0,L.jsxs)("div",{className:Ue("w-full relative flex focus-within:z-10",i),children:[d?(0,L.jsx)("div",{className:Ue(z,"left-0 pl-3",C[o]),children:d}):null,(0,L.jsx)("input",{ref:di(y,m),id:g,type:t,className:Ue(O,R,j[o],C[o],T[o],A[o],M,N,D),disabled:a,onChange:k,onInvalid:u,value:S(),...h}),"file"===t?w?(0,L.jsx)("div",{className:Ue(B,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",W[o]),onClick:E,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&E()},children:(0,L.jsx)(_t,{})}):(0,L.jsx)("div",{className:Ue(B,"right-0 pr-3",W[o]),children:(0,L.jsx)(xt,{})}):f?(0,L.jsx)("div",{className:Ue(z,"right-0 pr-3",C[o]),children:f}):null]})]})}));xi.displayName="Input";const wi=({title:e="",description:t="",icon:n=null,iconPosition:r="right",tag:o="h2",size:i="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=()=>(0,L.jsx)(o,{className:Ue("font-semibold p-0 m-0",{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"}[i]),children:e});return t?(0,L.jsxs)("div",{className:a,children:[(0,L.jsxs)("div",{children:[n&&"left"===r&&(0,L.jsxs)("div",{className:Ue("flex items-center",s[i]),children:[n,l()]}),n&&"right"===r&&(0,L.jsxs)("div",{className:Ue("flex items-center",s[i]),children:[l(),n]}),!n&&l()]}),(0,L.jsx)("p",{className:Ue("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[i]),children:t})]}):(0,L.jsxs)("div",{className:a,children:[n&&"left"===r&&(0,L.jsxs)("div",{className:Ue("flex items-center",s[i]),children:[n,l()]}),n&&"right"===r&&(0,L.jsxs)("div",{className:Ue("flex items-center",s[i]),children:[l(),n]}),!n&&l()]})},_i=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,L.jsx)("span",{className:Ue("flex",i,o,r),children:n||(0,L.jsx)(ft,{className:"animate-spin shrink-0"})})},Si=(0,s.createContext)({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),ki=(0,s.forwardRef)((({slug:e,text:t,icon:n,className:r,disabled:o=!1,isFirstChild:i,isLastChild:a,...l},c)=>{const u=s.useContext(Si);if(!u)throw new Error("Button should be used inside Button Group");const{activeItem:d,onChange:f,size:p,iconPosition:h}=u,m=Ue("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",o?"text-text-disabled cursor-not-allowed":"",{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"}[p],"border-0 border-r border-border-subtle border-solid",d===e?"bg-button-disabled":"",i?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",a?"rounded-tr rounded-br border-0":"",r);return(0,L.jsxs)("button",{ref:c,className:m,disabled:o,onClick:n=>{f({event:n,value:{slug:e,text:t}})},...l,children:["left"===h&&n&&(0,L.jsx)("span",{className:"mr-1",children:n}),t,"right"===h&&n&&(0,L.jsx)("span",{className:"ml-1",children:n})]})}));function Ei(e){if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Oi(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}ki.displayName="Button";const ji=e=>Array.isArray(e);function Pi(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Ci(e){return"string"==typeof e||Array.isArray(e)}function Ti(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function Ai(e,t,n,r){if("function"==typeof t){const[o,i]=Ti(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Ti(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function Ni(e,t,n){const r=e.getProps();return Ai(r,t,void 0!==n?n:r.custom,e)}const Mi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Di=["initial",...Mi],Ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ri=new Set(Ii),Li=e=>1e3*e,Fi=e=>e/1e3,zi={type:"spring",stiffness:500,damping:25,restSpeed:10},Bi={type:"keyframes",duration:.8},Wi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Vi=(e,{keyframes:t})=>t.length>2?Bi:Ri.has(e)?e.startsWith("scale")?(e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}))(t[1]):zi:Wi;function Ui(e,t){return e?e[t]||e.default||e:void 0}const $i=e=>null!==e;function Hi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter($i),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const qi=e=>e,Ki=["read","resolveKeyframes","update","preRender","render","postRender"];function Yi(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=Ki.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=a,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Ki.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<Ki.length;t++)a[Ki[t]].cancel(e)},state:o,steps:a}}const{schedule:Xi,cancel:Gi,state:Zi,steps:Ji}=Yi(typeof requestAnimationFrame<"u"?requestAnimationFrame:qi,!0),Qi=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function ea(e,t,n,r){if(e===t&&n===r)return qi;return o=>0===o||1===o?o:Qi((t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Qi(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n))(o),t,r)}const ta=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,na=e=>t=>1-e(1-t),ra=ea(.33,1.53,.69,.99),oa=na(ra),ia=ta(oa),aa=e=>(e*=2)<1?.5*oa(e):.5*(2-Math.pow(2,-10*(e-1))),sa=e=>1-Math.sin(Math.acos(e)),la=na(sa),ca=ta(sa),ua=e=>/^0[^.\s]+$/u.test(e);function da(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||ua(e)}let fa=qi,pa=qi;const ha=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ma=e=>t=>"string"==typeof t&&t.startsWith(e),ya=ma("--"),ga=ma("var(--"),va=e=>!!ga(e)&&ba.test(e.split("/*")[0].trim()),ba=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wa(e,t,n=1){pa(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=xa.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return ha(e)?parseFloat(e):e}return va(o)?wa(o,t,n+1):o}const _a=(e,t,n)=>n>t?t:n<e?e:n,Sa={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ka={...Sa,transform:e=>_a(0,1,e)},Ea={...Sa,default:1},Oa=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ja=Oa("deg"),Pa=Oa("%"),Ca=Oa("px"),Ta=Oa("vh"),Aa=Oa("vw"),Na={...Pa,parse:e=>Pa.parse(e)/100,transform:e=>Pa.transform(100*e)},Ma=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Da=e=>e===Sa||e===Ca,Ia=(e,t)=>parseFloat(e.split(", ")[t]),Ra=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return Ia(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?Ia(t[1],e):0}},La=new Set(["x","y","z"]),Fa=Ii.filter((e=>!La.has(e))),za={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:Ra(4,13),y:Ra(5,14)};za.translateX=za.x,za.translateY=za.y;const Ba=e=>t=>t.test(e),Wa=[Sa,Ca,Pa,ja,Aa,Ta,{test:e=>"auto"===e,parse:e=>e}],Va=e=>Wa.find(Ba(e)),Ua=new Set;let $a=!1,Ha=!1;function qa(){if(Ha){const e=Array.from(Ua).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return Fa.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Ha=!1,$a=!1,Ua.forEach((e=>e.complete())),Ua.clear()}function Ka(){Ua.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Ha=!0)}))}class Ya{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ua.add(this),$a||($a=!0,Xi.read(Ka),Xi.resolveKeyframes(qa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ua.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ua.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Xa=e=>Math.round(1e5*e)/1e5,Ga=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Za=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ja=(e,t)=>n=>!!("string"==typeof n&&Za.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qa=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(Ga);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},es={...Sa,transform:e=>Math.round((e=>_a(0,255,e))(e))},ts={test:Ja("rgb","red"),parse:Qa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+es.transform(e)+", "+es.transform(t)+", "+es.transform(n)+", "+Xa(ka.transform(r))+")"},ns={test:Ja("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ts.transform},rs={test:Ja("hsl","hue"),parse:Qa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Pa.transform(Xa(t))+", "+Pa.transform(Xa(n))+", "+Xa(ka.transform(r))+")"},os={test:e=>ts.test(e)||ns.test(e)||rs.test(e),parse:e=>ts.test(e)?ts.parse(e):rs.test(e)?rs.parse(e):ns.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ts.transform(e):rs.transform(e)},is=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,as="number",ss="color",ls=/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 cs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(ls,(e=>(os.test(e)?(r.color.push(i),o.push(ss),n.push(os.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(as),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function us(e){return cs(e).values}function ds(e){const{split:t,types:n}=cs(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===as?Xa(e[i]):t===ss?os.transform(e[i]):e[i]}return o}}const fs=e=>"number"==typeof e?0:e,ps={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Ga))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(is))||void 0===n?void 0:n.length)||0)>0},parse:us,createTransformer:ds,getAnimatableNone:function(e){const t=us(e);return ds(e)(t.map(fs))}},hs=new Set(["brightness","contrast","saturate","opacity"]);function ms(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Ga)||[];if(!r)return e;const o=n.replace(r,"");let i=hs.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const ys=/\b([a-z-]*)\(.*?\)/gu,gs={...ps,getAnimatableNone:e=>{const t=e.match(ys);return t?t.map(ms).join(" "):e}},vs={borderWidth:Ca,borderTopWidth:Ca,borderRightWidth:Ca,borderBottomWidth:Ca,borderLeftWidth:Ca,borderRadius:Ca,radius:Ca,borderTopLeftRadius:Ca,borderTopRightRadius:Ca,borderBottomRightRadius:Ca,borderBottomLeftRadius:Ca,width:Ca,maxWidth:Ca,height:Ca,maxHeight:Ca,top:Ca,right:Ca,bottom:Ca,left:Ca,padding:Ca,paddingTop:Ca,paddingRight:Ca,paddingBottom:Ca,paddingLeft:Ca,margin:Ca,marginTop:Ca,marginRight:Ca,marginBottom:Ca,marginLeft:Ca,backgroundPositionX:Ca,backgroundPositionY:Ca},bs={rotate:ja,rotateX:ja,rotateY:ja,rotateZ:ja,scale:Ea,scaleX:Ea,scaleY:Ea,scaleZ:Ea,skew:ja,skewX:ja,skewY:ja,distance:Ca,translateX:Ca,translateY:Ca,translateZ:Ca,x:Ca,y:Ca,z:Ca,perspective:Ca,transformPerspective:Ca,opacity:ka,originX:Na,originY:Na,originZ:Ca},xs={...Sa,transform:Math.round},ws={...vs,...bs,zIndex:xs,size:Ca,fillOpacity:ka,strokeOpacity:ka,numOctaves:xs},_s={...ws,color:os,backgroundColor:os,outlineColor:os,fill:os,stroke:os,borderColor:os,borderTopColor:os,borderRightColor:os,borderBottomColor:os,borderLeftColor:os,filter:gs,WebkitFilter:gs},Ss=e=>_s[e];function ks(e,t){let n=Ss(e);return n!==gs&&(n=ps),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Es=new Set(["auto","none","0"]);class Os extends Ya{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),va(r))){const o=wa(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ma.has(n)||2!==e.length)return;const[r,o]=e,i=Va(r),a=Va(o);if(i!==a)if(Da(i)&&Da(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)da(e[t])&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Es.has(t)&&cs(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=ks(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=za[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=za[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),!(null===(e=this.removedTransforms)||void 0===e)&&e.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function js(e){return"function"==typeof e}let Ps;function Cs(){Ps=void 0}const Ts={now:()=>(void 0===Ps&&Ts.set(Zi.isProcessing?Zi.timestamp:performance.now()),Ps),set:e=>{Ps=e,queueMicrotask(Cs)}},As=(e,t)=>"zIndex"!==t&&!("number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!ps.test(e)&&"0"!==e||e.startsWith("url(")));class Ns{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ts.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&(Ka(),qa()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ts.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=As(o,t),s=As(i,t);return fa(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||js(n))&&r)}(e,n,r,o)){if(!i)return null==s||s(Hi(e,this.options,t)),null==a||a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function Ms(e,t){return t?e*(1e3/t):0}function Ds(e,t,n){const r=Math.max(t-5,0);return Ms(n-e(r),t-r)}const Is=.001;const Rs=12;function Ls(e,t){return e*Math.sqrt(1-t*t)}const Fs=["duration","bounce"],zs=["stiffness","damping","mass"];function Bs(e,t){return t.some((t=>void 0!==e[t]))}function Ws({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,duration:u,velocity:d,isResolvedFromDuration:f}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Bs(e,zs)&&Bs(e,Fs)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;fa(e<=Li(10),"Spring duration must be 10 seconds or less");let a=1-t;a=_a(.05,1,a),e=_a(.01,10,Fi(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=Ls(t,a),l=Math.exp(-o);return Is-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Ls(Math.pow(t,2),a);return(-o(t)+Is>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-Is,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<Rs;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Li(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-Fi(r.velocity||0)}),p=d||0,h=l/(2*Math.sqrt(s*c)),m=i-o,y=Fi(Math.sqrt(s/c)),g=Math.abs(m)<5;let v;if(n||(n=g?.01:2),t||(t=g?.005:.5),h<1){const e=Ls(y,h);v=t=>{const n=Math.exp(-h*y*t);return i-n*((p+h*y*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)v=e=>i-Math.exp(-y*e)*(m+(p+y*m)*e);else{const e=y*Math.sqrt(h*h-1);v=t=>{const n=Math.exp(-h*y*t),r=Math.min(e*t,300);return i-n*((p+h*y*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:f&&u||null,next:e=>{const r=v(e);if(f)a.done=e>=u;else{let o=0;h<1&&(o=0===e?Li(p):Ds(v,e,r));const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function Vs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,y=void 0===a?m:a(m);y!==m&&(h=y-d);const g=e=>-h*Math.exp(-e/r),v=e=>y+g(e),b=e=>{const t=g(e),n=v(e);f.done=Math.abs(t)<=c,f.value=f.done?y:n};let x,w;const _=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(f.value)&&(x=e,w=Ws({keyframes:[f.value,p(f.value)],velocity:Ds(v,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return!w&&void 0===x&&(t=!0,b(e),_(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}const Us=ea(.42,0,1,1),$s=ea(0,0,.58,1),Hs=ea(.42,0,.58,1),qs=e=>Array.isArray(e)&&"number"==typeof e[0],Ks={linear:qi,easeIn:Us,easeInOut:Hs,easeOut:$s,circIn:sa,circInOut:ca,circOut:la,backIn:oa,backInOut:ia,backOut:ra,anticipate:aa},Ys=e=>{if(qs(e)){pa(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ea(t,n,r,o)}return"string"==typeof e?(pa(void 0!==Ks[e],`Invalid easing type '${e}'`),Ks[e]):e},Xs=(e,t)=>n=>t(e(n)),Gs=(...e)=>e.reduce(Xs),Zs=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Js=(e,t,n)=>e+(t-e)*n;function Qs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function el(e,t){return n=>n>0?t:e}const tl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},nl=[ns,ts,rs];function rl(e){const t=(e=>nl.find((t=>t.test(e))))(e);if(fa(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===rs&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Qs(s,r,e+1/3),i=Qs(s,r,e),a=Qs(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const ol=(e,t)=>{const n=rl(e),r=rl(t);if(!n||!r)return el(e,t);const o={...n};return e=>(o.red=tl(n.red,r.red,e),o.green=tl(n.green,r.green,e),o.blue=tl(n.blue,r.blue,e),o.alpha=Js(n.alpha,r.alpha,e),ts.transform(o))},il=new Set(["none","hidden"]);function al(e,t){return n=>Js(e,t,n)}function sl(e){return"number"==typeof e?al:"string"==typeof e?va(e)?el:os.test(e)?ol:ul:Array.isArray(e)?ll:"object"==typeof e?os.test(e)?ol:cl:el}function ll(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>sl(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function cl(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=sl(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const ul=(e,t)=>{const n=ps.createTransformer(t),r=cs(e),o=cs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?il.has(e)&&!o.values.length||il.has(t)&&!r.values.length?function(e,t){return il.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Gs(ll(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(fa(!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.`),el(e,t))};function dl(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Js(e,t,n):sl(e)(e,t)}function fl(e,t){return e.map((()=>t||Hs)).splice(0,e.length-1)}function pl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Ys):Ys(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Zs(0,t,r);e.push(Js(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(pa(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||dl,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||qi:t;i=Gs(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Zs(e[n],e[n+1],t);return a[n](r)};return n?t=>l(_a(e[0],e[i-1],t)):l}(a,t,{ease:Array.isArray(o)?o:fl(t,o)});return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const hl=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Xi.update(t,!0),stop:()=>Gi(t),now:()=>Zi.isProcessing?Zi.timestamp:Ts.now()}},ml={decay:Vs,inertia:Vs,tween:pl,keyframes:pl,spring:Ws},yl=e=>e/100;class gl extends Ns{constructor(e){super(e),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,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||Ya;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=js(t)?t:ml[t]||pl;let s,l;a!==pl&&"number"!=typeof e[0]&&(s=Gs(yl,dl(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:f,repeatType:p,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),g=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(f){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,f+1),!!(t%2)&&("reverse"===p?(n=1-n,h&&(n-=h/u)):"mirror"===p&&(b=i)),v=_a(0,1,n)*u}const x=g?{done:!1,value:s[0]}:b.next(v);a&&(x.value=a(x.value));let{done:w}=x;!g&&null!==l&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(x.value=Hi(s,this.options,r)),m&&m(x.value),_&&this.finish(),x}get duration(){const{resolved:e}=this;return e?Fi(e.calculatedDuration):0}get time(){return Fi(this.currentTime)}set time(e){e=Li(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Fi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=hl,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&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(e){return this.startTime=0,this.tick(e,!0)}}const vl=new Set(["opacity","clipPath","filter","transform"]);function bl(e){let t;return()=>(void 0===t&&(t=e()),t)}const xl={linearEasing:void 0};function wl(e,t){const n=bl(e);return()=>{var e;return null!==(e=xl[t])&&void 0!==e?e:n()}}const _l=wl((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}),"linearEasing");function Sl(e){return!!("function"==typeof e&&_l()||!e||"string"==typeof e&&(e in El||_l())||qs(e)||Array.isArray(e)&&e.every(Sl))}const kl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,El={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kl([0,.65,.55,1]),circOut:kl([.55,0,1,.45]),backIn:kl([.31,.01,.66,-.59]),backOut:kl([.33,1.53,.69,.99])};function Ol(e,t){if(e)return"function"==typeof e&&_l()?((e,t)=>{let n="";const r=Math.max(Math.round(t/10),2);for(let t=0;t<r;t++)n+=e(Zs(0,r-1,t))+", ";return`linear(${n.substring(0,n.length-2)})`})(e,t):qs(e)?kl(e):Array.isArray(e)?e.map((e=>Ol(e,t)||El.easeOut)):El[e]}function jl(e,t){e.timeline=t,e.onfinish=null}const Pl=bl((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Cl={anticipate:aa,backInOut:ia,circInOut:ca};class Tl extends Ns{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Os(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(null===(n=s.owner)||void 0===n||!n.current)return!1;if("string"==typeof i&&_l()&&function(e){return e in Cl}(i)&&(i=Cl[i]),function(e){return js(e.type)||"spring"===e.type||!Sl(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new gl({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),r=u.duration,o=u.times,i=u.ease,a="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Ol(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(s.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(jl(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(Hi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Fi(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Fi(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Li(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return qi;const{animation:n}=t;jl(n,e)}else this.pendingTimeline=e;return qi}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new gl({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),d=Li(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;return Pl()&&n&&vl.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const Al=bl((()=>void 0!==window.ScrollTimeline));class Nl{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>Al()&&n.attachTimeline?n.attachTimeline(e):t(n)));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Ml=(e,t,n,r={},o,i)=>a=>{const s=Ui(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Li(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...Vi(e,u)}),u.duration&&(u.duration=Li(u.duration)),u.repeatDelay&&(u.repeatDelay=Li(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=Hi(u.keyframes,s);if(void 0!==e)return Xi.update((()=>{u.onUpdate(e),u.onComplete()})),new Nl([])}return!i&&Tl.supports(u)?new Tl(u):new gl(u)},Dl=e=>ji(e)?e[e.length-1]||0:e;function Il(e,t){-1===e.indexOf(t)&&e.push(t)}function Rl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Ll{constructor(){this.subscriptions=[]}add(e){return Il(this.subscriptions,e),()=>Rl(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class Fl{constructor(e,t={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ts.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ts.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Ll);const n=this.events[e].add(t);return"change"===e?()=>{n(),Xi.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Ts.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Ms(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 zl(e,t){return new Fl(e,t)}function Bl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zl(n))}const Wl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vl="data-"+Wl("framerAppearId");function Ul(e){return e.props[Vl]}const $l=e=>!(!e||!e.getVelocity);function Hl(e,t){const n=e.getValue("willChange");if(function(e){return!(!$l(e)||!e.add)}(n))return n.add(t)}function ql({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Kl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&ql(u,t))continue;const s={delay:n,...Ui(a||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=Ul(e);if(n){const e=window.MotionHandoffAnimation(n,t,Xi);null!==e&&(s.startTime=e,d=!0)}}Hl(e,t),r.start(Ml(t,r,o,e.shouldReduceMotion&&Ri.has(t)?{type:!1}:s,e,d));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then((()=>{Xi.update((()=>{s&&function(e,t){const n=Ni(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Bl(e,t,Dl(i[t]))}(e,s)}))})),c}function Yl(e,t,n={}){var r;const o=Ni(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(Kl(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Xl).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(Yl(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function Xl(e,t){return e.sortNodePosition(t)}const Gl=Di.length;function Zl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Zl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Gl;n++){const r=Di[n],o=e.props[r];(Ci(o)||!1===o)&&(t[r]=o)}return t}const Jl=[...Mi].reverse(),Ql=Mi.length;function ec(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Yl(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Yl(e,t,n);else{const o="function"==typeof t?Ni(e,t,n.custom):t;r=Promise.all(Kl(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=rc(),r=!0;const o=t=>(n,r)=>{var o;const i=Ni(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=Zl(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Ql;t++){const f=Jl[t],p=n[f],h=void 0!==a[f]?a[f]:s[f],m=Ci(h),y=f===i?p.isActive:null;!1===y&&(d=t);let g=h===s[f]&&h!==a[f]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!h&&!p.prevProp||Oi(h)||"boolean"==typeof h)continue;const v=tc(p.prevProp,h);let b=v||f===i&&p.isActive&&!g&&m||t>d&&m,x=!1;const w=Array.isArray(h)?h:[h];let _=w.reduce(o(f),{});!1===y&&(_={});const{prevResolvedValues:S={}}=p,k={...S,..._},E=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=_[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ji(t)&&ji(n)?!Pi(t,n):t!==n,r?null!=t?E(e):c.add(e):void 0!==t&&c.has(e)?E(e):p.protectedKeys[e]=!0}p.prevProp=h,p.prevResolvedValues=_,p.isActive&&(u={...u,..._}),r&&e.blockInitialAnimation&&(b=!1),b&&(!g||!v||x)&&l.push(...w.map((e=>({animation:e,options:{type:f}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null})),l.push({animation:t})}let f=!!l.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=rc(),r=!0}}}function tc(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Pi(t,e)}function nc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rc(){return{animate:nc(!0),whileInView:nc(),whileHover:nc(),whileTap:nc(),whileDrag:nc(),whileFocus:nc(),exit:nc()}}class oc{constructor(e){this.isMounted=!1,this.node=e}update(){}}let ic=0;const ac={animation:{Feature:class extends oc{constructor(e){super(e),e.animationState||(e.animationState=ec(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Oi(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends oc{constructor(){super(...arguments),this.id=ic++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},sc=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function lc(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function cc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function uc(e,t,n,r){return cc(e,t,(e=>t=>sc(t)&&e(t,lc(t)))(n),r)}const dc=(e,t)=>Math.abs(e-t);class fc{constructor(e,t,{transformPagePoint:n,contextWindow:r,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 e=mc(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=dc(e.x,t.x),r=dc(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Zi;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=pc(t,this.transformPagePoint),Xi.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=mc("pointercancel"===e.type?this.lastMoveEventInfo:pc(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!sc(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=pc(lc(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=Zi;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,mc(i,this.history)),this.removeListeners=Gs(uc(this.contextWindow,"pointermove",this.handlePointerMove),uc(this.contextWindow,"pointerup",this.handlePointerUp),uc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Gi(this.updatePoint)}}function pc(e,t){return t?{point:t(e.point)}:e}function hc(e,t){return{x:e.x-t.x,y:e.y-t.y}}function mc({point:e},t){return{point:e,delta:hc(e,gc(t)),offset:hc(e,yc(t)),velocity:vc(t,.1)}}function yc(e){return e[0]}function gc(e){return e[e.length-1]}function vc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=gc(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Li(t)));)n--;if(!r)return{x:0,y:0};const i=Fi(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function bc(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const xc=bc("dragHorizontal"),wc=bc("dragVertical");function _c(e){let t=!1;if("y"===e)t=wc();else if("x"===e)t=xc();else{const e=xc(),n=wc();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Sc(){const e=_c(!0);return!e||(e(),!1)}function kc(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Ec(e){return e.max-e.min}function Oc(e,t,n,r=.5){e.origin=r,e.originPoint=Js(t.min,t.max,e.origin),e.scale=Ec(n)/Ec(t),e.translate=Js(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function jc(e,t,n,r){Oc(e.x,t.x,n.x,r?r.originX:void 0),Oc(e.y,t.y,n.y,r?r.originY:void 0)}function Pc(e,t,n){e.min=n.min+t.min,e.max=e.min+Ec(t)}function Cc(e,t,n){e.min=t.min-n.min,e.max=e.min+Ec(t)}function Tc(e,t,n){Cc(e.x,t.x,n.x),Cc(e.y,t.y,n.y)}function Ac(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Nc(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Mc=.35;function Dc(e,t,n){return{min:Ic(e,t),max:Ic(e,n)}}function Ic(e,t){return"number"==typeof e?e:e[t]||0}const Rc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Lc(e){return[e("x"),e("y")]}function Fc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function zc(e){return void 0===e||1===e}function Bc({scale:e,scaleX:t,scaleY:n}){return!zc(e)||!zc(t)||!zc(n)}function Wc(e){return Bc(e)||Vc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vc(e){return Uc(e.x)||Uc(e.y)}function Uc(e){return e&&"0%"!==e}function $c(e,t,n){return n+t*(e-n)}function Hc(e,t,n,r,o){return void 0!==o&&(e=$c(e,o,r)),$c(e,n,r)+t}function qc(e,t=0,n=1,r,o){e.min=Hc(e.min,t,n,r,o),e.max=Hc(e.max,t,n,r,o)}function Kc(e,{x:t,y:n}){qc(e.x,t.translate,t.scale,t.originPoint),qc(e.y,n.translate,n.scale,n.originPoint)}const Yc=.999999999999,Xc=1.0000000000001;function Gc(e,t){e.min=e.min+t,e.max=e.max+t}function Zc(e,t,n,r,o=.5){qc(e,t,n,Js(e.min,e.max,o),r)}function Jc(e,t){Zc(e.x,t.x,t.scaleX,t.scale,t.originX),Zc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Qc(e,t){return Fc(function(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}}(e.getBoundingClientRect(),t))}const eu=({current:e})=>e?e.ownerDocument.defaultView:null,tu=new WeakMap;class nu{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new fc(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(lc(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=_c(n),!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),Lc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Pa.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Ec(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Xi.postRender((()=>o(e,t))),Hl(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Lc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:eu(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Xi.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!ru(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Js(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Js(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&kc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ac(e.x,n,o),y:Ac(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Mc){return!1===e?e=0:!0===e&&(e=Mc),{x:Dc(e,"left","right"),y:Dc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Lc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!kc(e))return!1;const n=e.current;pa(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Qc(e,n),{scroll:o}=t;return o&&(Gc(r.x,o.offset.x),Gc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Nc(e.x,t.x),y:Nc(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=Fc(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=Lc((a=>{if(!ru(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Hl(this.visualElement,e),n.start(Ml(e,n,0,t,this.visualElement,!1))}stopAnimation(){Lc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Lc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Lc((t=>{const{drag:n}=this.getProps();if(!ru(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Js(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!kc(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Lc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ec(e),o=Ec(t);return o>r?n=Zs(t.min,t.max-r,e.min):r>o&&(n=Zs(e.min,e.max-o,t.min)),_a(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Lc((t=>{if(!ru(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Js(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;tu.set(this.visualElement,this);const e=uc(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();kc(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Xi.read(t);const o=cc(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Lc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Mc,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function ru(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ou=e=>(t,n)=>{e&&Xi.postRender((()=>e(t,n)))},iu=(0,s.createContext)(null),au=(0,s.createContext)({}),su=(0,s.createContext)({}),lu={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function cu(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const uu={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Ca.test(e))return e;e=parseFloat(e)}return`${cu(e,t.target.x)}% ${cu(e,t.target.y)}%`}},du={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ps.parse(e);if(o.length>5)return r;const i=ps.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Js(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},fu={},{schedule:pu,cancel:hu}=Yi(queueMicrotask,!1);class mu extends s.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;(function(e){Object.assign(fu,e)})(gu),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),lu.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i&&(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Xi.postRender((()=>{const e=i.getStack();(!e||!e.members.length)&&this.safeToRemove()})))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pu.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function yu(e){const[t,n]=function(){const e=(0,s.useContext)(iu);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,s.useId)();(0,s.useEffect)((()=>r(o)),[]);const i=(0,s.useCallback)((()=>n&&n(o)),[o,n]);return!t&&n?[!1,i]:[!0]}(),r=(0,s.useContext)(au);return(0,L.jsx)(mu,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(su),isPresent:t,safeToRemove:n})}const gu={borderRadius:{...uu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:uu,borderTopRightRadius:uu,borderBottomLeftRadius:uu,borderBottomRightRadius:uu,boxShadow:du},vu=["TopLeft","TopRight","BottomLeft","BottomRight"],bu=vu.length,xu=e=>"string"==typeof e?parseFloat(e):e,wu=e=>"number"==typeof e||Ca.test(e);function _u(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Su=Eu(0,.5,la),ku=Eu(.5,.95,qi);function Eu(e,t,n){return r=>r<e?0:r>t?1:n(Zs(e,t,r))}function Ou(e,t){e.min=t.min,e.max=t.max}function ju(e,t){Ou(e.x,t.x),Ou(e.y,t.y)}function Pu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Cu(e,t,n,r,o){return e=$c(e-=t,1/n,r),void 0!==o&&(e=$c(e,1/o,r)),e}function Tu(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(Pa.test(t)&&(t=parseFloat(t),t=Js(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=Js(i.min,i.max,r);e===i&&(s-=t),e.min=Cu(e.min,t,n,s,o),e.max=Cu(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const Au=["x","scaleX","originX"],Nu=["y","scaleY","originY"];function Mu(e,t,n,r){Tu(e.x,t,Au,n?n.x:void 0,r?r.x:void 0),Tu(e.y,t,Nu,n?n.y:void 0,r?r.y:void 0)}function Du(e){return 0===e.translate&&1===e.scale}function Iu(e){return Du(e.x)&&Du(e.y)}function Ru(e,t){return e.min===t.min&&e.max===t.max}function Lu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fu(e,t){return Lu(e.x,t.x)&&Lu(e.y,t.y)}function zu(e){return Ec(e.x)/Ec(e.y)}function Bu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Wu{constructor(){this.members=[]}add(e){Il(this.members,e),e.scheduleRender()}remove(e){if(Rl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Vu=(e,t)=>e.depth-t.depth;class Uu{constructor(){this.children=[],this.isDirty=!1}add(e){Il(this.children,e),this.isDirty=!0}remove(e){Rl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Vu),this.isDirty=!1,this.children.forEach(e)}}function $u(e){const t=$l(e)?e.get():e;return(e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const Hu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},qu=typeof window<"u"&&void 0!==window.MotionDebug,Ku=["","X","Y","Z"],Yu={visibility:"hidden"};let Xu=0;function Gu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Zu(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ul(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Xi,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Zu(r)}function Ju({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Xu++,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,qu&&(Hu.totalNodes=Hu.resolvedTargetDeltas=Hu.recalculatedProjection=0),this.nodes.forEach(td),this.nodes.forEach(ld),this.nodes.forEach(cd),this.nodes.forEach(nd),qu&&window.MotionDebug.record(Hu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Uu)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Ll),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=function(e){return e instanceof SVGElement&&"svg"!==e.tagName}(t),this.instance=t;const{layoutId:r,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=Ts.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(Gi(n),e(o-250))};return Xi.read(n,!0),()=>Gi(n)}(r),lu.hasAnimatedSinceResize&&(lu.hasAnimatedSinceResize=!1,this.nodes.forEach(sd))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||md,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!Fu(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...Ui(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||sd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Gi(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(ud),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Zu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(od);this.isUpdating||this.nodes.forEach(id),this.isUpdating=!1,this.nodes.forEach(ad),this.nodes.forEach(Qu),this.nodes.forEach(ed),this.clearAllSnapshots();const e=Ts.now();Zi.delta=_a(0,1e3/60,e-Zi.timestamp),Zi.timestamp=e,Zi.isProcessing=!0,Ji.update.process(Zi),Ji.preRender.process(Zi),Ji.render.process(Zi),Zi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(rd),this.sharedNodes.forEach(dd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xi.postRender((()=>{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 e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Iu(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Wc(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),function(e){vd(e.x),vd(e.y)}(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(xd)){const{scroll:e}=this.root;e&&(Gc(n.x,e.offset.x),Gc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(ju(n,e),null!==(t=this.scroll)&&void 0!==t&&t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&ju(n,e),Gc(n.x,o.offset.x),Gc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};ju(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Jc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Wc(r.latestValues)&&Jc(n,r.latestValues)}return Wc(this.latestValues)&&Jc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};ju(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance||!Wc(n.latestValues))continue;Bc(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};ju(r,n.measurePageBox()),Mu(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Wc(this.latestValues)&&Mu(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Zi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=!!this.resumingFrom||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||null!==(t=this.parent)&&void 0!==t&&t.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Zi.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Tc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ju(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(e,t,n){Pc(e.x,t.x,n.x),Pc(e.y,t.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ju(this.target,this.layout.layoutBox),Kc(this.target,this.targetDelta)):ju(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Tc(this.relativeTargetOrigin,this.target,e.target),ju(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}qu&&Hu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Bc(this.parent.latestValues)&&!Vc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){var e;const t=this.getLead(),n=!!this.resumingFrom||this!==t;let r=!0;if((this.isProjectionDirty||!(null===(e=this.parent)||void 0===e)&&e.isProjectionDirty)&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Zi.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;ju(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;(function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Jc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Kc(e,a)),r&&Wc(i.latestValues)&&Jc(e,i.latestValues))}t.x<Xc&&t.x>Yc&&(t.x=1),t.y<Xc&&t.y>Yc&&(t.y=1)})(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Pu(this.prevProjectionDelta.x,this.projectionDelta.x),Pu(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),jc(this.projectionDelta,this.layoutCorrected,l,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==s||!Bu(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),qu&&Hu.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=!(!s||c||!0!==this.options.crossfade||this.path.some(hd));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;fd(i.x,e.x,n),fd(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tc(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){pd(e.x,t.x,n.x,r),pd(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return Ru(e.x,t.x)&&Ru(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),ju(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Js(0,void 0!==n.opacity?n.opacity:1,Su(r)),e.opacityExit=Js(void 0!==t.opacity?t.opacity:1,0,ku(r))):i&&(e.opacity=Js(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<bu;o++){const i=`border${vu[o]}Radius`;let a=_u(t,i),s=_u(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||wu(a)===wu(s)?(e[i]=Math.max(Js(xu(a),xu(s),r),0),(Pa.test(s)||Pa.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Js(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Gi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xi.update((()=>{lu.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=$l(0)?0:zl(0);return r.start(Ml("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&bd(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ec(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ec(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}ju(t,n),Jc(t,o),jc(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Wu),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Gu("z",e,r,this.animationValues);for(let t=0;t<Ku.length;t++)Gu(`rotate${Ku[t]}`,e,r,this.animationValues),Gu(`skew${Ku[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Yu;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=$u(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=$u(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Wc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in fu){if(void 0===a[e])continue;const{correct:t,applyTo:n}=fu[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?$u(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(od),this.root.sharedNodes.clear()}}}function Qu(e){e.updateLayout()}function ed(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Lc((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Ec(r);r.min=t[e].min,r.max=r.min+o})):bd(o,n.layoutBox,t)&&Lc((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Ec(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};jc(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?jc(s,e.applyTransform(r,!0),n.measuredBox):jc(s,t,n.layoutBox);const l=!Iu(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};Tc(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};Tc(s,t,i.layoutBox),Fu(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function td(e){qu&&Hu.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 nd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function rd(e){e.clearSnapshot()}function od(e){e.clearMeasurements()}function id(e){e.isLayoutDirty=!1}function ad(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function ld(e){e.resolveTargetDelta()}function cd(e){e.calcProjection()}function ud(e){e.resetSkewAndRotation()}function dd(e){e.removeLeadSnapshot()}function fd(e,t,n){e.translate=Js(t.translate,0,n),e.scale=Js(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function pd(e,t,n,r){e.min=Js(t.min,n.min,r),e.max=Js(t.max,n.max,r)}function hd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const md={duration:.45,ease:[.4,0,.1,1]},yd=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gd=yd("applewebkit/")&&!yd("chrome/")?Math.round:qi;function vd(e){e.min=gd(e.min),e.max=gd(e.max)}function bd(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){return Math.abs(e-t)<=.2}(zu(t),zu(n))}function xd(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const wd=Ju({attachResizeListener:(e,t)=>cc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),_d={current:void 0},Sd=Ju({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_d.current){const e=new wd({});e.mount(window),e.setOptions({layoutScroll:!0}),_d.current=e}return _d.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),kd={pan:{Feature:class extends oc{constructor(){super(...arguments),this.removePointerDownListener=qi}onPointerDown(e){this.session=new fc(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eu(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ou(e),onStart:ou(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Xi.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=uc(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends oc{constructor(e){super(e),this.removeGroupControls=qi,this.removeListeners=qi,this.controls=new nu(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||qi}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Sd,MeasureLayout:yu}};function Ed(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return uc(e.current,n,((n,o)=>{if("touch"===n.pointerType||Sc())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&Xi.postRender((()=>a(n,o)))}),{passive:!e.getProps()[r]})}const Od=(e,t)=>!!t&&(e===t||Od(e,t.parentElement));function jd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,lc(n))}const Pd=new WeakMap,Cd=new WeakMap,Td=e=>{const t=Pd.get(e.target);t&&t(e)},Ad=e=>{e.forEach(Td)};const Nd={some:0,all:1},Md={inView:{Feature:class extends oc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Nd[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;Cd.has(n)||Cd.set(n,{});const r=Cd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Ad,{root:e,...t})),r[o]}(t);return Pd.set(e,n),r.observe(e),()=>{Pd.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends oc{constructor(){super(...arguments),this.removeStartListeners=qi,this.removeEndListeners=qi,this.removeAccessibleListeners=qi,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=uc(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Od(this.node.current,e.target)?n:r;i&&Xi.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=uc(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Gs(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=cc(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=cc(this.node.current,"keyup",(e=>{"Enter"!==e.key||!this.checkPressEnd()||jd("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Xi.postRender((()=>n(e,t)))}))})),jd("down",((e,t)=>{this.startPress(e,t)})))})),t=cc(this.node.current,"blur",(()=>{this.isPressing&&jd("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Gs(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Xi.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Sc()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Xi.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=uc(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=cc(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Gs(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends oc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=Gs(cc(this.node.current,"focus",(()=>this.onFocus())),cc(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends oc{mount(){this.unmount=Gs(Ed(this.node,!0),Ed(this.node,!1))}unmount(){}}}},Dd={layout:{ProjectionNode:Sd,MeasureLayout:yu}},Id=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Rd=(0,s.createContext)({}),Ld=typeof window<"u",Fd=Ld?s.useLayoutEffect:s.useEffect,zd=(0,s.createContext)({strict:!1});function Bd(e,t,n,r,o){var i,a;const{visualElement:l}=(0,s.useContext)(Rd),c=(0,s.useContext)(zd),u=(0,s.useContext)(iu),d=(0,s.useContext)(Id).reducedMotion,f=(0,s.useRef)();r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=f.current,h=(0,s.useContext)(su);p&&!p.projection&&o&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wd(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&kc(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(f.current,n,o,h);const m=(0,s.useRef)(!1);(0,s.useInsertionEffect)((()=>{p&&m.current&&p.update(n,u)}));const y=n[Vl],g=(0,s.useRef)(!!y&&!(null!==(i=window.MotionHandoffIsComplete)&&void 0!==i&&i.call(window,y))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,y)));return Fd((()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),pu.render(p.render),g.current&&p.animationState&&p.animationState.animateChanges())})),(0,s.useEffect)((()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,y)})),g.current=!1))})),p}function Wd(e){if(e)return!1!==e.options.allowProjection?e.projection:Wd(e.parent)}function Vd(e,t,n){return(0,s.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):kc(n)&&(n.current=r))}),[t])}function Ud(e){return Oi(e.animate)||Di.some((t=>Ci(e[t])))}function $d(e){return!(!Ud(e)&&!e.variants)}function Hd(e){return Array.isArray(e)?e.join(" "):e}const qd={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"]},Kd={};for(const e in qd)Kd[e]={isEnabled:t=>qd[e].some((e=>!!t[e]))};const Yd=Symbol.for("motionComponentSymbol");function Xd({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)Kd[t]={...Kd[t],...e[t]}}(e);const i=(0,s.forwardRef)((function(e,i){let a;const l={...(0,s.useContext)(Id),...e,layoutId:Gd(e)},{isStatic:c}=l,u=function(e){const{initial:t,animate:n}=function(e,t){if(Ud(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Ci(t)?t:void 0,animate:Ci(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(Rd));return(0,s.useMemo)((()=>({initial:t,animate:n})),[Hd(t),Hd(n)])}(e),d=r(e,c);if(!c&&Ld){(0,s.useContext)(zd).strict;const e=function(e){const{drag:t,layout:n}=Kd;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:null!=t&&t.isEnabled(e)||null!=n&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);a=e.MeasureLayout,u.visualElement=Bd(o,d,l,t,e.ProjectionNode)}return(0,L.jsxs)(Rd.Provider,{value:u,children:[a&&u.visualElement?(0,L.jsx)(a,{visualElement:u.visualElement,...l}):null,n(o,e,Vd(d,u.visualElement,i),d,c,u.visualElement)]})}));return i[Yd]=o,i}function Gd({layoutId:e}){const t=(0,s.useContext)(au).id;return t&&void 0!==e?t+"-"+e:e}const Zd=["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 Jd(e){return"string"==typeof e&&!e.includes("-")&&!!(Zd.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qd(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const ef=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 tf(e,t,n,r){Qd(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(ef.has(n)?n:Wl(n),t.attrs[n])}function nf(e,{layout:t,layoutId:n}){return Ri.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!fu[e]||"opacity"===e)}function rf(e,t,n){var r;const{style:o}=e,i={};for(const a in o)($l(o[a])||t.style&&$l(t.style[a])||nf(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}function of(e,t,n){const r=rf(e,t,n);for(const n in e)($l(e[n])||$l(t[n]))&&(r[-1!==Ii.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function af(e){const t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}const sf=e=>(t,n)=>{const r=(0,s.useContext)(Rd),o=(0,s.useContext)(iu),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:lf(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():af(i)};function lf(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=$u(i[e]);let{initial:a,animate:s}=e;const l=Ud(e),c=$d(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Oi(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ai(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const cf=(e,t)=>t&&"number"==typeof e?t.transform(e):e,uf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},df=Ii.length;function ff(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(Ri.has(e))a=!0;else if(ya(e))o[e]=n;else{const t=cf(n,ws[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<df;i++){const a=Ii[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=cf(s,ws[a]);l||(o=!1,r+=`${uf[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function pf(e,t,n){return"string"==typeof e?e:Ca.transform(t+n*e)}const hf={offset:"stroke-dashoffset",array:"stroke-dasharray"},mf={offset:"strokeDashoffset",array:"strokeDasharray"};function yf(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,d){if(ff(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:h}=e;f.transform&&(h&&(p.transform=f.transform),delete f.transform),h&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${pf(t,e.x,e.width)} ${pf(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?hf:mf;e[i.offset]=Ca.transform(-r);const a=Ca.transform(t),s=Ca.transform(n);e[i.array]=`${a} ${s}`}(f,a,s,l,!1)}const gf=e=>"string"==typeof e&&"svg"===e.toLowerCase(),vf={useVisualState:sf({scrapeMotionValuesFromProps:of,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onMount:(e,t,{renderState:n,latestValues:r})=>{Xi.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}})),Xi.render((()=>{yf(n,r,gf(t.tagName),e.transformTemplate),tf(t,n)}))}})},bf={useVisualState:sf({scrapeMotionValuesFromProps:rf,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function xf(e,t,n){for(const r in t)!$l(t[r])&&!nf(r,n)&&(e[r]=t[r])}function wf(e,t){const n={},r=function(e,t){const n={};return xf(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ff(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const _f=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 Sf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_f.has(e)}let kf=e=>!Sf(e);try{!function(e){e&&(kf=t=>t.startsWith("on")?!Sf(t):e(t))}(require("@emotion/is-prop-valid").default)}catch{}function Ef(e,t,n,r){const o=(0,s.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return yf(n,t,gf(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};xf(t,e.style,e),o.style={...t,...o.style}}return o}function Of(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(Jd(t)?Ef:wf)(n,o,i,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(kf(o)||!0===n&&Sf(o)||!t&&!Sf(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==s.Fragment?{...l,...a,ref:r}:{},{children:u}=n,d=(0,s.useMemo)((()=>$l(u)?u.get():u),[u]);return(0,s.createElement)(t,{...c,children:d})}}function jf(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Xd({...Jd(n)?vf:bf,preloadedFeatures:e,useRender:Of(r),createVisualElement:t,Component:n})}}const Pf={current:null},Cf={current:!1},Tf=new WeakMap,Af=[...Wa,os,ps],Nf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mf{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ya,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 e=Ts.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Xi.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Ud(t),this.isVariantNode=$d(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!e||!e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&$l(t)&&t.set(s[e],!1)}}mount(e){this.current=e,Tf.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Cf.current||function(){if(Cf.current=!0,Ld)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pf.current=e.matches;e.addListener(t),t()}else Pf.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Pf.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Tf.delete(this.current),this.projection&&this.projection.unmount(),Gi(this.notifyUpdate),Gi(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Ri.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Xi.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Kd){const t=Kd[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Nf.length;t++){const n=Nf[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if($l(o))e.addValue(r,o);else if($l(i))e.addValue(r,zl(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,zl(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=zl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(ha(r)||ua(r))?r=parseFloat(r):!(e=>Af.find(Ba(e)))(r)&&ps.test(t)&&(r=ks(e,t)),this.setBaseTarget(e,$l(r)?r.get():r)),$l(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Ai(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||$l(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Ll),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class Df extends Mf{constructor(){super(...arguments),this.KeyframeResolver=Os}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class If extends Df{constructor(){super(...arguments),this.type="html",this.renderInstance=Qd}readValueFromInstance(e,t){if(Ri.has(t)){const e=Ss(t);return e&&e.default||0}{const n=function(e){return window.getComputedStyle(e)}(e),r=(ya(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Qc(e,t)}build(e,t,n){ff(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return rf(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;$l(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class Rf extends Df{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Rc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Ri.has(t)){const e=Ss(t);return e&&e.default||0}return t=ef.has(t)?t:Wl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return of(e,t,n)}build(e,t,n){yf(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){tf(e,t,0,r)}mount(e){this.isSVGTag=gf(e.tagName),super.mount(e)}}const Lf=(e,t)=>Jd(e)?new Rf(t):new If(t,{allowProjection:e!==s.Fragment}),Ff=Ei(jf({...ac,...Md,...kd,...Dd},Lf));class zf extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Bf({children:e,isPresent:t}){const n=(0,s.useId)(),r=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,s.useContext)(Id);return(0,s.useInsertionEffect)((()=>{const{width:e,height:a,top:s,left:l}=o.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,L.jsx)(zf,{isPresent:t,childRef:r,sizeRef:o,children:s.cloneElement(e,{ref:r})})}const Wf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const l=af(Vf),c=(0,s.useId)(),u=(0,s.useCallback)((e=>{l.set(e,!0);for(const e of l.values())if(!e)return;r&&r()}),[l,r]),d=(0,s.useMemo)((()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:u,register:e=>(l.set(e,!1),()=>l.delete(e))})),i?[Math.random(),u]:[n,u]);return(0,s.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),s.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===a&&(e=(0,L.jsx)(Bf,{isPresent:n,children:e})),(0,L.jsx)(iu.Provider,{value:d,children:e})};function Vf(){return new Map}const Uf=e=>e.key||"";function $f(e){const t=[];return s.Children.forEach(e,(e=>{(0,s.isValidElement)(e)&&t.push(e)})),t}const Hf=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{pa(!t,"Replace exitBeforeEnter with mode='wait'");const l=(0,s.useMemo)((()=>$f(e)),[e]),c=l.map(Uf),u=(0,s.useRef)(!0),d=(0,s.useRef)(l),f=af((()=>new Map)),[p,h]=(0,s.useState)(l),[m,y]=(0,s.useState)(l);Fd((()=>{u.current=!1,d.current=l;for(let e=0;e<m.length;e++){const t=Uf(m[e]);c.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}}),[m,c.length,c.join("-")]);const g=[];if(l!==p){let e=[...l];for(let t=0;t<m.length;t++){const n=m[t],r=Uf(n);c.includes(r)||(e.splice(t,0,n),g.push(n))}return"wait"===a&&g.length&&(e=g),y($f(e)),void h(l)}const{forceRender:v}=(0,s.useContext)(au);return(0,L.jsx)(L.Fragment,{children:m.map((e=>{const t=Uf(e),s=l===m||c.includes(t);return(0,L.jsx)(Wf,{isPresent:s,initial:!(u.current&&!r)&&void 0,custom:s?void 0:n,presenceAffectsLayout:i,mode:a,onExitComplete:s?void 0:()=>{if(!f.has(t))return;f.set(t,!0);let e=!0;f.forEach((t=>{t||(e=!1)})),e&&(null==v||v(),y(d.current),o&&o())},children:e},t)}))})},qf=(0,s.createContext)(null);const Kf=e=>!e.isLayoutDirty&&e.willUpdate(!1);function Yf(){const e=new Set,t=new WeakMap,n=()=>e.forEach(Kf);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Xf=e=>!0===e,Gf=({children:e,id:t,inherit:n=!0})=>{const r=(0,s.useContext)(au),o=(0,s.useContext)(qf),[i,a]=function(){const e=function(){const e=(0,s.useRef)(!1);return Fd((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),[t,n]=(0,s.useState)(0),r=(0,s.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,s.useCallback)((()=>Xi.postRender(r)),[r]),t]}(),l=(0,s.useRef)(null),c=r.id||o;null===l.current&&((e=>Xf(!0===e)||"id"===e)(n)&&c&&(t=t?c+"-"+t:c),l.current={id:t,group:Xf(n)&&r.group||Yf()});const u=(0,s.useMemo)((()=>({...l.current,forceRender:i})),[a]);return(0,L.jsx)(au.Provider,{value:u,children:e})},Zf=(0,s.createContext)({}),Jf=()=>(0,s.useContext)(Zf),Qf=(0,s.createContext)(null),ep=({children:e,activeItem:t=null,onChange:n,className:r,size:o="sm",orientation:i="horizontal",variant:a="pill",iconPosition:l="left",width:c="full"})=>{const u=Ge(),d=Jf(),f=(null==d?void 0:d.activeItem)||t,p=(0,s.useCallback)(((e,t)=>{n&&n({event:e,value:t})}),[n]);let h,m="rounded-full",y="p-1",g="ring-1 ring-tab-border";"vertical"===i?h="gap-0.5":("rounded"===a||"pill"===a)&&("xs"===o||"sm"===o?h="gap-0.5":("md"===o||"lg"===o)&&(h="gap-1")),"rounded"===a||"vertical"===i?m="rounded-md":"underline"===a&&(m="rounded-none",y="p-0",g="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===o?h="gap-0":"sm"===o?h="gap-2.5":("md"===o||"lg"===o)&&(h="gap-3"));const v=Ue(`box-border [&>*]:box-border flex items-center ${"full"===c?"w-full":""} ${"vertical"===i?"flex-col":""}`,m,y,h,g,"underline"!==a?"bg-tab-background":"",r);return(0,L.jsx)("div",{className:v,children:(0,L.jsx)(Qf.Provider,{value:{activeItem:f,onChange:p,size:o,variant:a,orientation:i,iconPosition:l,width:c},children:(0,L.jsx)(Gf,{id:u,children:s.Children.map(e,(e=>(0,s.isValidElement)(e)?s.cloneElement(e):null))})})})};ep.displayName="Tabs.Group";const tp=(0,s.forwardRef)((({slug:e,text:t,icon:n,className:r,disabled:o=!1,badge:i=null,...a},l)=>{const c=(0,s.useContext)(Qf);if(!c)throw new Error("Tab should be used inside Tabs Group");const{activeItem:u,onChange:d,size:f,variant:p,orientation:h,iconPosition:m,width:y}=c,g={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===p?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===p?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===p?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[f],v=Ue("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===y?"flex-1":"","vertical"===h?"w-full justify-between":"");let b="rounded-full";"rounded"===p?b="rounded-md":"underline"===p&&(b="rounded-none");const x=Ue(v,"border-none",b,"hover:text-text-primary group","focus:outline-none",g,u===e?"bg-background-primary text-text-primary shadow-sm":"",o?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),w=Ue("flex items-center gap-1 group-hover:text-text-primary",o&&"group-hover:text-text-disabled");return(0,L.jsxs)(Ff.button,{ref:l,className:x,disabled:o,onClick:n=>{d(n,{slug:e,text:t})},...a,layoutRoot:!0,children:[u===e&&"underline"===p&&(0,L.jsx)(Ff.span,{layoutId:"underline",layoutDependency:u,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,L.jsxs)("span",{className:w,children:["left"===m&&n&&(0,L.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===m&&n&&(0,L.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),i&&(0,s.isValidElement)(i)&&i]})}));tp.displayName="Tabs.Tab";const np=({activeItem:e,children:t})=>(0,L.jsx)(Zf.Provider,{value:{activeItem:e},children:t}),rp=({slug:e,children:t})=>{const n=Jf();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,L.jsx)(L.Fragment,{children:t}):null};rp.displayName="Tabs.Panel",np.Group=ep,np.Tab=tp,np.Panel=rp;const op={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"}},ip="group-disabled:text-field-color-disabled",ap={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]"},sp=e=>{var t;return"string"==typeof e?e:"object"==typeof e&&"textContent"in e?(null==(t=e.textContent)?void 0:t.toString().toLowerCase())||"":"object"==typeof e&&"children"in e?sp(e.children):""},lp=(0,s.createContext)({}),cp=()=>(0,s.useContext)(lp);function up({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:o,label:i,className:a,...l}){var c,u;const{sizeValue:d,getReferenceProps:f,getValues:p,selectId:h,refs:m,isOpen:y,multiple:g,combobox:v,setSelected:b,onChange:x,isControlled:w,disabled:_,by:S}=cp(),k={sm:"xs",md:"sm",lg:"md"}[d],E=(0,s.useCallback)((()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return v?(0,L.jsx)(ct,{className:e}):(0,L.jsx)(at,{className:e})}),[t]),O=(0,s.useCallback)((()=>{const t=p();if(!t)return null;if(g)return t.map(((e,t)=>(0,L.jsx)(vi,{className:"cursor-default",icon:r,type:"rounded",size:k,onMouseDown:j(e),label:"function"==typeof o?o(e):e.toString(),closable:!0,disabled:_},t)));let n="string"==typeof t?t:"";if("function"==typeof o&&(n=o(t)),"function"==typeof e&&"function"!=typeof o){const r={value:t,...g?{onClose:j(t)}:{}};n=e(r)}return((0,s.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof o&&(n=e),(0,L.jsx)("span",{className:Ue("truncate",op[d].displaySelected,ip),children:n})}),[p,_]),j=e=>t=>{null==t||t.preventDefault(),null==t||t.stopPropagation();const n=[...p()??[]],r=n.findIndex((t=>null!==t&&null!==e&&"object"==typeof t?t[S]===e[S]:t===e));-1!==r&&(n.splice(r,1),w||b(n),"function"==typeof x&&x(n))};return(0,L.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!i&&(0,L.jsx)("label",{className:Ue(null==(c=op[d])?void 0:c.label,"text-field-label"),htmlFor:h,children:i}),(0,L.jsxs)("button",{id:h,ref:m.setReference,className:Ue("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",!y&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",op[d].selectButton,g&&op[d].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",a),tabIndex:0,disabled:_,...l,...f(),children:[(0,L.jsxs)("div",{className:Ue("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",p()&&"flex flex-wrap"),children:[O(),(g?!(null!=(u=p())&&u.length):!p())&&(0,L.jsx)("div",{className:Ue("[grid-area:1/1/2/3] text-field-input px-1",op[d].displaySelected,ip),children:n})]}),(0,L.jsx)("div",{className:Ue("flex items-center [&>svg]:shrink-0",op[d].icon),children:E()})]})]})}function dp({label:e,children:t,className:n,...r}){const{index:o,totalGroups:i}=r,{sizeValue:a}=cp();return(0,L.jsxs)(s.Fragment,{children:[(0,L.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,L.jsx)("div",{className:Ue("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[a],n),id:`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,L.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),o<i&&!!(t&&s.Children.count(t)>0)&&(0,L.jsx)("hr",{className:Ue("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",ap[a])})]})}function fp({children:e,className:t}){const{isOpen:n,context:r,refs:o,combobox:i,floatingStyles:a,getFloatingProps:l,sizeValue:c,setSearchKeyword:u,setActiveIndex:d,setSelectedIndex:f,value:p,selected:h,getValues:m,searchKeyword:y,listContentRef:g,by:v,searchPlaceholder:b,activeIndex:x,searchFn:w,debounceDelay:_}=cp(),S=(0,s.useMemo)((()=>{const t=m();let n=-1;if(t){let r=s.Children.toArray(e);r.length>0&&(0,s.isValidElement)(r[0])&&r[0].type===dp&&(r=s.Children.toArray(e).map((e=>(0,s.isValidElement)(e)?s.Children.toArray(e.props.children):[])).flat()),n=r.findIndex((e=>{if(!(0,s.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[v]===t[v]:n===t}))}return n}),[p,h,e,v]);(0,s.useLayoutEffect)((()=>{n||(d(S),f(S))}),[S,n]),(0,s.useLayoutEffect)((()=>{n&&(i&&[-1,null].includes(x)||d(-1))}),[y,n]);const k=(0,s.useMemo)((()=>{let t=0,n=0;s.Children.forEach(e,(e=>{(0,s.isValidElement)(e)&&e.type===dp&&s.Children.toArray(e.props.children).some((e=>{var t;if(!(0,s.isValidElement)(e))return!1;if(y&&!w){const n=null==(t=sp(e.props.children))?void 0:t.toLowerCase(),r=y.toLowerCase();return n.includes(r)}return!0}))&&t++})),n=Math.max(0,t-1);let r=0,o=0;const i=e=>{var t,a;if(!(0,s.isValidElement)(e))return null;if(e.type===dp){const t=s.Children.map(e.props.children,i);if(!(null==t?void 0:t.some((e=>null!==e))))return null;const r={...e.props,children:t,index:o,totalGroups:n};return o++,(0,s.cloneElement)(e,r)}if(y&&!w){const n=null==(a=sp(null==(t=e.props)?void 0:t.children))?void 0:a.toLowerCase(),r=y.toLowerCase();if(!(null==n?void 0:n.includes(r)))return null}return(0,s.cloneElement)(e,{...e.props,index:r++})};return s.Children.map(e,i)}),[y,p,h,e,w]),E=s.Children.count(k);(0,s.useEffect)((()=>{g.current=[];let t=s.Children.toArray(e);t&&(0,s.isValidElement)(t[0])&&t[0].type===dp&&(t=s.Children.toArray(t).map((e=>(0,s.isValidElement)(e)?e.props.children:null)).filter(Boolean)),s.Children.forEach(t,(e=>{var t,n;if(!(0,s.isValidElement)(e))return;const r=null==(n=sp(null==(t=e.props)?void 0:t.children))?void 0:n.toLowerCase();if(y&&!w){const e=y.toLowerCase();if(!(null==r?void 0:r.includes(e)))return}g.current.push(r)}))}),[y,w]);const[O,j]=(0,s.useState)(!1),P=((e,t=500)=>{const n=(0,s.useRef)(null);return(0,s.useCallback)(((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout((()=>e(...r)),t)}),[e,t])})((0,s.useCallback)((async()=>{if(w&&"function"==typeof w&&!O){j(!0);try{await w(y)}catch(e){console.error(e)}finally{j(!1)}}}),[y]),_);return(0,s.useEffect)((()=>{"function"==typeof w&&P()}),[P]),(0,L.jsx)(L.Fragment,{children:n&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Do,{context:r,modal:!1,children:(0,L.jsxs)("div",{ref:o.setFloating,className:Ue("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",i&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",op[c].dropdown,!i&&"h-auto",i?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...a},...l(),children:[i&&(0,L.jsxs)("div",{className:Ue(op[c].searchbarWrapper),children:[O?(0,L.jsx)(_i,{className:op[c].searchbarIcon}):(0,L.jsx)(gt,{className:Ue("text-icon-secondary shrink-0",op[c].searchbarIcon)}),(0,L.jsx)("input",{className:Ue("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",op[c].searchbar),type:"search",name:"keyword",placeholder:b,onChange:e=>u(e.target.value),value:y,autoComplete:"off"})]}),(0,L.jsxs)("div",{className:Ue("overflow-y-auto overflow-x-hidden",!i&&"w-full h-full",op[c].dropdownItemsWrapper),children:[!!E&&k,!E&&(0,L.jsx)("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function pp({children:e,root:t,id:n}){return(0,L.jsx)(Oo,{id:n,root:t,children:e})}function hp({value:e,selected:t,children:n,className:r,...o}){const{sizeValue:i,getItemProps:a,onKeyDownItem:l,onClickItem:c,activeIndex:u,selectedIndex:d,updateListRef:f,getValues:p,by:h,multiple:m}=cp(),{index:y}=o,g=(0,s.useRef)(y),v=(0,s.useMemo)((()=>{if(!m)return!1;const t=p();return!!t&&t.some((t=>null!==t&&null!==e&&"object"==typeof t?t[h]===e[h]:t===e))}),[e,p]),b=(0,s.useMemo)((()=>"boolean"==typeof t?t:m?v:y===d),[v,d,t]);return(0,L.jsxs)("div",{className:Ue("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",{sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[i],y===u&&"bg-button-tertiary-hover",r),ref:e=>{f(y,e)},role:"option",tabIndex:y===u?0:-1,"aria-selected":b&&y===u,...a({onClick(){c(g.current,e)},onKeyDown(t){l(t,g.current,e)}}),children:[(0,L.jsx)("span",{className:"w-full truncate",children:n}),b&&(0,L.jsx)(it,{className:Ue("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[i])})]})}const mp=({id:e,size:t="md",value:n,defaultValue:r,onChange:o,by:i="id",children:a,multiple:l=!1,combobox:c=!1,disabled:u=!1,searchPlaceholder:d="Search...",searchFn:f,debounceDelay:p=500})=>{const h=(0,s.useMemo)((()=>e||`select-${Ge()}`),[e]),m=(0,s.useMemo)((()=>typeof n<"u"),[n]),[y,g]=(0,s.useState)(r),[v,b]=(0,s.useState)(""),x=(0,s.useCallback)((()=>m?n:y),[m,n,y]),[w,_]=(0,s.useState)(!1),[S,k]=(0,s.useState)(null),[E,O]=(0,s.useState)(null),j={sm:c?256:172,md:c?256:216,lg:c?256:216},{refs:P,floatingStyles:C,context:T}=Vo({placement:"bottom-start",open:w,onOpenChange:_,whileElementsMounted:dr,middleware:[Sr(5),Er({padding:10}),Or({apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${j[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),A=(0,s.useRef)([]),N=(0,s.useRef)([]),M=(0,s.useRef)(!1),D=Lo(T,{event:"mousedown"}),I=Wo(T),R=Qo(T,{role:"listbox"}),F=function(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:_=!0,virtualItemRef:S,itemSizes:k,dense:E=!1}=t,O=to(Co(o.floating)),j=Jr(),P=Qr(),C=Tr(l),T=dn(o.domReference),A=s.useRef(y),N=s.useRef(u??-1),M=s.useRef(null),D=s.useRef(!0),I=s.useRef(C),R=s.useRef(!!o.floating),L=s.useRef(n),F=s.useRef(!1),z=s.useRef(!1),B=to(b),W=to(n),V=to(_),U=to(u),[$,H]=s.useState(),[q,K]=s.useState(),Y=Tr((function(e,t,n){function r(e){m?(H(e.id),null==P||P.events.emit("virtualfocus",e),S&&(S.current=e)):io(e,{preventScroll:!0,sync:!(!rn()||!tn())&&(Ko||F.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=V.current;a&&G&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))}))}));Ur((()=>{document.createElement("div").focus({get preventScroll(){return Ko=!0,!1}})}),[]),Ur((()=>{c&&(n&&o.floating?A.current&&null!=u&&(z.current=!0,N.current=u,C(u)):R.current&&(N.current=-1,I.current(null)))}),[c,n,o.floating,u,C]),Ur((()=>{if(c&&n&&o.floating)if(null==a){if(F.current=!1,null!=U.current)return;if(R.current&&(N.current=-1,Y(i,N)),(!L.current||!R.current)&&A.current&&(null!=M.current||!0===A.current&&null==M.current)){let e=0;const t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(N.current=null==M.current||Go(M.current,x,h)||p?Lr(i,B.current):Fr(i,B.current),M.current=null,C(N.current))};t()}}else Rr(i,a)||(N.current=a,Y(i,N,z.current),z.current=!1)}),[c,n,o.floating,a,U,p,i,x,h,C,Y,B]),Ur((()=>{var e;if(!c||o.floating||!P||m||!R.current)return;const t=P.nodesRef.current,n=null==(e=t.find((e=>e.id===j)))||null==(e=e.context)?void 0:e.elements.floating,r=Xt(an(o.floating)),i=t.some((e=>e.context&&Gt(e.context.elements.floating,r)));n&&!i&&D.current&&n.focus({preventScroll:!0})}),[c,o.floating,P,j,m]),Ur((()=>{if(c&&P&&m&&!j)return P.events.on("virtualfocus",e),()=>{P.events.off("virtualfocus",e)};function e(e){K(e.id),S&&(S.current=e)}}),[c,P,m,j,S]),Ur((()=>{I.current=C,R.current=!!o.floating})),Ur((()=>{n||(M.current=null)}),[n]),Ur((()=>{L.current=n}),[n]);const X=null!=a,G=s.useMemo((()=>{function e(e){if(!n)return;const t=i.current.indexOf(e);-1!==t&&C(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...g&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;!D.current||"touch"===t||(N.current=-1,Y(i,N),C(null),m||io(O.current,{preventScroll:!0}))}}}}),[n,O,Y,g,i,C,m]),Z=Tr((e=>{if(D.current=!1,F.current=!0,229===e.which||!W.current&&e.currentTarget===O.current)return;if(p&&Zo(e.key,x,h))return un(e),r(!1,e.nativeEvent,"list-navigation"),void(It(o.domReference)&&(m?null==P||P.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=N.current,a=Lr(i,b),s=Fr(i,b);if(T||("Home"===e.key&&(un(e),N.current=a,C(N.current)),"End"===e.key&&(un(e),N.current=s,C(N.current))),w>1){const t=k||Array.from({length:i.current.length},(()=>({width:1,height:1}))),n=function(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=i})),l=!0):o++}})),[...r]}(t,w,E),r=n.findIndex((e=>null!=e&&!Vr(i.current,e,b))),o=n.reduce(((e,t,n)=>null==t||Vr(i.current,t,b)?e:n),-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===Ar){if(d&&un(n),-1===u)f=c;else if(f=zr(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const e=u%a,t=c%a,n=c-(t-e);f=t===e?c:t>e?n:n-a}Rr(e,f)&&(f=u)}if(n.key===Nr&&(d&&un(n),-1===u?f=l:(f=zr(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=zr(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Rr(e,f)&&(f=u)),"both"===r){const t=mn(u/a);n.key===(i?Mr:Dr)&&(d&&un(n),u%a!=a-1?(f=zr(e,{startingIndex:u,disabledIndices:s}),o&&Ir(f,a,t)&&(f=zr(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=zr(e,{startingIndex:u-u%a-1,disabledIndices:s})),Ir(f,a,t)&&(f=u)),n.key===(i?Dr:Mr)&&(d&&un(n),u%a!=0?(f=zr(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Ir(f,a,t)&&(f=zr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=zr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Ir(f,a,t)&&(f=u));const r=mn(c/a)===t;Rr(e,f)&&(f=o&&r?n.key===(i?Dr:Mr)?c:zr(e,{startingIndex:u-u%a-1,disabledIndices:s}):u)}return f}({current:n.map((e=>null!=e?i.current[e]:null))},{event:e,orientation:x,loop:f,rtl:h,cols:w,disabledIndices:Wr([...b||i.current.map(((e,t)=>Vr(i.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:o,prevIndex:Br(N.current>s?a:N.current,t,n,w,e.key===Nr?"bl":e.key===(h?Mr:Dr)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(N.current=l,C(N.current)),"both"===x)return}if(Xo(e.key,x)){if(un(e),n&&!m&&Xt(e.currentTarget.ownerDocument)===e.currentTarget)return N.current=Go(e.key,x,h)?a:s,void C(N.current);Go(e.key,x,h)?N.current=f?t>=s?d&&t!==i.current.length?-1:a:zr(i,{startingIndex:t,disabledIndices:b}):Math.min(s,zr(i,{startingIndex:t,disabledIndices:b})):N.current=f?t<=a?d&&-1!==t?i.current.length:s:zr(i,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(a,zr(i,{startingIndex:t,decrement:!0,disabledIndices:b})),Rr(i,N.current)?C(null):C(N.current)}})),J=s.useMemo((()=>m&&n&&X&&{"aria-activedescendant":q||$}),[m,n,X,q,$]),Q=s.useMemo((()=>({"aria-orientation":"both"===x?void 0:x,...!dn(o.domReference)&&J,onKeyDown:Z,onPointerMove(){D.current=!0}})),[J,Z,o.domReference,x]),ee=s.useMemo((()=>{function e(e){"auto"===y&&Qt(e.nativeEvent)&&(A.current=!0)}return{...J,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),a=t||o,s=function(e,t,n){return Yo(t,n?e===Mr:e===Dr,e===Nr)}(e.key,x,h),l=Zo(e.key,x,h),c=Xo(e.key,x),d=(p?s:c)||"Enter"===e.key||""===e.key.trim();if(m&&n){const t=null==P?void 0:P.nodesRef.current.find((e=>null==e.parentId)),n=P&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),ao(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(P.nodesRef.current,t.id):null;if(a&&n&&S){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var f,y;const r=(null==(f=n.context)?void 0:f.elements.domReference)===e.currentTarget,o=l&&!r?null==(y=n.context)?void 0:y.elements.domReference:s?i.current.find((e=>(null==e?void 0:e.id)===$)):null;o&&(un(e),o.dispatchEvent(t),K(void 0))}var g;if((c||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return un(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return Z(e)}if(n||v||!t){if(d&&(M.current=p&&c?null:e.key),p)return void(s&&(un(e),n?(N.current=Lr(i,B.current),C(N.current)):r(!0,e.nativeEvent,"list-navigation")));c&&(null!=u&&(N.current=u),un(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):Z(e),n&&C(N.current))}},onFocus(){n&&!m&&C(null)},onPointerDown:function(e){A.current=y,"auto"===y&&en(e.nativeEvent)&&(A.current=!0)},onMouseDown:e,onClick:e}}),[$,J,Z,B,y,i,p,C,r,n,v,x,h,u,P,m,S]);return s.useMemo((()=>c?{reference:ee,floating:Q,item:G}:{}),[c,ee,Q,G])}(T,{listRef:A,activeIndex:S,selectedIndex:E,onNavigate:k,loop:!0}),z=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:l,onTypingChange:c,enabled:u=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:h=null}=t,m=s.useRef(),y=s.useRef(""),g=s.useRef(null!=(n=h??a)?n:-1),v=s.useRef(null),b=Tr(l),x=Tr(c),w=to(d),_=to(p);Ur((()=>{r&&(clearTimeout(m.current),v.current=null,y.current="")}),[r]),Ur((()=>{var e;r&&""===y.current&&(g.current=null!=(e=h??a)?e:-1)}),[r,h,a]);const S=Tr((e=>{e?o.current.typing||(o.current.typing=e,x(e)):o.current.typing&&(o.current.typing=e,x(e))})),k=Tr((e=>{function t(e,t,n){const r=w.current?w.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=i.current;if(y.current.length>0&&" "!==y.current[0]&&(-1===t(n,n,y.current)?S(!1):" "===e.key&&un(e)),null==n||_.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(un(e),S(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&y.current===e.key&&(y.current="",g.current=v.current),y.current+=e.key,clearTimeout(m.current),m.current=setTimeout((()=>{y.current="",g.current=v.current,S(!1)}),f);const o=g.current,a=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],y.current);-1!==a?(b(a),v.current=a):" "!==e.key&&(y.current="",S(!1))})),E=s.useMemo((()=>({onKeyDown:k})),[k]),O=s.useMemo((()=>({onKeyDown:k,onKeyUp(e){" "===e.key&&S(!1)}})),[k,S]);return s.useMemo((()=>u?{reference:E,floating:O}:{}),[u,E,O])}(T,{listRef:N,activeIndex:S,selectedIndex:E,onMatch:w?k:O,onTypingChange(e){M.current=e}}),{getReferenceProps:B,getFloatingProps:W,getItemProps:V}=qo([I,R,F,D,...c?[]:[z]]),U=(e,t)=>{if(l)return((e,t)=>{const n=[...x()??[]];-1===n.findIndex((e=>null!==e&&null!==t&&"object"==typeof e?e[i]===t[i]:e===t))&&(n.push(t),m||g(n),O(e),P.reference.current.focus(),_(!1),b(""),"function"==typeof o&&o(n))})(e,t);O(e),m||g(t),P.reference.current.focus(),_(!1),b(""),"function"==typeof o&&o(t)},$=(0,s.useCallback)(((e,t)=>{A.current[e]=t}),[]);return(0,L.jsx)(lp.Provider,{value:{selectedIndex:E,setSelectedIndex:O,activeIndex:S,setActiveIndex:k,selected:y,setSelected:g,handleSelect:U,combobox:c,sizeValue:t,multiple:l,onChange:o,isTypingRef:M,getItemProps:V,onClickItem:(e,t)=>{U(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),U(t,n))," "===e.key&&!M.current&&(e.preventDefault(),U(t,n))},getValues:x,selectId:h,getReferenceProps:B,isOpen:w,value:n,updateListRef:$,refs:P,listContentRef:N,by:i,getFloatingProps:W,floatingStyles:C,context:T,searchKeyword:v,setSearchKeyword:b,disabled:u,isControlled:m,searchPlaceholder:d,searchFn:f,debounceDelay:p},children:a})};mp.displayName="Select",Object.assign((0,s.memo)(mp),{Portal:(0,s.memo)(pp),Button:(0,s.memo)(up),Options:(0,s.memo)(fp),Option:(0,s.memo)(hp),OptionGroup:(0,s.memo)(dp)}),pp.displayName="Select.Portal",up.displayName="Select.Button",fp.displayName="Select.Options",hp.displayName="Select.Option",dp.displayName="Select.OptionGroup";let yp=1;var gp,vp;gp=new WeakMap,vp=new WeakMap;const bp=new class{constructor(){q(this,gp),q(this,vp),K(this,gp,[]),K(this,vp,[])}subscribe(e){return H(this,vp).push(e),()=>{K(this,vp,H(this,vp).filter((t=>t!==e)))}}publish(e){H(this,vp).forEach((t=>t(e)))}add(e){H(this,gp).push(e),this.publish(e)}remove(e){return K(this,gp,H(this,gp).filter((t=>t.id!==e))),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:yp++;return H(this,gp).find((e=>e.id===i))&&K(this,gp,H(this,gp).map((e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e))),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}K(this,gp,H(this,gp).map((t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)))}dismiss(e){return e||H(this,gp).forEach((e=>H(this,vp).forEach((t=>t({id:e.id,dismiss:!0}))))),H(this,vp).forEach((t=>t({id:e,dismiss:!0}))),e}history(){return H(this,gp)}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}};Object.seal(Object.assign(((e,t)=>bp.default(e,t)),{success:bp.success.bind(bp),error:bp.error.bind(bp),warning:bp.warning.bind(bp),info:bp.info.bind(bp),custom:bp.custom.bind(bp),dismiss:bp.dismiss.bind(bp),update:bp.update.bind(bp)},{getHistory:bp.history.bind(bp)}));let xp=!1;const _p={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},Sp={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"},kp="bg-background-inverse border-background-inverse",Ep={light:"text-icon-secondary",dark:"text-icon-inverse"},Op=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:o=5e3,theme:i="light",design:a="stack",icon:l,variant:c="neutral",removeToast:u})=>{var d,f,p,h,m,y,g;const v=(0,s.useRef)(0),b=(0,s.useRef)(0),x=(0,s.useRef)(),w=(e,t=o)=>{if(r&&!(o<0))return v.current=(new Date).getTime(),setTimeout((()=>{"function"==typeof u&&u(e.id)}),t)};(0,s.useEffect)((()=>{const t=o;return x.current=w(e,t),()=>{clearTimeout(x.current)}}),[]),(0,s.useEffect)((()=>{null==e||!e.dismiss||"function"!=typeof u||u(e.id)}),[e]);const _=()=>{var t,n;"function"==typeof u&&(null==(n=null==(t=null==e?void 0:e.action)?void 0:t.onClick)||n.call(t,(()=>u(e.id))))};let S=null;return"stack"===a&&(S=(0,L.jsx)("div",{className:Ue("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?kp:null==(d=Sp)?void 0:d[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(x.current),b.current=(new Date).getTime()},onMouseLeave:()=>{x.current=w(e,o-(b.current-v.current))},children:"custom"!==e.type?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:si({variant:c,icon:l,theme:i})}),(0,L.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[ci({title:t,theme:i}),ui({content:n,theme:i}),(null==(f=null==e?void 0:e.action)?void 0:f.label)&&"function"==typeof(null==(p=null==e?void 0:e.action)?void 0:p.onClick)&&(0,L.jsx)("div",{className:"mt-2.5",children:li({actionLabel:null==(h=null==e?void 0:e.action)?void 0:h.label,actionType:(null==(m=null==e?void 0:e.action)?void 0:m.type)??"button",onAction:_,theme:i})})]}),(0,L.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,L.jsx)("button",{className:Ue("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Ep[i]??Ep.light),onClick:()=>{"function"==typeof u&&u(e.id)},children:(0,L.jsx)(_t,{})})})]}):null==(y=null==e?void 0:e.jsx)?void 0:y.call(e,{close:()=>u(e.id),action:null!=e&&e.action?{...null==e?void 0:e.action,onClick:_}:null})})),"inline"===a&&(S=(0,L.jsxs)("div",{className:Ue("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?kp:null==(g=Sp)?void 0:g[c],"lg:w-[47.5rem] w-full"),children:[(0,L.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:si({variant:c,icon:l,theme:i})}),(0,L.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[ci({title:t,theme:i}),ui({content:n,theme:i})]}),(0,L.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,L.jsx)("button",{className:Ue("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Ep[i]??Ep.light),onClick:()=>u(e.id),children:(0,L.jsx)(_t,{})})})]})),S},jp=((e=>{(0,s.memo)((t=>{const n=t.singleTon;return xp&&n?null:(xp=!0,(0,L.jsx)(e,{...t}))}))})((({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:o=!0,dismissAfter:i=5e3})=>{const[a,l]=(0,s.useState)([]);(0,s.useEffect)((()=>{bp.subscribe((e=>{null!=e&&e.dismiss?l((t=>t.map((t=>t.id===e.id?{...t,dismiss:!0}:t)))):setTimeout((()=>{(0,F.flushSync)((()=>l((t=>-1!==t.findIndex((t=>t.id===e.id))?t.map((t=>t.id===e.id?{...t,...e}:t)):[...t,e]))))}))}))}),[]);const c=e=>{l((t=>t.filter((t=>t.id!==e))))};return(0,L.jsx)("ul",{className:Ue("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",_p[e]??_p["top-right"],r),children:(0,L.jsx)(Hf,{initial:!1,children:a.map((e=>(0,L.jsx)(Ff.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-${e.id}`,children:(0,L.jsx)(Op,{toastItem:e,title:e.title,content:null==e?void 0:e.description,icon:(null==e?void 0:e.icon)??void 0,design:(null==e?void 0:e.design)??t,autoDismiss:(null==e?void 0:e.autoDismiss)??o,dismissAfter:(null==e?void 0:e.dismissAfter)??i,removeToast:c,variant:e.type,theme:(null==e?void 0:e.theme)??n})},e.id)))})})})),{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"}}),Pp={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"}},Cp={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"}},Tp={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"}},Ap={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"}},Np={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"}},Mp={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"}},Dp={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"}},Ip={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"}},Rp={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"}},Lp={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"}},Fp={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"}},zp={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"}},Bp={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"}},Wp={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"}},Vp={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},Up={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},$p=(e,t,n,r="sm")=>{var o,i,a,s,l;const c=[];switch(typeof e){case"object":for(const[r,a]of Object.entries(e))t[r]&&c.push((null==(o=null==t?void 0:t[r])?void 0:o[a])??(null==(i=null==t?void 0:t[r])?void 0:i[null==n?void 0:n[r]])??"");break;case"string":case"number":const u=r;c.push((null==(a=null==t?void 0:t[u])?void 0:a[e])??(null==(s=null==t?void 0:t[u])?void 0:s[null==n?void 0:n[u]])??"");break;default:if(void 0===e)break;c.push((null==(l=null==t?void 0:t[r])?void 0:l[n])??"")}return c.join(" ")},Hp=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:i,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:u=!1,autoCols:d=!1,children:f,...p})=>{const h=$p(t,jp,1),m=$p(n,Pp,"sm"),y=$p(r,Cp,""),g=$p(o,Tp,""),v=$p(i,Ip,""),b=$p(a,Dp,""),x=$p(s,Mp,"");return(0,L.jsx)("div",{className:Ue("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":d,"auto-rows-auto":u},h,m,y,g,v,b,x,e),...p,children:f})};Hp.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:i,...a})=>{const s=$p(n,Ap,0),l=$p(r,Np,0),c=$p(o,Rp,""),u=$p(i,Lp,"");return(0,L.jsx)("div",{className:Ue(s,l,c,u,e),...a,children:t})};const qp=(0,s.createContext)({}),Kp=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:i,align:a,wrap:s,cols:l,className:c,children:u,...d})=>{if("grid"===e)return(0,L.jsx)(qp.Provider,{value:{containerType:e},children:(0,L.jsx)(Hp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:a,justify:i,...d})});const f=$p(s,zp,""),p=$p(t,Pp,"sm"),h=$p(n,Cp,""),m=$p(r,Tp,""),y=$p(o,Fp,""),g=$p(i,Dp,""),v=$p(a,Ip,""),b=Ue("flex",f,p,h,m,y,g,v,c);return(0,L.jsx)(qp.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,L.jsx)("div",{className:b,children:u}):(0,L.jsx)(Hp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:a,justify:i,...d})})},Yp=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:o,className:i,children:a,...l})=>{const{containerType:c,cols:u}=(0,s.useContext)(qp);if("grid"===c)return(0,L.jsx)(Hp.Item,{className:i,alignSelf:r,justifySelf:o,children:a,...l});const d=$p(r,Rp,""),f=$p(o,Lp,""),p=$p(e,Vp,0),h=$p(t,Up,0),m=$p(n,Wp,0),y=$p(u,Bp,1);return(0,L.jsx)("div",{className:Ue("box-border",p,h,m,d,f,y,i),children:a})};Kp.Item=Yp,Kp.displayName="Container",Yp.displayName="Container.Item";var Xp=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const Gp=(0,s.createContext)(null);function Zp(){const e=(0,s.useContext)(Gp);return null==e&&Xp(8),e}function Jp({defaultSelection:e}){const[t]=Zp();return(0,s.useEffect)((()=>{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const Qp={},eh={},th={},nh={},rh={},oh={},ih={},ah={},sh={},lh={},ch={},uh={},dh={},fh={},ph={},hh={},mh={},yh={},gh={},vh={},bh={},xh={},wh={},_h={},Sh={},kh={},Eh={},Oh={},jh={},Ph={},Ch={},Th={},Ah={},Nh={},Mh={},Dh={},Ih={},Rh={},Lh={},Fh={},zh=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,Bh=zh&&"documentMode"in document?document.documentMode:null,Wh=zh&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Vh=zh&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Uh=!(!zh||!("InputEvent"in window)||Bh)&&"getTargetRanges"in new window.InputEvent("input"),$h=zh&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Hh=zh&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,qh=zh&&/Android/.test(navigator.userAgent),Kh=zh&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Yh=zh&&qh&&Kh,Xh=zh&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Kh,Gh=0,Zh=1,Jh=2,Qh=1,em=2,tm=3,nm=4,rm=5,om=6,im=$h||Hh||Xh?" ":"",am="\n\n",sm=Vh?" ":im,lm="֑-߿יִ-﷽ﹰ-ﻼ",cm="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",um=new RegExp("^[^"+cm+"]*["+lm+"]"),dm=new RegExp("^[^"+lm+"]*["+cm+"]"),fm={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},pm={directionless:1,unmergeable:2},hm={center:2,end:6,justify:4,left:1,right:3,start:5},mm={[em]:"center",[om]:"end",[nm]:"justify",[Qh]:"left",[tm]:"right",[rm]:"start"},ym={normal:0,segmented:2,token:1},gm={[Gh]:"normal",[Jh]:"segmented",[Zh]:"token"};var vm=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function bm(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let xm=!1,wm=0;function _m(e){wm=e.timeStamp}function Sm(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function km(e,t,n){const r=My(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&cy(t,a,o,i,!1)}function Em(e,t,n){if(kv(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return 3===t.nodeType&&n.isAttached()}function Om(e,t,n){xm=!0;const r=performance.now()-wm>100;try{fb(e,(()=>{const o=Lv()||e.getEditorState().read((()=>{const e=Lv();return null!==e?e.clone():null})),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const d=t[n],f=d.type,p=d.target;let h=Gm(p,s);if(!(null===h&&p!==a||gb(h)))if("characterData"===f)r&&hv(h)&&Em(o,p,h)&&km(p,h,e);else if("childList"===f){c=!0;const t=d.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=Xm(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&("BR"!==r.nodeName||!Sm(r,i,e))){if(Vh){const e=r.innerText||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=d.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];("BR"===r.nodeName&&Sm(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&(p===a&&(h=ey(s)),i.set(p,h))}}}if(i.size>0)for(const[t,n]of i)if(hb(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n<r.length;n++){const i=r[n],a=e.getElementByKey(i);null!==a&&(null==o?(t.appendChild(a),o=a):o!==a&&t.replaceChild(a,o),o=o.nextSibling)}}else hv(n)&&n.markDirty();const d=n.takeRecords();if(d.length>0){for(let t=0;t<d.length;t++){const n=d[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||Sm(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,ty(o)),Vh&&wy(e)&&o.insertRawText(u))}))}finally{xm=!1}}function jm(e){const t=e._observer;null!==t&&Om(e,t.takeRecords(),t)}function Pm(e){(function(e){0===wm&&jy(e).addEventListener("textInput",_m,!0)})(e),e._observer=new MutationObserver(((t,n)=>{Om(e,t,n)}))}function Cm(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function Tm(e,t){const n=e.mergeWithSibling(t),r=tb()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function Am(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&hv(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(Cm(t,r)){r=Tm(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&hv(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(Cm(r,n)){r=Tm(r,n);break}break}n.remove()}}else r.remove()}function Nm(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),hv(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!hb(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let Mm=1;const Dm="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function Im(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return gb(Gm(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==zm(t))}function Rm(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!Im(t)&&Fm(t)===e}catch{return!1}}function Lm(e){return e instanceof Cb}function Fm(e){let t=e;for(;null!=t;){const e=zm(t);if(Lm(e))return e;t=Ey(t)}return null}function zm(e){return e?e.__lexicalEditor:null}function Bm(e){return e.isToken()||e.isSegmented()}function Wm(e){return 3===e.nodeType}function Vm(e){let t=e;for(;null!=t;){if(Wm(t))return t;t=t.firstChild}return null}function Um(e,t,n){const r=fm[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~fm.superscript:"superscript"===t&&(o&=~fm.subscript),o}function $m(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function Hm(e){Qv();const t=e.getLatest(),n=t.__parent,r=eb(),o=tb(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,hb(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function qm(e){Jv();const t=tb(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=Ym(n);null!==e&&e.getWritable()}if(null!==e){const t=Ym(e);null!==t&&t.getWritable()}}}function Km(){return Zv()?null:tb()._compositionKey}function Ym(e,t){const n=(t||eb())._nodeMap.get(e);return void 0===n?null:n}function Xm(e,t){const n=e[`__lexicalKey_${tb()._key}`];return void 0!==n?Ym(n,t):null}function Gm(e,t){let n=e;for(;null!=n;){const e=Xm(n,t);if(null!==e)return e;n=Ey(n)}return null}function Zm(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Jm(e){return e.read((()=>Qm().getTextContent()))}function Qm(){return ey(eb())}function ey(e){return e._nodeMap.get("root")}function ty(e){Jv();const t=eb();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function ny(e){const t=tb(),n=function(e,t){let n=e;for(;null!=n;){const e=n[`__lexicalKey_${t._key}`];if(void 0!==e)return e;n=Ey(n)}return null}(e,t);return null===n?e===t.getRootElement()?Ym("root"):null:Ym(n)}function ry(e,t){return t?e.getTextContentSize():0}function oy(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function iy(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function ay(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function sy(e){return 3===e.nodeType?e.nodeValue:null}function ly(e,t,n){const r=My(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=sy(o);const r=Gm(o);if(null!==t&&hv(r)){if(t===im&&n){const e=n.length;t=n,i=e,a=e}null!==t&&cy(r,t,i,a,e)}}}function cy(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===im&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(qm(null),$h||Hh||Xh)i.remove();else{const e=tb();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=Fv(),l=i.getTextContentSize(),c=Km(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||kv(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const d=Lv();if(!kv(d)||null===n||null===r)return void i.setTextContent(s);if(d.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=pv(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function uy(e){return"ArrowLeft"===e}function dy(e){return"ArrowRight"===e}function fy(e,t){return Wh?e:t}function py(e){return"Enter"===e}function hy(e){return"Backspace"===e}function my(e){return"Delete"===e}function yy(e,t,n){return"a"===e.toLowerCase()&&fy(t,n)}function gy(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=bm(o);return n[t]=e,e}return o}function vy(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&vm(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),d="destroyed"===u&&"created"===o;(void 0===u||d)&&c.set(a,d?"updated":o)}function by(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function xy(e,t){const n=e.offset;if("element"===e.type)return by(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?by(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function wy(e){const t=jy(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function _y(e,t,n){return cb(e,t,n)}function Sy(e){return!bb(e)&&!e.isLastChild()&&!e.isInline()}function ky(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&vm(75,t),n}function Ey(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function Oy(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function jy(e){const t=e._window;return null===t&&vm(78),t}function Py(e){return bb(e)||hb(e)&&e.isShadowRoot()}function Cy(e){const t=tb(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&vm(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||vm(98),t}return e}function Ty(e,t){!bb(e.getParent())||hb(t)||gb(t)||vm(99)}function Ay(e){return(gb(e)||hb(e)&&!e.canBeEmpty())&&!e.isInline()}function Ny(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function My(e){return zh?(e||window).getSelection():null}function Dy(e){return 1===e.nodeType}function Iy(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 null!==e.nodeName.match(t)}function Ry(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 null!==e.nodeName.match(t)}function Ly(e){if(bb(e)||gb(e)&&!e.isInline())return!0;if(!hb(e)||Py(e))return!1;const t=e.getFirstChild(),n=null===t||Gg(t)||hv(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function Fy(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const zy=new WeakMap,By=new Map;function Wy(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function Vy(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(hb(a)&&Vy(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let Uy,$y,Hy,qy,Ky,Yy,Xy,Gy,Zy,Jy,Qy="",eg="",tg=null,ng="",rg="",og=!1,ig=!1,ag=null;function sg(e,t){const n=Xy.get(e);if(null!==t){const n=_g(e);n.parentNode===t&&t.removeChild(n)}if(Gy.has(e)||$y._keyToDOMMap.delete(e),hb(n)){const e=vg(n,Xy);lg(e,0,e.length-1,null)}void 0!==n&&vy(Jy,Hy,qy,n,"destroyed")}function lg(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&sg(t,r)}}function cg(e,t){e.setProperty("text-align",t)}const ug="40px";function dg(e,t){const n=Uy.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||ug;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function fg(e,t){const n=e.style;0===t?cg(n,""):1===t?cg(n,"left"):2===t?cg(n,"center"):3===t?cg(n,"right"):4===t?cg(n,"justify"):5===t?cg(n,"start"):6===t&&cg(n,"end")}function pg(e,t,n){const r=Gy.get(e);void 0===r&&vm(60);const o=r.createDOM(Uy,$y);if(function(e,t,n){const r=n._keyToDOMMap;t["__lexicalKey_"+n._key]=e,r.set(e,t)}(e,o,$y),hv(r)?o.setAttribute("data-lexical-text","true"):gb(r)&&o.setAttribute("data-lexical-decorator","true"),hb(r)){const e=r.__indent,t=r.__size;if(0!==e&&dg(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=eg;eg="",hg(e,n,0,t,r,null),gg(n,r),eg=o}(vg(r,Gy),e,r,o)}const n=r.__format;0!==n&&fg(o,n),r.isInline()||yg(null,r,o),Sy(r)&&(Qy+=am,rg+=am)}else{const t=r.getTextContent();if(gb(r)){const t=r.decorate($y,Uy);null!==t&&xg(e,t),o.contentEditable="false"}else hv(r)&&(r.isDirectionless()||(eg+=t));Qy+=t,rg+=t}if(null!==t)if(null!=n)t.insertBefore(o,n);else{const e=t.__lexicalLineBreak;null!=e?t.insertBefore(o,e):t.appendChild(o)}return vy(Jy,Hy,qy,r,"created"),o}function hg(e,t,n,r,o,i){const a=Qy;Qy="";let s=n;for(;s<=r;++s){pg(e[s],o,i);const t=Gy.get(e[s]);null!==t&&hv(t)&&(null===tg&&(tg=t.getFormat()),""===ng&&(ng=t.getStyle()))}Sy(t)&&(Qy+=am),o.__lexicalTextContent=Qy,Qy=a+Qy}function mg(e,t){const n=t.get(e);return Gg(n)||gb(n)&&n.isInline()}function yg(e,t,n){const r=null!==e&&(0===e.__size||mg(e.__last,Xy)),o=0===t.__size||mg(t.__last,Gy);if(r){if(!o){const e=n.__lexicalLineBreak;if(null!=e)try{n.removeChild(e)}catch(t){if("object"==typeof t&&null!=t){const r=`${t.toString()} Parent: ${n.tagName}, child: ${e.tagName}.`;throw new Error(r)}throw t}n.__lexicalLineBreak=null}}else if(o){const e=document.createElement("br");n.__lexicalLineBreak=e,n.appendChild(e)}}function gg(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==eg||r!==ag){const n=""===eg,i=n?ag:(o=eg,um.test(o)?"rtl":dm.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=Uy.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=bm(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=bm(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}ig||(e.getWritable().__dir=i)}ag=i,t.__lexicalDirTextContent=eg,t.__lexicalDir=i}var o}function vg(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&vm(101),n.push(r),r=e.__next}return n}function bg(e,t){const n=Xy.get(e);let r=Gy.get(e);void 0!==n&&void 0!==r||vm(61);const o=og||Yy.has(e)||Ky.has(e),i=ky($y,e);if(n===r&&!o){if(hb(n)){const e=i.__lexicalTextContent;void 0!==e&&(Qy+=e,rg+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(eg+=t)}else{const e=n.getTextContent();hv(n)&&!n.isDirectionless()&&(eg+=e),rg+=e,Qy+=e}return i}if(n!==r&&o&&vy(Jy,Hy,qy,r,"updated"),r.updateDOM(n,i,Uy)){const n=pg(e,null,null);return null===t&&vm(62),t.replaceChild(n,i),sg(e,null),n}if(hb(n)&&hb(r)){const e=r.__indent;e!==n.__indent&&dg(i,e);const t=r.__format;t!==n.__format&&fg(i,t),o&&(function(e,t,n){const r=eg;var o;eg="",tg=null,ng="",function(e,t,n){const r=Qy,o=e.__size,i=t.__size;if(Qy="",1===o&&1===i){const r=e.__first,o=t.__first;if(r===o)bg(r,n);else{const e=_g(r),t=pg(o,null,null);try{n.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i){const a=`${i.toString()} Parent: ${n.tagName}, new child: {tag: ${t.tagName} key: ${o}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw new Error(a)}throw i}sg(r,null)}const i=Gy.get(o);hv(i)&&(null===tg&&(tg=i.getFormat()),""===ng&&(ng=i.getStyle()))}else{const r=vg(e,Xy),a=vg(t,Gy);if(0===o)0!==i&&hg(a,t,0,i-1,n,null);else if(0===i){if(0!==o){const e=null==n.__lexicalLineBreak;lg(r,0,o-1,e?null:n),e&&(n.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.firstChild,d=0,f=0;for(;d<=a&&f<=s;){const e=t[d],r=n[f];if(e===r)u=wg(bg(r,i)),d++,f++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=ky($y,r);e===u?u=wg(bg(r,i)):(null!=u?i.insertBefore(e,u):i.appendChild(e),bg(r,i)),d++,f++}else pg(r,i,u),f++;else u=wg(_g(e)),sg(e,i),d++}const o=Gy.get(r);null!==o&&hv(o)&&(null===tg&&(tg=o.getFormat()),""===ng&&(ng=o.getStyle()))}const p=d>a,h=f>s;if(p&&!h){const t=n[s+1];hg(n,e,f,s,i,void 0===t?null:$y.getElementByKey(t))}else h&&!p&&lg(t,d,a,i)}(t,r,a,o,i,n)}Sy(t)&&(Qy+=am),n.__lexicalTextContent=Qy,Qy=r+Qy}(e,t,n),gg(t,n),jb(o=t)&&null!=tg&&tg!==o.__textFormat&&!ig&&(o.setTextFormat(tg),o.setTextStyle(ng)),function(e){jb(e)&&""!==ng&&ng!==e.__textStyle&&!ig&&e.setTextStyle(ng)}(t),eg=r}(n,r,i),bb(r)||r.isInline()||yg(n,r,i)),Sy(r)&&(Qy+=am,rg+=am)}else{const t=r.getTextContent();if(gb(r)){const t=r.decorate($y,Uy);null!==t&&xg(e,t)}else hv(r)&&!r.isDirectionless()&&(eg+=t);Qy+=t,rg+=t}if(!ig&&bb(r)&&r.__cachedText!==rg){const e=r.getWritable();e.__cachedText=rg,r=e}return i}function xg(e,t){let n=$y._pendingDecorators;const r=$y._decorators;if(null===n){if(r[e]===t)return;n=Zm($y)}n[e]=t}function wg(e){let t=e.nextSibling;return null!==t&&t===$y._blockCursorElement&&(t=t.nextSibling),t}function _g(e){const t=Zy.get(e);return void 0===t&&vm(75,e),t}const Sg=Object.freeze({}),kg=[["keydown",function(e,t){if(Eg=e.timeStamp,Og=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;_y(t,fh,e)||null!=n&&(function(e,t,n,r){return dy(e)&&!t&&!r&&!n}(n,o,a,i)?_y(t,ph,e):function(e,t,n,r,o){return dy(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?_y(t,hh,e):function(e,t,n,r){return uy(e)&&!t&&!r&&!n}(n,o,a,i)?_y(t,mh,e):function(e,t,n,r,o){return uy(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?_y(t,yh,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?_y(t,gh,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?_y(t,vh,e):function(e,t){return py(e)&&t}(n,r)?(Ng=!0,_y(t,bh,e)):function(e){return" "===e}(n)?_y(t,xh,e):function(e,t){return Wh&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),Ng=!0,_y(t,nh,!0)):function(e,t){return py(e)&&!t}(n,r)?(Ng=!1,_y(t,bh,e)):function(e,t,n,r){return Wh?!t&&!n&&(hy(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&hy(e)}(n,a,i,o)?hy(n)?_y(t,wh,e):(e.preventDefault(),_y(t,th,!0)):function(e){return"Escape"===e}(n)?_y(t,_h,e):function(e,t,n,r,o){return Wh?!(n||r||o)&&(my(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&my(e)}(n,o,r,a,i)?my(n)?_y(t,Sh,e):(e.preventDefault(),_y(t,th,!1)):function(e,t,n){return hy(e)&&(Wh?t:n)}(n,a,o)?(e.preventDefault(),_y(t,sh,!0)):function(e,t,n){return my(e)&&(Wh?t:n)}(n,a,o)?(e.preventDefault(),_y(t,sh,!1)):function(e,t){return Wh&&t&&hy(e)}(n,i)?(e.preventDefault(),_y(t,lh,!0)):function(e,t){return Wh&&t&&my(e)}(n,i)?(e.preventDefault(),_y(t,lh,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&fy(n,r)}(n,a,i,o)?(e.preventDefault(),_y(t,ch,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&fy(n,r)}(n,a,i,o)?(e.preventDefault(),_y(t,ch,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&fy(n,r)}(n,a,i,o)?(e.preventDefault(),_y(t,ch,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?_y(t,kh,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&fy(n,r)}(n,r,i,o)?(e.preventDefault(),_y(t,uh,void 0)):function(e,t,n,r){return Wh?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),_y(t,dh,void 0)):Ov(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(Wh?n:r)}(n,r,i,o)?(e.preventDefault(),_y(t,Ch,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(Wh?n:r)}(n,r,i,o)?(e.preventDefault(),_y(t,Th,e)):yy(n,i,o)&&(e.preventDefault(),_y(t,Ah,e)):!Vh&&yy(n,i,o)&&(e.preventDefault(),_y(t,Ah,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&_y(t,Fh,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&fb(t,(()=>{gb(Gm(n))||(Ag=!0)}))}],["compositionstart",function(e,t){fb(t,(()=>{const n=Lv();if(kv(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();qm(r.key),(e.timeStamp<Eg+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||hv(o)&&o.getStyle()!==n.style)&&_y(t,oh,sm)}}))}],["compositionend",function(e,t){Vh?Mg=!0:fb(t,(()=>{zg(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),fb(t,(()=>{const n=Lv(),r=e.data,o=Fg(e);if(null!=r&&kv(n)&&Ig(n,o,r,e.timeStamp,!1)){Mg&&(zg(t,r),Mg=!1);const o=n.anchor.getNode(),i=My(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;Uh&&!n.isCollapsed()&&hv(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===sy(i.anchorNode)||_y(t,oh,r);const c=r.length;Vh&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),$h||Hh||Xh||!t.isComposing()||(Eg=0,qm(null))}else ly(!1,t,null!==r?r:void 0),Mg&&(zg(t,r||void 0),Mg=!1);Jv(),jm(tb())})),Pg=null}],["click",function(e,t){fb(t,(()=>{const n=Lv(),r=My(t._window),o=Fv();if(r)if(kv(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!bb(i)&&1===Qm().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3===e.detail&&!n.isCollapsed()&&i!==n.focus.getNode()&&(hb(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;if(null!==n){const i=n.nodeType;(1===i||3===i)&&ty(Rv(o,r,t,e))}}_y(t,eh,e)}))}],["cut",Sg],["copy",Sg],["dragstart",Sg],["dragover",Sg],["dragend",Sg],["paste",Sg],["focus",Sg],["blur",Sg],["drop",Sg]];Uh&&kg.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=Fg(e);"deleteCompositionText"===n||Vh&&wy(t)||"insertCompositionText"!==n&&fb(t,(()=>{const o=Lv();if("deleteContentBackward"===n){if(null===o){const e=Fv();if(!kv(e))return;ty(e.clone())}if(kv(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===Og&&i<Eg+30&&t.isComposing()&&n){if(qm(null),Eg=0,setTimeout((()=>{fb(t,(()=>{qm(null)}))}),30),kv(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),hv(e)||vm(142),o.style=e.getStyle()}}else{qm(null),e.preventDefault();const r=o.anchor.getNode().getTextContent(),i=0===o.anchor.offset&&o.focus.offset===r.length;Yh&&n&&!i||_y(t,th,!0)}return}}var i;if(!kv(o))return;const a=e.data;null!==Pg&&ly(!1,t,Pg),o.dirty&&null===Pg||!o.isCollapsed()||bb(o.anchor.getNode())||null===r||o.applyDOMRange(r),Pg=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":_y(t,oh,e);break;case"insertFromComposition":qm(null),_y(t,oh,e);break;case"insertLineBreak":qm(null),_y(t,nh,!1);break;case"insertParagraph":qm(null),Ng&&!Hh?(Ng=!1,_y(t,nh,!1)):_y(t,rh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":_y(t,ih,e);break;case"deleteByComposition":(function(e,t){return e!==t||hb(e)||hb(t)||!e.isToken()||!t.isToken()})(c,u)&&_y(t,ah,e);break;case"deleteByDrag":case"deleteByCut":_y(t,ah,e);break;case"deleteContent":_y(t,th,!1);break;case"deleteWordBackward":_y(t,sh,!0);break;case"deleteWordForward":_y(t,sh,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":_y(t,lh,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":_y(t,lh,!1);break;case"formatStrikeThrough":_y(t,ch,"strikethrough");break;case"formatBold":_y(t,ch,"bold");break;case"formatItalic":_y(t,ch,"italic");break;case"formatUnderline":_y(t,ch,"underline");break;case"historyUndo":_y(t,uh,void 0);break;case"historyRedo":_y(t,dh,void 0)}else{if("\n"===a)e.preventDefault(),_y(t,nh,!1);else if(a===am)e.preventDefault(),_y(t,rh,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&Ig(o,r,a,e.timeStamp,!0)?(e.preventDefault(),_y(t,oh,a)):Pg=a;jg=e.timeStamp}}))}(e,t)]);let Eg=0,Og=null,jg=0,Pg=null;const Cg=new WeakMap;let Tg=!1,Ag=!1,Ng=!1,Mg=!1,Dg=[0,"",0,"root",0];function Ig(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=tb(),c=My(l._window),u=null!==c?c.anchorNode:null,d=i.key,f=l.getElementByKey(d),p=n.length;return d!==a.key||!hv(s)||(!o&&(!Uh||jg<r+50)||s.isDirty()&&p<2||oy(n))&&i.offset!==a.offset&&!s.isComposing()||Bm(s)||s.isDirty()&&p>1||(o||!Uh)&&null!==f&&!s.isComposing()&&u!==Vm(f)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(hv(t)||hb(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function Rg(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function Lg(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;Tg&&(Tg=!1,Rg(r,o)&&Rg(i,a))||fb(t,(()=>{if(!n)return void ty(null);if(!Rm(t,r,i))return;const s=Lv();if(kv(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=jy(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,d]=Dg,f=Qm(),p=!1===t.isComposing()&&""===f.getTextContent();if(i<d+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)hv(r)||vm(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){const e=n.getNode();s.style="",e instanceof kb&&0===e.getChildrenSize()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,d=l?t:e,f=l?e:t;let p=255,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(hv(t)&&0!==n&&!(0===e&&t.__key===d&&c===n||e===i-1&&t.__key===f&&0===u)&&(h=!0,p&=t.getFormat(),0===p))break}s.format=h?p:0}}_y(t,Qp,void 0)}))}function Fg(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function zg(e,t){const n=e._compositionKey;if(qm(null),null!==n&&null!=t){if(""===t){const t=Ym(n),r=Vm(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&hv(t)&&cy(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=Lv();if(kv(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void _y(e,bh,null)}}}ly(!0,e,t)}function Bg(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const Wg=new Map;function Vg(e){const t=e.target,n=My(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null===n)return;const r=Fm(n.anchorNode);if(null===r)return;Ag&&(Ag=!1,fb(r,(()=>{const t=Fv(),o=n.anchorNode;if(null===o)return;const i=o.nodeType;1!==i&&3!==i||ty(Rv(t,n,r,e))})));const o=iy(r),i=o[o.length-1],a=i._key,s=Wg.get(a),l=s||i;l!==r&&Lg(n,l,!1),Lg(n,r,!0),r!==i?Wg.set(a,r):s&&Wg.delete(a)}function Ug(e){e._lexicalHandled=!0}function $g(e){return!0===e._lexicalHandled}function Hg(e,t,n){Jv();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=Lv();if(!kv(t)||!hb(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return Oy(o,e)&&n.set(e.__key,0,"element"),Oy(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(kv(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(Wv(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(Wv(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else Ov(i)&&t&&e.isSelected()&&e.selectPrevious();if(kv(i)&&t&&!a){const t=e.getIndexWithinParent();$m(e),zv(i,o,t,-1)}else $m(e);n||Py(o)||o.canBeEmpty()||!o.isEmpty()||Hg(o,t),t&&bb(o)&&o.isEmpty()&&o.selectEnd()}class qg{static getType(){vm(64,this.name)}static clone(e){vm(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);Jv(),Qv();const n=tb(),r=eb(),o=""+Mm++;r._nodeMap.set(o,e),hb(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){vm(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=Ym(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||Lv();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(hv(this))return n;if(kv(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(gb(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:Ym(e)}getParentOrThrow(){const e=this.getParent();return null===e&&vm(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(Py(t))return hb(e)||e===this&&gb(e)||vm(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&vm(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:Ym(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:Ym(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();hb(this)&&t.unshift(this),hb(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=hb(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&vm(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=tb()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=Ym(this.__key);return null===e&&vm(113),e}getWritable(){Jv();const e=eb(),t=tb(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=Lv();if(null!==a&&a.setCachedNodes(null),i.has(r))return Hm(o),o;const s=Wy(o);return i.add(r),Hm(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){vm(70)}updateDOM(e,t,n){vm(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){vm(72)}static importJSON(e){vm(18,this.name)}static transform(){return null}remove(e){Hg(this,!0,e)}replace(e,t){Jv();let n=Lv();null!==n&&(n=n.clone()),Ty(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;$m(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),d=r.__prev,f=r.__next,p=r.__parent;if(Hg(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=d,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=f,a.__parent=p,s.__size=l,t&&(hb(this)&&hb(a)||vm(139),this.getChildren().forEach((e=>{a.append(e)}))),kv(n)){ty(n);const e=n.anchor,t=n.focus;e.key===o&&wv(e,a),t.key===o&&wv(t,a)}return Km()===o&&qm(i),a}insertAfter(e,t=!0){Jv(),Ty(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=Lv();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if($m(r),kv(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,d=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=d,r.__prev=n.__key,r.__parent=n.__parent,t&&kv(i)){const e=this.getIndexWithinParent();zv(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){Jv(),Ty(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;$m(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=Lv();return t&&kv(c)&&zv(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return Ob()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){Jv();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(hb(n))return n.select();if(!hv(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){Jv();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(hb(n))return n.select(0,0);if(!hv(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}}class Kg extends qg{static getType(){return"linebreak"}static clone(e){return new Kg(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&Ry(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&Zg(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&Zg(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&Ry(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&Zg(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&Zg(r))return!0}return!1}(e)?null:{conversion:Yg,priority:0}}}static importJSON(e){return Xg()}exportJSON(){return{type:"linebreak",version:1}}}function Yg(e){return{node:Xg()}}function Xg(){return Cy(new Kg)}function Gg(e){return e instanceof Kg}function Zg(e){return 3===e.nodeType&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Jg(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function Qg(e,t){return 1&t?"strong":2&t?"em":"span"}function ev(e,t,n,r,o){const i=r.classList;let a=gy(o,"base");void 0!==a&&i.add(...a),a=gy(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in fm){const r=fm[e];if(a=gy(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function tv(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?im:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||Vh){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function nv(e,t,n,r,o,i){tv(o,e,t);const a=i.theme.text;void 0!==a&&ev(0,0,r,e,a)}function rv(e,t){const n=document.createElement(t);return n.appendChild(e),n}class ov extends qg{static getType(){return"text"}static clone(e){return new ov(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return gm[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===Km()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=fm[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return Um(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=Jg(0,n),o=Qg(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),nv(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=Jg(0,o),s=Jg(0,i),l=Qg(0,o),c=Qg(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&vm(48);const o=document.createElement(c);return nv(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&vm(49)),tv(r,u,this);const d=n.theme.text;void 0!==d&&o!==i&&ev(0,o,i,u,d);const f=e.__style,p=this.__style;return f!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:cv,priority:0}),b:()=>({conversion:av,priority:0}),code:()=>({conversion:fv,priority:0}),em:()=>({conversion:fv,priority:0}),i:()=>({conversion:fv,priority:0}),s:()=>({conversion:fv,priority:0}),span:()=>({conversion:iv,priority:0}),strong:()=>({conversion:fv,priority:0}),sub:()=>({conversion:fv,priority:0}),sup:()=>({conversion:fv,priority:0}),u:()=>({conversion:fv,priority:0})}}static importJSON(e){const t=pv(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return null!==t&&Dy(t)||vm(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=rv(t,"b")),this.hasFormat("italic")&&(t=rv(t,"i")),this.hasFormat("strikethrough")&&(t=rv(t,"s")),this.hasFormat("underline")&&(t=rv(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?fm[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?pm[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=Um(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=ym[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){Jv();let n=e,r=t;const o=Lv(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!kv(o))return Dv(a,n,a,r,"text","text");{const e=Km();e!==o.anchor.key&&e!==o.focus.key||qm(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=Lv();if(r&&kv(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){Jv();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=Km(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],d=t.getParent();let f;const p=t.getFormat(),h=t.getStyle(),m=t.__detail;let y=!1;t.isSegmented()?(f=pv(u),f.__format=p,f.__style=h,f.__detail=m,y=!0):(f=t.getWritable(),f.__text=u);const g=Lv(),v=[f];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=pv(t).getWritable();i.__format=p,i.__style=h,i.__detail=m;const s=i.__key,l=b+n;if(kv(g)){const e=g.anchor,t=g.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,g.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,g.dirty=!0)}o===r&&qm(s),b=l,v.push(i)}if(null!==d){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&Hm(t),null!==n&&Hm(n)}(this);const e=d.getWritable(),t=this.getIndexWithinParent();y?(e.splice(t,0,v),this.remove()):e.splice(t,1,v),kv(g)&&zv(g,d,t,c-1)}return v}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||vm(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;Km()===r&&qm(n);const a=Lv();if(kv(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(Vv(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(Vv(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function iv(e){return{forChild:mv(e.style),node:null}}function av(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:mv(t.style,n?void 0:"bold"),node:null}}const sv=new WeakMap;function lv(e){return"PRE"===e.nodeName||1===e.nodeType&&void 0!==e.style&&void 0!==e.style.whiteSpace&&e.style.whiteSpace.startsWith("pre")}function cv(e){const t=e;null===e.parentElement&&vm(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=sv.get(n))&&!lv(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)sv.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(Xg()):"\t"===r?t.push(gv()):""!==r&&t.push(pv(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=uv(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=uv(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:pv(n)}}function uv(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,1===n.nodeType){const e=n.style.display;if(""===e&&!Iy(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(3===n.nodeType)return n;if("BR"===n.nodeName)return null}}const dv={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function fv(e){const t=dv[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:mv(e.style,t),node:null}}function pv(e=""){return Cy(new ov(e))}function hv(e){return e instanceof ov}function mv(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>(hv(e)&&(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class yv extends ov{static getType(){return"tab"}static clone(e){return new yv(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=gv();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){vm(126)}setDetail(e){vm(127)}setMode(e){vm(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function gv(){return Cy(new yv)}class vv{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(hb(t)){const e=t.getDescendantByIndex(r);t=e??t}if(hb(n)){const e=n.getDescendantByIndex(o);n=e??n}return t===n?r<o:t.isBefore(n)}getNode(){const e=Ym(this.key);return null===e&&vm(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,Zv()||(Km()===o&&qm(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function bv(e,t,n){return new vv(e,t,n)}function xv(e,t){let n=t.__key,r=e.offset,o="element";if(hv(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!hb(t)){const e=t.getNextSibling();if(hv(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function wv(e,t){if(hb(t)){const n=t.getLastDescendant();hb(n)||hv(n)?xv(e,n):xv(e,t)}else xv(e,t)}function _v(e,t,n,r){e.key=t,e.offset=n,e.type=r}let Sv=class e{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Ov(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(hv(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=Ym(e);null!==t&&n.push(t)}return Zv()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}};function kv(e){return e instanceof Ev}class Ev{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!kv(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=o.offset,c=i.offset;if(hb(a)){const e=a.getDescendantByIndex(l);a=e??a}if(hb(s)){let e=s.getDescendantByIndex(c);null!==e&&e!==a&&s.getChildAtIndex(c)===e&&(e=e.getPreviousSibling()),s=e??s}let u;return u=a.is(s)?hb(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(s),Zv()||(this._cachedNodes=u),u}setTextNodeRange(e,t,n,r){_v(this.anchor,e.__key,t,"text"),_v(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=Pv(this);let l="",c=!0;for(let u=0;u<e.length;u++){const d=e[u];if(hb(d)&&!d.isInline())c||(l+="\n"),c=!d.isEmpty();else if(c=!1,hv(d)){let e=d.getTextContent();d===t?d===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):d===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!gb(d)&&!Gg(d)||d===n&&this.isCollapsed()||(l+=d.getTextContent())}return l}applyDOMRange(e){const t=tb(),n=t.getEditorState()._selection,r=Mv(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;_v(this.anchor,o.key,o.offset,o.type),_v(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Ev(bv(e.key,e.offset,e.type),bv(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=Um(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=fm[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(Xg()):"\t"===r?n.push(gv()):n.push(pv(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=pv(),s=bb(o)?Ob().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let d=c[0];hv(d)||vm(26);const f=d.getTextContent().length,p=d.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===a.type&&(l=f,a.set(i.key,l,"text")),this.isCollapsed()&&s===f&&(d.isSegmented()||d.isToken()||!d.canInsertTextAfter()||!p.canInsertTextAfter()&&null===d.getNextSibling())){let t=d.getNextSibling();if(hv(t)&&t.canInsertTextBefore()&&!Bm(t)||(t=pv(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?d.insertAfter(t):p.insertAfter(t)),t.select(0,0),d=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(d.isSegmented()||d.isToken()||!d.canInsertTextBefore()||!p.canInsertTextBefore()&&null===d.getPreviousSibling())){let t=d.getPreviousSibling();if(hv(t)&&!Bm(t)||(t=pv(),t.setFormat(r),p.canInsertTextBefore()?d.insertBefore(t):p.insertBefore(t)),t.select(),d=t,""!==e)return void this.insertText(e)}else if(d.isSegmented()&&s!==f){const e=pv(d.getTextContent());e.setFormat(r),d.replace(e),d=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||hb(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),Nv(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(d.isToken()){const t=pv(e);return t.select(),void d.replace(t)}const t=d.getFormat(),n=d.getStyle();if(s!==l||t===r&&n===o){if(function(e){return e instanceof yv}(d)){const t=pv(e);return t.setFormat(r),t.setStyle(o),t.select(),void d.replace(t)}}else{if(""!==d.getTextContent()){const t=pv(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)d.insertBefore(t,!1);else{const[e]=d.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}d.setFormat(r),d.setStyle(o)}const i=l-s;d=d.spliceText(s,i,e,!0),""===d.getTextContent()?d.remove():"text"===this.anchor.type&&(d.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...d.getParentKeys(),...h.getParentKeys()]),n=hb(d)?d:d.getParentOrThrow();let r=hb(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===h.getTextContent())||"element"===a.type&&h.getIndexWithinParent()<l)if(hv(h)&&!h.isToken()&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=pv(h.getTextContent());h.replace(e),h=e}bb(a.getNode())||"text"!==a.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),y=n.isInline()&&null===d.getNextSibling()?n:d;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(d)||hb(t)&&t.isParentOf(d))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||y.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(d.isToken())if(s===f)d.select();else{const t=pv(e);t.select(),d.replace(t)}else d=d.spliceText(s,f-s,e,!0),""===d.getTextContent()?d.remove():d.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void qm(null);const t=this.getNodes(),n=[];for(const e of t)hv(e)&&n.push(e);const r=n.length;if(0===r)return this.toggleFormat(e),void qm(null);const o=this.anchor,i=this.focus,a=this.isBackward(),s=a?i:o,l=a?o:i;let c=0,u=n[0],d="element"===s.type?0:s.offset;if("text"===s.type&&d===u.getTextContentSize()&&(c=1,u=n[1],d=0),null==u)return;const f=u.getFormatFlags(e,null),p=r-1;let h=n[p];const m="text"===l.type?l.offset:h.getTextContentSize();if(u.is(h)){if(d===m)return;if(Bm(u)||0===d&&m===u.getTextContentSize())u.setFormat(f);else{const e=u.splitText(d,m),t=0===d?e[0]:e[1];t.setFormat(f),"text"===s.type&&s.set(t.__key,0,"text"),"text"===l.type&&l.set(t.__key,m-d,"text")}return void(this.format=f)}0===d||Bm(u)||([,u]=u.splitText(d),d=0),u.setFormat(f);const y=h.getFormatFlags(e,f);m>0&&(m===h.getTextContentSize()||Bm(h)||([h]=h.splitText(m)),h.setFormat(y));for(let t=c+1;t<p;t++){const r=n[t],o=r.getFormatFlags(e,y);r.setFormat(o)}"text"===s.type&&s.set(u.__key,d,"text"),"text"===l.type&&l.set(h.__key,m,"text"),this.format=f|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=Lv();return kv(t)||vm(134),t.insertNodes(e)}const t=Fy((this.isBackward()?this.focus:this.anchor).getNode(),Ly),n=e[e.length-1];if("__language"in t&&hb(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const r=Uv(this);t.splice(r,0,e),n.selectEnd()}return}if(!e.some((e=>(hb(e)||gb(e))&&!e.isInline()))){hb(t)||vm(135);const r=Uv(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=Ob();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=Gg(o);if(i||gb(o)&&o.isInline()||hb(o)&&o.isInline()||hv(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),o=r.getLastDescendant(),i=r.getChildren(),a=hb(t)&&t.isEmpty()?null:this.insertParagraph(),s=i[i.length-1];let l=i[0];var c;hb(c=l)&&Ly(c)&&!c.isEmpty()&&hb(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(hb(t)||vm(135),t.append(...l.getChildren()),l=i[1]),l&&function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||vm(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(t,l);const u=Fy(o,Ly);a&&hb(u)&&(a.canMergeWhenEmpty()||Ly(s))&&(u.append(...a.getChildren()),a.remove()),hb(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const d=hb(t)?t.getLastChild():null;Gg(d)&&u!==t&&d.remove()}insertParagraph(){if("root"===this.anchor.key){const e=Ob();return Qm().splice(this.anchor.offset,0,[e]),e.select(),e}const e=Uv(this),t=Fy(this.anchor.getNode(),Ly);hb(t)||vm(136);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=Xg();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=Pv(this);if(0===t)return[];if(1===t){if(hv(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(hv(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(hv(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=xy(r,t);if(gb(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=Iv();return e.add(a.__key),void ty(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(hv(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return hb(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=tb(),l=My(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!hb(a)||a.isInline()||a.canBeEmpty()||Ny(c,s,u),function(e,t,n,r){e.modify(t,n,r)}(l,e,t?"backward":"forward",n),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=bb(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(Py(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];Oy(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];hb(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];hb(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;_v(n,t.key,t.offset,t.type),_v(t,r,o,i),e._cachedNodes=null}(this)}}}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&hb(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(hb(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=xy(r,e);if(gb(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&hb(n)&&0===n.getChildrenSize()){n.remove();const e=Iv();e.add(o.__key),ty(e)}else o.remove(),tb().dispatchCommand(Qp,void 0);return}if(!e&&hb(o)&&hb(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void Cv(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void Cv(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(oy(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&bb(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Ov(e){return e instanceof Sv}function jv(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function Pv(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[jv(n),jv(r)]}function Cv(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function Tv(e,t,n,r){let o,i=t;if(1===e.nodeType){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],d=!1;if(u===c)u=s[i+1],d=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=ny(u),hv(o))i=ry(o,a);else{let r=ny(e);if(null===r)return null;if(hb(r)){i=Math.min(r.getChildrenSize(),i);let e=r.getChildAtIndex(i);if(hb(e)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(e,0,n)){const t=a?e.getLastDescendant():e.getFirstDescendant();null===t?r=e:(e=t,r=hb(e)?e:e.getParentOrThrow()),i=0}hv(e)?(o=e,r=null,i=ry(e,a)):e!==r&&a&&!d&&i++}else{const n=r.getIndexWithinParent();i=0===t&&gb(r)&&ny(e)===r?n:n+1,r=r.getParentOrThrow()}if(hb(r))return bv(r.__key,i,"element")}}else o=ny(e);return hv(o)?bv(o.__key,i,"text"):null}function Av(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&hb(i)&&i.isInline()){const t=i.getPreviousSibling();hv(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else hb(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):hv(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&hb(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&hb(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();hv(t)&&(e.key=t.__key,e.offset=0)}}}function Nv(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);Av(e,r,o),Av(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=tb();if(i.isComposing()&&i._compositionKey!==e.key&&kv(n)){const r=n.anchor,o=n.focus;_v(e,r.key,r.offset,r.type),_v(t,o.key,o.offset,o.type)}}}function Mv(e,t,n,r,o,i){if(null===e||null===n||!Rm(o,e,n))return null;const a=Tv(e,t,kv(i)?i.anchor:null,o);if(null===a)return null;const s=Tv(n,r,kv(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=ny(e),r=ny(n);if(gb(t)&&gb(r))return null}return Nv(a,s,i),[a,s]}function Dv(e,t,n,r,o,i){const a=eb(),s=new Ev(bv(e,t,o),bv(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function Iv(){return new Sv(new Set)}function Rv(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!xm&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,d,f;if(kv(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,d=t.anchorOffset,f=t.focusOffset,s&&kv(e)&&!Rm(n,c,u))return e.clone();const p=Mv(c,d,u,f,n,e);if(null===p)return null;const[h,m]=p;return new Ev(h,m,kv(e)?e.format:0,kv(e)?e.style:"")}function Lv(){return eb()._selection}function Fv(){return tb()._editorState._selection}function zv(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),Bv(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,d=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(d)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}Bv(e)}function Bv(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!hb(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hv(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(hb(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(hv(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(hb(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(hv(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function Wv(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,hv(r)?(a=r.getTextContentSize(),s="text"):hb(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,hv(o)?s="text":hb(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function Vv(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function Uv(e){let t=e;e.isCollapsed()||t.removeText();const n=Lv();kv(n)&&(t=n),kv(t)||vm(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!Ly(o);)[o,i]=$v(o,i);return i}function $v(e,t){const n=e.getParent();if(!n){const e=Ob();return Qm().append(e),e.select(),[Qm(),0]}if(hv(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!hb(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Ev(bv(e.__key,t,"element"),bv(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let Hv=null,qv=null,Kv=!1,Yv=!1,Xv=0;const Gv={characterData:!0,childList:!0,subtree:!0};function Zv(){return Kv||null!==Hv&&Hv._readOnly}function Jv(){Kv&&vm(13)}function Qv(){Xv>99&&vm(14)}function eb(){return null===Hv&&vm(195,nb()),Hv}function tb(){return null===qv&&vm(196,nb()),qv}function nb(){let e=0;const t=new Set,n=Cb.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const o=zm(r);if(Lm(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}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 rb(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&vm(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function ob(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function ib(e,t){const n=e.type,r=t.get(n);void 0===r&&vm(17,n);const o=r.klass;e.type!==o.getType()&&vm(18,o.name);const i=o.importJSON(e),a=e.children;if(hb(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=ib(a[e],t);i.append(n)}return i}function ab(e,t,n){const r=Hv,o=Kv,i=qv;Hv=t,Kv=!0,qv=e;try{return n()}finally{Hv=r,Kv=o,qv=i}}function sb(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=Hv,u=Kv,d=qv,f=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){qv=e,Hv=n,Kv=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),h=function(e,t,n,r,o,i){Qy="",rg="",eg="",og=2===r,ag=null,$y=n,Uy=n._config,Hy=n._nodes,qy=$y._listeners.mutation,Ky=o,Yy=i,Xy=e._nodeMap,Gy=t._nodeMap,ig=t._readOnly,Zy=new Map(n._keyToDOMMap);const a=new Map;return Jy=a,bg("root",null),$y=void 0,Hy=void 0,Ky=void 0,Yy=void 0,Xy=void 0,Gy=void 0,Uy=void 0,Zy=void 0,Jy=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),Yv)throw t;return Pb(e,null,r,n),Pm(e),e._dirtyType=2,Yv=!0,sb(e,i),void(Yv=!1)}finally{p.observe(r,Gv),e._updating=f,Hv=c,Kv=u,qv=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,y=e._dirtyElements,g=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=Zm(e)),delete r[i])}(e,n);const x=o?null:My(e._window);if(e._editable&&null!==x&&(l||null===s||s.dirty)){qv=e,Hv=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&Ny(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&Im(u))return;if(!kv(t))return void(null!==e&&Rm(n,a,s)&&r.removeAllRanges());const d=t.anchor,f=t.focus,p=d.key,h=f.key,m=ky(n,p),y=ky(n,h),g=d.offset,v=f.offset,b=t.format,x=t.style,w=t.isCollapsed();let _=m,S=y,k=!1;if("text"===d.type){_=Vm(m);const e=d.getNode();k=e.getFormat()!==b||e.getStyle()!==x}else kv(e)&&"text"===e.anchor.type&&(k=!0);var E,O,j,P,C;if("text"===f.type&&(S=Vm(y)),null!==_&&null!==S&&(w&&(null===e||k||kv(e)&&(e.format!==b||e.style!==x))&&(E=b,O=x,j=g,P=p,C=performance.now(),Dg=[E,O,j,P,C]),l!==g||c!==v||a!==_||s!==S||"Range"===r.type&&w||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===d.type))){try{r.setBaseAndExtent(_,g,S,v)}catch{}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=t instanceof Ev&&"element"===t.anchor.type?_.childNodes[g]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=n.ownerDocument,o=r.defaultView;if(null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=jy(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=Ey(c)}}(n,t,i)}}Tg=!0}}(a,s,e,x,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(kv(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())Ay(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(Ay(t)){const n=t.getPreviousSibling();(null===n||Ay(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=bm(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&Ny(r,e,t)})(e,r,s),null!==p&&p.observe(r,Gv)}finally{qv=d,Hv=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,h,v,m,i),kv(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(Qp,void 0);const w=e._pendingDecorators;null!==w&&(e._decorators=w,e._pendingDecorators=null,lb("decorator",e,!0,w)),function(e,t,n){const r=Jm(t),o=Jm(n);r!==o&&lb("textcontent",e,!0,o)}(e,t||i,n),lb("update",e,!0,{dirtyElements:y,dirtyLeaves:m,editorState:n,normalizedNodes:g,prevEditorState:t||i,tags:v}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;db(e,t,r)}}}(e)}function lb(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function cb(e,t,n){if(!1===e._updating||qv!==e){let r=!1;return e.update((()=>{r=cb(e,t,n)})),r}const r=iy(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function ub(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i,a;if(void 0!==o){if(i=o.onUpdate,a=o.tag,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&vm(191),t._flushSync=!0}i&&e._deferred.push(i),a&&e._updateTags.add(a)}n()}}return r}function db(e,t,n){const r=e._updateTags;let o,i,a=!1,s=!1;void 0!==n&&(o=n.onUpdate,i=n.tag,null!=i&&r.add(i),a=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const l=e._editorState;let c=e._pendingEditorState,u=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=new _b(new Map((c||l)._nodeMap)),u=!0),c._flushSync=s;const d=Hv,f=Kv,p=qv,h=e._updating;Hv=c,Kv=!1,e._updating=!0,qv=e;try{u&&(e._headless?null!==l._selection&&(c._selection=l._selection.clone()):c._selection=function(e){const t=e.getEditorState()._selection,n=My(e._window);return kv(t)||null==t?Rv(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),a=ub(e,a),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(kv(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(c,e),0!==e._dirtyType&&(a?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);hv(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&Am(t)}}(c,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=Km(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);hv(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&Am(r),void 0!==r&&ob(r,i)&&rb(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){Xv++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&ob(l,i)&&rb(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,Xv++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),ub(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(hb(t)&&Vy(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(l,c,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(c._flushSync=!0);const r=c._selection;if(kv(r)){const e=c._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||vm(19)}else Ov(r)&&0===r._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=l,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void sb(e)}finally{Hv=d,Kv=f,qv=p,e._updating=h,Xv=0}0!==e._dirtyType||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,sb(e)):u&&Dm((()=>{sb(e)})):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function fb(e,t,n){e._updating?e._updates.push([t,n]):db(e,t,n)}class pb extends qg{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return mm[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=tb()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(hv(t)&&e.push(t),hb(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;hb(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;hb(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return hb(e)&&e.getLastDescendant()||e||null}const r=t[e];return hb(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:Ym(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&vm(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:Ym(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&vm(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),hb(o)&&r!==n-1&&!o.isInline()&&(e+=am)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),hb(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(""!==e){const t=hm[e];return!!(this.getFormat()&t)}return!1}select(e,t){Jv();const n=Lv();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(hv(e)||hb(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(hv(e)||hb(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return kv(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):Dv(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?hm[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,d=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&vm(100);const t=e.getNextSibling(),n=e.__key;$m(e.getWritable()),l.push(n),e=t}}let f=u;for(let e=0;e<r;e++){const t=n[e];null!==f&&t.is(f)&&(u=f=f.getPreviousSibling());const r=t.getWritable();r.__parent===a&&d--,$m(r);const o=t.__key;if(null===f)i.__first=o,r.__prev=null;else{const e=f.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&vm(76),r.__parent=a,s.push(o),f=t}if(e+t===o)null!==f&&(f.getWritable().__next=null,i.__last=f.__key);else if(null!==c){const e=c.getWritable();if(null!==f){const t=f.getWritable();e.__prev=f.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=d,l.length){const e=Lv();if(kv(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;mb(r,t,n)&&Wv(r,r.getNode(),this,u,c),mb(o,t,n)&&Wv(o,o.getNode(),this,u,c),0!==d||this.canBeEmpty()||Py(this)||this.remove()}}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}}function hb(e){return e instanceof pb}function mb(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class yb extends qg{constructor(e){super(e)}decorate(e,t){vm(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function gb(e){return e instanceof yb}class vb extends pb{static getType(){return"root"}static clone(){return new vb}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){vm(51)}getTextContent(){const e=this.__cachedText;return!Zv()&&0!==tb()._dirtyType||null===e?super.getTextContent():e}remove(){vm(52)}replace(e){vm(53)}insertBefore(e){vm(54)}insertAfter(e){vm(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];hb(n)||gb(n)||vm(56)}return super.append(...e)}static importJSON(e){const t=Qm();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function bb(e){return e instanceof vb}function xb(){return new _b(new Map([["root",new vb]]))}function wb(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&vm(130,n.name),hb(e)){const r=t.children;Array.isArray(r)||vm(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=wb(o[e]);r.push(t)}}return t}class _b{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return ab(t&&t.editor||null,this,e)}clone(e){const t=new _b(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return ab(null,this,(()=>({root:wb(Qm())})))}}class Sb extends pb{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class kb extends pb{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=fm[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new kb(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),n=gy(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Eb,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&Dy(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n);const r=this.getIndent();r>0&&(t.style.textIndent=20*r+"px")}return{element:t}}static importJSON(e){const t=Ob();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const n=Ob();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||hv(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Eb(e){const t=Ob();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 Ob(){return Cy(new kb)}function jb(e){return e instanceof kb}function Pb(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=xb(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class Cb{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,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=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,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=ay(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&vm(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&vm(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0===i||i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&vm(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=function(e){if(!e._readOnly&&e.isEmpty())return By;e._readOnly||vm(192);let t=zy.get(e);if(!t){t=new Map,zy.set(e,t);for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}}return t}(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}var i;return i=e.getType(),fb(this,(()=>{const e=eb();if(e.isEmpty())return;if("root"===i)return void Qm().markDirty();const t=e._nodeMap;for(const[,e]of t)e.markDirty()}),null===this._pendingEditorState?{tag:"history-merge"}:void 0),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return _y(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=gy(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,Pb(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=Cg.get(t);void 0===n&&vm(162);const r=n-1;r>=0||vm(164),Cg.set(t,r),0===r&&t.removeEventListener("selectionchange",Vg);const o=zm(e);Lm(o)?(function(e){if(null!==e._parentEditor){const t=iy(e),n=t[t.length-1]._key;Wg.get(n)===e&&Wg.delete(n)}else Wg.delete(e._key)}(o),e.__lexicalEditor=null):o&&vm(198);const i=Bg(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=function(e){const t=e.ownerDocument;return t&&t.defaultView||null}(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,Pm(this),this._updateTags.add("history-merge"),sb(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=Cg.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",Vg),Cg.set(n,(r||0)+1),e.__lexicalEditor=t;const o=Bg(e);for(let n=0;n<kg.length;n++){const[r,i]=kg[n],a="function"==typeof i?e=>{$g(e)||(Ug(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if($g(e))return;Ug(e);const n=t.isEditable();switch(r){case"cut":return n&&_y(t,Th,e);case"copy":return _y(t,Ch,e);case"paste":return n&&_y(t,ih,e);case"dragstart":return n&&_y(t,Oh,e);case"dragover":return n&&_y(t,jh,e);case"dragend":return n&&_y(t,Ph,e);case"focus":return n&&_y(t,Rh,e);case"blur":return n&&_y(t,Lh,e);case"drop":return n&&_y(t,Eh,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;lb("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&vm(38),jm(this);const n=this._pendingEditorState,r=this._updateTags,o=void 0!==t?t.tag:null;null===n||n.isEmpty()||(null!=o&&r.add(o),sb(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&r.add(o),sb(this)}parseEditorState(e,t){return function(e,t,n){const r=xb(),o=Hv,i=Kv,a=qv,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,Hv=r,Kv=!1,qv=t;try{const o=t._nodes;ib(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,Hv=o,Kv=i,qv=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return sb(this),this.getEditorState().read(e,{editor:this})}update(e,t){fb(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),fb(this,(()=>{const e=Lv(),n=Qm();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=My(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,lb("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}Cb.version="0.17.1+prod.esm";const Tb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,Ab=Tb?s.useLayoutEffect:s.useEffect,Nb={tag:"history-merge"};function Mb({initialConfig:e,children:t}){const n=(0,s.useMemo)((()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:a}=e,s=function(e,t){return{getTheme:function(){return t??null}}}(0,t),l=function(e){const t=e||{},n=qv,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=xb(),s=t.namespace||(null!==o?o._config.namespace:ay()),l=t.editorState,c=[vb,ov,Kg,yv,kb,Sb,...t.nodes||[]],{onError:u,html:d}=t,f=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:d&&d.export?d.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const h=new Cb(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,d?d.import:void 0),f);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),h}({editable:e.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=Qm();if(t.isEmpty()){const n=Ob();t.append(n);const r=Tb?document.activeElement:null;(null!==Lv()||null!==r&&r===e.getRootElement())&&n.select()}}),Nb);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,Nb);break}case"object":e.setEditorState(t,Nb);break;case"function":e.update((()=>{Qm().isEmpty()&&t(e)}),Nb)}}(l,i),[l,s]}),[]);return Ab((()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),(0,L.jsx)(Gp.Provider,{value:n,children:t})}const Db=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function Ib(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function Rb(e){return()=>function(e){if(!function(e,t=!0){if(e)return!1;let n=Qm().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;const t=Qm().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(gb(n))return!1;if(hb(n)){if(!jb(n)||0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!hv(t[e]))return!1}}return!0}(e)}function Lb(e,t){const n=xy(e.focus,t);return gb(n)&&!n.isIsolated()||hb(n)&&!n.isInline()&&!n.canBeEmpty()}function Fb(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(bb(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n){e.modify(t?"extend":"move",n,"character")}(e,t,n?!r:r)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const zb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,Bb=zb&&"documentMode"in document?document.documentMode:null;function Wb(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function Vb(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=hb(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=Wy(t);e=hv(e)&&null!==r?function(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=Pv(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,d=0;return o?(d=n>r?r:n,u=n>r?n:r):l?(d=i?r:n,u=void 0):c&&(d=0,u=i?n:r),t.__text=t.__text.slice(d,u),t}}return t}(r,e):e,a=e}const s=hb(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:d}=c;if(!u)return!1;const f=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=Vb(e,i,f,r);!o&&hb(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if(Dy(u)&&u.append(f),n.append(u),d){const e=d.call(a,u);e&&u.replaceWith(e)}}else n.append(f);return o}zb&&"InputEvent"in window&&!Bb&&new window.InputEvent("input");var Ub=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function $b(e,t){const n=e.getData("text/plain")||e.getData("text/uri-list");null!=n&&t.insertRawText(n)}const Hb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,qb=Hb&&"documentMode"in document?document.documentMode:null,Kb=!(!Hb||!("InputEvent"in window)||qb)&&"getTargetRanges"in new window.InputEvent("input"),Yb=Hb&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Xb=Hb&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Gb=Hb&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Zb=Hb&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Gb;function Jb(e,t){t.update((()=>{if(null!==e){const n=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}(e,KeyboardEvent)?null:e.clipboardData,r=Lv();if(null!==r&&null!=n){e.preventDefault();const o=function(e,t=Lv()){return null==t&&Ub(166),kv(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if(typeof document>"u"||typeof window>"u"&&void 0===global.window)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=Qm().getChildren();for(let o=0;o<r.length;o++)Vb(e,r[o],n,t);return n.innerHTML}(e,t)}(t);null!==o&&n.setData("text/html",o),n.setData("text/plain",r.getTextContent())}}}))}const Qb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function ex(e){return e.getEditorState().read(Rb(e.isComposing()))}function tx({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Zp(),o=function(e,t){const[n,r]=(0,s.useState)((()=>e.getDecorators()));return Qb((()=>e.registerDecoratorListener((e=>{(0,F.flushSync)((()=>{r(e)}))}))),[e]),(0,s.useEffect)((()=>{r(e.getDecorators())}),[e]),(0,s.useMemo)((()=>{const r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){const a=o[i],l=(0,L.jsx)(t,{onError:t=>e._onError(t),children:(0,L.jsx)(s.Suspense,{fallback:null,children:n[a]})}),c=e.getElementByKey(a);null!==c&&r.push((0,F.createPortal)(l,c,a))}return r}),[t,n,e])}(r,n);return function(e){Qb((()=>Wb(function(e){return Wb(e.registerCommand(th,(e=>{const t=Lv();return!!kv(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(sh,(e=>{const t=Lv();return!!kv(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(lh,(e=>{const t=Lv();return!!kv(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(oh,(e=>{const t=Lv();if(!kv(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;if(null!=n)$b(n,t);else{const n=e.data;n&&t.insertText(n)}}return!0}),0),e.registerCommand(ah,(()=>{const e=Lv();return!!kv(e)&&(e.removeText(),!0)}),0),e.registerCommand(nh,(e=>{const t=Lv();return!!kv(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(rh,(()=>{const e=Lv();return!!kv(e)&&(e.insertLineBreak(),!0)}),0),e.registerCommand(mh,(e=>{const t=Lv();if(!kv(t))return!1;const n=e,r=n.shiftKey;return!!Lb(t,!0)&&(n.preventDefault(),Fb(t,r,!0),!0)}),0),e.registerCommand(ph,(e=>{const t=Lv();if(!kv(t))return!1;const n=e,r=n.shiftKey;return!!Lb(t,!1)&&(n.preventDefault(),Fb(t,r,!1),!0)}),0),e.registerCommand(wh,(t=>!!kv(Lv())&&(t.preventDefault(),e.dispatchCommand(th,!0))),0),e.registerCommand(Sh,(t=>!!kv(Lv())&&(t.preventDefault(),e.dispatchCommand(th,!1))),0),e.registerCommand(bh,(t=>{if(!kv(Lv()))return!1;if(null!==t){if((Xb||Yb||Zb)&&Kb)return!1;t.preventDefault()}return e.dispatchCommand(nh,!1)}),0),e.registerCommand(Ah,(()=>(function(){const e=Qm();ty(function(e){return Nm(e.anchor),Nm(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0)),0),e.registerCommand(Ch,(t=>!!kv(Lv())&&(Jb(t,e),!0)),0),e.registerCommand(Th,(t=>!!kv(Lv())&&(function(e,t){Jb(e,t),t.update((()=>{const e=Lv();kv(e)&&e.removeText()}))}(t,e),!0)),0),e.registerCommand(ih,(t=>!!kv(Lv())&&(function(e,t){e.preventDefault(),t.update((()=>{const t=Lv(),{clipboardData:n}=e;null!=n&&kv(t)&&$b(n,t)}),{tag:"paste"})}(t,e),!0)),0),e.registerCommand(Eh,(e=>!!kv(Lv())&&(e.preventDefault(),!0)),0),e.registerCommand(Oh,(e=>!!kv(Lv())&&(e.preventDefault(),!0)),0))}(e),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch{return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=Lv();if(kv(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(hv(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),hv(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(e))),[e])}(r),(0,L.jsxs)(L.Fragment,{children:[e,(0,L.jsx)(nx,{content:t}),o]})}function nx({content:e}){const[t]=Zp(),n=function(e){const[t,n]=(0,s.useState)((()=>ex(e)));return Qb((()=>{function t(){const t=ex(e);n(t)}return t(),Wb(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=Zp(),n=(0,s.useMemo)((()=>e(t)),[t,e]),r=(0,s.useRef)(n.initialValueFn()),[o,i]=(0,s.useState)(r.current);return Db((()=>{const{initialValueFn:e,subscribe:t}=n,o=e();return r.current!==o&&(r.current=o,i(o)),t((e=>{r.current=e,i(e)}))}),[n,e]),o}(Ib);return n?"function"==typeof e?e(r):e:null}const rx=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,ox=(0,s.forwardRef)((function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaExpanded:i,ariaLabel:a,ariaLabelledBy:l,ariaMultiline:c,ariaOwns:u,ariaRequired:d,autoCapitalize:f,className:p,id:h,role:m="textbox",spellCheck:y=!0,style:g,tabIndex:v,"data-testid":b,...x},w){const[_,S]=(0,s.useState)(e.isEditable()),k=(0,s.useCallback)((t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)}),[e]),E=(0,s.useMemo)((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(w,k)),[k,w]);return rx((()=>(S(e.isEditable()),e.registerEditableListener((e=>{S(e)})))),[e]),(0,L.jsx)("div",{...x,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":o,"aria-expanded":_&&"combobox"===m?!!i:void 0,"aria-label":a,"aria-labelledby":l,"aria-multiline":c,"aria-owns":_?u:void 0,"aria-readonly":!_||void 0,"aria-required":d,autoCapitalize:f,className:p,contentEditable:_,"data-testid":b,id:h,ref:E,role:_?m:void 0,spellCheck:y,style:g,tabIndex:v})}));function ix(e){return e.getEditorState().read(Rb(e.isComposing()))}const ax=(0,s.forwardRef)((function(e,t){const{placeholder:n,...r}=e,[o]=Zp();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ox,{editor:o,...r,ref:t}),null!=n&&(0,L.jsx)(sx,{editor:o,content:n})]})}));function sx({content:e,editor:t}){const n=function(e){const[t,n]=(0,s.useState)((()=>ix(e)));return rx((()=>{function t(){const t=ix(e);n(t)}return t(),Wb(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),[r,o]=(0,s.useState)(t.isEditable());if((0,s.useLayoutEffect)((()=>(o(t.isEditable()),t.registerEditableListener((e=>{o(e)})))),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,L.jsx)("div",{"aria-hidden":!0,children:i})}function lx(e){e.undoStack=[],e.redoStack=[],e.current=null}function cx({delay:e,externalHistoryState:t}){const[n]=Zp();return function(e,t,n=1e3){const r=(0,s.useMemo)((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);(0,s.useEffect)((()=>function(e,t,n){const r=function(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const d=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(kv(i)&&kv(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||bb(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&hv(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!hv(c)||!hv(l)||c.__mode!==l.__mode)return 0;const u=c.__text,d=l.__text;if(u===d)return 0;const f=i.anchor,p=a.anchor;if(f.key!==p.key||"text"!==f.type)return 0;const h=f.offset,m=p.offset,y=d.length-u.length;return 1===y&&m===h-1?2:-1===y&&m===h+1?3:-1===y&&m===h?4:0}(o,i,s,l,e.isComposing()),f=(()=>{const f=null===a||a.editor===e,p=c.has("history-push");if(!p&&f&&c.has("history-merge"))return 0;if(null===o)return 1;const h=i._selection;return s.size>0||l.size>0?!1===p&&0!==d&&d===r&&u<n+t&&f||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(kv(i)&&kv(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!hv(r)||!hv(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==h?0:2})();return n=u,r=d,f}}(e,n);return Wb(e.registerCommand(uh,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(Dh,!0)),0===r.length&&e.dispatchCommand(Ih,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(dh,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(Ih,!0));const i=n.pop();0===n.length&&e.dispatchCommand(Dh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(Nh,(()=>(lx(t),!1)),0),e.registerCommand(Mh,(()=>(lx(t),e.dispatchCommand(Dh,!1),e.dispatchCommand(Ih,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,d=null===l?null:l.editorState;if(null!==l&&n===d)return;const f=r(o,n,l,i,a,s);if(1===f)0!==c.length&&(t.redoStack=[],e.dispatchCommand(Dh,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(Ih,!0));else if(2===f)return;t.current={editor:e,editorState:n}})))}(e,r,n)),[n,e,r])}(n,t,e),null}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ux(e,t)}var dx={error:null},fx=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=dx,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ux(t,n),r.getDerivedStateFromError=function(e){return{error:e}};var o=r.prototype;return o.reset=function(){this.setState(dx)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var i={error:e,resetErrorBoundary:this.resetErrorBoundary};if(s.isValidElement(o))return o;if("function"==typeof n)return n(i);if(r)return s.createElement(r,i);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(s.Component);function px({children:e,onError:t}){return(0,L.jsx)(fx,{fallback:(0,L.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const hx=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;function mx({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=Zp();return hx((()=>{if(n)return r.registerUpdateListener((({editorState:o,dirtyElements:i,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&0===i.size&&0===a.size||e&&l.has("history-merge")||s.isEmpty()||n(o,r,l)}))}),[r,e,t,n]),null}function yx({editorRef:e}){const[t]=Zp();return s.useEffect((()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)}),[t]),null}const gx={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"},vx={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]"},bx={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"},xx="startTransition",wx=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect,_x=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 Sx(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top<r.bottom}const kx={};function Ex({close:e,editor:t,anchorElementRef:n,resolution:r,options:o,menuRenderFn:i,onSelectOption:a,shouldSplitNodeWithQuery:l=!1,commandPriority:c=1}){const[u,d]=(0,s.useState)(null),f=r.match&&r.match.matchingString;(0,s.useEffect)((()=>{d(0)}),[f]);const p=(0,s.useCallback)((n=>{t.update((()=>{const t=null!=r.match&&l?function(e){const t=Lv();if(!kv(t)||!t.isCollapsed())return null;const n=t.anchor;if("text"!==n.type)return null;const r=n.getNode();if(!r.isSimpleText())return null;const o=n.offset,i=r.getTextContent().slice(0,o),a=e.replaceableString.length,s=o-function(e,t,n){let r=n;for(let n=r;n<=t.length;n++)e.substr(-n)===t.substr(0,n)&&(r=n);return r}(i,e.matchingString,a);if(s<0)return null;let l;return 0===s?[l]=r.splitText(o):[,l]=r.splitText(s,o),l}(r.match):null;a(n,t,e,r.match?r.match.matchingString:"")}))}),[t,l,r.match,a,e]),h=(0,s.useCallback)((e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),d(e))}),[t]);return(0,s.useEffect)((()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")}),[t]),wx((()=>{null===o?d(null):null===u&&h(0)}),[o,u,h]),(0,s.useEffect)((()=>Wb(t.registerCommand(kx,(({option:e})=>!(!e.ref||null==e.ref.current||(_x(e.ref.current),0))),c))),[t,h,c]),(0,s.useEffect)((()=>Wb(t.registerCommand(vh,(e=>{const n=e;if(null!==o&&o.length&&null!==u){const e=u!==o.length-1?u+1:0;h(e);const r=o[e];null!=r.ref&&r.ref.current&&t.dispatchCommand(kx,{index:e,option:r}),n.preventDefault(),n.stopImmediatePropagation()}return!0}),c),t.registerCommand(gh,(e=>{const t=e;if(null!==o&&o.length&&null!==u){const e=0!==u?u-1:o.length-1;h(e);const n=o[e];null!=n.ref&&n.ref.current&&_x(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0}),c),t.registerCommand(_h,(t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0}),c),t.registerCommand(kh,(e=>{const t=e;return null!==o&&null!==u&&null!=o[u]&&(t.preventDefault(),t.stopImmediatePropagation(),p(o[u]),!0)}),c),t.registerCommand(bh,(e=>null!==o&&null!==u&&null!=o[u]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),p(o[u]),!0)),c))),[p,e,t,o,u,h,c]),i(n,(0,s.useMemo)((()=>({options:o,selectOptionAndCleanUp:p,selectedIndex:u,setHighlightedIndex:d})),[p,u,o]),r.match?r.match.matchingString:"")}function Ox({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:o,menuRenderFn:i,triggerFn:a,anchorClassName:l,commandPriority:c=1,parent:u}){const[d]=Zp(),[f,p]=(0,s.useState)(null),h=function(e,t,n,r=document.body){const[o]=Zp(),i=(0,s.useRef)(document.createElement("div")),a=(0,s.useCallback)((()=>{i.current.style.top=i.current.style.bottom;const t=o.getRootElement(),a=i.current,s=a.firstChild;if(null!==t&&null!==e){const{left:o,top:l,width:c,height:u}=e.getRect(),d=i.current.offsetHeight;if(a.style.top=`${l+window.pageYOffset+d+3}px`,a.style.left=`${o+window.pageXOffset}px`,a.style.height=`${u}px`,a.style.width=`${c}px`,null!==s){s.style.top=`${l}`;const e=s.getBoundingClientRect(),n=e.height,r=e.width,i=t.getBoundingClientRect();o+r>i.right&&(a.style.left=`${i.right-r+window.pageXOffset}px`),(l+n>window.innerHeight||l+n>i.bottom)&&l-i.top>n+u&&(a.style.top=l-n+window.pageYOffset-u+"px")}a.isConnected||(null!=n&&(a.className=n),a.setAttribute("aria-label","Typeahead menu"),a.setAttribute("id","typeahead-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",r.append(a)),i.current=a,t.setAttribute("aria-controls","typeahead-menu")}}),[o,e,n,r]);(0,s.useEffect)((()=>{const t=o.getRootElement();if(null!==e)return a(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=i.current;null!==e&&e.isConnected&&e.remove()}}),[o,a,e]);const l=(0,s.useCallback)((n=>{null!==e&&(n||t(null))}),[e,t]);return function(e,t,n,r){const[o]=Zp();(0,s.useEffect)((()=>{if(null!=t&&null!=e){const e=o.getRootElement(),i=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.body}(e):document.body;let a=!1,s=Sx(t,i);const l=function(){a||(window.requestAnimationFrame((function(){n(),a=!1})),a=!0);const e=Sx(t,i);e!==s&&(s=e,null!=r&&r(e))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",l,!0)}}}),[t,o,r,n,e])}(e,i.current,a,l),i}(f,p,l,u),m=(0,s.useCallback)((()=>{p(null),null!=o&&null!==f&&o()}),[o,f]),y=(0,s.useCallback)((e=>{p(e),null!=r&&null===f&&r(e)}),[r,f]);return(0,s.useEffect)((()=>{const e=d.registerUpdateListener((()=>{d.getEditorState().read((()=>{const e=d._window||window,n=e.document.createRange(),r=Lv(),o=function(e){let t=null;return e.getEditorState().read((()=>{const e=Lv();kv(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const r=t.offset;return n.getTextContent().slice(0,r)}(e))})),t}(d);if(!kv(r)||!r.isCollapsed()||null===o||null===n)return void m();const i=a(o,d);if(t(i?i.matchingString:null),null!==i&&!function(e,t){return 0===t&&e.getEditorState().read((()=>{const e=Lv();if(kv(e)){const t=e.anchor.getNode().getPreviousSibling();return hv(t)&&t.isTextEntity()}return!1}))}(d,i.leadOffset)&&null!==function(e,t,n){const r=n.getSelection();if(null===r||!r.isCollapsed)return!1;const o=r.anchorNode,i=e,a=r.anchorOffset;if(null==o||null==a)return!1;try{t.setStart(o,i),t.setEnd(o,a)}catch{return!1}return!0}(i.leadOffset,n,e))return l=()=>y({getRect:()=>n.getBoundingClientRect(),match:i}),void(xx in s?s[xx](l):l());var l;m()}))}));return()=>{e()}}),[d,a,t,f,m,y]),null===f||null===d?null:(0,L.jsx)(Ex,{close:m,resolution:f,editor:d,anchorElementRef:h,options:e,menuRenderFn:i,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:c})}const jx=e=>{switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},Px=({data:e,by:t,size:n,nodeKey:r})=>{const[o]=Zp(),i=!o.isEditable();let a=e;"object"==typeof e&&(a=e[t]);const l=(0,s.useCallback)((e=>{const t=Ym(r);if(!t||!t.isSelected())return!1;let n=!1;const o=t.getPreviousSibling();return hb(o)&&(o.selectEnd(),n=!0),hv(o)&&(o.select(),n=!0),gb(o)&&(o.selectNext(),n=!0),null===o&&(t.selectPrevious(),n=!0),n&&e.preventDefault(),n}),[r]),c=(0,s.useCallback)((e=>{const t=Ym(r);if(!t||!t.isSelected())return!1;let n=!1;const o=t.getNextSibling();return hb(o)&&(o.selectStart(),n=!0),hv(o)&&(o.select(0,0),n=!0),gb(o)&&(o.selectPrevious(),n=!0),null===o&&(t.selectNext(),n=!0),n&&e.preventDefault(),n}),[r]);return(0,s.useEffect)((()=>{const e=Wb(o.registerCommand(mh,l,1),o.registerCommand(ph,c,1));return()=>{e()}}),[o,l,c]),(0,L.jsx)(vi,{className:"inline-flex mr-0.5",type:"rounded",size:jx(n),label:a,icon:null,closable:!0,onClose:e=>{e.stopPropagation(),e.preventDefault(),!i&&o.update((()=>{const e=Ym(r);e&&e.remove()}))},disabled:i})};class Cx extends yb{constructor(e,t,n,r){super(r),U(this,"__data"),U(this,"__by"),U(this,"__size"),this.__data=e,this.__by=t,this.__size=n}static getType(){return"mention"}static clone(e){return new Cx(e.__data,e.__by,e.__size,e.__key)}static importJSON(e){return Tx(e.data,e.by,e.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:Cx.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return(0,L.jsx)(Px,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const Tx=(e,t,n)=>new Cx(e,t,n);class Ax{constructor(e){U(this,"data"),U(this,"key"),U(this,"ref"),U(this,"setRefElement"),this.initData=e,this.key="",this.data=e,this.ref={current:null},this.setRefElement=e=>{this.ref.current=e}}}const Nx=new Map,Mx={search(e,t,n,r){setTimeout((()=>{if(!Array.isArray(e))return[];const o=e.filter((e=>{var n;if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());const o=null==(n=null==e?void 0:e[r])?void 0:n.toString();return!!o&&o.toLowerCase().includes(t.toLowerCase())}));n(o)}),500)}},Dx=({size:e,className:t,children:n})=>(0,L.jsx)("ul",{role:"menu",className:Ue("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",vx[e],t),children:n});Dx.displayName="EditorCombobox";const Ix=(0,s.forwardRef)((({size:e,children:t,selected:n=!1,className:r,...o},i)=>(0,L.jsx)("li",{role:"option",ref:i,className:Ue("m-0 text-text-primary cursor-pointer",bx[e],n&&"bg-button-tertiary-hover",r),...o,children:t})));Ix.displayName="EditorCombobox.Item",Dx.Item=Ix;const Rx=({optionsArray:e,by:t="name",size:n="md",trigger:r="@",menuComponent:o=Dx,menuItemComponent:i=Dx.Item,autoSpace:a=!0})=>{const l=(0,s.useRef)(!1),c="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",u=[r].join(""),d="[^"+u+c+"\\s]",f=new RegExp(`(^|\\s|\\()([${u}]((?:${d}${"(?:\\.[ |$]| |["+c+"]|)"}){0,75}))$`),p=new RegExp(`(^|\\s|\\()([${u}]((?:${d}){0,50}))$`),[h]=Zp(),[m,y]=(0,s.useState)(null),g=function(e,t,n="name"){const[r,o]=(0,s.useState)([]);return(0,s.useEffect)((()=>{if(null===t)return void o([]);const r=Nx.get(t);if(null!==r){if(void 0!==r)return void o(r);Nx.set(t,null),Mx.search(e,t,(e=>{Nx.set(t,e),o(e)}),n)}}),[t]),r}(e,m,t),v=(0,s.useCallback)(((e,r,o)=>{h.update((()=>{const i=Tx(e.data,t,n);r&&r.replace(i),o()}))}),[h]),b=(0,s.useMemo)((()=>g.map((e=>new Ax(e)))),[h,g]),x=(0,s.useCallback)((e=>{if(!a)return!1;const{key:t,ctrlKey:n,metaKey:r}=e;if(n||r||" "===t||t.length>1||l.current)return l.current&&(l.current=!1),!1;const o=Lv(),{focus:i,anchor:s}=o,[c]=o.getNodes();if(!s||!i||(null==s?void 0:s.key)!==(null==i?void 0:i.key)||(null==s?void 0:s.offset)!==(null==i?void 0:i.offset)||!c)return!1;if((e=>e instanceof Cx)(c)){const e=pv(" ");return c.insertAfter(e),!0}return!1}),[h,r,a]),w=(0,s.useCallback)((e=>{const{key:t}=e;return"Backspace"===t&&(l.current=!0,!0)}),[l]);return(0,s.useEffect)((()=>{if(h)return Wb(h.registerCommand(fh,x,1),h.registerCommand(wh,w,1))}),[h,x]),(0,L.jsx)(Ox,{onQueryChange:y,onSelectOption:v,triggerFn:e=>{let t=f.exec(e);if(null===t&&(t=p.exec(e)),null!==t){const e=t[1],n=t[3];if(n.length>=0)return{leadOffset:t.index+e.length,matchingString:n,replaceableString:t[2]}}return null},options:b,menuRenderFn:(e,{selectedIndex:r,selectOptionAndCleanUp:a,setHighlightedIndex:s})=>e.current&&null!=b&&b.length?(0,L.jsx)(o,{size:n,children:b.map(((e,o)=>{var l;return(0,L.jsx)(i,{ref:e.ref,size:n,selected:o===r,onMouseEnter:()=>{s(o)},onClick:()=>a(e),children:"string"==typeof e.data?e.data:null==(l=e.data)?void 0:l[t]},o)}))}):null})},Lx={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"}},Fx=({content:e})=>(0,L.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:(0,L.jsx)("span",{className:"truncate",children:e})});function zx(e){console.error(e)}const Bx=(0,s.forwardRef)((({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:n,size:r="md",autoFocus:o=!1,options:i,by:a="name",trigger:l="@",menuComponent:c,menuItemComponent:u,className:d,wrapperClassName:f,disabled:p=!1,autoSpaceAfterMention:h=!1},m)=>{const y={namespace:"Editor",editorTheme:Lx,onError:zx,nodes:[Cx],editorState:e||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!p};let g,v;return(0,s.isValidElement)(c)&&(g=c),(0,s.isValidElement)(u)&&(v=u),(0,L.jsx)("div",{className:Ue("relative w-full","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",gx[r],p&&"bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",f),children:(0,L.jsxs)(Mb,{initialConfig:y,children:[(0,L.jsx)("div",{className:"relative w-full [&_p]:m-0",children:(0,L.jsx)(tx,{contentEditable:(0,L.jsx)(ax,{className:Ue("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",d)}),placeholder:(0,L.jsx)(Fx,{content:t}),ErrorBoundary:px})}),(0,L.jsx)(cx,{}),(0,L.jsx)(Rx,{menuComponent:g,menuItemComponent:v,size:r,by:a,optionsArray:i,trigger:l,autoSpace:h}),(0,L.jsx)(mx,{onChange:(e,t)=>{"function"==typeof n&&n(e,t)},ignoreSelectionChange:!0}),m&&(0,L.jsx)(yx,{editorRef:m}),o&&(0,L.jsx)(Jp,{})]})})}));Bx.displayName="EditorInput";const Wx=(e,t)=>Ue("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),Vx={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"}},Ux=({variant:e="dot",size:t="sm",type:n="inline",currentStep:r=1,children:o,className:i,lineClassName:a="min-w-10",...l})=>{const c=s.Children.count(o);-1===r&&(r=c+1);const u=s.Children.map(o,((o,i)=>{const l={isCompleted:i+1<r,isCurrent:i+1===r,sizeClasses:Vx,size:t,variant:e,type:n,isLast:i+1===c,index:i,lineClassName:a};return(0,L.jsx)(s.Fragment,{children:s.isValidElement(o)?s.cloneElement(o,l):o},i)}));return(0,L.jsx)("div",{className:Ue("flex w-full",i,"inline"===n?"items-center justify-between":""),...l,children:u})},$x=({labelText:e="",icon:t=(0,L.jsx)(yt,{}),isCurrent:n,isCompleted:r,className:o,type:i,variant:a,sizeClasses:s,size:l,isLast:c,index:u,lineClassName:d,...f})=>{const p=Hx(a,r,n,s,l,t,u),h={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)]"},m={lg:"top-3.5",md:"top-3",sm:"top-2.5"},y=()=>{if(e){const t=Ue(s[l].label,"text-text-tertiary",n?"text-brand-primary-600":"","break-word","stack"===i?"mt-2 transform max-w-xs":"mx-2 max-w-32");return(0,L.jsx)("span",{className:t,children:e})}return null},g=()=>{if(!c){const t=Ue("block",r?"border-brand-primary-600":"border-border-subtle",d);return"stack"===i?(0,L.jsx)("div",{className:Ue("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",m[l],h[l]),children:(0,L.jsx)("span",{className:"block"})}):(0,L.jsx)("div",{className:"flex-1",children:(0,L.jsx)("span",{className:Ue("mr-2 border-y border-solid",!e&&"ml-2",t)})})}return null};return"stack"===i?(0,L.jsxs)("div",{className:"relative flex-1 justify-center",children:[(0,L.jsxs)("div",{className:Ue("flex items-center flex-col",o),...f,children:[p,y()]}),g()]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:Ue("flex items-center",o),...f,children:[p,y()]}),g()]})};$x.displayName="ProgressSteps.Step";const Hx=(e,t,n,r,o,i,a)=>{if(t)return(0,L.jsx)(it,{className:Wx(r,o)});const s=((e,t,n)=>Ue("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))(!!n,r,o),l=((e,t,n,r)=>{const o=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return"dot"===e?Ue(o,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):"number"===e?Ue(o,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):"icon"===e?Ue(o,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""})(e,n,r,o);let c=null;return"number"===e?c=a+1:"icon"===e&&i&&(c=i),(0,L.jsx)("span",{className:s,children:(0,L.jsx)("span",{className:l,children:c})})};Ux.Step=$x;const qx=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],o={circular:"size-10",rectangular:"w-96 h-3"}[e];return(0,L.jsx)("div",{className:Ue(r,"animate-pulse",o,t),...n})},Kx=(0,s.createContext)({}),Yx=()=>(0,s.useContext)(Kx),Xx=({size:e="md",children:t,className:n})=>(0,L.jsx)(Kx.Provider,{value:{size:e},children:(0,L.jsx)("div",{className:Ue("flex flex-col bg-background-primary p-2",n),children:t})});Xx.displayName="Menu";const Gx=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:o,children:i,className:a})=>{const[l,c]=(0,s.useState)(r),[u,d]=(0,s.useState)(!1),{size:f}=Yx(),p={sm:"text-xs",md:"text-sm"}[f??"md"],h={sm:"size-4",md:"size-5"}[f??"md"],m=()=>{c(!l),o&&o(!l)};return(0,L.jsxs)("div",{children:[!!e&&(0,L.jsxs)("div",{role:"button",tabIndex:0,onClick:m,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&m()},onMouseEnter:()=>n&&d(!0),onMouseLeave:()=>n&&d(!1),className:Ue("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",p,e?"p-1":"p-0",a),"aria-expanded":l,children:[(0,L.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,L.jsx)(Ff.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?l||u?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,L.jsx)(Ff.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:l?"open":"closed",transition:{duration:.15},children:(0,L.jsx)(at,{className:Ue("shrink-0",h)})})})]}),(0,L.jsx)(Hf,{initial:!1,children:l&&(0,L.jsx)(Ff.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},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:i})})]})};Gx.displayName="Menu.List";const Zx=({disabled:e=!1,active:t,onClick:n,children:r,className:o})=>{const{size:i}=Yx(),a={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"}[i??"md"];return(0,L.jsx)("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(null==n||n())},className:Ue("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",a,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),children:r})};Zx.displayName="Menu.Item";const Jx=({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(0,L.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,L.jsx)("hr",{className:Ue("w-full border-0 border-t border-border-subtle",n,t)})})};Jx.displayName="Menu.Separator",Xx.List=Gx,Xx.Item=Zx,Xx.Separator=Jx;const Qx=(0,s.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),ew=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,borderOn:o=!0,...i})=>{const a=(0,s.useRef)(null),[l,c]=(0,s.useState)((()=>{const e=Ye("sidebar-collapsed"),t=window.innerWidth<1280;return e||t}));return(0,s.useEffect)((()=>{n&&n(l)}),[l,n]),(0,s.useEffect)((()=>{const e=()=>{const e=window.innerWidth<1280;if(r)if(e)c(!0),Ke("sidebar-collapsed",!0);else{const e=Ye("sidebar-collapsed");c(e||!1)}else c(!1),(e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(e){console.error(e)}})("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[r]),(0,L.jsx)(Qx.Provider,{value:{isCollapsed:l,setIsCollapsed:c,collapsible:r},children:(0,L.jsx)("div",{ref:a,className:Ue("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",o&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",l&&"w-16 px-2",t),...i,children:e})})};ew.displayName="Sidebar";const tw=({children:e})=>(0,L.jsx)("div",{className:"space-y-2",children:e});tw.displayName="Sidebar.Header";const nw=({children:e})=>(0,L.jsx)("div",{className:Ue("space-y-4 grow items-start"),children:e});nw.displayName="Sidebar.Body";const rw=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=(0,s.useContext)(Qx);return(0,L.jsxs)("div",{className:"space-y-4",children:[e,r&&(0,L.jsx)("button",{className:Ue("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),Ke("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(fi,{title:"Expand",children:(0,L.jsx)(mt,{className:"size-5"})})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ht,{className:"size-5"})," Collapse"]})})]})};rw.displayName="Sidebar.Footer";const ow=({children:e,className:t})=>(0,L.jsx)("div",{className:Ue("w-full",t),children:e});ow.displayName="Sidebar.Item",Object.assign(ew,{Header:tw,Body:nw,Footer:rw,Item:ow});const iw={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},aw=(0,s.createContext)({sizes:iw.sm}),sw=({children:e,size:t="sm"})=>{const n=iw[t]||iw.sm;return(0,L.jsx)(aw.Provider,{value:{sizes:n},children:(0,L.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,L.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};sw.displayName="Breadcrumb";const lw=({children:e})=>(0,L.jsx)(L.Fragment,{children:e});lw.displayName="Breadcrumb.List";const cw=({children:e})=>(0,L.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});cw.displayName="Breadcrumb.Item";const uw=({href:e,children:t,className:n,as:r="a",...o})=>{const{sizes:i}=(0,s.useContext)(aw);return(0,L.jsx)(r,{href:e,className:Ue(i.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),...o,children:t})};uw.displayName="Breadcrumb.Link";const dw=({type:e})=>{const{sizes:t}=(0,s.useContext)(aw),n={slash:(0,L.jsx)("span",{className:Ue("mx-1",t.separator),children:"/"}),arrow:(0,L.jsx)(lt,{size:t.separatorIconSize})};return(0,L.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})};dw.displayName="Breadcrumb.Separator";const fw=()=>{const{sizes:e}=(0,s.useContext)(aw);return(0,L.jsx)(ut,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};fw.displayName="Breadcrumb.Ellipsis";const pw=({children:e})=>{const{sizes:t}=(0,s.useContext)(aw);return(0,L.jsx)("span",{className:Ue(t.text,"font-medium text-text-primary"),children:e})};pw.displayName="Breadcrumb.Page",sw.List=lw,sw.Item=cw,sw.Link=uw,sw.Separator=dw,sw.Ellipsis=fw,sw.Page=pw;const hw=(0,s.createContext)({}),mw=()=>(0,s.useContext)(hw),yw={open:{opacity:1},exit:{opacity:0}},gw={duration:.2},vw=({open:e,setOpen:t,children:n,trigger:r=null,className:o,exitOnClickOutside:i=!1,exitOnEsc:a=!0,design:l="simple",scrollLock:c=!0})=>{const u=void 0!==e&&void 0!==t,[d,f]=(0,s.useState)(!1),p=(0,s.useRef)(null),h=(0,s.useRef)(null),m=(0,s.useMemo)((()=>u?e:d),[e,d]),y=(0,s.useMemo)((()=>u?t:f),[f,f]),g=()=>{m||y(!0)},v=()=>{m&&y(!1)},b=(0,s.useCallback)((()=>{var e;return(0,s.isValidElement)(r)?(0,s.cloneElement)(r,{onClick:$e(g,null==(e=null==r?void 0:r.props)?void 0:e.onClick)}):"function"==typeof r?r({onClick:g}):null}),[r,g,v]),x=e=>{"Escape"===e.key&&a&&v()},w=e=>{i&&p.current&&!p.current.contains(e.target)&&v()};return(0,s.useEffect)((()=>(window.addEventListener("keydown",x),document.addEventListener("mousedown",w),()=>{window.removeEventListener("keydown",x),document.removeEventListener("mousedown",w)})),[m]),(0,s.useEffect)((()=>{if(!c)return;const e=document.querySelector("html");return m&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}}),[m]),(0,L.jsxs)(L.Fragment,{children:[b(),(0,L.jsx)(hw.Provider,{value:{open:m,setOpen:y,handleClose:v,design:l,dialogContainerRef:h,dialogRef:p},children:(0,L.jsx)("div",{ref:h,className:Ue("fixed z-999999 w-0 h-0 overflow-visible",o),children:n})})]})};vw.displayName="Dialog";const bw=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=mw();return(0,L.jsx)(Hf,{children:n&&(0,L.jsx)(Ff.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:yw,role:"dialog",transition:gw,children:(0,L.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,L.jsx)("div",{ref:o,className:Ue("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:"function"==typeof e?e({close:r}):e})})})})};bw.displayName="Dialog.Panel";const xw=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=mw();return null!=r&&r.current?(0,L.jsx)(L.Fragment,{children:(0,F.createPortal)((0,L.jsx)(Hf,{children:n&&(0,L.jsx)(Ff.div,{className:Ue("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:yw,transition:gw})}),r.current)}):null};xw.displayName="Dialog.Backdrop";const ww=({children:e,className:t,...n})=>(0,L.jsx)("div",{className:Ue("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});ww.displayName="Dialog.Header";const _w=({children:e,as:t="h3",className:n,...r})=>(0,L.jsx)(t,{className:Ue("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});_w.displayName="Dialog.Title";const Sw=({children:e,as:t="p",className:n,...r})=>(0,L.jsx)(t,{className:Ue("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Sw.displayName="Dialog.Description";const kw=({className:e,...t})=>(0,L.jsx)("button",{className:Ue("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:(0,L.jsx)(_t,{className:"size-4 text-text-primary shrink-0"})}),Ew=({children:e,as:t=s.Fragment,...n})=>{const{handleClose:r}=mw();return e?t===s.Fragment?"function"==typeof e?e({close:r}):(0,s.cloneElement)(e,{onClick:r}):(0,L.jsx)(t,{...n,onClick:r,children:e}):(0,L.jsx)(kw,{onClick:r,...n})};Ew.displayName="Dialog.CloseButton";const Ow=({children:e,className:t,...n})=>(0,L.jsx)("div",{className:Ue("px-5",t),...n,children:e});Ow.displayName="Dialog.Body";const jw=({children:e,className:t})=>{const{design:n,handleClose:r}=mw();return(0,L.jsx)("div",{className:Ue("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};jw.displayName="Dialog.Footer",vw.Panel=bw,vw.Title=_w,vw.Description=Sw,vw.CloseButton=Ew,vw.Header=ww,vw.Body=Ow,vw.Footer=jw,vw.Backdrop=xw;const Pw=({children:e,gap:t="lg",className:n,...r})=>(0,L.jsx)("div",{className:Ue("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",He(t),n),...r,children:e});Pw.displayName="Topbar";const Cw=({gap:e="sm",children:t,className:n})=>(0,L.jsx)("div",{className:Ue("flex items-center",He(e),n),children:t});Cw.displayName="Topbar.Left";const Tw=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,L.jsx)("div",{className:Ue("flex items-center grow",He(e),o,r),children:t})};Tw.displayName="Topbar.Middle";const Aw=({gap:e="sm",children:t,className:n})=>(0,L.jsx)("div",{className:Ue("flex items-center",He(e),n),children:t});Aw.displayName="Topbar.Right";const Nw=({children:e,className:t})=>(0,L.jsx)("div",{className:Ue("flex items-center [&>svg]:block h-full",t),children:e});Nw.displayName="Topbar.Item",Pw.Left=Cw,Pw.Middle=Tw,Pw.Right=Aw,Pw.Item=Nw;const Mw=(0,s.createContext)({}),Dw=Mw.Provider,Iw=()=>(0,s.useContext)(Mw),Rw=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=null==e?void 0:e.getBoundingClientRect(),o=null==t?void 0:t.getBoundingClientRect(),i=n?(null==r?void 0:r.x)-(null==o?void 0:o.x)+(null==r?void 0:r.width)/2:(null==o?void 0:o.width)-((null==o?void 0:o.right)-(null==r?void 0:r.x))+(null==r?void 0:r.width)/2,a=(null==r?void 0:r.y)-(null==o?void 0:o.y)+(null==r?void 0:r.height)/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${(null==r?void 0:r.width)/2}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},Lw=e=>(0,L.jsx)(Ff.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),Fw=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=Iw();return(0,L.jsx)(Xe,{ref:n,className:Ue("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:(0,L.jsxs)(Ff.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:[(0,L.jsx)(Lw,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,L.jsx)(Lw,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,L.jsx)(Lw,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},zw={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},Bw=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:o,children:i,...a})=>{var l;let c=null,u=null;const d=n&&(0,s.isValidElement)(n)?(0,s.cloneElement)(n,{key:"left-icon",className:Ue("size-5",t?"text-brand-800":"text-icon-secondary",(null==(l=n.props)?void 0:l.className)??"")}):null;switch(r){case"left":c=d;break;case"right":u=d;break;default:c=null,u=null}return(0,L.jsx)(Vw,{children:(0,L.jsxs)(e,{className:Ue("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",o),...a,children:[!!c&&c,(0,L.jsx)("span",{className:"contents",children:i}),!!u&&u]})})},Ww={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},Vw=({children:e})=>(0,L.jsx)(Ff.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:Ww,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),Uw=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:o}=Iw(),[i,a]=(0,s.useState)(null);return n?(0,L.jsxs)(Ff.div,{ref:a,className:Ue("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[i&&(0,L.jsx)(Ff.div,{className:Ue("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:Rw(n,i,o??!1)}),(0,L.jsx)(Ff.ul,{variants:zw,className:Ue("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},$w=({className:e,children:t})=>{const[n,r]=function(...e){const t=(0,s.useRef)(0),[n,r]=(0,s.useState)(e[t.current]),o=(0,s.useCallback)((n=>{t.current="number"!=typeof n?((e,t,n)=>{const r=t-0;return((n-0)%r+r)%r+0})(0,e.length,t.current+1):n,r(e[t.current])}),[e.length,...e]);return[n,o]}(!1,!0),[o,i]=(0,s.useState)(null),a=(0,s.useRef)(null),{height:l}=(e=>{const t=(0,s.useRef)({width:0,height:0});return(0,s.useEffect)((()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)}),[]),t.current})(a),{isRight:c=!1,isLeft:u=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,o=t.right<r,i=t.left>r;return{isLeft:o,isRight:i,isCenter:!o&&!i,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}})(o);return(0,L.jsx)(Dw,{value:{isOpen:n,toggleOpen:r,setTriggerRef:e=>{(0,s.startTransition)((()=>{i(e)}))},triggerRef:o,triggerOnRight:c,triggerOnLeft:u},children:(0,L.jsx)("div",{className:Ue("size-6 z-[1]",e),children:(0,L.jsx)(Ff.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:l,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:a,children:t})})})};$w.displayName="HamburgerMenu",Fw.displayName="HamburgerMenu.Toggle",Uw.displayName="HamburgerMenu.Options",Bw.displayName="HamburgerMenu.Option",$w.Options=Uw,$w.Option=Bw,$w.Toggle=Fw;var Hw={exports:{}};!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",a=32,s=128,l=1/0,c=9007199254740991,u=NaN,d=4294967295,f=d-1,p=d>>>1,h=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],m="[object Arguments]",y="[object Array]",g="[object Boolean]",v="[object Date]",b="[object Error]",x="[object Function]",w="[object GeneratorFunction]",_="[object Map]",S="[object Number]",k="[object Object]",E="[object Promise]",O="[object RegExp]",j="[object Set]",P="[object String]",C="[object Symbol]",T="[object WeakMap]",A="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",I="[object Int8Array]",R="[object Int16Array]",L="[object Int32Array]",F="[object Uint8Array]",B="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",U=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Y=RegExp(q.source),X=RegExp(K.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ne.source),oe=/^\s+/,ie=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,de=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Oe="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ce="["+_e+"]",Te="["+Pe+"]",Ae="["+Se+"]",Ne="\\d+",Me="["+ke+"]",De="["+Ee+"]",Ie="[^"+_e+Pe+Ne+ke+Ee+Oe+"]",Re="\\ud83c[\\udffb-\\udfff]",Le="[^"+_e+"]",Fe="(?:\\ud83c[\\udde6-\\uddff]){2}",ze="[\\ud800-\\udbff][\\udc00-\\udfff]",Be="["+Oe+"]",We="\\u200d",Ve="(?:"+De+"|"+Ie+")",Ue="(?:"+Be+"|"+Ie+")",$e="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+Re+")?",Ke="["+je+"]?",Ye=Ke+qe+"(?:"+We+"(?:"+[Le,Fe,ze].join("|")+")"+Ke+qe+")*",Xe="(?:"+[Me,Fe,ze].join("|")+")"+Ye,Ge="(?:"+[Le+Ae+"?",Ae,Fe,ze,Ce].join("|")+")",Ze=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Qe=RegExp(Re+"(?="+Re+")|"+Ge+Ye,"g"),et=RegExp([Be+"?"+De+"+"+$e+"(?="+[Te,Be,"$"].join("|")+")",Ue+"+"+He+"(?="+[Te,Be+Ve,"$"].join("|")+")",Be+"?"+Ve+"+"+$e,Be+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,Xe].join("|"),"g"),tt=RegExp("["+We+_e+Se+je+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["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"],ot=-1,it={};it[M]=it[D]=it[I]=it[R]=it[L]=it[F]=it[B]=it[W]=it[V]=!0,it[m]=it[y]=it[A]=it[g]=it[N]=it[v]=it[b]=it[x]=it[_]=it[S]=it[k]=it[O]=it[j]=it[P]=it[T]=!1;var at={};at[m]=at[y]=at[A]=at[N]=at[g]=at[v]=at[M]=at[D]=at[I]=at[R]=at[L]=at[_]=at[S]=at[k]=at[O]=at[j]=at[P]=at[C]=at[F]=at[B]=at[W]=at[V]=!0,at[b]=at[x]=at[T]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ct=parseInt,ut="object"==typeof z&&z&&z.Object===Object&&z,dt="object"==typeof self&&self&&self.Object===Object&&self,ft=ut||dt||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,mt=ht&&ht.exports===pt,yt=mt&&ut.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||yt&&yt.binding&&yt.binding("util")}catch{}}(),vt=gt&>.isArrayBuffer,bt=gt&>.isDate,xt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,St=gt&>.isTypedArray;function kt(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)}function Et(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function Ot(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function jt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Tt(e,t){return!(null==e||!e.length)&&Bt(e,t,0)>-1}function At(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Nt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Mt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function It(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Lt=$t("length");function Ft(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function zt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Bt(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):zt(e,Vt,n)}function Wt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Vt(e){return e!=e}function Ut(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:u}function $t(e){return function(t){return null==t?n:t[e]}}function Ht(e){return function(t){return null==e?n:e[t]}}function qt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Kt(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e&&e.slice(0,fn(e)+1).replace(oe,"")}function Gt(e){return function(t){return e(t)}}function Zt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Bt(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Bt(t,e[n],0)>-1;);return n}var tn=Ht({À:"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"}),nn=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+st[e]}function on(e){return tt.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var s=e[n];(s===t||s===i)&&(e[n]=i,a[o++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){return on(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Lt(e)}function dn(e){return on(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pn=Ht({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function e(t){var z=(t=null==t?ft:hn.defaults(ft.Object(),t,hn.pick(ft,rt))).Array,ie=t.Date,_e=t.Error,Se=t.Function,ke=t.Math,Ee=t.Object,Oe=t.RegExp,je=t.String,Pe=t.TypeError,Ce=z.prototype,Te=Se.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],Me=Te.toString,De=Ae.hasOwnProperty,Ie=0,Re=function(){var e=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=Ae.toString,Fe=Me.call(Ee),ze=ft._,Be=Oe("^"+Me.call(De).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=mt?t.Buffer:n,Ve=t.Symbol,Ue=t.Uint8Array,$e=We?We.allocUnsafe:n,He=sn(Ee.getPrototypeOf,Ee),qe=Ee.create,Ke=Ae.propertyIsEnumerable,Ye=Ce.splice,Xe=Ve?Ve.isConcatSpreadable:n,Ge=Ve?Ve.iterator:n,Qe=Ve?Ve.toStringTag:n,tt=function(){try{var e=ci(Ee,"defineProperty");return e({},"",{}),e}catch{}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ut=ie&&ie.now!==ft.Date.now&&ie.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=ke.ceil,ht=ke.floor,yt=Ee.getOwnPropertySymbols,gt=We?We.isBuffer:n,Lt=t.isFinite,Ht=Ce.join,mn=sn(Ee.keys,Ee),yn=ke.max,gn=ke.min,vn=ie.now,bn=t.parseInt,xn=ke.random,wn=Ce.reverse,_n=ci(t,"DataView"),Sn=ci(t,"Map"),kn=ci(t,"Promise"),En=ci(t,"Set"),On=ci(t,"WeakMap"),jn=ci(Ee,"create"),Pn=On&&new On,Cn={},Tn=Ii(_n),An=Ii(Sn),Nn=Ii(kn),Mn=Ii(En),Dn=Ii(On),In=Ve?Ve.prototype:n,Rn=In?In.valueOf:n,Ln=In?In.toString:n;function Fn(e){if(Ja(e)&&!Wa(e)&&!(e instanceof Vn)){if(e instanceof Wn)return e;if(De.call(e,"__wrapped__"))return Ri(e)}return new Wn(e)}var zn=function(){function e(){}return function(t){if(!Za(t))return{};if(qe)return qe(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Bn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new $n(e);this.size=t.size}function Yn(e,t){var n=Wa(e),r=!n&&Ba(e),o=!n&&!r&&Ha(e),i=!n&&!r&&!o&&as(e),a=n||r||o||i,s=a?Yt(e.length,je):[],l=s.length;for(var c in e)(t||De.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yi(c,l)))&&s.push(c);return s}function Xn(e){var t=e.length;return t?e[Hr(0,t-1)]:n}function Gn(e,t){return Ni(jo(e),ir(t,0,e.length))}function Zn(e){return Ni(jo(e))}function Jn(e,t,r){(r!==n&&!La(e[t],r)||r===n&&!(t in e))&&rr(e,t,r)}function Qn(e,t,r){var o=e[t];(!De.call(e,t)||!La(o,r)||r===n&&!(t in e))&&rr(e,t,r)}function er(e,t){for(var n=e.length;n--;)if(La(e[n][0],t))return n;return-1}function tr(e,t,n,r){return ur(e,(function(e,o,i){t(r,e,n(e),i)})),r}function nr(e,t){return e&&Po(t,Ps(t),e)}function rr(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function or(e,t){for(var r=-1,o=t.length,i=z(o),a=null==e;++r<o;)i[r]=a?n:Ss(e,t[r]);return i}function ir(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function ar(e,t,r,o,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!Za(e))return e;var d=Wa(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&De.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return jo(e,s)}else{var f=fi(e),p=f==x||f==w;if(Ha(e))return wo(e,l);if(f==k||f==m||p&&!i){if(s=c||p?{}:hi(e),!l)return c?function(e,t){return Po(e,di(e),t)}(e,function(e,t){return e&&Po(t,Cs(t),e)}(s,e)):function(e,t){return Po(e,ui(e),t)}(e,nr(s,e))}else{if(!at[f])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case A:return _o(e);case g:case v:return new r(+e);case N:return function(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case M:case D:case I:case R:case L:case F:case B:case W:case V:return So(e,n);case _:return new r;case S:case P:return new r(e);case O:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case j:return new r;case C:return function(e){return Rn?Ee(Rn.call(e)):{}}(e)}}(e,f,l)}}a||(a=new Kn);var h=a.get(e);if(h)return h;a.set(e,s),rs(e)?e.forEach((function(n){s.add(ar(n,t,r,n,e,a))})):Qa(e)&&e.forEach((function(n,o){s.set(o,ar(n,t,r,o,e,a))}));var y=d?n:(u?c?ni:ti:c?Cs:Ps)(e);return Ot(y||e,(function(n,o){y&&(n=e[o=n]),Qn(s,o,ar(n,t,r,o,e,a))})),s}function sr(e,t,r){var o=r.length;if(null==e)return!o;for(e=Ee(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function lr(e,t,o){if("function"!=typeof e)throw new Pe(r);return Pi((function(){e.apply(n,o)}),t)}function cr(e,t,n,r){var o=-1,i=Tt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Nt(t,Gt(n))),r?(i=At,a=!1):t.length>=200&&(i=Jt,a=!1,t=new qn(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=r||0!==u?u:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;l.push(u)}else i(t,d,r)||l.push(u)}return l}Fn.templateSettings={escape:G,evaluate:Z,interpolate:J,variable:"",imports:{_:Fn}},Fn.prototype=Bn.prototype,Fn.prototype.constructor=Fn,Wn.prototype=zn(Bn.prototype),Wn.prototype.constructor=Wn,Vn.prototype=zn(Bn.prototype),Vn.prototype.constructor=Vn,Un.prototype.clear=function(){this.__data__=jn?jn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(jn){var r=t[e];return r===o?n:r}return De.call(t,e)?t[e]:n},Un.prototype.has=function(e){var t=this.__data__;return jn?t[e]!==n:De.call(t,e)},Un.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=jn&&t===n?o:t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=er(t,e);return!(n<0||(n==t.length-1?t.pop():Ye.call(t,n,1),--this.size,0))},$n.prototype.get=function(e){var t=this.__data__,r=er(t,e);return r<0?n:t[r][1]},$n.prototype.has=function(e){return er(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,r=er(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(Sn||$n),string:new Un}},Hn.prototype.delete=function(e){var t=si(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return si(this,e).get(e)},Hn.prototype.has=function(e){return si(this,e).has(e)},Hn.prototype.set=function(e,t){var n=si(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},qn.prototype.add=qn.prototype.push=function(e){return this.__data__.set(e,o),this},qn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new $n,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var r=n.__data__;if(!Sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this};var ur=Ao(vr),dr=Ao(br,!0);function fr(e,t){var n=!0;return ur(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function pr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(l===n?s==s&&!is(s):r(s,l)))var l=s,c=a}return c}function hr(e,t){var n=[];return ur(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function mr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=mi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?mr(s,t-1,n,r,o):Mt(o,s):r||(o[o.length]=s)}return o}var yr=No(),gr=No(!0);function vr(e,t){return e&&yr(e,t,Ps)}function br(e,t){return e&&gr(e,t,Ps)}function xr(e,t){return Ct(t,(function(t){return Ya(e[t])}))}function wr(e,t){for(var r=0,o=(t=go(t,e)).length;null!=e&&r<o;)e=e[Di(t[r++])];return r&&r==o?e:n}function _r(e,t,n){var r=t(e);return Wa(e)?r:Mt(r,n(e))}function Sr(e){return null==e?e===n?"[object Undefined]":"[object Null]":Qe&&Qe in Ee(e)?function(e){var t=De.call(e,Qe),r=e[Qe];try{e[Qe]=n;var o=!0}catch{}var i=Le.call(e);return o&&(t?e[Qe]=r:delete e[Qe]),i}(e):function(e){return Le.call(e)}(e)}function kr(e,t){return e>t}function Er(e,t){return null!=e&&De.call(e,t)}function Or(e,t){return null!=e&&t in Ee(e)}function jr(e,t,r){for(var o=r?At:Tt,i=e[0].length,a=e.length,s=a,l=z(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=Nt(d,Gt(t))),c=gn(d.length,c),l[s]=!r&&(t||i>=120&&d.length>=120)?new qn(s&&d):n}d=e[0];var f=-1,p=l[0];e:for(;++f<i&&u.length<c;){var h=d[f],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?Jt(p,m):o(u,m,r))){for(s=a;--s;){var y=l[s];if(!(y?Jt(y,m):o(e[s],m,r)))continue e}p&&p.push(m),u.push(h)}}return u}function Pr(e,t,r){var o=null==(e=Ei(e,t=go(t,e)))?e:e[Di(Ki(t))];return null==o?n:kt(o,e,r)}function Cr(e){return Ja(e)&&Sr(e)==m}function Tr(e,t,r,o,i){return e===t||(null==e||null==t||!Ja(e)&&!Ja(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=Wa(e),l=Wa(t),c=s?y:fi(e),u=l?y:fi(t),d=(c=c==m?k:c)==k,f=(u=u==m?k:u)==k,p=c==u;if(p&&Ha(e)){if(!Ha(t))return!1;s=!0,d=!1}if(p&&!d)return a||(a=new Kn),s||as(e)?Qo(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case A:return!(e.byteLength!=t.byteLength||!i(new Ue(e),new Ue(t)));case g:case v:case S:return La(+e,+t);case b:return e.name==t.name&&e.message==t.message;case O:case P:return e==t+"";case _:var s=an;case j:var l=1&r;if(s||(s=cn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=Qo(s(e),s(t),r,o,i,a);return a.delete(e),u;case C:if(Rn)return Rn.call(e)==Rn.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var h=d&&De.call(e,"__wrapped__"),x=f&&De.call(t,"__wrapped__");if(h||x){var w=h?e.value():e,E=x?t.value():t;return a||(a=new Kn),i(w,E,r,o,a)}}return!!p&&(a||(a=new Kn),function(e,t,r,o,i,a){var s=1&r,l=ti(e),c=l.length;if(c!=ti(t).length&&!s)return!1;for(var u=c;u--;){var d=l[u];if(!(s?d in t:De.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var m=s;++u<c;){var y=e[d=l[u]],g=t[d];if(o)var v=s?o(g,y,d,t,e,a):o(y,g,d,e,t,a);if(!(v===n?y===g||i(y,g,r,o,a):v)){h=!1;break}m||(m="constructor"==d)}if(h&&!m){var b=e.constructor,x=t.constructor;b!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,r,o,i,a))}(e,t,r,o,Tr,i))}function Ar(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=Ee(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=r[i])[0],u=e[c],d=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var f=new Kn;if(o)var p=o(u,d,c,e,t,f);if(!(p===n?Tr(d,u,3,o,f):p))return!1}}return!0}function Nr(e){return!(!Za(e)||function(e){return!!Re&&Re in e}(e))&&(Ya(e)?Be:ye).test(Ii(e))}function Mr(e){return"function"==typeof e?e:null==e?el:"object"==typeof e?Wa(e)?Fr(e[0],e[1]):Lr(e):cl(e)}function Dr(e){if(!wi(e))return mn(e);var t=[];for(var n in Ee(e))De.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ir(e,t){return e<t}function Rr(e,t){var n=-1,r=Ua(e)?z(e.length):[];return ur(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Lr(e){var t=li(e);return 1==t.length&&t[0][2]?Si(t[0][0],t[0][1]):function(n){return n===e||Ar(n,e,t)}}function Fr(e,t){return vi(e)&&_i(t)?Si(Di(e),t):function(r){var o=Ss(r,e);return o===n&&o===t?ks(r,e):Tr(t,o,3)}}function zr(e,t,r,o,i){e!==t&&yr(t,(function(a,s){if(i||(i=new Kn),Za(a))!function(e,t,r,o,i,a,s){var l=Oi(e,r),c=Oi(t,r),u=s.get(c);if(u)Jn(e,r,u);else{var d=a?a(l,c,r+"",e,t,s):n,f=d===n;if(f){var p=Wa(c),h=!p&&Ha(c),m=!p&&!h&&as(c);d=c,p||h||m?Wa(l)?d=l:$a(l)?d=jo(l):h?(f=!1,d=wo(c,!0)):m?(f=!1,d=So(c,!0)):d=[]:ts(c)||Ba(c)?(d=l,Ba(l)?d=hs(l):(!Za(l)||Ya(l))&&(d=hi(c))):f=!1}f&&(s.set(c,d),i(d,c,o,a,s),s.delete(c)),Jn(e,r,d)}}(e,t,s,r,zr,o,i);else{var l=o?o(Oi(e,s),a,s+"",e,t,i):n;l===n&&(l=a),Jn(e,s,l)}}),Cs)}function Br(e,t){var r=e.length;if(r)return yi(t+=t<0?r:0,r)?e[t]:n}function Wr(e,t,n){t=t.length?Nt(t,(function(e){return Wa(e)?function(t){return wr(t,1===e.length?e[0]:e)}:e})):[el];var r=-1;return t=Nt(t,Gt(ai())),function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=ko(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(Rr(e,(function(e,n,o){return{criteria:Nt(t,(function(t){return t(e)})),index:++r,value:e}})))}function Vr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=wr(e,a);n(s,a)&&Gr(i,go(a,e),s)}return i}function Ur(e,t,n,r){var o=r?Wt:Bt,i=-1,a=t.length,s=e;for(e===t&&(t=jo(t)),n&&(s=Nt(e,Gt(n)));++i<a;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&Ye.call(s,l,1),Ye.call(e,l,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;yi(o)?Ye.call(e,o,1):lo(e,o)}}return e}function Hr(e,t){return e+ht(xn()*(t-e+1))}function qr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=ht(t/2))&&(e+=e)}while(t);return n}function Kr(e,t){return Ci(ki(e,t,el),e+"")}function Yr(e){return Xn(Ls(e))}function Xr(e,t){var n=Ls(e);return Ni(n,ir(t,0,n.length))}function Gr(e,t,r,o){if(!Za(e))return e;for(var i=-1,a=(t=go(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=Di(t[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var d=l[c];(u=o?o(d,c,l):n)===n&&(u=Za(d)?d:yi(t[i+1])?[]:{})}Qn(l,c,u),l=l[c]}return e}var Zr=Pn?function(e,t){return Pn.set(e,t),e}:el,Jr=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:Zs(t),writable:!0})}:el;function Qr(e){return Ni(Ls(e))}function eo(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=z(o);++r<o;)i[r]=e[r+t];return i}function to(e,t){var n;return ur(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function no(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=p){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!is(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return ro(e,t,el,n)}function ro(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=is(t),u=t===n;i<a;){var d=ht((i+a)/2),p=r(e[d]),h=p!==n,m=null===p,y=p==p,g=is(p);if(s)var v=o||y;else v=u?y&&(o||h):l?y&&h&&(o||!m):c?y&&h&&!m&&(o||!g):!m&&!g&&(o?p<=t:p<t);v?i=d+1:a=d}return gn(a,f)}function oo(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!La(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function io(e){return"number"==typeof e?e:is(e)?u:+e}function ao(e){if("string"==typeof e)return e;if(Wa(e))return Nt(e,ao)+"";if(is(e))return Ln?Ln.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function so(e,t,n){var r=-1,o=Tt,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=At;else if(i>=200){var c=t?null:Ko(e);if(c)return cn(c);a=!1,o=Jt,l=new qn}else l=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function lo(e,t){return null==(e=Ei(e,t=go(t,e)))||delete e[Di(Ki(t))]}function co(e,t,n,r){return Gr(e,t,n(wr(e,t)),r)}function uo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?eo(e,r?0:i,r?i+1:o):eo(e,r?i+1:0,r?o:i)}function fo(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Mt([e],t.args))}),n)}function po(e,t,n){var r=e.length;if(r<2)return r?so(e[0]):[];for(var o=-1,i=z(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=cr(i[o]||a,e[s],t,n));return so(mr(i,1),t,n)}function ho(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var l=o<a?t[o]:n;r(s,e[o],l)}return s}function mo(e){return $a(e)?e:[]}function yo(e){return"function"==typeof e?e:el}function go(e,t){return Wa(e)?e:vi(e,t)?[e]:Mi(ms(e))}var vo=Kr;function bo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:eo(e,t,r)}var xo=st||function(e){return ft.clearTimeout(e)};function wo(e,t){if(t)return e.slice();var n=e.length,r=$e?$e(n):new e.constructor(n);return e.copy(r),r}function _o(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function So(e,t){var n=t?_o(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ko(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=is(e),s=t!==n,l=null===t,c=t==t,u=is(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e<t||u&&r&&i&&!o&&!a||l&&r&&i||!s&&i||!c)return-1}return 0}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=yn(i-a,0),u=z(l+c),d=!r;++s<l;)u[s]=t[s];for(;++o<a;)(d||o<i)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function Oo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,u=yn(i-s,0),d=z(u+c),f=!r;++o<u;)d[o]=e[o];for(var p=o;++l<c;)d[p+l]=t[l];for(;++a<s;)(f||o<i)&&(d[p+n[a]]=e[o++]);return d}function jo(e,t){var n=-1,r=e.length;for(t||(t=z(r));++n<r;)t[n]=e[n];return t}function Po(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),i?rr(r,l,c):Qn(r,l,c)}return r}function Co(e,t){return function(n,r){var o=Wa(n)?Et:tr,i=t?t():{};return o(n,e,ai(r,2),i)}}function To(e){return Kr((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&gi(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=Ee(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t}))}function Ao(e,t){return function(n,r){if(null==n)return n;if(!Ua(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Ee(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function No(e){return function(t,n,r){for(var o=-1,i=Ee(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}function Mo(e){return function(t){var r=on(t=ms(t))?dn(t):n,o=r?r[0]:t.charAt(0),i=r?bo(r,1).join(""):t.slice(1);return o[e]()+i}}function Do(e){return function(t){return Dt(Ys(Bs(t).replace(Ze,"")),e,"")}}function Io(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=zn(e.prototype),r=e.apply(n,t);return Za(r)?r:n}}function Ro(e){return function(t,r,o){var i=Ee(t);if(!Ua(t)){var a=ai(r,3);t=Ps(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function Lo(e){return ei((function(t){var o=t.length,i=o,a=Wn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Pe(r);if(a&&!l&&"wrapper"==oi(s))var l=new Wn([],!0)}for(i=l?i:o;++i<o;){var c=oi(s=t[i]),u="wrapper"==c?ri(s):n;l=u&&bi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[oi(u[0])].apply(l,u[3]):1==s.length&&bi(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Wa(n))return l.plant(n).value();for(var r=0,i=o?t[r].apply(this,e):n;++r<o;)i=t[r].call(this,i);return i}}))}function Fo(e,t,r,o,i,a,l,c,u,d){var f=t&s,p=1&t,h=2&t,m=24&t,y=512&t,g=h?n:Io(e);return function s(){for(var v=arguments.length,b=z(v),x=v;x--;)b[x]=arguments[x];if(m)var w=ii(s),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,w);if(o&&(b=Eo(b,o,i,m)),a&&(b=Oo(b,a,l,m)),v-=_,m&&v<d){var S=ln(b,w);return Ho(e,t,Fo,s.placeholder,r,b,S,c,u,d-v)}var k=p?r:this,E=h?k[e]:e;return v=b.length,c?b=function(e,t){for(var r=e.length,o=gn(t.length,r),i=jo(e);o--;){var a=t[o];e[o]=yi(a,r)?i[a]:n}return e}(b,c):y&&v>1&&b.reverse(),f&&u<v&&(b.length=u),this&&this!==ft&&this instanceof s&&(E=g||Io(E)),E.apply(k,b)}}function zo(e,t){return function(n,r){return function(e,t,n,r){return vr(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Bo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=ao(r),o=ao(o)):(r=io(r),o=io(o)),i=e(r,o)}return i}}function Wo(e){return ei((function(t){return t=Nt(t,Gt(ai())),Kr((function(n){var r=this;return e(t,(function(e){return kt(e,r,n)}))}))}))}function Vo(e,t){var r=(t=t===n?" ":ao(t)).length;if(r<2)return r?qr(t,e):t;var o=qr(t,pt(e/un(t)));return on(t)?bo(dn(o),0,e).join(""):o.slice(0,e)}function Uo(e){return function(t,r,o){return o&&"number"!=typeof o&&gi(t,r,o)&&(r=o=n),t=us(t),r===n?(r=t,t=0):r=us(r),function(e,t,n,r){for(var o=-1,i=yn(pt((t-e)/(n||1)),0),a=z(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:us(o),e)}}function $o(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ps(t),n=ps(n)),e(t,n)}}function Ho(e,t,r,o,i,s,l,c,u,d){var f=8&t;t|=f?a:64,4&(t&=~(f?64:a))||(t&=-4);var p=[e,t,i,f?s:n,f?l:n,f?n:s,f?n:l,c,u,d],h=r.apply(n,p);return bi(e)&&ji(h,p),h.placeholder=o,Ti(h,e,t)}function qo(e){var t=ke[e];return function(e,n){if(e=ps(e),(n=null==n?0:gn(ds(n),292))&&Lt(e)){var r=(ms(e)+"e").split("e");return+((r=(ms(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ko=En&&1/cn(new En([,-0]))[1]==l?function(e){return new En(e)}:il;function Yo(e){return function(t){var n=fi(t);return n==_?an(t):n==j?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xo(e,t,o,l,c,u,d,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Pe(r);var h=l?l.length:0;if(h||(t&=-97,l=c=n),d=d===n?d:yn(ds(d),0),f=f===n?f:ds(f),h-=c?c.length:0,64&t){var m=l,y=c;l=c=n}var g=p?n:ri(e),v=[e,t,o,l,c,m,y,u,d,f];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,a=o<131,l=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!l)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Eo(u,c,t[4]):c,e[4]=u?ln(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Oo(u,c,t[6]):c,e[6]=u?ln(e[5],i):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,g),e=v[0],t=v[1],o=v[2],l=v[3],c=v[4],!(f=v[9]=v[9]===n?p?0:e.length:yn(v[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=Io(e);return function i(){for(var a=arguments.length,s=z(a),l=a,c=ii(i);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=u.length)<r?Ho(e,t,Fo,i.placeholder,n,s,u,n,n,r-a):kt(this&&this!==ft&&this instanceof i?o:e,this,s)}}(e,t,f):t!=a&&33!=t||c.length?Fo.apply(n,v):function(e,t,n,r){var o=1&t,i=Io(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=z(c+s),d=this&&this!==ft&&this instanceof t?i:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return kt(d,o?n:this,u)}}(e,t,o,l);else var b=function(e,t,n){var r=1&t,o=Io(e);return function t(){return(this&&this!==ft&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ti((g?Zr:ji)(b,v),e,t)}function Go(e,t,r,o){return e===n||La(e,Ae[r])&&!De.call(o,r)?t:e}function Zo(e,t,r,o,i,a){return Za(e)&&Za(t)&&(a.set(t,e),zr(e,t,n,Zo,a),a.delete(t)),e}function Jo(e){return ts(e)?n:e}function Qo(e,t,r,o,i,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,h=2&r?new qn:n;for(a.set(e,t),a.set(t,e);++f<l;){var m=e[f],y=t[f];if(o)var g=s?o(y,m,f,t,e,a):o(m,y,f,e,t,a);if(g!==n){if(g)continue;p=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(m===e||i(m,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!i(m,y,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ei(e){return Ci(ki(e,n,Vi),e+"")}function ti(e){return _r(e,Ps,ui)}function ni(e){return _r(e,Cs,di)}var ri=Pn?function(e){return Pn.get(e)}:il;function oi(e){for(var t=e.name+"",n=Cn[t],r=De.call(Cn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ii(e){return(De.call(Fn,"placeholder")?Fn:e).placeholder}function ai(){var e=Fn.iteratee||tl;return e=e===tl?Mr:e,arguments.length?e(arguments[0],arguments[1]):e}function si(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function li(e){for(var t=Ps(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,_i(o)]}return t}function ci(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Nr(r)?r:n}var ui=yt?function(e){return null==e?[]:(e=Ee(e),Ct(yt(e),(function(t){return Ke.call(e,t)})))}:fl,di=yt?function(e){for(var t=[];e;)Mt(t,ui(e)),e=He(e);return t}:fl,fi=Sr;function pi(e,t,n){for(var r=-1,o=(t=go(t,e)).length,i=!1;++r<o;){var a=Di(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ga(o)&&yi(a,o)&&(Wa(e)||Ba(e))}function hi(e){return"function"!=typeof e.constructor||wi(e)?{}:zn(He(e))}function mi(e){return Wa(e)||Ba(e)||!!(Xe&&e&&e[Xe])}function yi(e,t){var n=typeof e;return!!(t=t??c)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function gi(e,t,n){if(!Za(n))return!1;var r=typeof t;return!!("number"==r?Ua(n)&&yi(t,n.length):"string"==r&&t in n)&&La(n[t],e)}function vi(e,t){if(Wa(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!is(e))||ee.test(e)||!Q.test(e)||null!=t&&e in Ee(t)}function bi(e){var t=oi(e),n=Fn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=ri(n);return!!r&&e===r[0]}(_n&&fi(new _n(new ArrayBuffer(1)))!=N||Sn&&fi(new Sn)!=_||kn&&fi(kn.resolve())!=E||En&&fi(new En)!=j||On&&fi(new On)!=T)&&(fi=function(e){var t=Sr(e),r=t==k?e.constructor:n,o=r?Ii(r):"";if(o)switch(o){case Tn:return N;case An:return _;case Nn:return E;case Mn:return j;case Dn:return T}return t});var xi=Ne?Ya:pl;function wi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function _i(e){return e==e&&!Za(e)}function Si(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in Ee(r))}}function ki(e,t,r){return t=yn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=yn(n.length-t,0),a=z(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=z(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),kt(e,this,s)}}function Ei(e,t){return t.length<2?e:wr(e,eo(t,0,-1))}function Oi(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ji=Ai(Zr),Pi=dt||function(e,t){return ft.setTimeout(e,t)},Ci=Ai(Jr);function Ti(e,t,n){var r=t+"";return Ci(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return Ot(h,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(le):[]}(r),n)))}function Ai(e){var t=0,r=0;return function(){var o=vn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=Hr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Mi=function(){var e=Aa((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,n,r,o){t.push(r?o.replace(de,"$1"):n||e)})),t}),(function(e){return 500===t.size&&t.clear(),e})),t=e.cache;return e}();function Di(e){if("string"==typeof e||is(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function Ii(e){if(null!=e){try{return Me.call(e)}catch{}try{return e+""}catch{}}return""}function Ri(e){if(e instanceof Vn)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=jo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Li=Kr((function(e,t){return $a(e)?cr(e,mr(t,1,$a,!0)):[]})),Fi=Kr((function(e,t){var r=Ki(t);return $a(r)&&(r=n),$a(e)?cr(e,mr(t,1,$a,!0),ai(r,2)):[]})),zi=Kr((function(e,t){var r=Ki(t);return $a(r)&&(r=n),$a(e)?cr(e,mr(t,1,$a,!0),n,r):[]}));function Bi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=yn(r+o,0)),zt(e,ai(t,3),o)}function Wi(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=ds(r),i=r<0?yn(o+i,0):gn(i,o-1)),zt(e,ai(t,3),i,!0)}function Vi(e){return null!=e&&e.length?mr(e,1):[]}function Ui(e){return e&&e.length?e[0]:n}var $i=Kr((function(e){var t=Nt(e,mo);return t.length&&t[0]===e[0]?jr(t):[]})),Hi=Kr((function(e){var t=Ki(e),r=Nt(e,mo);return t===Ki(r)?t=n:r.pop(),r.length&&r[0]===e[0]?jr(r,ai(t,2)):[]})),qi=Kr((function(e){var t=Ki(e),r=Nt(e,mo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?jr(r,n,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Yi=Kr(Xi);function Xi(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Gi=ei((function(e,t){var n=null==e?0:e.length,r=or(e,t);return $r(e,Nt(t,(function(e){return yi(e,n)?+e:e})).sort(ko)),r}));function Zi(e){return null==e?e:wn.call(e)}var Ji=Kr((function(e){return so(mr(e,1,$a,!0))})),Qi=Kr((function(e){var t=Ki(e);return $a(t)&&(t=n),so(mr(e,1,$a,!0),ai(t,2))})),ea=Kr((function(e){var t=Ki(e);return t="function"==typeof t?t:n,so(mr(e,1,$a,!0),n,t)}));function ta(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if($a(e))return t=yn(e.length,t),!0})),Yt(t,(function(t){return Nt(e,$t(t))}))}function na(e,t){if(!e||!e.length)return[];var r=ta(e);return null==t?r:Nt(r,(function(e){return kt(t,n,e)}))}var ra=Kr((function(e,t){return $a(e)?cr(e,t):[]})),oa=Kr((function(e){return po(Ct(e,$a))})),ia=Kr((function(e){var t=Ki(e);return $a(t)&&(t=n),po(Ct(e,$a),ai(t,2))})),aa=Kr((function(e){var t=Ki(e);return t="function"==typeof t?t:n,po(Ct(e,$a),n,t)})),sa=Kr(ta),la=Kr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,na(e,r)}));function ca(e){var t=Fn(e);return t.__chain__=!0,t}function ua(e,t){return t(e)}var da=ei((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return or(t,e)};return!(t>1||this.__actions__.length)&&o instanceof Vn&&yi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:ua,args:[i],thisArg:n}),new Wn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)})),fa=Co((function(e,t,n){De.call(e,n)?++e[n]:rr(e,n,1)})),pa=Ro(Bi),ha=Ro(Wi);function ma(e,t){return(Wa(e)?Ot:ur)(e,ai(t,3))}function ya(e,t){return(Wa(e)?jt:dr)(e,ai(t,3))}var ga=Co((function(e,t,n){De.call(e,n)?e[n].push(t):rr(e,n,[t])})),va=Kr((function(e,t,n){var r=-1,o="function"==typeof t,i=Ua(e)?z(e.length):[];return ur(e,(function(e){i[++r]=o?kt(t,e,n):Pr(e,t,n)})),i})),ba=Co((function(e,t,n){rr(e,n,t)}));function xa(e,t){return(Wa(e)?Nt:Rr)(e,ai(t,3))}var wa=Co((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),_a=Kr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Wr(e,mr(t,1),[])})),Sa=ut||function(){return ft.Date.now()};function ka(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Xo(e,s,n,n,n,n,t)}function Ea(e,t){var o;if("function"!=typeof t)throw new Pe(r);return e=ds(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Oa=Kr((function(e,t,n){var r=1;if(n.length){var o=ln(n,ii(Oa));r|=a}return Xo(e,r,t,n,o)})),ja=Kr((function(e,t,n){var r=3;if(n.length){var o=ln(n,ii(ja));r|=a}return Xo(t,r,e,n,o)}));function Pa(e,t,o){var i,a,s,l,c,u,d=0,f=!1,p=!1,h=!0;if("function"!=typeof e)throw new Pe(r);function m(t){var r=i,o=a;return i=a=n,d=t,l=e.apply(o,r)}function y(e){var r=e-u;return u===n||r>=t||r<0||p&&e-d>=s}function g(){var e=Sa();if(y(e))return v(e);c=Pi(g,function(e){var n=t-(e-u);return p?gn(n,s-(e-d)):n}(e))}function v(e){return c=n,h&&i?m(e):(i=a=n,l)}function b(){var e=Sa(),r=y(e);if(i=arguments,a=this,u=e,r){if(c===n)return function(e){return d=e,c=Pi(g,t),f?m(e):l}(u);if(p)return xo(c),c=Pi(g,t),m(u)}return c===n&&(c=Pi(g,t)),l}return t=ps(t)||0,Za(o)&&(f=!!o.leading,s=(p="maxWait"in o)?yn(ps(o.maxWait)||0,t):s,h="trailing"in o?!!o.trailing:h),b.cancel=function(){c!==n&&xo(c),d=0,i=u=a=c=n},b.flush=function(){return c===n?l:v(Sa())},b}var Ca=Kr((function(e,t){return lr(e,1,t)})),Ta=Kr((function(e,t,n){return lr(e,ps(t)||0,n)}));function Aa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Aa.Cache||Hn),n}function Na(e){if("function"!=typeof e)throw new Pe(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Aa.Cache=Hn;var Ma=vo((function(e,t){var n=(t=1==t.length&&Wa(t[0])?Nt(t[0],Gt(ai())):Nt(mr(t,1),Gt(ai()))).length;return Kr((function(r){for(var o=-1,i=gn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return kt(e,this,r)}))})),Da=Kr((function(e,t){var r=ln(t,ii(Da));return Xo(e,a,n,t,r)})),Ia=Kr((function(e,t){var r=ln(t,ii(Ia));return Xo(e,64,n,t,r)})),Ra=ei((function(e,t){return Xo(e,256,n,n,n,t)}));function La(e,t){return e===t||e!=e&&t!=t}var Fa=$o(kr),za=$o((function(e,t){return e>=t})),Ba=Cr(function(){return arguments}())?Cr:function(e){return Ja(e)&&De.call(e,"callee")&&!Ke.call(e,"callee")},Wa=z.isArray,Va=vt?Gt(vt):function(e){return Ja(e)&&Sr(e)==A};function Ua(e){return null!=e&&Ga(e.length)&&!Ya(e)}function $a(e){return Ja(e)&&Ua(e)}var Ha=gt||pl,qa=bt?Gt(bt):function(e){return Ja(e)&&Sr(e)==v};function Ka(e){if(!Ja(e))return!1;var t=Sr(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ts(e)}function Ya(e){if(!Za(e))return!1;var t=Sr(e);return t==x||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==ds(e)}function Ga(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function Za(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ja(e){return null!=e&&"object"==typeof e}var Qa=xt?Gt(xt):function(e){return Ja(e)&&fi(e)==_};function es(e){return"number"==typeof e||Ja(e)&&Sr(e)==S}function ts(e){if(!Ja(e)||Sr(e)!=k)return!1;var t=He(e);if(null===t)return!0;var n=De.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Me.call(n)==Fe}var ns=wt?Gt(wt):function(e){return Ja(e)&&Sr(e)==O},rs=_t?Gt(_t):function(e){return Ja(e)&&fi(e)==j};function os(e){return"string"==typeof e||!Wa(e)&&Ja(e)&&Sr(e)==P}function is(e){return"symbol"==typeof e||Ja(e)&&Sr(e)==C}var as=St?Gt(St):function(e){return Ja(e)&&Ga(e.length)&&!!it[Sr(e)]},ss=$o(Ir),ls=$o((function(e,t){return e<=t}));function cs(e){if(!e)return[];if(Ua(e))return os(e)?dn(e):jo(e);if(Ge&&e[Ge])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ge]());var t=fi(e);return(t==_?an:t==j?cn:Ls)(e)}function us(e){return e?(e=ps(e))===l||e===-l?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ds(e){var t=us(e),n=t%1;return t==t?n?t-n:t:0}function fs(e){return e?ir(ds(e),0,d):0}function ps(e){if("number"==typeof e)return e;if(is(e))return u;if(Za(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Za(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=me.test(e);return n||ge.test(e)?ct(e.slice(2),n?2:8):he.test(e)?u:+e}function hs(e){return Po(e,Cs(e))}function ms(e){return null==e?"":ao(e)}var ys=To((function(e,t){if(wi(t)||Ua(t))Po(t,Ps(t),e);else for(var n in t)De.call(t,n)&&Qn(e,n,t[n])})),gs=To((function(e,t){Po(t,Cs(t),e)})),vs=To((function(e,t,n,r){Po(t,Cs(t),e,r)})),bs=To((function(e,t,n,r){Po(t,Ps(t),e,r)})),xs=ei(or),ws=Kr((function(e,t){e=Ee(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&gi(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Cs(a),l=-1,c=s.length;++l<c;){var u=s[l],d=e[u];(d===n||La(d,Ae[u])&&!De.call(e,u))&&(e[u]=a[u])}return e})),_s=Kr((function(e){return e.push(n,Zo),kt(As,n,e)}));function Ss(e,t,r){var o=null==e?n:wr(e,t);return o===n?r:o}function ks(e,t){return null!=e&&pi(e,t,Or)}var Es=zo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=n}),Zs(el)),Os=zo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),De.call(e,t)?e[t].push(n):e[t]=[n]}),ai),js=Kr(Pr);function Ps(e){return Ua(e)?Yn(e):Dr(e)}function Cs(e){return Ua(e)?Yn(e,!0):function(e){if(!Za(e))return function(e){var t=[];if(null!=e)for(var n in Ee(e))t.push(n);return t}(e);var t=wi(e),n=[];for(var r in e)"constructor"==r&&(t||!De.call(e,r))||n.push(r);return n}(e)}var Ts=To((function(e,t,n){zr(e,t,n)})),As=To((function(e,t,n,r){zr(e,t,n,r)})),Ns=ei((function(e,t){var n={};if(null==e)return n;var r=!1;t=Nt(t,(function(t){return t=go(t,e),r||(r=t.length>1),t})),Po(e,ni(e),n),r&&(n=ar(n,7,Jo));for(var o=t.length;o--;)lo(n,t[o]);return n})),Ms=ei((function(e,t){return null==e?{}:function(e,t){return Vr(e,t,(function(t,n){return ks(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=Nt(ni(e),(function(e){return[e]}));return t=ai(t),Vr(e,n,(function(e,n){return t(e,n[0])}))}var Is=Yo(Ps),Rs=Yo(Cs);function Ls(e){return null==e?[]:Zt(e,Ps(e))}var Fs=Do((function(e,t,n){return t=t.toLowerCase(),e+(n?zs(t):t)}));function zs(e){return Ks(ms(e).toLowerCase())}function Bs(e){return(e=ms(e))&&e.replace(be,tn).replace(Je,"")}var Ws=Do((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vs=Do((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Us=Mo("toLowerCase"),$s=Do((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Hs=Do((function(e,t,n){return e+(n?" ":"")+Ks(t)})),qs=Do((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ks=Mo("toUpperCase");function Ys(e,t,r){return e=ms(e),(t=r?n:t)===n?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Xs=Kr((function(e,t){try{return kt(e,n,t)}catch(e){return Ka(e)?e:new _e(e)}})),Gs=ei((function(e,t){return Ot(t,(function(t){t=Di(t),rr(e,t,Oa(e[t],e))})),e}));function Zs(e){return function(){return e}}var Js=Lo(),Qs=Lo(!0);function el(e){return e}function tl(e){return Mr("function"==typeof e?e:ar(e,1))}var nl=Kr((function(e,t){return function(n){return Pr(n,e,t)}})),rl=Kr((function(e,t){return function(n){return Pr(e,n,t)}}));function ol(e,t,n){var r=Ps(t),o=xr(t,r);null==n&&(!Za(t)||!o.length&&r.length)&&(n=t,t=e,e=this,o=xr(t,Ps(t)));var i=!(Za(n)&&"chain"in n&&!n.chain),a=Ya(e);return Ot(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=jo(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Mt([this.value()],arguments))})})),e}function il(){}var al=Wo(Nt),sl=Wo(Pt),ll=Wo(Rt);function cl(e){return vi(e)?$t(Di(e)):function(e){return function(t){return wr(t,e)}}(e)}var ul=Uo(),dl=Uo(!0);function fl(){return[]}function pl(){return!1}var hl=Bo((function(e,t){return e+t}),0),ml=qo("ceil"),yl=Bo((function(e,t){return e/t}),1),gl=qo("floor"),vl=Bo((function(e,t){return e*t}),1),bl=qo("round"),xl=Bo((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Pe(r);return e=ds(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=ka,Fn.assign=ys,Fn.assignIn=gs,Fn.assignInWith=vs,Fn.assignWith=bs,Fn.at=xs,Fn.before=Ea,Fn.bind=Oa,Fn.bindAll=Gs,Fn.bindKey=ja,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wa(e)?e:[e]},Fn.chain=ca,Fn.chunk=function(e,t,r){t=(r?gi(e,t,r):t===n)?1:yn(ds(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=z(pt(o/t));i<o;)s[a++]=eo(e,i,i+=t);return s},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=z(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Mt(Wa(n)?jo(n):[n],mr(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=ai();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Pe(r);return[n(e[0]),e[1]]})):[],Kr((function(n){for(var r=-1;++r<t;){var o=e[r];if(kt(o[0],this,n))return kt(o[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Ps(e);return function(n){return sr(n,e,t)}}(ar(e,1))},Fn.constant=Zs,Fn.countBy=fa,Fn.create=function(e,t){var n=zn(e);return null==t?n:nr(n,t)},Fn.curry=function e(t,r,o){var i=Xo(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Fn.curryRight=function e(t,r,o){var i=Xo(t,16,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Fn.debounce=Pa,Fn.defaults=ws,Fn.defaultsDeep=_s,Fn.defer=Ca,Fn.delay=Ta,Fn.difference=Li,Fn.differenceBy=Fi,Fn.differenceWith=zi,Fn.drop=function(e,t,r){var o=null==e?0:e.length;return o?eo(e,(t=r||t===n?1:ds(t))<0?0:t,o):[]},Fn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?eo(e,0,(t=o-(t=r||t===n?1:ds(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!0):[]},Fn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&gi(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=ds(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:ds(o))<0&&(o+=i),o=r>o?0:fs(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Fn.filter=function(e,t){return(Wa(e)?Ct:hr)(e,ai(t,3))},Fn.flatMap=function(e,t){return mr(xa(e,t),1)},Fn.flatMapDeep=function(e,t){return mr(xa(e,t),l)},Fn.flatMapDepth=function(e,t,r){return r=r===n?1:ds(r),mr(xa(e,t),r)},Fn.flatten=Vi,Fn.flattenDeep=function(e){return null!=e&&e.length?mr(e,l):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?mr(e,t=t===n?1:ds(t)):[]},Fn.flip=function(e){return Xo(e,512)},Fn.flow=Js,Fn.flowRight=Qs,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Fn.functions=function(e){return null==e?[]:xr(e,Ps(e))},Fn.functionsIn=function(e){return null==e?[]:xr(e,Cs(e))},Fn.groupBy=ga,Fn.initial=function(e){return null!=e&&e.length?eo(e,0,-1):[]},Fn.intersection=$i,Fn.intersectionBy=Hi,Fn.intersectionWith=qi,Fn.invert=Es,Fn.invertBy=Os,Fn.invokeMap=va,Fn.iteratee=tl,Fn.keyBy=ba,Fn.keys=Ps,Fn.keysIn=Cs,Fn.map=xa,Fn.mapKeys=function(e,t){var n={};return t=ai(t,3),vr(e,(function(e,r,o){rr(n,t(e,r,o),e)})),n},Fn.mapValues=function(e,t){var n={};return t=ai(t,3),vr(e,(function(e,r,o){rr(n,r,t(e,r,o))})),n},Fn.matches=function(e){return Lr(ar(e,1))},Fn.matchesProperty=function(e,t){return Fr(e,ar(t,1))},Fn.memoize=Aa,Fn.merge=Ts,Fn.mergeWith=As,Fn.method=nl,Fn.methodOf=rl,Fn.mixin=ol,Fn.negate=Na,Fn.nthArg=function(e){return e=ds(e),Kr((function(t){return Br(t,e)}))},Fn.omit=Ns,Fn.omitBy=function(e,t){return Ds(e,Na(ai(t)))},Fn.once=function(e){return Ea(2,e)},Fn.orderBy=function(e,t,r,o){return null==e?[]:(Wa(t)||(t=null==t?[]:[t]),Wa(r=o?n:r)||(r=null==r?[]:[r]),Wr(e,t,r))},Fn.over=al,Fn.overArgs=Ma,Fn.overEvery=sl,Fn.overSome=ll,Fn.partial=Da,Fn.partialRight=Ia,Fn.partition=wa,Fn.pick=Ms,Fn.pickBy=Ds,Fn.property=cl,Fn.propertyOf=function(e){return function(t){return null==e?n:wr(e,t)}},Fn.pull=Yi,Fn.pullAll=Xi,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,ai(n,2)):e},Fn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Ur(e,t,n,r):e},Fn.pullAt=Gi,Fn.range=ul,Fn.rangeRight=dl,Fn.rearg=Ra,Fn.reject=function(e,t){return(Wa(e)?Ct:hr)(e,Na(ai(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ai(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return $r(e,o),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Pe(r);return Kr(e,t=t===n?t:ds(t))},Fn.reverse=Zi,Fn.sampleSize=function(e,t,r){return t=(r?gi(e,t,r):t===n)?1:ds(t),(Wa(e)?Gn:Xr)(e,t)},Fn.set=function(e,t,n){return null==e?e:Gr(e,t,n)},Fn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:Gr(e,t,r,o)},Fn.shuffle=function(e){return(Wa(e)?Zn:Qr)(e)},Fn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&gi(e,t,r)?(t=0,r=o):(t=null==t?0:ds(t),r=r===n?o:ds(r)),eo(e,t,r)):[]},Fn.sortBy=_a,Fn.sortedUniq=function(e){return e&&e.length?oo(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?oo(e,ai(t,2)):[]},Fn.split=function(e,t,r){return r&&"number"!=typeof r&&gi(e,t,r)&&(t=r=n),(r=r===n?d:r>>>0)?(e=ms(e))&&("string"==typeof t||null!=t&&!ns(t))&&!(t=ao(t))&&on(e)?bo(dn(e),0,r):e.split(t,r):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Pe(r);return t=null==t?0:yn(ds(t),0),Kr((function(n){var r=n[t],o=bo(n,0,t);return r&&Mt(o,r),kt(e,this,o)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?eo(e,1,t):[]},Fn.take=function(e,t,r){return e&&e.length?eo(e,0,(t=r||t===n?1:ds(t))<0?0:t):[]},Fn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?eo(e,(t=o-(t=r||t===n?1:ds(t)))<0?0:t,o):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?uo(e,ai(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?uo(e,ai(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new Pe(r);return Za(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Pa(e,t,{leading:o,maxWait:t,trailing:i})},Fn.thru=ua,Fn.toArray=cs,Fn.toPairs=Is,Fn.toPairsIn=Rs,Fn.toPath=function(e){return Wa(e)?Nt(e,Di):is(e)?[e]:jo(Mi(ms(e)))},Fn.toPlainObject=hs,Fn.transform=function(e,t,n){var r=Wa(e),o=r||Ha(e)||as(e);if(t=ai(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:Za(e)&&Ya(i)?zn(He(e)):{}}return(o?Ot:vr)(e,(function(e,r,o){return t(n,e,r,o)})),n},Fn.unary=function(e){return ka(e,1)},Fn.union=Ji,Fn.unionBy=Qi,Fn.unionWith=ea,Fn.uniq=function(e){return e&&e.length?so(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?so(e,ai(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?so(e,n,t):[]},Fn.unset=function(e,t){return null==e||lo(e,t)},Fn.unzip=ta,Fn.unzipWith=na,Fn.update=function(e,t,n){return null==e?e:co(e,t,yo(n))},Fn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:co(e,t,yo(r),o)},Fn.values=Ls,Fn.valuesIn=function(e){return null==e?[]:Zt(e,Cs(e))},Fn.without=ra,Fn.words=Ys,Fn.wrap=function(e,t){return Da(yo(t),e)},Fn.xor=oa,Fn.xorBy=ia,Fn.xorWith=aa,Fn.zip=sa,Fn.zipObject=function(e,t){return ho(e||[],t||[],Qn)},Fn.zipObjectDeep=function(e,t){return ho(e||[],t||[],Gr)},Fn.zipWith=la,Fn.entries=Is,Fn.entriesIn=Rs,Fn.extend=gs,Fn.extendWith=vs,ol(Fn,Fn),Fn.add=hl,Fn.attempt=Xs,Fn.camelCase=Fs,Fn.capitalize=zs,Fn.ceil=ml,Fn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ps(r))==r?r:0),t!==n&&(t=(t=ps(t))==t?t:0),ir(ps(e),t,r)},Fn.clone=function(e){return ar(e,4)},Fn.cloneDeep=function(e){return ar(e,5)},Fn.cloneDeepWith=function(e,t){return ar(e,5,t="function"==typeof t?t:n)},Fn.cloneWith=function(e,t){return ar(e,4,t="function"==typeof t?t:n)},Fn.conformsTo=function(e,t){return null==t||sr(e,t,Ps(t))},Fn.deburr=Bs,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=yl,Fn.endsWith=function(e,t,r){e=ms(e),t=ao(t);var o=e.length,i=r=r===n?o:ir(ds(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Fn.eq=La,Fn.escape=function(e){return(e=ms(e))&&X.test(e)?e.replace(K,nn):e},Fn.escapeRegExp=function(e){return(e=ms(e))&&re.test(e)?e.replace(ne,"\\$&"):e},Fn.every=function(e,t,r){var o=Wa(e)?Pt:fr;return r&&gi(e,t,r)&&(t=n),o(e,ai(t,3))},Fn.find=pa,Fn.findIndex=Bi,Fn.findKey=function(e,t){return Ft(e,ai(t,3),vr)},Fn.findLast=ha,Fn.findLastIndex=Wi,Fn.findLastKey=function(e,t){return Ft(e,ai(t,3),br)},Fn.floor=gl,Fn.forEach=ma,Fn.forEachRight=ya,Fn.forIn=function(e,t){return null==e?e:yr(e,ai(t,3),Cs)},Fn.forInRight=function(e,t){return null==e?e:gr(e,ai(t,3),Cs)},Fn.forOwn=function(e,t){return e&&vr(e,ai(t,3))},Fn.forOwnRight=function(e,t){return e&&br(e,ai(t,3))},Fn.get=Ss,Fn.gt=Fa,Fn.gte=za,Fn.has=function(e,t){return null!=e&&pi(e,t,Er)},Fn.hasIn=ks,Fn.head=Ui,Fn.identity=el,Fn.includes=function(e,t,n,r){e=Ua(e)?e:Ls(e),n=n&&!r?ds(n):0;var o=e.length;return n<0&&(n=yn(o+n,0)),os(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Bt(e,t,n)>-1},Fn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:ds(n);return o<0&&(o=yn(r+o,0)),Bt(e,t,o)},Fn.inRange=function(e,t,r){return t=us(t),r===n?(r=t,t=0):r=us(r),function(e,t,n){return e>=gn(t,n)&&e<yn(t,n)}(e=ps(e),t,r)},Fn.invoke=js,Fn.isArguments=Ba,Fn.isArray=Wa,Fn.isArrayBuffer=Va,Fn.isArrayLike=Ua,Fn.isArrayLikeObject=$a,Fn.isBoolean=function(e){return!0===e||!1===e||Ja(e)&&Sr(e)==g},Fn.isBuffer=Ha,Fn.isDate=qa,Fn.isElement=function(e){return Ja(e)&&1===e.nodeType&&!ts(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Ua(e)&&(Wa(e)||"string"==typeof e||"function"==typeof e.splice||Ha(e)||as(e)||Ba(e)))return!e.length;var t=fi(e);if(t==_||t==j)return!e.size;if(wi(e))return!Dr(e).length;for(var n in e)if(De.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Tr(e,t)},Fn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Tr(e,t,n,r):!!o},Fn.isError=Ka,Fn.isFinite=function(e){return"number"==typeof e&&Lt(e)},Fn.isFunction=Ya,Fn.isInteger=Xa,Fn.isLength=Ga,Fn.isMap=Qa,Fn.isMatch=function(e,t){return e===t||Ar(e,t,li(t))},Fn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Ar(e,t,li(t),r)},Fn.isNaN=function(e){return es(e)&&e!=+e},Fn.isNative=function(e){if(xi(e))throw new _e("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=es,Fn.isObject=Za,Fn.isObjectLike=Ja,Fn.isPlainObject=ts,Fn.isRegExp=ns,Fn.isSafeInteger=function(e){return Xa(e)&&e>=-c&&e<=c},Fn.isSet=rs,Fn.isString=os,Fn.isSymbol=is,Fn.isTypedArray=as,Fn.isUndefined=function(e){return e===n},Fn.isWeakMap=function(e){return Ja(e)&&fi(e)==T},Fn.isWeakSet=function(e){return Ja(e)&&"[object WeakSet]"==Sr(e)},Fn.join=function(e,t){return null==e?"":Ht.call(e,t)},Fn.kebabCase=Ws,Fn.last=Ki,Fn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=ds(r))<0?yn(o+i,0):gn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):zt(e,Vt,i,!0)},Fn.lowerCase=Vs,Fn.lowerFirst=Us,Fn.lt=ss,Fn.lte=ls,Fn.max=function(e){return e&&e.length?pr(e,el,kr):n},Fn.maxBy=function(e,t){return e&&e.length?pr(e,ai(t,2),kr):n},Fn.mean=function(e){return Ut(e,el)},Fn.meanBy=function(e,t){return Ut(e,ai(t,2))},Fn.min=function(e){return e&&e.length?pr(e,el,Ir):n},Fn.minBy=function(e,t){return e&&e.length?pr(e,ai(t,2),Ir):n},Fn.stubArray=fl,Fn.stubFalse=pl,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=vl,Fn.nth=function(e,t){return e&&e.length?Br(e,ds(t)):n},Fn.noConflict=function(){return ft._===this&&(ft._=ze),this},Fn.noop=il,Fn.now=Sa,Fn.pad=function(e,t,n){e=ms(e);var r=(t=ds(t))?un(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Vo(ht(o),n)+e+Vo(pt(o),n)},Fn.padEnd=function(e,t,n){e=ms(e);var r=(t=ds(t))?un(e):0;return t&&r<t?e+Vo(t-r,n):e},Fn.padStart=function(e,t,n){e=ms(e);var r=(t=ds(t))?un(e):0;return t&&r<t?Vo(t-r,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),bn(ms(e).replace(oe,""),t||0)},Fn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&gi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=us(e),t===n?(t=e,e=0):t=us(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=xn();return gn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return Hr(e,t)},Fn.reduce=function(e,t,n){var r=Wa(e)?Dt:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,ur)},Fn.reduceRight=function(e,t,n){var r=Wa(e)?It:qt,o=arguments.length<3;return r(e,ai(t,4),n,o,dr)},Fn.repeat=function(e,t,r){return t=(r?gi(e,t,r):t===n)?1:ds(t),qr(ms(e),t)},Fn.replace=function(){var e=arguments,t=ms(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,r){var o=-1,i=(t=go(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[Di(t[o])];a===n&&(o=i,a=r),e=Ya(a)?a.call(e):a}return e},Fn.round=bl,Fn.runInContext=e,Fn.sample=function(e){return(Wa(e)?Xn:Yr)(e)},Fn.size=function(e){if(null==e)return 0;if(Ua(e))return os(e)?un(e):e.length;var t=fi(e);return t==_||t==j?e.size:Dr(e).length},Fn.snakeCase=$s,Fn.some=function(e,t,r){var o=Wa(e)?Rt:to;return r&&gi(e,t,r)&&(t=n),o(e,ai(t,3))},Fn.sortedIndex=function(e,t){return no(e,t)},Fn.sortedIndexBy=function(e,t,n){return ro(e,t,ai(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=no(e,t);if(r<n&&La(e[r],t))return r}return-1},Fn.sortedLastIndex=function(e,t){return no(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ro(e,t,ai(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=no(e,t,!0)-1;if(La(e[n],t))return n}return-1},Fn.startCase=Hs,Fn.startsWith=function(e,t,n){return e=ms(e),n=null==n?0:ir(ds(n),0,e.length),t=ao(t),e.slice(n,n+t.length)==t},Fn.subtract=xl,Fn.sum=function(e){return e&&e.length?Kt(e,el):0},Fn.sumBy=function(e,t){return e&&e.length?Kt(e,ai(t,2)):0},Fn.template=function(e,t,r){var o=Fn.templateSettings;r&&gi(e,t,r)&&(t=n),e=ms(e),t=vs({},t,o,Go);var i,a,s=vs({},t.imports,o.imports,Go),l=Ps(s),c=Zt(s,l),u=0,d=t.interpolate||xe,f="__p += '",p=Oe((t.escape||xe).source+"|"+d.source+"|"+(d===J?fe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),h="//# sourceURL="+(De.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,o,s,l){return r||(r=o),f+=e.slice(u,l).replace(we,rn),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),f+="';\n";var m=De.call(t,"variable")&&t.variable;if(m){if(ue.test(m))throw new _e("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(U,""):f).replace($,"$1").replace(H,"$1;"),f="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=Xs((function(){return Se(l,h+"return "+f).apply(n,c)}));if(y.source=f,Ka(y))throw y;return y},Fn.times=function(e,t){if((e=ds(e))<1||e>c)return[];var n=d,r=gn(e,d);t=ai(t),e-=d;for(var o=Yt(r,t);++n<e;)t(n);return o},Fn.toFinite=us,Fn.toInteger=ds,Fn.toLength=fs,Fn.toLower=function(e){return ms(e).toLowerCase()},Fn.toNumber=ps,Fn.toSafeInteger=function(e){return e?ir(ds(e),-c,c):0===e?e:0},Fn.toString=ms,Fn.toUpper=function(e){return ms(e).toUpperCase()},Fn.trim=function(e,t,r){if((e=ms(e))&&(r||t===n))return Xt(e);if(!e||!(t=ao(t)))return e;var o=dn(e),i=dn(t);return bo(o,Qt(o,i),en(o,i)+1).join("")},Fn.trimEnd=function(e,t,r){if((e=ms(e))&&(r||t===n))return e.slice(0,fn(e)+1);if(!e||!(t=ao(t)))return e;var o=dn(e);return bo(o,0,en(o,dn(t))+1).join("")},Fn.trimStart=function(e,t,r){if((e=ms(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=ao(t)))return e;var o=dn(e);return bo(o,Qt(o,dn(t))).join("")},Fn.truncate=function(e,t){var r=30,o="...";if(Za(t)){var i="separator"in t?t.separator:i;r="length"in t?ds(t.length):r,o="omission"in t?ao(t.omission):o}var a=(e=ms(e)).length;if(on(e)){var s=dn(e);a=s.length}if(r>=a)return e;var l=r-un(o);if(l<1)return o;var c=s?bo(s,0,l).join(""):e.slice(0,l);if(i===n)return c+o;if(s&&(l+=c.length-l),ns(i)){if(e.slice(l).search(i)){var u,d=c;for(i.global||(i=Oe(i.source,ms(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(d);)var f=u.index;c=c.slice(0,f===n?l:f)}}else if(e.indexOf(ao(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+o},Fn.unescape=function(e){return(e=ms(e))&&Y.test(e)?e.replace(q,pn):e},Fn.uniqueId=function(e){var t=++Ie;return ms(e)+t},Fn.upperCase=qs,Fn.upperFirst=Ks,Fn.each=ma,Fn.eachRight=ya,Fn.first=Ui,ol(Fn,function(){var e={};return vr(Fn,(function(t,n){De.call(Fn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Fn.VERSION="4.17.21",Ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),Ot(["drop","take"],(function(e,t){Vn.prototype[e]=function(r){r=r===n?1:yn(ds(r),0);var o=this.__filtered__&&!t?new Vn(this):this.clone();return o.__filtered__?o.__takeCount__=gn(r,o.__takeCount__):o.__views__.push({size:gn(r,d),type:e+(o.__dir__<0?"Right":"")}),o},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ot(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ai(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),Ot(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),Ot(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(el)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Kr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Pr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Na(ai(e)))},Vn.prototype.slice=function(e,t){e=ds(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=ds(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(d)},vr(Vn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Fn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Fn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof Vn,c=s[0],u=l||Wa(t),d=function(e){var t=i.apply(Fn,Mt([e],s));return o&&f?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var f=this.__chain__,p=!!this.__actions__.length,h=a&&!f,m=l&&!p;if(!a&&u){t=m?t:new Vn(this);var y=e.apply(t,s);return y.__actions__.push({func:ua,args:[d],thisArg:n}),new Wn(y,f)}return h&&m?e.apply(this,s):(y=this.thru(d),h?o?y.value()[0]:y.value():y)})})),Ot(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Wa(o)?o:[],e)}return this[n]((function(n){return t.apply(Wa(n)?n:[],e)}))}})),vr(Vn.prototype,(function(e,t){var n=Fn[t];if(n){var r=n.name+"";De.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:t,func:n})}})),Cn[Fo(n,2).name]=[{name:"wrapper",func:n}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=jo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jo(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wa(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=yn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,d=u.length,f=0,p=gn(l,this.__takeCount__);if(!n||!r&&o==l&&p==l)return fo(e,this.__actions__);var h=[];e:for(;l--&&f<p;){for(var m=-1,y=e[c+=t];++m<d;){var g=u[m],v=g.iteratee,b=g.type,x=v(y);if(2==b)y=x;else if(!x){if(1==b)continue e;break e}}h[f++]=y}return h},Fn.prototype.at=da,Fn.prototype.chain=function(){return ca(this)},Fn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===n&&(this.__values__=cs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,r=this;r instanceof Bn;){var o=Ri(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:ua,args:[Zi],thisArg:n}),new Wn(t,this.__chain__)}return this.thru(Zi)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return fo(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,Ge&&(Fn.prototype[Ge]=function(){return this}),Fn}();ht?((ht.exports=hn)._=hn,pt._=hn):ft._=hn}).call(z)}(Hw,Hw.exports);var qw=Hw.exports;const Kw={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},Yw={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"}},Xw={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"},Gw={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"},Zw=(0,s.createContext)({}),Jw=()=>(0,s.useContext)(Zw),Qw=(0,s.forwardRef)((({className:e,size:t="sm",open:n=!1,onOpenChange:r=()=>{},loading:o=!1,...i},a)=>{const[l,c]=(0,s.useState)(""),[u,d]=(0,s.useState)(o??!1),{refs:f,floatingStyles:p,context:h}=Vo({open:n,onOpenChange:r,placement:"bottom-start",whileElementsMounted:dr,middleware:[Sr("sm"===t?4:6),Er({padding:10}),Or({apply({rects:e,elements:t,availableHeight:n}){t.floating.style.maxHeight=`${n}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),m=Wo(h),{getReferenceProps:y,getFloatingProps:g}=qo([m]);return(0,s.useEffect)((()=>{const e=(()=>{var e,t;const n=(null==(t=null==(e=window.navigator)?void 0:e.userAgentData)?void 0:t.platform)||window.navigator.platform;let r="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(n)?r="Mac OS":["Win32","Win64","Windows","WinCE"].includes(n)&&(r="Windows"),r})(),t=t=>{const n="Mac OS"===e?t.metaKey:t.ctrlKey;if("/"===t.key&&n&&(t.preventDefault(),f.reference&&f.reference.current)){const e=f.reference.current instanceof HTMLElement?f.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}}),[f.reference]),(0,L.jsx)(Zw.Provider,{value:{size:t,open:n,onOpenChange:r,refs:f,floatingStyles:p,context:h,getReferenceProps:y,getFloatingProps:g,searchTerm:l,setSearchTerm:c,isLoading:u,setIsLoading:d},children:(0,L.jsx)("div",{className:Ue("searchbox-wrapper box-border relative w-full",e),...i,ref:a})})}));Qw.displayName="SearchBox";const e_=(0,s.forwardRef)((({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:o=!1,onChange:i=()=>{},...a},s)=>{const{size:l,onOpenChange:c,refs:u,getReferenceProps:d,searchTerm:f,setSearchTerm:p}=Jw(),h="lg"===l?"sm":"xs";return(0,L.jsxs)("div",{ref:u.setReference,className:Ue("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",Xw[r],Yw.input[l],o?Gw[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:[(0,L.jsx)("span",{className:Ue(Kw[l],o?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,L.jsx)(gt,{})}),(0,L.jsx)("input",{type:t,ref:s,className:Ue(Kw[l],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",o?Gw[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:o,value:f,onChange:e=>{const t=e.target.value;p(t),i(t),"function"==typeof c&&(t.trim()?c(!0):c(!1))},placeholder:n,...qw.omit(a,["size","open","onOpenChange","loading"])}),(0,L.jsx)(vi,{label:"⌘/",size:h,type:"rounded",variant:"neutral"})]})}));e_.displayName="SearchBox.Input";const t_=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...o})=>{const{size:i,open:a,refs:s,floatingStyles:l,getFloatingProps:c}=Jw();return a?(0,L.jsx)(Oo,{id:n,root:t,children:(0,L.jsx)("div",{ref:s.setFloating,style:{...l},className:Ue("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",Yw.dialog[i],e),...c(),...o,children:r})}):null};t_.displayName="SearchBox.Content";const n_=({filter:e=!0,children:t})=>{const{searchTerm:n,isLoading:r}=Jw();if(!e)return(0,L.jsx)("div",{children:t});const o=s.Children.toArray(t).map((e=>{if(s.isValidElement(e)&&e.type===o_){const t=s.Children.toArray(e.props.children).filter((e=>s.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(n.toLowerCase())));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e})).filter(Boolean);return r?(0,L.jsx)(a_,{}):(0,L.jsx)("div",{children:o.some((e=>s.isValidElement(e)&&e.type!==s_))?o:(0,L.jsx)(r_,{})})};n_.displayName="SearchBox.List";const r_=({children:e="No results found."})=>{const{size:t}=Jw();return(0,L.jsx)("div",{className:Ue("flex justify-center items-center",Yw.item[t],"text-text-tertiary p-4"),children:e})};r_.displayName="SearchBox.Empty";const o_=({heading:e,children:t})=>{const{size:n}=Jw();return(0,L.jsxs)("div",{className:Ue(Yw.content[n],Yw.item[n]),children:[e&&(0,L.jsx)("div",{className:Ue(Yw.title[n],"text-text-secondary"),children:e}),t]})};o_.displayName="SearchBox.Group";const i_=(0,s.forwardRef)((({className:e,icon:t,children:n,...r},o)=>{const{size:i}=Jw();return(0,L.jsxs)("div",{ref:o,className:Ue("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",Yw.item[i]),...r,children:[t&&(0,L.jsx)("span",{className:Ue(Yw.icon[i],"flex items-center justify-center"),children:t}),(0,L.jsx)("span",{className:Ue("flex-grow p-1 font-normal cursor-pointer",Yw.item[i],e),children:n})]})}));i_.displayName="SearchBox.Item";const a_=({loadingIcon:e=(0,L.jsx)(_i,{})})=>{const{size:t}=Jw(),n=s.isValidElement(e)?(0,s.cloneElement)(e,{size:t}):e;return(0,L.jsx)("div",{className:Ue("flex justify-center p-4",Kw[t],Yw.item[t]),children:n})};a_.displayName="SearchBox.Loading";const s_=(0,s.forwardRef)((({className:e,...t},n)=>(0,L.jsx)("hr",{ref:n,className:Ue("border-0 border-t border-border-subtle border-solid m-0",e),...t})));s_.displayName="SearchBox.Separator",Qw.Input=e_,Qw.Loading=a_,Qw.Separator=s_,Qw.Content=t_,Qw.List=n_,Qw.Empty=r_,Qw.Group=o_,Qw.Item=i_;const l_=(0,s.createContext)({}),c_=()=>(0,s.useContext)(l_),u_=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:r,className:o})=>{const[i,a]=(0,s.useState)(!1),{refs:l,floatingStyles:c,context:u}=Vo({open:i,onOpenChange:a,placement:e,strategy:"absolute",middleware:[Sr(t),Er({boundary:n}),kr({boundary:n})],whileElementsMounted:dr}),d=Lo(u),f=Wo(u),p=Qo(u,{role:"menu"}),{getReferenceProps:h,getFloatingProps:m}=qo([d,f,p]),{isMounted:y,styles:g}=ni(u,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),v=()=>a((e=>!e));return(0,L.jsx)(l_.Provider,{value:{refs:l,handleClose:()=>a(!1),isMounted:y,styles:g,floatingStyles:c,getFloatingProps:m},children:(0,L.jsxs)("div",{className:Ue("relative inline-block",o),children:[s.Children.map(r,(e=>{var t;return s.isValidElement(e)&&"DropdownMenu.Trigger"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?(0,s.cloneElement)(e,{ref:l.setReference,onClick:v,...h()}):null})),s.Children.map(r,(e=>{var t;return s.isValidElement(e)&&"DropdownMenu.Portal"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null}))]})})};u_.displayName="DropdownMenu";const d_=({children:e,className:t,root:n,id:r})=>{const{refs:o,floatingStyles:i,getFloatingProps:a,isMounted:l,styles:c}=c_();return l&&(0,L.jsx)(Oo,{id:r,root:n,children:(0,L.jsx)("div",{ref:o.setFloating,className:t,style:{...i,...c},...a(),children:s.Children.map(e,(e=>{var t;return"DropdownMenu.Content"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null}))})})};d_.displayName="DropdownMenu.Portal";const f_=s.forwardRef((({children:e,className:t,...n},r)=>(0,s.isValidElement)(e)?s.cloneElement(e,{className:Ue(t,e.props.className),ref:r,...n}):(0,L.jsx)("div",{ref:r,className:Ue("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e})));f_.displayName="DropdownMenu.Trigger";const p_=({children:e,className:t,...n})=>(0,L.jsx)("div",{className:Ue("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,L.jsx)(Xx,{...n,children:e})});p_.displayName="DropdownMenu.Content";const h_=e=>(0,L.jsx)(Xx.List,{...e});h_.displayName="DropdownMenu.List";const m_=({children:e,as:t=Xx.Item,...n})=>{var r;const{handleClose:o}=c_();return e?t===s.Fragment&&(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:$e(null==(r=e.props)?void 0:r.onClick,o)}):(0,L.jsx)(t,{...n,className:Ue("px-2",n.className),onClick:$e(n.onClick,o),children:e}):null};m_.displayName="DropdownMenu.Item";const y_=e=>(0,L.jsx)(Xx.Separator,{...e});y_.displayName="DropdownMenu.Separator",u_.Trigger=f_,u_.Content=p_,u_.List=h_,u_.Item=m_,u_.Separator=y_,u_.Portal=d_;const g_={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},v_=({children:e,className:t})=>{const{open:n,position:r,handleClose:o,drawerRef:i,transitionDuration:a}=C_();return(0,L.jsx)(Hf,{children:n&&(0,L.jsx)("div",{className:"fixed inset-0",children:(0,L.jsx)("div",{className:Ue("flex items-center justify-center h-full",{"justify-start":"left"===r,"justify-end":"right"===r}),children:(0,L.jsx)(Ff.div,{ref:i,className:Ue("flex flex-col w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:g_[r],transition:a,children:"function"==typeof e?e({close:o}):e})})})})};v_.displayName="Drawer.Panel";const b_=({children:e,className:t,...n})=>(0,L.jsx)("div",{className:Ue("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});b_.displayName="Drawer.Header";const x_=({children:e,as:t="h3",className:n,...r})=>(0,L.jsx)(t,{className:Ue("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});x_.displayName="Drawer.Title";const w_=({children:e,as:t="p",className:n,...r})=>(0,L.jsx)(t,{className:Ue("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});w_.displayName="Drawer.Description";const __=({children:e,className:t,...n})=>(0,L.jsx)("div",{className:Ue("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});__.displayName="Drawer.Body";const S_=({children:e,className:t})=>{const{design:n,handleClose:r}=C_();return(0,L.jsx)("div",{className:Ue("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===n,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};S_.displayName="Drawer.Footer";const k_=({className:e,...t})=>(0,L.jsx)("button",{className:Ue("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:(0,L.jsx)(_t,{className:"size-4 text-text-primary shrink-0"})}),E_=({children:e,as:t=s.Fragment,...n})=>{const{handleClose:r}=C_();return e?t===s.Fragment?"function"==typeof e?e({close:r}):(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:r}):(0,L.jsx)(k_,{onClick:r,...n}):(0,L.jsx)(t,{...n,onClick:r,children:e}):(0,L.jsx)(k_,{onClick:r,...n})};E_.displayName="Drawer.CloseButton";const O_={open:{opacity:1},exit:{opacity:0}},j_=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:o}=C_();return null!=r&&r.current?!!r.current&&(0,F.createPortal)((0,L.jsx)(Hf,{children:n&&(0,L.jsx)(Ff.div,{className:Ue("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:O_,transition:o})}),r.current):null};j_.displayName="Drawer.Backdrop";const P_=(0,s.createContext)({}),C_=()=>(0,s.useContext)(P_),T_=({open:e,setOpen:t,children:n,trigger:r,className:o,exitOnClickOutside:i=!1,exitOnEsc:a=!0,design:l="simple",position:c="right",transitionDuration:u=.2,scrollLock:d=!0})=>{const f=void 0!==e&&void 0!==t,[p,h]=(0,s.useState)(!1),m=(0,s.useRef)(null),y=(0,s.useRef)(null),g=(0,s.useMemo)((()=>f?e:p),[e,p]),v=(0,s.useMemo)((()=>f?t:h),[h,h]),b=()=>{g||v(!0)},x=()=>{g&&v(!1)},w=(0,s.useCallback)((()=>(0,s.isValidElement)(r)?(0,s.cloneElement)(r,{onClick:$e(b,r.props.onClick)}):"function"==typeof r?r({onClick:b}):null),[r,b,x]),_=e=>{"Escape"===e.key&&a&&x()},S=e=>{i&&m.current&&!m.current.contains(e.target)&&x()};return(0,s.useEffect)((()=>(window.addEventListener("keydown",_),document.addEventListener("mousedown",S),()=>{window.removeEventListener("keydown",_),document.removeEventListener("mousedown",S)})),[g]),(0,s.useEffect)((()=>{if(!d)return;const e=document.querySelector("html");return g&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}}),[g]),(0,L.jsxs)(L.Fragment,{children:[w(),(0,L.jsx)(P_.Provider,{value:{open:g,setOpen:v,handleClose:x,design:l,position:c,drawerContainerRef:y,drawerRef:m,transitionDuration:{duration:u}},children:(0,L.jsx)("div",{className:Ue("fixed z-auto w-0 h-0 overflow-visible",o),ref:y,role:"dialog","aria-modal":"true","aria-label":"drawer",children:n})})]})};T_.displayName="Drawer",T_.Panel=v_,T_.Header=b_,T_.Title=x_,T_.Description=w_,T_.Body=__,T_.CloseButton=E_,T_.Footer=S_,T_.Backdrop=j_;const A_={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"}},N_="group disabled:border-field-border-disabled opacity-50",M_=(0,s.createContext)({size:"sm",disabled:!1}),D_=()=>(0,s.useContext)(M_),I_=({size:e="sm",disabled:t=!1,children:n,className:r,...o})=>(0,L.jsx)(M_.Provider,{value:{size:e,disabled:t},children:(0,L.jsx)("nav",{role:"navigation","aria-label":"pagination",className:Ue("flex w-full justify-center box-border m-0",r),...o,children:n})});I_.displayName="Pagination";const R_=(0,s.forwardRef)((({className:e,...t},n)=>(0,L.jsx)("ul",{ref:n,className:Ue("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t})));R_.displayName="Pagination.Content";const L_=(0,s.forwardRef)((({isActive:e=!1,className:t,children:n,...r},o)=>{const{disabled:i}=D_();return(0,L.jsx)("li",{ref:o,className:Ue("flex",i&&N_),children:(0,L.jsx)(F_,{isActive:e,disabled:i,className:t,...r,children:n})})}));L_.displayName="Pagination.Item";const F_=({isActive:e=!1,tag:t="a",children:n,className:r,...o})=>{const{size:i,disabled:a}=D_(),s=e=>e.preventDefault();return(0,L.jsx)(Xe,{tag:t,size:i,variant:"ghost",className:Ue("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",A_[i].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[N_,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],r),disabled:a,...o,onClick:e=>$e(o.onClick||(()=>{}),a?s:()=>{})(e),children:(0,L.jsx)("span",{className:"px-1 flex",children:n})})},z_=e=>{const{size:t,disabled:n}=D_();return(0,L.jsx)("li",{className:Ue("flex",n&&N_),"aria-label":"Go to previous page",children:(0,L.jsx)(F_,{className:Ue("[&>span]:flex [&>span]:items-center"),...e,children:(0,L.jsx)(st,{className:Ue(A_[t].icon)})})})};z_.displayName="Pagination.Previous";const B_=e=>{const{size:t,disabled:n}=D_();return(0,L.jsx)("li",{className:Ue("flex",n&&N_),"aria-label":"Go to next page",children:(0,L.jsx)(F_,{className:Ue("[&>span]:flex [&>span]:items-center"),...e,children:(0,L.jsx)(lt,{className:Ue(A_[t].icon)})})})};B_.displayName="Pagination.Next";const W_=e=>{const{size:t,disabled:n}=D_();return(0,L.jsx)("li",{className:Ue("flex",n&&N_),children:(0,L.jsx)("span",{className:Ue("flex justify-center",A_[t].ellipse,n&&N_),...e,children:"•••"})})};var V_,U_,$_;W_.displayName="Pagination.Ellipsis",I_.Content=R_,I_.Item=L_,I_.Previous=z_,I_.Next=B_,I_.Ellipsis=W_,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"}(V_||(V_={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(U_||(U_={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}($_||($_={}));const H_=6048e5,q_=Symbol.for("constructDateFrom");function K_(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&q_ in e?e[q_](t):e instanceof Date?new e.constructor(t):new Date(t)}function Y_(e,t){return K_(t||e,e)}function X_(e,t,n){const r=Y_(e,null==n?void 0:n.in);return isNaN(t)?K_(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function G_(e,t,n){const r=Y_(e,null==n?void 0:n.in);if(isNaN(t))return K_(e,NaN);if(!t)return r;const o=r.getDate(),i=K_(e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let Z_={};function J_(){return Z_}function Q_(e,t){var n,r,o,i;const a=J_(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=Y_(e,null==t?void 0:t.in),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}function eS(e,t){return Q_(e,{...t,weekStartsOn:1})}function tS(e,t){const n=Y_(e,null==t?void 0:t.in),r=n.getFullYear(),o=K_(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=eS(o),a=K_(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=eS(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function nS(e){const t=Y_(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 rS(e,...t){const n=K_.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}function oS(e,t){const n=Y_(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function iS(e,t,n){const[r,o]=rS(null==n||n.in,e,t),i=oS(r),a=oS(o),s=+i-nS(i),l=+a-nS(a);return Math.round((s-l)/864e5)}function aS(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function sS(e,t){const n=Y_(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function lS(e,t){var n,r,o,i;const a=J_(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=Y_(e,null==t?void 0:t.in),c=l.getDay(),u=6+(c<s?-7:0)-(c-s);return l.setDate(l.getDate()+u),l.setHours(23,59,59,999),l}const cS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function uS(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const dS={date:uS({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:uS({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:uS({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},fS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function pS(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const hS={ordinalNumber:(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"},era:pS({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:pS({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:pS({values:{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"]},defaultWidth:"wide"}),day:pS({values:{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"]},defaultWidth:"wide"}),dayPeriod:pS({values:{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"}},defaultWidth:"wide",formattingValues:{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"}},defaultFormattingWidth:"wide"})};function mS(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,(e=>e.test(a))):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,(e=>e.test(a)));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const yS={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:mS({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mS({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:mS({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),day:mS({matchPatterns:{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},defaultMatchWidth:"wide",parsePatterns:{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]},defaultParseWidth:"any"}),dayPeriod:mS({matchPatterns:{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},defaultMatchWidth:"any",parsePatterns:{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}},defaultParseWidth:"any"})},gS={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=cS[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:dS,formatRelative:(e,t,n,r)=>fS[e],localize:hS,match:yS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vS(e,t){const n=Y_(e,null==t?void 0:t.in),r=+eS(n)-+function(e){const t=tS(e,void 0),n=K_(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),eS(n)}(n);return Math.round(r/H_)+1}function bS(e,t){var n,r,o,i;const a=Y_(e,null==t?void 0:t.in),s=a.getFullYear(),l=J_(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(i=null==(o=l.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,u=K_((null==t?void 0:t.in)||e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const d=Q_(u,t),f=K_((null==t?void 0:t.in)||e,0);f.setFullYear(s,0,c),f.setHours(0,0,0,0);const p=Q_(f,t);return+a>=+d?s+1:+a>=+p?s:s-1}function xS(e,t){const n=Y_(e,null==t?void 0:t.in),r=+Q_(n,t)-+function(e,t){var n,r,o,i;const a=J_(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,l=bS(e,t),c=K_((null==t?void 0:t.in)||e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),Q_(c,t)}(n,t);return Math.round(r/H_)+1}function wS(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const _S={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return wS("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):wS(n+1,2)},d:(e,t)=>wS(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];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>wS(e.getHours()%12||12,t.length),H:(e,t)=>wS(e.getHours(),t.length),m:(e,t)=>wS(e.getMinutes(),t.length),s:(e,t)=>wS(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return wS(Math.trunc(r*Math.pow(10,n-3)),t.length)}},SS={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"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return _S.y(e,t)},Y:function(e,t,n,r){const o=bS(e,r),i=o>0?o:1-o;return"YY"===t?wS(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):wS(i,t.length)},R:function(e,t){return wS(tS(e),t.length)},u:function(e,t){return wS(e.getFullYear(),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 wS(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"});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 wS(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"});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 _S.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"});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 wS(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"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=xS(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):wS(o,t.length)},I:function(e,t,n){const r=vS(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):wS(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):_S.d(e,t)},D:function(e,t,n){const r=function(e){const t=Y_(e,void 0);return iS(t,sS(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):wS(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"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return wS(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return wS(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return wS(o,t.length);case"io":return n.ordinalNumber(o,{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"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return _S.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):_S.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):wS(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):wS(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_S.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_S.s(e,t)},S:function(e,t){return _S.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return ES(r);case"XXXX":case"XX":return OS(r);default:return OS(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ES(r);case"xxxx":case"xx":return OS(r);default:return OS(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+kS(r,":");default:return"GMT"+OS(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+kS(r,":");default:return"GMT"+OS(r,":")}},t:function(e,t,n){return wS(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return wS(+e,t.length)}};function kS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+wS(i,2)}function ES(e,t){return e%60==0?(e>0?"-":"+")+wS(Math.abs(e)/60,2):OS(e,t)}function OS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+wS(Math.trunc(r/60),2)+t+wS(r%60,2)}const jS=(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"});default:return t.date({width:"full"})}},PS=(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"});default:return t.time({width:"full"})}},CS={p:PS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return jS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",jS(r,t)).replace("{{time}}",PS(o,t))}},TS=/^D+$/,AS=/^Y+$/,NS=["D","DD","YY","YYYY"],MS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,IS=/^'([^]*?)'?$/,RS=/''/g,LS=/[a-zA-Z]/;function FS(e){const t=e.match(IS);return t?t[1].replace(RS,"'"):e}class zS{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addDays?this.overrides.addDays(e,t):X_(e,t)},this.addMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addMonths?this.overrides.addMonths(e,t):G_(e,t)},this.addWeeks=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addWeeks?this.overrides.addWeeks(e,t):function(e,t){return X_(e,7*t,void 0)}(e,t)},this.addYears=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addYears?this.overrides.addYears(e,t):function(e,t){return G_(e,12*t,void 0)}(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):iS(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[n,r]=rS(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(e,t)},this.endOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e){return lS(e,{weekStartsOn:1})}(e)},this.endOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=Y_(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e)},this.endOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfWeek?this.overrides.endOfWeek(e,this.options):lS(e,this.options)},this.endOfYear=e=>{var t;return null!=(t=this.overrides)&&t.endOfYear?this.overrides.endOfYear(e):function(e){const t=Y_(e,void 0),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}(e)},this.format=(e,t)=>{var n;return null!=(n=this.overrides)&&n.format?this.overrides.format(e,t,this.options):function(e,t,n){var r,o,i,a,s,l,c,u;const d=J_(),f=(null==n?void 0:n.locale)??d.locale??gS,p=(null==n?void 0:n.firstWeekContainsDate)??(null==(o=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(a=null==(i=d.locale)?void 0:i.options)?void 0:a.firstWeekContainsDate)??1,h=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??d.weekStartsOn??(null==(u=null==(c=d.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=Y_(e,null==n?void 0:n.in);if(!function(e){return!(!aS(e)&&"number"!=typeof e||isNaN(+Y_(e)))}(m))throw new RangeError("Invalid time value");let y=t.match(DS).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,CS[t])(e,f.formatLong):e})).join("").match(MS).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:FS(e)};if(SS[t])return{isToken:!0,value:e};if(t.match(LS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));f.localize.preprocessor&&(y=f.localize.preprocessor(m,y));const g={firstWeekContainsDate:p,weekStartsOn:h,locale:f};return y.map((r=>{if(!r.isToken)return r.value;const o=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(e){return AS.test(e)}(o)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(e){return TS.test(e)}(o))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"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`}(e,t,n);if(console.warn(r),NS.includes(e))throw new RangeError(r)}(o,t,String(e)),(0,SS[o[0]])(m,o,f.localize,g)})).join("")}(e,t,this.options)},this.getISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.getISOWeek?this.overrides.getISOWeek(e):vS(e)},this.getWeek=e=>{var t;return null!=(t=this.overrides)&&t.getWeek?this.overrides.getWeek(e,this.options):xS(e,this.options)},this.isAfter=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isAfter?this.overrides.isAfter(e,t):function(e,t){return+Y_(e)>+Y_(t)}(e,t)},this.isBefore=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isBefore?this.overrides.isBefore(e,t):function(e,t){return+Y_(e)<+Y_(t)}(e,t)},this.isDate=e=>{var t;return null!=(t=this.overrides)&&t.isDate?this.overrides.isDate(e):aS(e)},this.isSameDay=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,r]=rS(0,e,t);return+oS(n)==+oS(r)}(e,t)},this.isSameMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,r]=rS(0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t)},this.isSameYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[n,r]=rS(0,e,t);return n.getFullYear()===r.getFullYear()}(e,t)},this.max=e=>{var t;return null!=(t=this.overrides)&&t.max?this.overrides.max(e):function(e){let t,n;return e.forEach((e=>{!n&&"object"==typeof e&&(n=K_.bind(null,e));const r=Y_(e,n);(!t||t<r||isNaN(+r))&&(t=r)})),K_(n,t||NaN)}(e)},this.min=e=>{var t;return null!=(t=this.overrides)&&t.min?this.overrides.min(e):function(e){let t,n;return e.forEach((e=>{!n&&"object"==typeof e&&(n=K_.bind(null,e));const r=Y_(e,n);(!t||t>r||isNaN(+r))&&(t=r)})),K_(n,t||NaN)}(e)},this.setMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setMonth?this.overrides.setMonth(e,t):function(e,t,n){const r=Y_(e,null==n?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=K_(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e){const t=Y_(e,void 0),n=t.getFullYear(),r=t.getMonth(),o=K_(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}(e,t)},this.setYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setYear?this.overrides.setYear(e,t):function(e,t){const n=Y_(e,void 0);return isNaN(+n)?K_(e,NaN):(n.setFullYear(t),n)}(e,t)},this.startOfDay=e=>{var t;return null!=(t=this.overrides)&&t.startOfDay?this.overrides.startOfDay(e):oS(e)},this.startOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):eS(e)},this.startOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=Y_(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e)},this.startOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfWeek?this.overrides.startOfWeek(e,this.options):Q_(e,this.options)},this.startOfYear=e=>{var t;return null!=(t=this.overrides)&&t.startOfYear?this.overrides.startOfYear(e):sS(e)},this.options={locale:gS,...e},this.overrides=t}}new zS;(0,s.createContext)(void 0);Symbol.toStringTag;Symbol.toStringTag;const BS={},WS={};function VS(e,t){try{const n=(BS[e]||(BS[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in WS?WS[n]:$S(n,n.split(":"))}catch{if(e in WS)return WS[e];const t=null==e?void 0:e.match(US);return t?$S(e,t.slice(1)):NaN}}const US=/([+-]\d\d):?(\d\d)?/;function $S(e,t){const n=+t[0],r=+(t[1]||0);return WS[e]=n>0?60*n+r:60*n-r}class HS extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(VS(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),YS(this),KS(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new HS(...t,e):new HS(Date.now(),e)}withTimeZone(e){return new HS(+this,e)}getTimezoneOffset(){return-VS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),KS(this),+this}[Symbol.for("constructDateFrom")](e){return new HS(+new Date(e),this.timeZone)}}const qS=/^(get|set)(?!UTC)/;function KS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function YS(e){const t=VS(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=VS(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-VS(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!qS.test(e))return;const t=e.replace(qS,"$1UTC");HS.prototype[t]&&(e.startsWith("get")?HS.prototype[e]=function(){return this.internal[t]()}:(HS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(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()),YS(e)}(this),+this},HS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),KS(this),+this}))})),Symbol.for("constructDateFrom");Symbol.toStringTag;const XS=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:o,className:i})=>{const[a,l]=(0,s.useState)(Array.isArray(t)?t:[t]);return(0,L.jsx)("div",{className:Ue("boxed"===e?"space-y-3":"",i),children:s.Children.map(o,(t=>s.isValidElement(t)&&"value"in t.props?s.cloneElement(t,{isOpen:a.includes(t.props.value),onToggle:()=>(e=>{l((t=>n?t.includes(e)?[]:[e]:t.includes(e)?t.filter((t=>t!==e)):[...t,e]))})(t.props.value),type:e,disabled:r||t.props.disabled}):t))})};XS.displayName="Accordion";const GS=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:o,className:i})=>{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(0,L.jsx)("div",{className:Ue(a,i),children:s.Children.map(o,(o=>s.isValidElement(o)?s.cloneElement(o,{isOpen:e,onToggle:t,type:n,disabled:r}):o))})};GS.displayName="Accordion.Item";const ZS=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:o="h3",type:i="simple",children:a,className:s,...l})=>{const c={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[i];return(0,L.jsx)(o,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,L.jsxs)("button",{className:Ue("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:[(0,L.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),"arrow"===n?(0,L.jsx)(at,{className:Ue("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):"plus-minus"===n?(0,L.jsx)(Ff.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?(0,L.jsx)(pt,{}):(0,L.jsx)(yt,{})},t?"minus":"plus"):null]})})};ZS.displayName="Accordion.Trigger";const JS=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o})=>{const i={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,L.jsx)(Hf,{initial:!1,children:e&&(0,L.jsx)(Ff.div,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:Ue("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,children:(0,L.jsx)("div",{className:Ue(i),children:r})},"content")})};JS.displayName="Accordion.Content",Object.assign(XS,{Item:GS,Trigger:ZS,Content:JS});var QS=Array.isArray,ek="object"==typeof z&&z&&z.Object===Object&&z,tk=ek,nk="object"==typeof self&&self&&self.Object===Object&&self,rk=tk||nk||Function("return this")(),ok=rk.Symbol,ik=ok,ak=Object.prototype,sk=ak.hasOwnProperty,lk=ak.toString,ck=ik?ik.toStringTag:void 0,uk=Object.prototype.toString,dk=function(e){var t=sk.call(e,ck),n=e[ck];try{e[ck]=void 0;var r=!0}catch{}var o=lk.call(e);return r&&(t?e[ck]=n:delete e[ck]),o},fk=function(e){return uk.call(e)},pk=ok?ok.toStringTag:void 0,hk=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pk&&pk in Object(e)?dk(e):fk(e)},mk=function(e){return null!=e&&"object"==typeof e},yk=hk,gk=mk,vk=function(e){return"symbol"==typeof e||gk(e)&&"[object Symbol]"==yk(e)},bk=QS,xk=vk,wk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_k=/^\w*$/,Sk=function(e,t){if(bk(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!xk(e))||_k.test(e)||!wk.test(e)||null!=t&&e in Object(t)},kk=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const Ek=B(kk);var Ok=hk,jk=kk,Pk=function(e){if(!jk(e))return!1;var t=Ok(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const Ck=B(Pk);var Tk=rk["__core-js_shared__"],Ak=function(){var e=/[^.]+$/.exec(Tk&&Tk.keys&&Tk.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Nk=Function.prototype.toString,Mk=function(e){if(null!=e){try{return Nk.call(e)}catch{}try{return e+""}catch{}}return""},Dk=Pk,Ik=function(e){return!!Ak&&Ak in e},Rk=kk,Lk=Mk,Fk=/^\[object .+?Constructor\]$/,zk=Function.prototype,Bk=Object.prototype,Wk=zk.toString,Vk=Bk.hasOwnProperty,Uk=RegExp("^"+Wk.call(Vk).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$k=function(e){return!(!Rk(e)||Ik(e))&&(Dk(e)?Uk:Fk).test(Lk(e))},Hk=function(e,t){return null==e?void 0:e[t]},qk=function(e,t){var n=Hk(e,t);return $k(n)?n:void 0},Kk=qk(Object,"create"),Yk=Kk,Xk=Kk,Gk=Object.prototype.hasOwnProperty,Zk=Kk,Jk=Object.prototype.hasOwnProperty,Qk=Kk,eE=function(){this.__data__=Yk?Yk(null):{},this.size=0},tE=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},nE=function(e){var t=this.__data__;if(Xk){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Gk.call(t,e)?t[e]:void 0},rE=function(e){var t=this.__data__;return Zk?void 0!==t[e]:Jk.call(t,e)},oE=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Qk&&void 0===t?"__lodash_hash_undefined__":t,this};function iE(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}iE.prototype.clear=eE,iE.prototype.delete=tE,iE.prototype.get=nE,iE.prototype.has=rE,iE.prototype.set=oE;var aE=iE,sE=function(e,t){return e===t||e!=e&&t!=t},lE=sE,cE=function(e,t){for(var n=e.length;n--;)if(lE(e[n][0],t))return n;return-1},uE=cE,dE=Array.prototype.splice,fE=cE,pE=cE,hE=cE,mE=function(){this.__data__=[],this.size=0},yE=function(e){var t=this.__data__,n=uE(t,e);return!(n<0||(n==t.length-1?t.pop():dE.call(t,n,1),--this.size,0))},gE=function(e){var t=this.__data__,n=fE(t,e);return n<0?void 0:t[n][1]},vE=function(e){return pE(this.__data__,e)>-1},bE=function(e,t){var n=this.__data__,r=hE(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function xE(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xE.prototype.clear=mE,xE.prototype.delete=yE,xE.prototype.get=gE,xE.prototype.has=vE,xE.prototype.set=bE;var wE=xE,_E=qk(rk,"Map"),SE=aE,kE=wE,EE=_E,OE=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},jE=function(e,t){var n=e.__data__;return OE(t)?n["string"==typeof t?"string":"hash"]:n.map},PE=jE,CE=jE,TE=jE,AE=jE,NE=function(e){var t=PE(this,e).delete(e);return this.size-=t?1:0,t},ME=function(e){return CE(this,e).get(e)},DE=function(e){return TE(this,e).has(e)},IE=function(e,t){var n=AE(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function RE(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RE.prototype.clear=function(){this.size=0,this.__data__={hash:new SE,map:new(EE||kE),string:new SE}},RE.prototype.delete=NE,RE.prototype.get=ME,RE.prototype.has=DE,RE.prototype.set=IE;var LE=RE,FE=LE;function zE(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(zE.Cache||FE),n}zE.Cache=FE;var BE=zE;const WE=B(BE);var VE=BE,UE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$E=/\\(\\)?/g,HE=function(e){var t=VE(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(UE,(function(e,n,r,o){t.push(r?o.replace($E,"$1"):n||e)})),t})),qE=HE,KE=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},YE=KE,XE=QS,GE=vk,ZE=ok?ok.prototype:void 0,JE=ZE?ZE.toString:void 0,QE=function e(t){if("string"==typeof t)return t;if(XE(t))return YE(t,e)+"";if(GE(t))return JE?JE.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},eO=function(e){return null==e?"":QE(e)},tO=QS,nO=Sk,rO=qE,oO=eO,iO=function(e,t){return tO(e)?e:nO(e,t)?[e]:rO(oO(e))},aO=vk,sO=function(e){if("string"==typeof e||aO(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},lO=iO,cO=sO,uO=function(e,t){for(var n=0,r=(t=lO(t,e)).length;null!=e&&n<r;)e=e[cO(t[n++])];return n&&n==r?e:void 0},dO=uO,fO=function(e,t,n){var r=null==e?void 0:dO(e,t);return void 0===r?n:r};const pO=B(fO);var hO=function(e){return null==e};const mO=B(hO);var yO=hk,gO=QS,vO=mk,bO=function(e){return"string"==typeof e||!gO(e)&&vO(e)&&"[object String]"==yO(e)};const xO=B(bO);var wO,_O={exports:{}},SO={};_O.exports=function(){if(wO)return SO;wO=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case p:case f:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),SO.ContextConsumer=s,SO.ContextProvider=a,SO.Element=t,SO.ForwardRef=c,SO.Fragment=r,SO.Lazy=p,SO.Memo=f,SO.Portal=n,SO.Profiler=i,SO.StrictMode=o,SO.Suspense=u,SO.SuspenseList=d,SO.isAsyncMode=function(){return!1},SO.isConcurrentMode=function(){return!1},SO.isContextConsumer=function(e){return m(e)===s},SO.isContextProvider=function(e){return m(e)===a},SO.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},SO.isForwardRef=function(e){return m(e)===c},SO.isFragment=function(e){return m(e)===r},SO.isLazy=function(e){return m(e)===p},SO.isMemo=function(e){return m(e)===f},SO.isPortal=function(e){return m(e)===n},SO.isProfiler=function(e){return m(e)===i},SO.isStrictMode=function(e){return m(e)===o},SO.isSuspense=function(e){return m(e)===u},SO.isSuspenseList=function(e){return m(e)===d},SO.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},SO.typeOf=m,SO}();var kO=_O.exports,EO=hk,OO=mk,jO=function(e){return"number"==typeof e||OO(e)&&"[object Number]"==EO(e)};const PO=B(jO);var CO=jO,TO=function(e){return CO(e)&&e!=+e};const AO=B(TO);var NO=function(e){return 0===e?0:e>0?1:-1},MO=function(e){return xO(e)&&e.indexOf("%")===e.length-1},DO=function(e){return PO(e)&&!AO(e)},IO=function(e){return DO(e)||xO(e)},RO=0,LO=function(e){var t=++RO;return"".concat(e||"").concat(t)},FO=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!DO(e)&&!xO(e))return r;if(MO(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return AO(n)&&(n=r),o&&n>t&&(n=t),n},zO=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},BO=function(e,t){return DO(e)&&DO(t)?function(n){return e+n*(t-e)}:function(){return t}};function WO(e,t,n){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):pO(e,t))===n})):null}function VO(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function UO(e){return UO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UO(e)}var $O=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],HO=["points","pathLength"],qO={svg:["viewBox","children"],polygon:HO,polyline:HO},KO=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],YO=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,s.isValidElement)(e)&&(n=e.props),!Ek(n))return null;var r={};return Object.keys(n).forEach((function(e){KO.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})})),r},XO=function(e,t,n){if(!Ek(e)||"object"!==UO(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];KO.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=function(e,t,n){return function(r){return e(t,n,r),null}}(i,t,n))})),r},GO=["children"],ZO=["children"];function JO(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function QO(e){return QO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QO(e)}var ej={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},tj=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},nj=null,rj=null,oj=function e(t){if(t===nj&&Array.isArray(rj))return rj;var n=[];return s.Children.forEach(t,(function(t){mO(t)||(kO.isFragment(t)?n=n.concat(e(t.props.children)):n.push(t))})),rj=n,nj=t,n};function ij(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map((function(e){return tj(e)})):[tj(t)],oj(e).forEach((function(e){var t=pO(e,"type.displayName")||pO(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n}function aj(e,t){var n=ij(e,t);return n&&n[0]}var sj=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!DO(n)||n<=0||!DO(r)||r<=0)},lj=["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"],cj=function(e){return e&&"object"===QO(e)&&"clipDot"in e},uj=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,s.isValidElement)(e)&&(r=e.props),!Ek(r))return null;var o={};return Object.keys(r).forEach((function(e){var i;(function(e,t,n,r){var o,i=null!==(o=null==qO?void 0:qO[r])&&void 0!==o?o:[];return!Ck(e)&&(r&&i.includes(t)||$O.includes(t))||n&&KO.includes(t)})(null===(i=r)||void 0===i?void 0:i[e],e,t,n)&&(o[e]=r[e])})),o},dj=function e(t,n){if(t===n)return!0;var r=s.Children.count(t);if(r!==s.Children.count(n))return!1;if(0===r)return!0;if(1===r)return fj(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var i=t[o],a=n[o];if(Array.isArray(i)||Array.isArray(a)){if(!e(i,a))return!1}else if(!fj(i,a))return!1}return!0},fj=function(e,t){if(mO(e)&&mO(t))return!0;if(!mO(e)&&!mO(t)){var n=e.props||{},r=n.children,o=JO(n,GO),i=t.props||{},a=i.children,s=JO(i,ZO);return r&&a?VO(o,s)&&dj(r,a):!r&&!a&&VO(o,s)}return!1},pj=function(e,t){var n=[],r={};return oj(e).forEach((function(e,o){if(function(e){return e&&e.type&&xO(e.type)&&lj.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=tj(e.type),a=t[i]||{},s=a.handler,l=a.once;if(s&&(!l||!r[i])){var c=s(e,i,o);n.push(c),r[i]=!0}}})),n},hj=function(e,t){return oj(t).indexOf(e)},mj=["children","width","height","viewBox","className","style","title","desc"];function yj(){return yj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yj.apply(this,arguments)}function gj(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,l=e.title,c=e.desc,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,mj),d=o||{width:n,height:r,x:0,y:0},f=Ve("recharts-surface",i);return s.createElement("svg",yj({},uj(u,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),s.createElement("title",null,l),s.createElement("desc",null,c),t)}var vj=["children","className"];function bj(){return bj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bj.apply(this,arguments)}var xj=s.forwardRef((function(e,t){var n=e.children,r=e.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,vj),i=Ve("recharts-layer",r);return s.createElement("g",bj({className:i},uj(o,!0),{ref:t}),n)})),wj=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]},_j=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i},Sj=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),kj=function(e){return Sj.test(e)},Ej="\\ud800-\\udfff",Oj="["+Ej+"]",jj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Pj="\\ud83c[\\udffb-\\udfff]",Cj="[^"+Ej+"]",Tj="(?:\\ud83c[\\udde6-\\uddff]){2}",Aj="[\\ud800-\\udbff][\\udc00-\\udfff]",Nj="(?:"+jj+"|"+Pj+")?",Mj="[\\ufe0e\\ufe0f]?",Dj=Mj+Nj+"(?:\\u200d(?:"+[Cj,Tj,Aj].join("|")+")"+Mj+Nj+")*",Ij="(?:"+[Cj+jj+"?",jj,Tj,Aj,Oj].join("|")+")",Rj=RegExp(Pj+"(?="+Pj+")|"+Ij+Dj,"g"),Lj=function(e){return e.split("")},Fj=kj,zj=function(e){return e.match(Rj)||[]},Bj=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:_j(e,t,n)},Wj=kj,Vj=function(e){return Fj(e)?zj(e):Lj(e)},Uj=eO;const $j=B(function(e){return function(t){t=Uj(t);var n=Wj(t)?Vj(t):void 0,r=n?n[0]:t.charAt(0),o=n?Bj(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"));function Hj(e){return function(){return e}}const qj=Math.cos,Kj=Math.sin,Yj=Math.sqrt,Xj=Math.PI,Gj=2*Xj,Zj=Math.PI,Jj=2*Zj,Qj=1e-6,eP=Jj-Qj;function tP(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class nP{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?tP:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return tP;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Qj)if(Math.abs(u*s-l*c)>Qj&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,y=Math.sqrt(h),g=Math.sqrt(d),v=o*Math.tan((Zj-Math.acos((h+d-m)/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>Qj&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Qj||Math.abs(this._y1-c)>Qj)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Jj+Jj),d>eP?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Qj&&this._append`A${n},${n},0,${+(d>=Zj)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function rP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new nP(t)}function oP(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function iP(e){this._context=e}function aP(e){return new iP(e)}function sP(e){return e[0]}function lP(e){return e[1]}function cP(e,t){var n=Hj(!0),r=null,o=aP,i=null,a=rP(s);function s(s){var l,c,u,d=(s=oP(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?sP:Hj(e),t="function"==typeof t?t:void 0===t?lP:Hj(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:Hj(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:Hj(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:Hj(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function uP(e,t,n){var r=null,o=Hj(!0),i=null,a=aP,s=null,l=rP(c);function c(c){var u,d,f,p,h,m=(c=oP(c)).length,y=!1,g=new Array(m),v=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===y)if(y=!y)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(g[f],v[f]);s.lineEnd(),s.areaEnd()}y&&(g[u]=+e(p,u,c),v[u]=+t(p,u,c),s.point(r?+r(p,u,c):g[u],n?+n(p,u,c):v[u]))}if(h)return s=null,h+""||null}function u(){return cP().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?sP:Hj(+e),t="function"==typeof t?t:Hj(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?lP:Hj(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Hj(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Hj(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Hj(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Hj(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Hj(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Hj(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:Hj(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}iP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};class dP{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const fP={draw(e,t){const n=Yj(t/Xj);e.moveTo(n,0),e.arc(0,0,n,0,Gj)}},pP={draw(e,t){const n=Yj(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()}},hP=Yj(1/3),mP=2*hP,yP={draw(e,t){const n=Yj(t/mP),r=n*hP;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},gP={draw(e,t){const n=Yj(t),r=-n/2;e.rect(r,r,n,n)}},vP=Kj(Xj/10)/Kj(7*Xj/10),bP=Kj(Gj/10)*vP,xP=-qj(Gj/10)*vP,wP={draw(e,t){const n=Yj(.8908130915292852*t),r=bP*n,o=xP*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=Gj*t/5,a=qj(i),s=Kj(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}},_P=Yj(3),SP={draw(e,t){const n=-Yj(t/(3*_P));e.moveTo(0,2*n),e.lineTo(-_P*n,-n),e.lineTo(_P*n,-n),e.closePath()}},kP=-.5,EP=Yj(3)/2,OP=1/Yj(12),jP=3*(OP/2+1),PP={draw(e,t){const n=Yj(t/jP),r=n/2,o=n*OP,i=r,a=n*OP+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(kP*r-EP*o,EP*r+kP*o),e.lineTo(kP*i-EP*a,EP*i+kP*a),e.lineTo(kP*s-EP*l,EP*s+kP*l),e.lineTo(kP*r+EP*o,kP*o-EP*r),e.lineTo(kP*i+EP*a,kP*a-EP*i),e.lineTo(kP*s+EP*l,kP*l-EP*s),e.closePath()}};function CP(){}function TP(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 AP(e){this._context=e}function NP(e){this._context=e}function MP(e){this._context=e}function DP(e){this._context=e}function IP(e){return e<0?-1:1}function RP(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(IP(i)+IP(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function LP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function FP(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function zP(e){this._context=e}function BP(e){this._context=new WP(e)}function WP(e){this._context=e}function VP(e){this._context=e}function UP(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function $P(e,t){this._context=e,this._t=t}function HP(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function qP(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function KP(e,t){return e[t]}function YP(e){const t=[];return t.key=e,t}function XP(e){return XP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XP(e)}AP.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:TP(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:TP(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},NP.prototype={areaStart:CP,areaEnd:CP,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)}},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:TP(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},MP.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||0!==this._line&&3===this._point)&&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:TP(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},DP.prototype={areaStart:CP,areaEnd:CP,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))}},zP.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:FP(this,this._t0,LP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+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,FP(this,LP(this,n=RP(this,e,t)),n);break;default:FP(this,this._t0,n=RP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(BP.prototype=Object.create(zP.prototype)).point=function(e,t){zP.prototype.point.call(this,t,e)},WP.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,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},VP.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]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=UP(e),o=UP(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},$P.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=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)}}this._x=e,this._y=t}};var GP=["type","size","sizeType"];function ZP(){return ZP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZP.apply(this,arguments)}function JP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JP(Object(n),!0).forEach((function(t){eC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eC(e,t,n){return t=function(e){var t=function(e){if("object"!=XP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XP(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tC={symbolCircle:fP,symbolCross:pP,symbolDiamond:yP,symbolSquare:gP,symbolStar:wP,symbolTriangle:SP,symbolWye:PP},nC=Math.PI/180,rC=function(e){var t=e.type,n=void 0===t?"circle":t,r=e.size,o=void 0===r?64:r,i=e.sizeType,a=void 0===i?"area":i,l=QP(QP({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,GP)),{},{type:n,size:o,sizeType:a}),c=l.className,u=l.cx,d=l.cy,f=uj(l,!0);return u===+u&&d===+d&&o===+o?s.createElement("path",ZP({},f,{className:Ve("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:function(){var e=function(e){var t="symbol".concat($j(e));return tC[t]||fP}(n),t=function(e,t){let n=null,r=rP(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:Hj(e||fP),t="function"==typeof t?t:Hj(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:Hj(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:Hj(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}().type(e).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*nC;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(o,a,n));return t()}()})):null};function oC(e){return oC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oC(e)}function iC(){return iC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iC.apply(this,arguments)}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(sC=function(){return!!e})()}function lC(e){return lC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lC(e)}function cC(e,t){return(cC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function uC(e,t,n){return(t=dC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dC(e){var t=function(e){if("object"!=oC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oC(t)?t:t+""}rC.registerSymbol=function(e,t){tC["symbol".concat($j(e))]=t};var fC=32,pC=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=lC(t),function(e,t){if(t&&("object"===oC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,sC()?Reflect.construct(t,n||[],lC(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cC(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dC(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=16,r=fC/6,o=fC/3,i=e.inactive?t:e.color;if("plainline"===e.type)return s.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:fC,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return s.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(fC,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return s.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(4,"h").concat(fC,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(s.isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aC(Object(n),!0).forEach((function(t){uC(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete a.legendIcon,s.cloneElement(e.legendIcon,a)}return s.createElement(rC,{fill:i,cx:n,cy:n,size:fC,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,i=t.formatter,a=t.inactiveColor,l={x:0,y:0,width:fC,height:fC},c={display:"horizontal"===o?"inline-block":"block",marginRight:10},u={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||i,d=Ve(uC(uC({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var f=Ck(t.value)?null:t.value;wj(!Ck(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var p=t.inactive?a:t.color;return s.createElement("li",iC({className:d,style:c,key:"legend-item-".concat(n)},XO(e.props,t,n)),s.createElement(gj,{width:r,height:r,viewBox:l,style:u},e.renderIcon(t)),s.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},o?o(f,t,n):f))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return s.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(s.PureComponent);uC(pC,"displayName","Legend"),uC(pC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var hC=wE,mC=wE,yC=_E,gC=LE,vC=wE,bC=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xC=function(e){return this.__data__.get(e)},wC=function(e){return this.__data__.has(e)},_C=function(e,t){var n=this.__data__;if(n instanceof mC){var r=n.__data__;if(!yC||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new gC(r)}return n.set(e,t),this.size=n.size,this};function SC(e){var t=this.__data__=new vC(e);this.size=t.size}SC.prototype.clear=function(){this.__data__=new hC,this.size=0},SC.prototype.delete=bC,SC.prototype.get=xC,SC.prototype.has=wC,SC.prototype.set=_C;var kC=SC,EC=LE,OC=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jC=function(e){return this.__data__.has(e)};function PC(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new EC;++t<n;)this.add(e[t])}PC.prototype.add=PC.prototype.push=OC,PC.prototype.has=jC;var CC=PC,TC=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},AC=function(e,t){return e.has(t)},NC=CC,MC=TC,DC=AC,IC=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=2&n?new NC:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var y=a?r(m,h,d,t,e,i):r(h,m,d,e,t,i);if(void 0!==y){if(y)continue;f=!1;break}if(p){if(!MC(t,(function(e,t){if(!DC(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)}))){f=!1;break}}else if(h!==m&&!o(h,m,n,r,i)){f=!1;break}}return i.delete(e),i.delete(t),f},RC=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},LC=rk.Uint8Array,FC=sE,zC=IC,BC=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},WC=RC,VC=ok?ok.prototype:void 0,UC=VC?VC.valueOf:void 0,$C=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},HC=$C,qC=QS,KC=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},YC=Object.prototype.propertyIsEnumerable,XC=Object.getOwnPropertySymbols,GC=XC?function(e){return null==e?[]:(e=Object(e),KC(XC(e),(function(t){return YC.call(e,t)})))}:function(){return[]},ZC=GC,JC=hk,QC=mk,eT=function(e){return QC(e)&&"[object Arguments]"==JC(e)},tT=mk,nT=Object.prototype,rT=nT.hasOwnProperty,oT=nT.propertyIsEnumerable,iT=eT(function(){return arguments}())?eT:function(e){return tT(e)&&rT.call(e,"callee")&&!oT.call(e,"callee")},aT=iT,sT={exports:{}},lT=function(){return!1};!function(e,t){var n=rk,r=lT,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(sT,sT.exports);var cT=sT.exports,uT=/^(?:0|[1-9]\d*)$/,dT=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&uT.test(e))&&e>-1&&e%1==0&&e<t},fT=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},pT=hk,hT=fT,mT=mk,yT={};yT["[object Float32Array]"]=yT["[object Float64Array]"]=yT["[object Int8Array]"]=yT["[object Int16Array]"]=yT["[object Int32Array]"]=yT["[object Uint8Array]"]=yT["[object Uint8ClampedArray]"]=yT["[object Uint16Array]"]=yT["[object Uint32Array]"]=!0,yT["[object Arguments]"]=yT["[object Array]"]=yT["[object ArrayBuffer]"]=yT["[object Boolean]"]=yT["[object DataView]"]=yT["[object Date]"]=yT["[object Error]"]=yT["[object Function]"]=yT["[object Map]"]=yT["[object Number]"]=yT["[object Object]"]=yT["[object RegExp]"]=yT["[object Set]"]=yT["[object String]"]=yT["[object WeakMap]"]=!1;var gT=function(e){return function(t){return e(t)}},vT={exports:{}};!function(e,t){var n=ek,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a}(vT,vT.exports);var bT=vT.exports,xT=function(e){return mT(e)&&hT(e.length)&&!!yT[pT(e)]},wT=gT,_T=bT&&bT.isTypedArray,ST=_T?wT(_T):xT,kT=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},ET=aT,OT=QS,jT=cT,PT=dT,CT=ST,TT=Object.prototype.hasOwnProperty,AT=Object.prototype,NT=function(e,t){return function(n){return e(t(n))}},MT=NT(Object.keys,Object),DT=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||AT)},IT=MT,RT=Object.prototype.hasOwnProperty,LT=Pk,FT=fT,zT=function(e){return null!=e&&FT(e.length)&&!LT(e)},BT=function(e,t){var n=OT(e),r=!n&&ET(e),o=!n&&!r&&jT(e),i=!n&&!r&&!o&&CT(e),a=n||r||o||i,s=a?kT(e.length,String):[],l=s.length;for(var c in e)(t||TT.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||PT(c,l)))&&s.push(c);return s},WT=function(e){if(!DT(e))return IT(e);var t=[];for(var n in Object(e))RT.call(e,n)&&"constructor"!=n&&t.push(n);return t},VT=zT,UT=function(e){return VT(e)?BT(e):WT(e)},$T=function(e,t,n){var r=t(e);return qC(e)?r:HC(r,n(e))},HT=ZC,qT=UT,KT=function(e){return $T(e,qT,HT)},YT=Object.prototype.hasOwnProperty,XT=qk(rk,"DataView"),GT=qk(rk,"Promise"),ZT=qk(rk,"Set"),JT=XT,QT=_E,eA=GT,tA=ZT,nA=qk(rk,"WeakMap"),rA=hk,oA=Mk,iA="[object Map]",aA="[object Promise]",sA="[object Set]",lA="[object WeakMap]",cA="[object DataView]",uA=oA(JT),dA=oA(QT),fA=oA(eA),pA=oA(tA),hA=oA(nA),mA=rA;(JT&&mA(new JT(new ArrayBuffer(1)))!=cA||QT&&mA(new QT)!=iA||eA&&mA(eA.resolve())!=aA||tA&&mA(new tA)!=sA||nA&&mA(new nA)!=lA)&&(mA=function(e){var t=rA(e),n="[object Object]"==t?e.constructor:void 0,r=n?oA(n):"";if(r)switch(r){case uA:return cA;case dA:return iA;case fA:return aA;case pA:return sA;case hA:return lA}return t});var yA=kC,gA=IC,vA=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new LC(e),new LC(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return FC(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=BC;case"[object Set]":var l=1&r;if(s||(s=WC),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=zC(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(UC)return UC.call(e)==UC.call(t)}return!1},bA=function(e,t,n,r,o,i){var a=1&n,s=KT(e),l=s.length;if(l!=KT(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:YT.call(t,u)))return!1}var d=i.get(e),f=i.get(t);if(d&&f)return d==t&&f==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<l;){var m=e[u=s[c]],y=t[u];if(r)var g=a?r(y,m,u,t,e,i):r(m,y,u,e,t,i);if(!(void 0===g?m===y||o(m,y,n,r,i):g)){p=!1;break}h||(h="constructor"==u)}if(p&&!h){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(e),i.delete(t),p},xA=mA,wA=QS,_A=cT,SA=ST,kA="[object Arguments]",EA="[object Array]",OA="[object Object]",jA=Object.prototype.hasOwnProperty,PA=function(e,t,n,r,o,i){var a=wA(e),s=wA(t),l=a?EA:xA(e),c=s?EA:xA(t),u=(l=l==kA?OA:l)==OA,d=(c=c==kA?OA:c)==OA,f=l==c;if(f&&_A(e)){if(!_A(t))return!1;a=!0,u=!1}if(f&&!u)return i||(i=new yA),a||SA(e)?gA(e,t,n,r,o,i):vA(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&jA.call(e,"__wrapped__"),h=d&&jA.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,y=h?t.value():t;return i||(i=new yA),o(m,y,n,r,i)}}return!!f&&(i||(i=new yA),bA(e,t,n,r,o,i))},CA=mk,TA=function e(t,n,r,o,i){return t===n||(null==t||null==n||!CA(t)&&!CA(n)?t!=t&&n!=n:PA(t,n,r,o,e,i))},AA=kC,NA=TA,MA=kk,DA=function(e){return e==e&&!MA(e)},IA=DA,RA=UT,LA=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},FA=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new AA;if(r)var f=r(c,u,l,e,t,d);if(!(void 0===f?NA(u,c,3,r,d):f))return!1}}return!0},zA=function(e){for(var t=RA(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,IA(o)]}return t},BA=LA,WA=iO,VA=aT,UA=QS,$A=dT,HA=fT,qA=sO,KA=function(e,t){return null!=e&&t in Object(e)},YA=function(e,t,n){for(var r=-1,o=(t=WA(t,e)).length,i=!1;++r<o;){var a=qA(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&HA(o)&&$A(a,o)&&(UA(e)||VA(e))},XA=TA,GA=fO,ZA=function(e,t){return null!=e&&YA(e,t,KA)},JA=Sk,QA=DA,eN=LA,tN=sO,nN=function(e){return e},rN=uO,oN=function(e){return function(t){return null==t?void 0:t[e]}},iN=function(e){return function(t){return rN(t,e)}},aN=Sk,sN=sO,lN=function(e){var t=zA(e);return 1==t.length&&t[0][2]?BA(t[0][0],t[0][1]):function(n){return n===e||FA(n,e,t)}},cN=function(e,t){return JA(e)&&QA(t)?eN(tN(e),t):function(n){var r=GA(n,e);return void 0===r&&r===t?ZA(n,e):XA(t,r,3)}},uN=nN,dN=QS,fN=function(e){return aN(e)?oN(sN(e)):iN(e)},pN=function(e){return"function"==typeof e?e:null==e?uN:"object"==typeof e?dN(e)?cN(e[0],e[1]):lN(e):fN(e)},hN=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},mN=hN,yN=function(e){return e!=e},gN=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1},vN=function(e,t,n){return t==t?gN(e,t,n):mN(e,yN,n)},bN=ZT,xN=bN&&1/RC(new bN([,-0]))[1]==1/0?function(e){return new bN(e)}:function(){},wN=CC,_N=function(e,t){return!(null==e||!e.length)&&vN(e,t,0)>-1},SN=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},kN=AC,EN=xN,ON=RC,jN=pN,PN=function(e,t,n){var r=-1,o=_N,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=SN;else if(i>=200){var c=t?null:EN(e);if(c)return ON(c);a=!1,o=kN,l=new wN}else l=t?[]:s;e:for(;++r<i;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s},CN=function(e,t){return e&&e.length?PN(e,jN(t)):[]};const TN=B(CN);function AN(e,t,n){return!0===t?TN(e,n):Ck(t)?TN(e,t):e}function NN(e){return NN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},NN(e)}var MN=["ref"];function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function IN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?DN(Object(n),!0).forEach((function(t){BN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function RN(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WN(r.key),r)}}function LN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(LN=function(){return!!e})()}function FN(e){return FN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},FN(e)}function zN(e,t){return(zN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function BN(e,t,n){return(t=WN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WN(e){var t=function(e){if("object"!=NN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=NN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==NN(t)?t:t+""}function VN(e){return e.value}var UN=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return BN(e=function(e,t,n){return t=FN(t),function(e,t){if(t&&("object"===NN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,LN()?Reflect.construct(t,n||[],FN(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zN(e,t)}(t,e),function(e,t,n){return t&&RN(e.prototype,t),n&&RN(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?IN({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),IN(IN({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,i=t.wrapperStyle,a=t.payloadUniqBy,l=t.payload,c=IN(IN({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(i)),i);return s.createElement("div",{className:"recharts-legend-wrapper",style:c,ref:function(t){e.wrapperNode=t}},function(e,t){if(s.isValidElement(e))return s.cloneElement(e,t);if("function"==typeof e)return s.createElement(e,t);t.ref;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,MN);return s.createElement(pC,n)}(n,IN(IN({},this.props),{},{payload:AN(l,a,VN)})))}}],[{key:"getWithHeight",value:function(e,t){var n=IN(IN({},this.defaultProps),e.props).layout;return"vertical"===n&&DO(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}(s.PureComponent);BN(UN,"displayName","Legend"),BN(UN,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var $N=aT,HN=QS,qN=ok?ok.isConcatSpreadable:void 0,KN=$C,YN=function(e){return HN(e)||$N(e)||!!(qN&&e&&e[qN])},XN=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=YN),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):KN(i,l):o||(i[i.length]=l)}return i},GN=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}(),ZN=UT,JN=function(e,t){return e&&GN(e,t,ZN)},QN=zT,eM=function(e,t){return function(n,r){if(null==n)return n;if(!QN(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}(JN),tM=eM,nM=zT,rM=function(e,t){var n=-1,r=nM(e)?Array(e.length):[];return tM(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},oM=vk,iM=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=oM(e),a=void 0!==t,s=null===t,l=t==t,c=oM(t);if(!s&&!c&&!i&&e>t||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0},aM=KE,sM=uO,lM=pN,cM=rM,uM=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e},dM=gT,fM=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=iM(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index},pM=nN,hM=QS,mM=function(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)},yM=Math.max,gM=qk,vM=function(){try{var e=gM(Object,"defineProperty");return e({},"",{}),e}catch{}}(),bM=vM,xM=function(e){return function(){return e}},wM=bM,_M=wM?function(e,t){return wM(e,"toString",{configurable:!0,enumerable:!1,value:xM(t),writable:!0})}:nN,SM=_M,kM=Date.now,EM=function(e){var t=0,n=0;return function(){var r=kM(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(SM),OM=nN,jM=function(e,t,n){return t=yM(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=yM(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),mM(e,this,s)}},PM=EM,CM=sE,TM=zT,AM=dT,NM=kk,MM=function(e,t,n){if(!NM(n))return!1;var r=typeof t;return!!("number"==r?TM(n)&&AM(t,n.length):"string"==r&&t in n)&&CM(n[t],e)},DM=XN,IM=function(e,t,n){t=t.length?aM(t,(function(e){return hM(e)?function(t){return sM(t,1===e.length?e[0]:e)}:e})):[pM];var r=-1;t=aM(t,dM(lM));var o=cM(e,(function(e,n,o){var i=aM(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return uM(o,(function(e,t){return fM(e,t,n)}))},RM=MM,LM=function(e,t){return PM(jM(e,t,OM),e+"")}((function(e,t){if(null==e)return[];var n=t.length;return n>1&&RM(e,t[0],t[1])?t=[]:n>2&&RM(t[0],t[1],t[2])&&(t=[t[0]]),IM(e,DM(t,1),[])}));const FM=B(LM);function zM(e){return zM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zM(e)}function BM(){return BM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BM.apply(this,arguments)}function WM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VM(Object(n),!0).forEach((function(t){$M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $M(e,t,n){return t=function(e){var t=function(e){if("object"!=zM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zM(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HM(e){return Array.isArray(e)&&IO(e[0])&&IO(e[1])?e.join(" ~ "):e}var qM=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,i=e.itemStyle,a=void 0===i?{}:i,l=e.labelStyle,c=void 0===l?{}:l,u=e.payload,d=e.formatter,f=e.itemSorter,p=e.wrapperClassName,h=e.labelClassName,m=e.label,y=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,b=UM({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),x=UM({margin:0},c),w=!mO(m),_=w?m:"",S=Ve("recharts-default-tooltip",p),k=Ve("recharts-tooltip-label",h);w&&y&&null!=u&&(_=y(m,u));var E=v?{role:"status","aria-live":"assertive"}:{};return s.createElement("div",BM({className:S,style:b},E),s.createElement("p",{className:k,style:x},s.isValidElement(_)?_:"".concat(_)),function(){if(u&&u.length){var e=(f?FM(u,f):u).map((function(e,t){if("none"===e.type)return null;var r=UM({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),o=e.formatter||d||HM,i=e.value,l=e.name,c=i,f=l;if(o&&null!=c&&null!=f){var p=o(i,l,e,t,u);if(Array.isArray(p)){var h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return WM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WM(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p,2);c=h[0],f=h[1]}else c=p}return s.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},IO(f)?s.createElement("span",{className:"recharts-tooltip-item-name"},f):null,IO(f)?s.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,s.createElement("span",{className:"recharts-tooltip-item-value"},c),s.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return s.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function KM(e){return KM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KM(e)}function YM(e,t,n){return t=function(e){var t=function(e){if("object"!=KM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=KM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==KM(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var XM="recharts-tooltip-wrapper",GM={visibility:"hidden"};function ZM(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ve(XM,YM(YM(YM(YM({},"".concat(XM,"-right"),DO(n)&&t&&DO(t.x)&&n>=t.x),"".concat(XM,"-left"),DO(n)&&t&&DO(t.x)&&n<t.x),"".concat(XM,"-bottom"),DO(r)&&t&&DO(t.y)&&r>=t.y),"".concat(XM,"-top"),DO(r)&&t&&DO(t.y)&&r<t.y))}function JM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&DO(i[r]))return i[r];var u=n[r]-s-o,d=n[r]+o;return t[r]?a[r]?u:d:a[r]?u<l[r]?Math.max(d,l[r]):Math.max(u,l[r]):d+s>l[r]+c?Math.max(u,l[r]):Math.max(d,l[r])}function QM(e){return QM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},QM(e)}function eD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eD(Object(n),!0).forEach((function(t){iD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(nD=function(){return!!e})()}function rD(e){return rD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rD(e)}function oD(e,t){return(oD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function iD(e,t,n){return(t=aD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aD(e){var t=function(e){if("object"!=QM(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=QM(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==QM(t)?t:t+""}var sD=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return iD(e=function(e,t,n){return t=rD(t),function(e,t){if(t&&("object"===QM(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nD()?Reflect.construct(t,n||[],rD(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),iD(e,"handleKeyDown",(function(t){var n,r,o,i;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oD(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aD(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&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 e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.children,l=t.coordinate,c=t.hasPayload,u=t.isAnimationActive,d=t.offset,f=t.position,p=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,y=t.wrapperStyle,g=function(e){var t,n,r,o=e.allowEscapeViewBox,i=e.coordinate,a=e.offsetTopLeft,s=e.position,l=e.reverseDirection,c=e.tooltipBox,u=e.useTranslate3d,d=e.viewBox;return t=c.height>0&&c.width>0&&i?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=JM({allowEscapeViewBox:o,coordinate:i,key:"x",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.width,viewBox:d,viewBoxDimension:d.width}),translateY:r=JM({allowEscapeViewBox:o,coordinate:i,key:"y",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.height,viewBox:d,viewBoxDimension:d.height}),useTranslate3d:u}):GM,{cssProperties:t,cssClasses:ZM({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:d,position:f,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:m}),v=g.cssClasses,b=g.cssProperties,x=tD(tD({transition:u&&n?"transform ".concat(o,"ms ").concat(i):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&c?"visible":"hidden",position:"absolute",top:0,left:0},y);return s.createElement("div",{tabIndex:-1,className:v,style:x,ref:function(t){e.wrapperNode=t}},a)}}])}(s.PureComponent),lD={isSsr:!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return lD[e]},set:function(e,t){if("string"==typeof e)lD[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){lD[t]=e[t]}))}}};function cD(e){return cD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cD(e)}function uD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uD(Object(n),!0).forEach((function(t){mD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(fD=function(){return!!e})()}function pD(e){return pD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pD(e)}function hD(e,t){return(hD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function mD(e,t,n){return(t=yD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yD(e){var t=function(e){if("object"!=cD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cD(t)?t:t+""}function gD(e){return e.dataKey}var vD=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=pD(t),function(e,t){if(t&&("object"===cD(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fD()?Reflect.construct(t,n||[],pD(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hD(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yD(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.content,l=t.coordinate,c=t.filterNull,u=t.isAnimationActive,d=t.offset,f=t.payload,p=t.payloadUniqBy,h=t.position,m=t.reverseDirection,y=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,b=f??[];c&&b.length&&(b=AN(f.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),p,gD));var x=b.length>0;return s.createElement(sD,{allowEscapeViewBox:r,animationDuration:o,animationEasing:i,isAnimationActive:u,active:n,coordinate:l,hasPayload:x,offset:d,position:h,reverseDirection:m,useTranslate3d:y,viewBox:g,wrapperStyle:v},function(e,t){return s.isValidElement(e)?s.cloneElement(e,t):"function"==typeof e?s.createElement(e,t):s.createElement(qM,t)}(a,dD(dD({},this.props),{},{payload:b})))}}])}(s.PureComponent);mD(vD,"displayName","Tooltip"),mD(vD,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!lD.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 bD=rk,xD=/\s/,wD=function(e){for(var t=e.length;t--&&xD.test(e.charAt(t)););return t},_D=/^\s+/,SD=function(e){return e&&e.slice(0,wD(e)+1).replace(_D,"")},kD=kk,ED=vk,OD=/^[-+]0x[0-9a-f]+$/i,jD=/^0b[01]+$/i,PD=/^0o[0-7]+$/i,CD=parseInt,TD=function(e){if("number"==typeof e)return e;if(ED(e))return NaN;if(kD(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=kD(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=SD(e);var n=jD.test(e);return n||PD.test(e)?CD(e.slice(2),n?2:8):OD.test(e)?NaN:+e},AD=kk,ND=function(){return bD.Date.now()},MD=TD,DD=Math.max,ID=Math.min,RD=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=i}function m(){var e=ND();if(h(e))return y(e);s=setTimeout(m,function(e){var n=t-(e-l);return d?ID(n,i-(e-c)):n}(e))}function y(e){return s=void 0,f&&r?p(e):(r=o=void 0,a)}function g(){var e=ND(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?p(e):a}(l);if(d)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=MD(t)||0,AD(n)&&(u=!!n.leading,i=(d="maxWait"in n)?DD(MD(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f),g.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},g.flush=function(){return void 0===s?a:y(ND())},g},LD=kk,FD=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return LD(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),RD(e,t,{leading:r,maxWait:t,trailing:o})};const zD=B(FD);var BD=function(e){return null};function WD(e){return WD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},WD(e)}function VD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function UD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VD(Object(n),!0).forEach((function(t){$D(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $D(e,t,n){return t=function(e){var t=function(e){if("object"!=WD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=WD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==WD(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}BD.displayName="Cell";var HD={widthCache:{},cacheCount:0},qD={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},KD="recharts_measurement_span",YD=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||lD.isSsr)return{width:0,height:0};var n=function(e){var t=UD({},e);return Object.keys(t).forEach((function(e){t[e]||delete t[e]})),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(HD.widthCache[r])return HD.widthCache[r];try{var o=document.getElementById(KD);o||((o=document.createElement("span")).setAttribute("id",KD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=UD(UD({},qD),n);Object.assign(o.style,i),o.textContent="".concat(e);var a=o.getBoundingClientRect(),s={width:a.width,height:a.height};return HD.widthCache[r]=s,++HD.cacheCount>2e3&&(HD.cacheCount=0,HD.widthCache={}),s}catch{return{width:0,height:0}}};function XD(e){return XD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},XD(e)}function GD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ZD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZD(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QD(r.key),r)}}function QD(e){var t=function(e){if("object"!=XD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XD(t)?t:t+""}var eI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nI=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,rI=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,oI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},iI=Object.keys(oI),aI="NaN",sI=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""!==n&&!nI.test(n)&&(this.num=NaN,this.unit=""),iI.includes(n)&&(this.num=function(e,t){return e*oI[t]}(t,n),this.unit="px")}return function(e,t,n){return t&&JD(e.prototype,t),n&&JD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(t){var n,r=GD(null!==(n=rI.exec(t))&&void 0!==n?n:[],3),o=r[1],i=r[2];return new e(parseFloat(o),i??"")}}])}();function lI(e){if(e.includes(aI))return aI;for(var t=e;t.includes("*")||t.includes("/");){var n,r=GD(null!==(n=eI.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],s=sI.parse(o??""),l=sI.parse(a??""),c="*"===i?s.multiply(l):s.divide(l);if(c.isNaN())return aI;t=t.replace(eI,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=GD(null!==(u=tI.exec(t))&&void 0!==u?u:[],4),f=d[1],p=d[2],h=d[3],m=sI.parse(f??""),y=sI.parse(h??""),g="+"===p?m.add(y):m.subtract(y);if(g.isNaN())return aI;t=t.replace(tI,g.toString())}return t}var cI=/\(([^()]*)\)/;function uI(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=GD(cI.exec(t),2)[1];t=t.replace(cI,lI(n))}return t}(t),lI(t)}(e)}catch{return aI}}(e.slice(5,-1));return t===aI?"":t}var dI=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],fI=["dx","dy","angle","className","breakAll"];function pI(){return pI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pI.apply(this,arguments)}function hI(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function mI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yI(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gI=/[ \f\n\r\t\v\u2028\u2029]+/,vI=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];mO(t)||(o=n?t.toString().split(""):t.toString().split(gI));var i=o.map((function(e){return{word:e,width:YD(e,r).width}}));return{wordsWithComputedWidth:i,spaceWidth:n?0:YD(" ",r).width}}catch{return null}},bI=function(e){return[{words:mO(e)?[]:e.toString().split(gI)}]},xI="#808080",wI=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.lineHeight,a=void 0===i?"1em":i,l=e.capHeight,c=void 0===l?"0.71em":l,u=e.scaleToFit,d=void 0!==u&&u,f=e.textAnchor,p=void 0===f?"start":f,h=e.verticalAnchor,m=void 0===h?"end":h,y=e.fill,g=void 0===y?xI:y,v=hI(e,dI),b=(0,s.useMemo)((function(){return function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!lD.isSsr){var s=vI({breakAll:i,children:r,style:o});return s?function(e,t,n,r,o){var i=e.maxLines,a=e.children,s=e.style,l=e.breakAll,c=DO(i),u=a,d=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var i=t.word,a=t.width,s=e[e.length-1];if(s&&(null==r||o||s.width+a+n<Number(r)))s.words.push(i),s.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e}),[])},f=d(t);if(!c)return f;for(var p,h=function(e){var t=u.slice(0,e),n=vI({breakAll:l,style:s,children:t+"…"}).wordsWithComputedWidth,o=d(n),a=o.length>i||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(o).width>Number(r);return[a,o]},m=0,y=u.length-1,g=0;m<=y&&g<=u.length-1;){var v=Math.floor((m+y)/2),b=mI(h(v-1),2),x=b[0],w=b[1],_=mI(h(v),1)[0];if(!x&&!_&&(m=v+1),x&&_&&(y=v-1),!x&&_){p=w;break}g++}return p||f}({breakAll:i,children:r,maxLines:a,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,n):bI(r)}return bI(r)}({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:d,style:v.style,width:v.width})}),[v.breakAll,v.children,v.maxLines,d,v.style,v.width]),x=v.dx,w=v.dy,_=v.angle,S=v.className,k=v.breakAll,E=hI(v,fI);if(!IO(n)||!IO(o))return null;var O,j=n+(DO(x)?x:0),P=o+(DO(w)?w:0);switch(m){case"start":O=uI("calc(".concat(c,")"));break;case"middle":O=uI("calc(".concat((b.length-1)/2," * -").concat(a," + (").concat(c," / 2))"));break;default:O=uI("calc(".concat(b.length-1," * -").concat(a,")"))}var C=[];if(d){var T=b[0].width,A=v.width;C.push("scale(".concat((DO(A)?A/T:1)/T,")"))}return _&&C.push("rotate(".concat(_,", ").concat(j,", ").concat(P,")")),C.length&&(E.transform=C.join(" ")),s.createElement("text",pI({},uj(E,!0),{x:j,y:P,className:Ve("recharts-text",S),textAnchor:p,fill:g.includes("url")?xI:g}),b.map((function(e,t){var n=e.words.join(k?"":" ");return s.createElement("tspan",{x:j,dy:0===t?O:a,key:"".concat(n,"-").concat(t)},n)})))};function _I(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function SI(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function kI(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=_I,n=(t,n)=>_I(e(t),n),r=(t,n)=>e(t)-n):(t=e===_I||e===SI?e:EI,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function EI(){return 0}function OI(e){return null===e?NaN:+e}const jI=kI(_I).right;kI(OI).center;class PI extends Map{constructor(e,t=TI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(CI(this,e))}has(e){return super.has(CI(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function CI({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function TI(e){return null!==e&&"object"==typeof e?e.valueOf():e}function AI(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const NI=Math.sqrt(50),MI=Math.sqrt(10),DI=Math.sqrt(2);function II(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=NI?10:i>=MI?5:i>=DI?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?II(e,t,2*n):[s,l,c]}function RI(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?II(t,e,n):II(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function LI(e,t,n){return II(e=+e,t=+t,n=+n)[2]}function FI(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?LI(t,e,n):LI(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function zI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function BI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function WI(e,t,n=0,r=1/0,o){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(o=void 0===o?AI:function(e=_I){if(e===_I)return AI;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);WI(e,t,Math.max(n,Math.floor(t-a*l/i+c)),Math.min(r,Math.floor(t+(i-a)*l/i+c)),o)}const i=e[t];let a=n,s=r;for(VI(e,n,t),o(e[r],i)>0&&VI(e,n,r);a<s;){for(VI(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?VI(e,n,s):(++s,VI(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function VI(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function UI(e,t,n=OI){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,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function $I(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function HI(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const qI=Symbol("implicit");function KI(){var e=new PI,t=[],n=[],r=qI;function o(o){let i=e.get(o);if(void 0===i){if(r!==qI)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new PI;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return KI(t,n).unknown(r)},$I.apply(o,arguments),o}function YI(){var e,t,n=KI().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return f+e*t}));return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return YI(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},$I.apply(d(),arguments)}function XI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return XI(t())},e}function GI(){return XI(YI.apply(null,arguments).paddingInner(1))}function ZI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function QI(){}var eR=.7,tR=1/eR,nR="\\s*([+-]?\\d+)\\s*",rR="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oR="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iR=/^#([0-9a-f]{3,8})$/,aR=new RegExp(`^rgb\\(${nR},${nR},${nR}\\)$`),sR=new RegExp(`^rgb\\(${oR},${oR},${oR}\\)$`),lR=new RegExp(`^rgba\\(${nR},${nR},${nR},${rR}\\)$`),cR=new RegExp(`^rgba\\(${oR},${oR},${oR},${rR}\\)$`),uR=new RegExp(`^hsl\\(${rR},${oR},${oR}\\)$`),dR=new RegExp(`^hsla\\(${rR},${oR},${oR},${rR}\\)$`),fR={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function pR(){return this.rgb().formatHex()}function hR(){return this.rgb().formatRgb()}function mR(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?yR(t):3===n?new bR(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gR(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gR(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=aR.exec(e))?new bR(t[1],t[2],t[3],1):(t=sR.exec(e))?new bR(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=lR.exec(e))?gR(t[1],t[2],t[3],t[4]):(t=cR.exec(e))?gR(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=uR.exec(e))?ER(t[1],t[2]/100,t[3]/100,1):(t=dR.exec(e))?ER(t[1],t[2]/100,t[3]/100,t[4]):fR.hasOwnProperty(e)?yR(fR[e]):"transparent"===e?new bR(NaN,NaN,NaN,0):null}function yR(e){return new bR(e>>16&255,e>>8&255,255&e,1)}function gR(e,t,n,r){return r<=0&&(e=t=n=NaN),new bR(e,t,n,r)}function vR(e,t,n,r){return 1===arguments.length?function(e){return e instanceof QI||(e=mR(e)),e?new bR((e=e.rgb()).r,e.g,e.b,e.opacity):new bR}(e):new bR(e,t,n,r??1)}function bR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function xR(){return`#${kR(this.r)}${kR(this.g)}${kR(this.b)}`}function wR(){const e=_R(this.opacity);return`${1===e?"rgb(":"rgba("}${SR(this.r)}, ${SR(this.g)}, ${SR(this.b)}${1===e?")":`, ${e})`}`}function _R(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function SR(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kR(e){return((e=SR(e))<16?"0":"")+e.toString(16)}function ER(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jR(e,t,n,r)}function OR(e){if(e instanceof jR)return new jR(e.h,e.s,e.l,e.opacity);if(e instanceof QI||(e=mR(e)),!e)return new jR;if(e instanceof jR)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new jR(a,s,l,e.opacity)}function jR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function PR(e){return(e=(e||0)%360)<0?e+360:e}function CR(e){return Math.max(0,Math.min(1,e||0))}function TR(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ZI(QI,mR,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pR,formatHex:pR,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return OR(this).formatHsl()},formatRgb:hR,toString:hR}),ZI(bR,vR,JI(QI,{brighter(e){return e=null==e?tR:Math.pow(tR,e),new bR(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?eR:Math.pow(eR,e),new bR(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new bR(SR(this.r),SR(this.g),SR(this.b),_R(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:xR,formatHex:xR,formatHex8:function(){return`#${kR(this.r)}${kR(this.g)}${kR(this.b)}${kR(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:wR,toString:wR})),ZI(jR,(function(e,t,n,r){return 1===arguments.length?OR(e):new jR(e,t,n,r??1)}),JI(QI,{brighter(e){return e=null==e?tR:Math.pow(tR,e),new jR(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?eR:Math.pow(eR,e),new jR(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new bR(TR(e>=240?e-240:e+120,o,r),TR(e,o,r),TR(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new jR(PR(this.h),CR(this.s),CR(this.l),_R(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=_R(this.opacity);return`${1===e?"hsl(":"hsla("}${PR(this.h)}, ${100*CR(this.s)}%, ${100*CR(this.l)}%${1===e?")":`, ${e})`}`}}));const AR=e=>()=>e;function NR(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):AR(isNaN(e)?t:e)}const MR=function e(t){var n=function(e){return 1==(e=+e)?NR:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):AR(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=vR(e)).r,(t=vR(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=NR(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function DR(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function IR(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=VR(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function RR(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function LR(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function FR(e,t){var n,r={},o={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=VR(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var zR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,BR=new RegExp(zR.source,"g");function WR(e,t){var n,r,o,i=zR.lastIndex=BR.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zR.exec(e))&&(r=BR.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:LR(n,r)})),i=BR.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function VR(e,t){var n,r=typeof t;return null==t||"boolean"===r?AR(t):("number"===r?LR:"string"===r?(n=mR(t))?(t=n,MR):WR:t instanceof mR?MR:t instanceof Date?RR:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?DR:Array.isArray(t)?IR:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?FR:LR)(e,t)}function UR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function $R(e){return+e}var HR=[0,1];function qR(e){return e}function KR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function YR(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=KR(o,r),i=n(a,i)):(r=KR(r,o),i=n(i,a)),function(e){return i(r(e))}}function XR(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=KR(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=jI(e,t,1,r)-1;return i[n](o[n](t))}}function GR(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ZR(){var e,t,n,r,o,i,a=HR,s=HR,l=VR,c=qR;function u(){var e=Math.min(a.length,s.length);return c!==qR&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?XR:YR,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),LR)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,$R),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=UR,u()},d.clamp=function(e){return arguments.length?(c=!!e||qR,u()):c!==qR},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function JR(){return ZR()(qR,qR)}function QR(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 eL(e){return(e=QR(Math.abs(e)))?e[1]:NaN}var tL,nL=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rL(e){if(!(t=nL.exec(e)))throw new Error("invalid format: "+e);var t;return new oL({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function oL(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function iL(e,t){var n=QR(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}rL.prototype=oL.prototype,oL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const aL={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>iL(100*e,t),r:iL,s:function(e,t){var n=QR(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(tL=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+QR(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sL(e){return e}var lL,cL,uL,dL=Array.prototype.map,fL=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pL(e,t,n,r){var o,i=FI(e,t,n);switch((r=rL(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(eL(t)/3)))-eL(Math.abs(e)))}(i,a))&&(r.precision=o),uL(r,a);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,eL(t)-eL(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(o=function(e){return Math.max(0,-eL(Math.abs(e)))}(i))&&(r.precision=o-2*("%"===r.type))}return cL(r)}function hL(e){var t=e.domain;return e.ticks=function(e){var n=t();return RI(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return pL(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=LI(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function mL(){var e=JR();return e.copy=function(){return GR(e,mL())},$I.apply(e,arguments),hL(e)}function yL(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function gL(e){return Math.log(e)}function vL(e){return Math.exp(e)}function bL(e){return-Math.log(-e)}function xL(e){return-Math.exp(-e)}function wL(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _L(e){return(t,n)=>-e(-t,n)}function SL(e){const t=e(gL,vL),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?wL:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=_L(r),o=_L(o),e(bL,xL)):e(gL,vL),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=RI(a,s,p))}else h=RI(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(!(i%1)&&null==(n=rL(n)).precision&&(n.trim=!0),n=cL(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(yL(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function kL(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function EL(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function OL(e){var t=1,n=e(kL(t),EL(t));return n.constant=function(n){return arguments.length?e(kL(t=+n),EL(t)):t},hL(n)}function jL(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function PL(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function CL(e){return e<0?-e*e:e*e}function TL(e){var t=e(qR,qR),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(qR,qR):.5===n?e(PL,CL):e(jL(n),jL(1/n)):n},hL(t)}function AL(){var e=TL(ZR());return e.copy=function(){return GR(e,AL()).exponent(e.exponent())},$I.apply(e,arguments),e}function NL(e){return Math.sign(e)*e*e}lL=function(e){var t=void 0===e.grouping||void 0===e.thousands?sL:function(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}(dL.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",i=void 0===e.numerals?sL:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(dL.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=rL(e)).fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,y=e.precision,g=e.trim,v=e.type;"n"===v?(m=!0,v="g"):aL[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",w=aL[v],_=/[defgprs%]/.test(v);function S(e){var n,r,a,f=b,S=x;if("c"===v)S=w(e)+S,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),y),g&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,S=("s"===v?fL[8+tL/3]:"")+S+(k&&"("===d?")":""),_)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){S=(46===a?o+e.slice(n+1):e.slice(n))+S,e=e.slice(0,n);break}}m&&!p&&(e=t(e,1/0));var E=f.length+e.length+S.length,O=E<h?new Array(h-E+1).join(c):"";switch(m&&p&&(e=t(O+e,O.length?h-S.length:1/0),O=""),u){case"<":e=f+e+S+O;break;case"=":e=f+O+e+S;break;case"^":e=O.slice(0,E=O.length>>1)+f+e+S+O.slice(E);break;default:e=O+f+e+S}return i(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),S.toString=function(){return e+""},S}return{format:c,formatPrefix:function(e,t){var n=c(((e=rL(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(eL(t)/3))),o=Math.pow(10,-r),i=fL[8+r/3];return function(e){return n(o*e)+i}}}}({thousands:",",grouping:[3],currency:["$",""]}),cL=lL.format,uL=lL.formatPrefix;const ML=new Date,DL=new Date;function IL(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>IL((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(ML.setTime(+t),DL.setTime(+r),e(ML),e(DL),Math.floor(n(ML,DL))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const RL=IL((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));RL.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?IL((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):RL:null),RL.range;const LL=1e3,FL=6e4,zL=60*FL,BL=24*zL,WL=7*BL,VL=30*BL,UL=365*BL,$L=IL((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*LL)}),((e,t)=>(t-e)/LL),(e=>e.getUTCSeconds()));$L.range;const HL=IL((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*LL)}),((e,t)=>{e.setTime(+e+t*FL)}),((e,t)=>(t-e)/FL),(e=>e.getMinutes()));HL.range;const qL=IL((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*FL)}),((e,t)=>(t-e)/FL),(e=>e.getUTCMinutes()));qL.range;const KL=IL((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*LL-e.getMinutes()*FL)}),((e,t)=>{e.setTime(+e+t*zL)}),((e,t)=>(t-e)/zL),(e=>e.getHours()));KL.range;const YL=IL((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*zL)}),((e,t)=>(t-e)/zL),(e=>e.getUTCHours()));YL.range;const XL=IL((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*FL)/BL),(e=>e.getDate()-1));XL.range;const GL=IL((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/BL),(e=>e.getUTCDate()-1));GL.range;const ZL=IL((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/BL),(e=>Math.floor(e/BL)));function JL(e){return IL((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*FL)/WL))}ZL.range;const QL=JL(0),eF=JL(1),tF=JL(2),nF=JL(3),rF=JL(4),oF=JL(5),iF=JL(6);function aF(e){return IL((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/WL))}QL.range,eF.range,tF.range,nF.range,rF.range,oF.range,iF.range;const sF=aF(0),lF=aF(1),cF=aF(2),uF=aF(3),dF=aF(4),fF=aF(5),pF=aF(6);sF.range,lF.range,cF.range,uF.range,dF.range,fF.range,pF.range;const hF=IL((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));hF.range;const mF=IL((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));mF.range;const yF=IL((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()));yF.every=e=>isFinite(e=Math.floor(e))&&e>0?IL((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)})):null,yF.range;const gF=IL((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()));function vF(e,t,n,r,o,i){const a=[[$L,1,LL],[$L,5,5e3],[$L,15,15e3],[$L,30,3e4],[i,1,FL],[i,5,5*FL],[i,15,15*FL],[i,30,30*FL],[o,1,zL],[o,3,3*zL],[o,6,6*zL],[o,12,12*zL],[r,1,BL],[r,2,2*BL],[n,1,WL],[t,1,VL],[t,3,3*VL],[e,1,UL]];function s(t,n,r){const o=Math.abs(n-t)/r,i=kI((([,,e])=>e)).right(a,o);if(i===a.length)return e.every(FI(t/UL,n/UL,r));if(0===i)return RL.every(Math.max(FI(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}gF.every=e=>isFinite(e=Math.floor(e))&&e>0?IL((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)})):null,gF.range;const[bF,xF]=vF(gF,mF,sF,ZL,YL,qL),[wF,_F]=vF(yF,hF,QL,XL,KL,HL);function SF(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function kF(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function EF(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var OF,jF,PF,CF={"-":"",_:" ",0:"0"},TF=/^\s*\d+/,AF=/^%/,NF=/[\\^$*+?|[\]().{}]/g;function MF(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function DF(e){return e.replace(NF,"\\$&")}function IF(e){return new RegExp("^(?:"+e.map(DF).join("|")+")","i")}function RF(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function LF(e,t,n){var r=TF.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function FF(e,t,n){var r=TF.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function zF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function BF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function WF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function VF(e,t,n){var r=TF.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function UF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $F(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 HF(e,t,n){var r=TF.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function qF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function KF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function YF(e,t,n){var r=TF.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function XF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function GF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ZF(e,t,n){var r=TF.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function JF(e,t,n){var r=TF.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function QF(e,t,n){var r=TF.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ez(e,t,n){var r=AF.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function tz(e,t,n){var r=TF.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function nz(e,t,n){var r=TF.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function rz(e,t){return MF(e.getDate(),t,2)}function oz(e,t){return MF(e.getHours(),t,2)}function iz(e,t){return MF(e.getHours()%12||12,t,2)}function az(e,t){return MF(1+XL.count(yF(e),e),t,3)}function sz(e,t){return MF(e.getMilliseconds(),t,3)}function lz(e,t){return sz(e,t)+"000"}function cz(e,t){return MF(e.getMonth()+1,t,2)}function uz(e,t){return MF(e.getMinutes(),t,2)}function dz(e,t){return MF(e.getSeconds(),t,2)}function fz(e){var t=e.getDay();return 0===t?7:t}function pz(e,t){return MF(QL.count(yF(e)-1,e),t,2)}function hz(e){var t=e.getDay();return t>=4||0===t?rF(e):rF.ceil(e)}function mz(e,t){return e=hz(e),MF(rF.count(yF(e),e)+(4===yF(e).getDay()),t,2)}function yz(e){return e.getDay()}function gz(e,t){return MF(eF.count(yF(e)-1,e),t,2)}function vz(e,t){return MF(e.getFullYear()%100,t,2)}function bz(e,t){return MF((e=hz(e)).getFullYear()%100,t,2)}function xz(e,t){return MF(e.getFullYear()%1e4,t,4)}function wz(e,t){var n=e.getDay();return MF((e=n>=4||0===n?rF(e):rF.ceil(e)).getFullYear()%1e4,t,4)}function _z(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+MF(t/60|0,"0",2)+MF(t%60,"0",2)}function Sz(e,t){return MF(e.getUTCDate(),t,2)}function kz(e,t){return MF(e.getUTCHours(),t,2)}function Ez(e,t){return MF(e.getUTCHours()%12||12,t,2)}function Oz(e,t){return MF(1+GL.count(gF(e),e),t,3)}function jz(e,t){return MF(e.getUTCMilliseconds(),t,3)}function Pz(e,t){return jz(e,t)+"000"}function Cz(e,t){return MF(e.getUTCMonth()+1,t,2)}function Tz(e,t){return MF(e.getUTCMinutes(),t,2)}function Az(e,t){return MF(e.getUTCSeconds(),t,2)}function Nz(e){var t=e.getUTCDay();return 0===t?7:t}function Mz(e,t){return MF(sF.count(gF(e)-1,e),t,2)}function Dz(e){var t=e.getUTCDay();return t>=4||0===t?dF(e):dF.ceil(e)}function Iz(e,t){return e=Dz(e),MF(dF.count(gF(e),e)+(4===gF(e).getUTCDay()),t,2)}function Rz(e){return e.getUTCDay()}function Lz(e,t){return MF(lF.count(gF(e)-1,e),t,2)}function Fz(e,t){return MF(e.getUTCFullYear()%100,t,2)}function zz(e,t){return MF((e=Dz(e)).getUTCFullYear()%100,t,2)}function Bz(e,t){return MF(e.getUTCFullYear()%1e4,t,4)}function Wz(e,t){var n=e.getUTCDay();return MF((e=n>=4||0===n?dF(e):dF.ceil(e)).getUTCFullYear()%1e4,t,4)}function Vz(){return"+0000"}function Uz(){return"%"}function $z(e){return+e}function Hz(e){return Math.floor(+e/1e3)}function qz(e){return new Date(e)}function Kz(e){return e instanceof Date?+e:+new Date(+e)}function Yz(e,t,n,r,o,i,a,s,l,c){var u=JR(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),g=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?y:r(e)<e?o(e)<e?g:v:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,Kz)):f().map(qz)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?f(yL(n,e)):u},u.copy=function(){return GR(u,Yz(e,t,n,r,o,i,a,s,l,c))},u}function Xz(){var e,t,n,r,o,i=0,a=1,s=qR,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(VR),c.rangeRound=u(UR),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}function Gz(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Zz(){var e=TL(Xz());return e.copy=function(){return Gz(e,Zz()).exponent(e.exponent())},HI.apply(e,arguments)}function Jz(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=qR,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=VR);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(VR),p.rangeRound=h(UR),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function Qz(){var e=TL(Jz());return e.copy=function(){return Gz(e,Qz()).exponent(e.exponent())},HI.apply(e,arguments)}OF=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=IF(o),u=RF(o),d=IF(i),f=RF(i),p=IF(a),h=RF(a),m=IF(s),y=RF(s),g=IF(l),v=RF(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:rz,e:rz,f:lz,g:bz,G:wz,H:oz,I:iz,j:az,L:sz,m:cz,M:uz,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:$z,s:Hz,S:dz,u:fz,U:pz,V:mz,w:yz,W:gz,x:null,X:null,y:vz,Y:xz,Z:_z,"%":Uz},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Sz,e:Sz,f:Pz,g:zz,G:Wz,H:kz,I:Ez,j:Oz,L:jz,m:Cz,M:Tz,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:$z,s:Hz,S:Az,u:Nz,U:Mz,V:Iz,w:Rz,W:Lz,x:null,X:null,y:Fz,Y:Bz,Z:Vz,"%":Uz},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:KF,e:KF,f:QF,g:UF,G:VF,H:XF,I:XF,j:YF,L:JF,m:qF,M:GF,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:HF,Q:tz,s:nz,S:ZF,u:FF,U:zF,V:BF,w:LF,W:WF,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:UF,Y:VF,Z:$F,"%":ez};function _(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=CF[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,o,i=EF(1900,void 0,1);if(k(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=kF(EF(i.y,0,1))).getUTCDay(),r=o>4||0===o?lF.ceil(r):lF(r),r=GL.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=SF(EF(i.y,0,1))).getDay(),r=o>4||0===o?eF.ceil(r):eF(r),r=XL.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?kF(EF(i.y,0,1)).getUTCDay():SF(EF(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,kF(i)):SF(i)}}function k(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in CF?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),x.x=_(n,x),x.X=_(r,x),x.c=_(t,x),{format:function(e){var t=_(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}({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"]}),jF=OF.format,OF.parse,PF=OF.utcFormat,OF.utcParse;const eB=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:YI,scaleDiverging:function e(){var t=hL(Jz()(qR));return t.copy=function(){return Gz(t,e())},HI.apply(t,arguments)},scaleDivergingLog:function e(){var t=SL(Jz()).domain([.1,1,10]);return t.copy=function(){return Gz(t,e()).base(t.base())},HI.apply(t,arguments)},scaleDivergingPow:Qz,scaleDivergingSqrt:function(){return Qz.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=OL(Jz());return t.copy=function(){return Gz(t,e()).constant(t.constant())},HI.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,$R),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,$R):[0,1],hL(r)},scaleImplicit:qI,scaleLinear:mL,scaleLog:function e(){const t=SL(ZR()).domain([1,10]);return t.copy=()=>GR(t,e()).base(t.base()),$I.apply(t,arguments),t},scaleOrdinal:KI,scalePoint:GI,scalePow:AL,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=UI(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[jI(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null!=t&&!isNaN(t=+t)&&n.push(t);return n.sort(_I),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},$I.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[jI(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length&&(t=e),s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},$I.apply(hL(s),arguments)},scaleRadial:function e(){var t,n=JR(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(NL(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,$R)).map(NL)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},$I.apply(i,arguments),hL(i)},scaleSequential:function e(){var t=hL(Xz()(qR));return t.copy=function(){return Gz(t,e())},HI.apply(t,arguments)},scaleSequentialLog:function e(){var t=SL(Xz()).domain([1,10]);return t.copy=function(){return Gz(t,e()).base(t.base())},HI.apply(t,arguments)},scaleSequentialPow:Zz,scaleSequentialQuantile:function e(){var t=[],n=qR;function r(e){if(null!=e&&!isNaN(e=+e))return n((jI(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null!=n&&!isNaN(n=+n)&&t.push(n);return t.sort(_I),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>function(e,t){if(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e)),(n=e.length)&&!isNaN(t=+t)){if(t<=0||n<2)return BI(e);if(t>=1)return zI(e);var n,r=(n-1)*t,o=Math.floor(r),i=zI(WI(e,o).subarray(0,o+1));return i+(BI(e.subarray(o+1))-i)*(r-o)}}(t,r/e)))},r.copy=function(){return e(n).domain(t)},HI.apply(r,arguments)},scaleSequentialSqrt:function(){return Zz.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=OL(Xz());return t.copy=function(){return Gz(t,e()).constant(t.constant())},HI.apply(t,arguments)},scaleSqrt:function(){return AL.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=OL(ZR());return t.copy=function(){return GR(t,e()).constant(t.constant())},$I.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[jI(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},$I.apply(i,arguments)},scaleTime:function(){return $I.apply(Yz(wF,_F,yF,hF,QL,XL,KL,HL,$L,jF).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return $I.apply(Yz(bF,xF,gF,mF,sF,GL,YL,qL,$L,PF).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:pL},Symbol.toStringTag,{value:"Module"}));var tB=vk,nB=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!tB(a):n(a,s)))var s=a,l=i}return l},rB=function(e,t){return e>t},oB=nB,iB=rB,aB=nN,sB=function(e){return e&&e.length?oB(e,aB,iB):void 0};const lB=B(sB);var cB=function(e,t){return e<t},uB=nB,dB=cB,fB=nN,pB=function(e){return e&&e.length?uB(e,fB,dB):void 0};const hB=B(pB);var mB=KE,yB=pN,gB=rM,vB=QS,bB=XN,xB=function(e,t){return(vB(e)?mB:gB)(e,yB(t))},wB=function(e,t){return bB(xB(e,t),1)};const _B=B(wB);var SB=TA,kB=function(e,t){return SB(e,t)};const EB=B(kB);var OB,jB=1e9,PB=!0,CB="[DecimalError] ",TB=CB+"Invalid argument: ",AB=CB+"Exponent out of range: ",NB=Math.floor,MB=Math.pow,DB=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,IB=1e7,RB=9007199254740991,LB=NB(RB/7),FB={};function zB(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),PB?XB(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),i>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=l.length)-(i=c.length)<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/IB|0,l[i]%=IB;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,PB?XB(t,d):t}function BB(e,t,n){if(e!==~~e||e<t||e>n)throw Error(TB+e)}function WB(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=qB(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=qB(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}FB.absoluteValue=FB.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},FB.comparedTo=FB.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},FB.decimalPlaces=FB.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},FB.dividedBy=FB.div=function(e){return VB(this,new this.constructor(e))},FB.dividedToIntegerBy=FB.idiv=function(e){var t=this.constructor;return XB(VB(this,new t(e),0,1),t.precision)},FB.equals=FB.eq=function(e){return!this.cmp(e)},FB.exponent=function(){return $B(this)},FB.greaterThan=FB.gt=function(e){return this.cmp(e)>0},FB.greaterThanOrEqualTo=FB.gte=function(e){return this.cmp(e)>=0},FB.isInteger=FB.isint=function(){return this.e>this.d.length-2},FB.isNegative=FB.isneg=function(){return this.s<0},FB.isPositive=FB.ispos=function(){return this.s>0},FB.isZero=function(){return 0===this.s},FB.lessThan=FB.lt=function(e){return this.cmp(e)<0},FB.lessThanOrEqualTo=FB.lte=function(e){return this.cmp(e)<1},FB.logarithm=FB.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(OB))throw Error(CB+"NaN");if(n.s<1)throw Error(CB+(n.s?"NaN":"-Infinity"));return n.eq(OB)?new r(0):(PB=!1,t=VB(KB(n,i),KB(e,i),i),PB=!0,XB(t,o))},FB.minus=FB.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GB(t,e):zB(t,(e.s=-e.s,e))},FB.modulo=FB.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(CB+"NaN");return n.s?(PB=!1,t=VB(n,e,0,1).times(e),PB=!0,n.minus(t)):XB(new r(n),o)},FB.naturalExponential=FB.exp=function(){return UB(this)},FB.naturalLogarithm=FB.ln=function(){return KB(this)},FB.negated=FB.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},FB.plus=FB.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zB(t,e):GB(t,(e.s=-e.s,e))},FB.precision=FB.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(TB+e);if(t=$B(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},FB.squareRoot=FB.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(CB+"NaN")}for(e=$B(s),PB=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=WB(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=NB((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=a=(n=l.precision)+3;;)if(r=(i=r).plus(VB(s,i,a+2)).times(.5),WB(i.d).slice(0,a)===(t=WB(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(XB(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if("9999"!=t)break;a+=4}return PB=!0,XB(r,n)},FB.times=FB.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(i=f,f=p,p=i,a=l,l=c,c=a),i=[],r=a=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%IB|0,t=s/IB|0;i[o]=(i[o]+t)%IB|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,PB?XB(e,d.precision):e},FB.toDecimalPlaces=FB.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(BB(e,0,jB),void 0===t?t=r.rounding:BB(t,0,8),XB(n,e+$B(n)+1,t))},FB.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=ZB(r,!0):(BB(e,0,jB),void 0===t?t=o.rounding:BB(t,0,8),n=ZB(r=XB(new o(r),e+1,t),!0,e+1)),n},FB.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?ZB(o):(BB(e,0,jB),void 0===t?t=i.rounding:BB(t,0,8),n=ZB((r=XB(new i(o),e+$B(o)+1,t)).abs(),!1,e+$B(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},FB.toInteger=FB.toint=function(){var e=this,t=e.constructor;return XB(new t(e),$B(e)+1,t.rounding)},FB.toNumber=function(){return+this},FB.toPower=FB.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(OB);if(!(s=new l(s)).s){if(e.s<1)throw Error(CB+"Infinity");return s}if(s.eq(OB))return s;if(r=l.precision,e.eq(OB))return XB(s,r);if(a=(t=e.e)>=(n=e.d.length-1),i=s.s,a){if((n=c<0?-c:c)<=RB){for(o=new l(OB),t=Math.ceil(r/7+4),PB=!1;n%2&&JB((o=o.times(s)).d,t),0!==(n=NB(n/2));)JB((s=s.times(s)).d,t);return PB=!0,e.s<0?new l(OB).div(o):XB(o,r)}}else if(i<0)throw Error(CB+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,PB=!1,o=e.times(KB(s,r+12)),PB=!0,(o=UB(o)).s=i,o},FB.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=ZB(o,(n=$B(o))<=i.toExpNeg||n>=i.toExpPos):(BB(e,1,jB),void 0===t?t=i.rounding:BB(t,0,8),r=ZB(o=XB(new i(o),e,t),e<=(n=$B(o))||n<=i.toExpNeg,e)),r},FB.toSignificantDigits=FB.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(BB(e,1,jB),void 0===t?t=n.rounding:BB(t,0,8)),XB(new n(this),e,t)},FB.toString=FB.valueOf=FB.val=FB.toJSON=FB[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=$B(e),n=e.constructor;return ZB(e,t<=n.toExpNeg||t>=n.toExpPos)};var VB=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%IB|0,r=n/IB|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*IB+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,y,g,v,b,x,w,_,S,k,E=r.constructor,O=r.s==o.s?1:-1,j=r.d,P=o.d;if(!r.s)return new E(r);if(!o.s)throw Error(CB+"Division by zero");for(l=r.e-o.e,S=P.length,w=j.length,h=(p=new E(O)).d=[],c=0;P[c]==(j[c]||0);)++c;if(P[c]>(j[c]||0)&&--l,(v=null==i?i=E.precision:a?i+($B(r)-$B(o))+1:i)<0)return new E(0);if(v=v/7+2|0,c=0,1==S)for(u=0,P=P[0],v++;(c<w||u)&&v--;c++)b=u*IB+(j[c]||0),h[c]=b/P|0,u=b%P|0;else{for((u=IB/(P[0]+1)|0)>1&&(P=e(P,u),j=e(j,u),S=P.length,w=j.length),x=S,y=(m=j.slice(0,S)).length;y<S;)m[y++]=0;(k=P.slice()).unshift(0),_=P[0],P[1]>=IB/2&&++_;do{u=0,(s=t(P,m,S,y))<0?(g=m[0],S!=y&&(g=g*IB+(m[1]||0)),(u=g/_|0)>1?(u>=IB&&(u=IB-1),1==(s=t(d=e(P,u),m,f=d.length,y=m.length))&&(u--,n(d,S<f?k:P,f))):(0==u&&(s=u=1),d=P.slice()),(f=d.length)<y&&d.unshift(0),n(m,d,y),-1==s&&(s=t(P,m,S,y=m.length))<1&&(u++,n(m,S<y?k:P,y)),y=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[y++]=j[x]||0:(m=[j[x]],y=1)}while((x++<w||void 0!==m[0])&&v--)}return h[0]||h.shift(),p.e=l,XB(p,a?i+$B(p)+1:i)}}();function UB(e,t){var n,r,o,i,a,s=0,l=0,c=e.constructor,u=c.precision;if($B(e)>16)throw Error(AB+$B(e));if(!e.s)return new c(OB);for(null==t?(PB=!1,a=u):a=t,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(a+=Math.log(MB(2,l))/Math.LN10*2+5|0,n=r=o=new c(OB),c.precision=a;;){if(r=XB(r.times(e),a),n=n.times(++s),WB((i=o.plus(VB(r,n,a))).d).slice(0,a)===WB(o.d).slice(0,a)){for(;l--;)o=XB(o.times(o),a);return c.precision=u,null==t?(PB=!0,XB(o,u)):o}o=i}}function $B(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function HB(e,t,n){if(t>e.LN10.sd())throw PB=!0,n&&(e.precision=n),Error(CB+"LN10 precision limit exceeded");return XB(new e(e.LN10),t)}function qB(e){for(var t="";e--;)t+="0";return t}function KB(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error(CB+(f.s?"NaN":"-Infinity"));if(f.eq(OB))return new h(0);if(null==t?(PB=!1,c=m):c=t,f.eq(10))return null==t&&(PB=!0),HB(h,c);if(c+=10,h.precision=c,r=(n=WB(p)).charAt(0),i=$B(f),!(Math.abs(i)<15e14))return l=HB(h,c+2,m).times(i+""),f=KB(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(PB=!0,XB(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=WB((f=f.times(e)).d)).charAt(0),d++;for(i=$B(f),r>1?(f=new h("0."+n),i++):f=new h(r+"."+n.slice(1)),s=a=f=VB(f.minus(OB),f.plus(OB),c),u=XB(f.times(f),c),o=3;;){if(a=XB(a.times(u),c),WB((l=s.plus(VB(a,new h(o),c))).d).slice(0,c)===WB(s.d).slice(0,c))return s=s.times(2),0!==i&&(s=s.plus(HB(h,c+2,m).times(i+""))),s=VB(s,new h(d),c),h.precision=m,null==t?(PB=!0,XB(s,m)):s;s=l,o+=2}}function YB(e,t){var n,r,o;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;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=NB(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),PB&&(e.e>LB||e.e<-LB))throw Error(AB+n)}else e.s=0,e.e=0,e.d=[0];return e}function XB(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=d.length))return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(s=c/(i=MB(10,a-o-1))%10|0,l=t<0||void 0!==d[u+1]||c%i,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/MB(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=$B(e),d.length=1,t=t-i-1,d[0]=MB(10,(7-t%7)%7),e.e=NB(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,i=1,u--):(d.length=u+1,i=MB(10,7-r),d[u]=o>0?(c/MB(10,a-o)%MB(10,o)|0)*i:0),l)for(;;){if(0==u){(d[0]+=i)==IB&&(d[0]=1,++e.e);break}if(d[u]+=i,d[u]!=IB)break;d[u--]=0,i=1}for(r=d.length;0===d[--r];)d.pop();if(PB&&(e.e>LB||e.e<-LB))throw Error(AB+$B(e));return e}function GB(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),PB?XB(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),a>(o=Math.max(Math.ceil(p/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=d.length))&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&0===l[--i];)l[i]=IB-1;--l[i],l[o]+=IB}l[o]-=d[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,PB?XB(t,p):t):new f(0)}function ZB(e,t,n){var r,o=$B(e),i=WB(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+qB(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+qB(-o-1)+i,n&&(r=n-a)>0&&(i+=qB(r))):o>=a?(i+=qB(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+qB(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=qB(r))),e.s<0?"-"+i:i}function JB(e,t){if(e.length>t)return e.length=t,!0}function QB(e){if(!e||"object"!=typeof e)throw Error(CB+"Object expected");var t,n,r,o=["precision",1,jB,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(NB(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(TB+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(TB+n+": "+r);this[n]=new this(r)}return this}var eW=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(TB+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):YB(t,e.toString())}if("string"!=typeof e)throw Error(TB+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!DB.test(e))throw Error(TB+e);YB(t,e)}if(i.prototype=FB,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=e,i.config=i.set=QB,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});OB=new eW(1);const tW=eW;function nW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rW=function(e){return e},oW={"@@functional/placeholder":!0},iW=function(e){return e===oW},aW=function(e){return function t(){return 0===arguments.length||1===arguments.length&&iW(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},sW=function e(t,n){return 1===t?n:aW((function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter((function(e){return e!==oW})).length;return a>=t?n.apply(void 0,o):e(t-a,aW((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.map((function(e){return iW(e)?t.shift():e}));return n.apply(void 0,function(e){return function(e){if(Array.isArray(e))return nW(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return nW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i).concat(t))})))}))},lW=function(e){return sW(e.length,e)},cW=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},uW=lW((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),dW=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},fW=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t&&o.every((function(e,n){return e===t[n]}))||(t=o,n=e.apply(void 0,o)),n}};lW((function(e,t,n){var r=+e;return r+n*(+t-r)})),lW((function(e,t,n){var r=t-+e;return(n-e)/(r||1/0)})),lW((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))}));const pW=function(e,t,n){for(var r=new tW(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i},hW=function(e){return 0===e?1:Math.floor(new tW(e).abs().log(10).toNumber())+1};function mW(e){return function(e){if(Array.isArray(e))return vW(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||gW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&null!=s.return&&s.return()}finally{if(o)throw i}}return n}}(e,t)||gW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gW(e,t){if(e){if("string"==typeof e)return vW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vW(e,t)}}function vW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bW(e){var t=yW(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function xW(e,t,n){if(e.lte(0))return new tW(0);var r=hW(e.toNumber()),o=new tW(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new tW(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?s:new tW(Math.ceil(s))}function wW(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new tW(0),tickMin:new tW(0),tickMax:new tW(0)};var i,a=xW(new tW(t).sub(e).div(n-1),r,o);i=e<=0&&t>=0?new tW(0):(i=new tW(e).add(t).div(2)).sub(new tW(i).mod(a));var s=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new tW(t).sub(i).div(a).toNumber()),c=s+l+1;return c>n?wW(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:i.sub(new tW(s).mul(a)),tickMax:i.add(new tW(l).mul(a))})}var _W=fW((function(e){var t=yW(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(o,2),s=yW(bW([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(mW(cW(0,o-1).map((function(){return 1/0})))):[].concat(mW(cW(0,o-1).map((function(){return-1/0}))),[c]);return n>r?dW(u):u}if(l===c)return function(e,t,n){var r=1,o=new tW(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new tW(10).pow(hW(e)-1),o=new tW(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new tW(Math.floor(e)))}else 0===e?o=new tW(Math.floor((t-1)/2)):n||(o=new tW(Math.floor(e)));var a=Math.floor((t-1)/2),s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return rW;var r=t.reverse(),o=r[0],i=r.slice(1);return function(){return i.reduce((function(e,t){return t(e)}),o.apply(void 0,arguments))}}(uW((function(e){return o.add(new tW(e-a).mul(r)).toNumber()})),cW);return s(0,t)}(l,o,i);var d=wW(l,c,a,i),f=d.step,p=d.tickMin,h=d.tickMax,m=pW(p,h.add(new tW(.1).mul(f)),f);return n>r?dW(m):m})),SW=fW((function(e,t){var n=yW(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=yW(bW([r,o]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var c=Math.max(t,2),u=xW(new tW(l).sub(s).div(c-1),i,0),d=[].concat(mW(pW(new tW(s),new tW(l).sub(new tW(.99).mul(u)),u)),[l]);return r>o?dW(d):d}));function kW(e,t){throw new Error("Invariant failed")}var EW=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function OW(e){return OW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OW(e)}function jW(){return jW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jW.apply(this,arguments)}function PW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function CW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(CW=function(){return!!e})()}function TW(e){return TW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},TW(e)}function AW(e,t){return(AW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function NW(e,t,n){return(t=MW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MW(e){var t=function(e){if("object"!=OW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=OW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==OW(t)?t:t+""}var DW=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=TW(t),function(e,t){if(t&&("object"===OW(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,CW()?Reflect.construct(t,n||[],TW(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AW(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MW(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,o=e.dataKey,i=e.data,a=e.dataPointFormatter,l=e.xAxis,c=e.yAxis,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,EW),d=uj(u,!1);"x"===this.props.direction&&"number"!==l.type&&kW();var f=i.map((function(e){var i=a(e,o),u=i.x,f=i.y,p=i.value,h=i.errorVal;if(!h)return null;var m,y,g=[];if(Array.isArray(h)){var v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return PW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PW(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2);m=v[0],y=v[1]}else m=y=h;if("vertical"===n){var b=l.scale,x=f+t,w=x+r,_=x-r,S=b(p-m),k=b(p+y);g.push({x1:k,y1:w,x2:k,y2:_}),g.push({x1:S,y1:x,x2:k,y2:x}),g.push({x1:S,y1:w,x2:S,y2:_})}else if("horizontal"===n){var E=c.scale,O=u+t,j=O-r,P=O+r,C=E(p-m),T=E(p+y);g.push({x1:j,y1:T,x2:P,y2:T}),g.push({x1:O,y1:C,x2:O,y2:T}),g.push({x1:j,y1:C,x2:P,y2:C})}return s.createElement(xj,jW({className:"recharts-errorBar",key:"bar-".concat(g.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},d),g.map((function(e){return s.createElement("line",jW({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return s.createElement(xj,{className:"recharts-errorBars"},f)}}])}(s.Component);function IW(e){return IW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IW(e)}function RW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function LW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RW(Object(n),!0).forEach((function(t){FW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FW(e,t,n){return t=function(e){var t=function(e){if("object"!=IW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=IW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==IW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}NW(DW,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),NW(DW,"displayName","ErrorBar");var zW=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,o=e.legendContent,i=aj(t,UN);if(!i)return null;var a,s=UN.defaultProps,l=void 0!==s?LW(LW({},s),i.props):{};return a=i.props&&i.props.payload?i.props&&i.props.payload:"children"===o?(n||[]).reduce((function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map((function(e){return{type:i.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?LW(LW({},n),t.props):{},o=r.dataKey,i=r.name,a=r.legendType;return{inactive:r.hide,dataKey:o,type:l.iconType||a||"square",color:YW(t),value:i||o,payload:r}})),LW(LW(LW({},l),UN.getWithHeight(i,r)),{},{payload:a,item:i})};function BW(e){return BW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BW(e)}function WW(e){return function(e){if(Array.isArray(e))return VW(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return VW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function UW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UW(Object(n),!0).forEach((function(t){HW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function HW(e,t,n){return t=function(e){var t=function(e){if("object"!=BW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qW(e,t,n){return mO(e)||mO(t)?n:IO(t)?pO(e,t,n):Ck(t)?t(e):n}function KW(e,t,n,r){var o=_B(e,(function(e){return qW(e,t)}));if("number"===n){var i=o.filter((function(e){return DO(e)||parseFloat(e)}));return i.length?[hB(i),lB(i)]:[1/0,-1/0]}var a=r?o.filter((function(e){return!mO(e)})):o;return a.map((function(e){return IO(e)||e instanceof Date?e:""}))}var YW=function(e){var t,n,r=e.type.displayName,o=null!==(t=e.type)&&void 0!==t&&t.defaultProps?$W($W({},e.type.defaultProps),e.props):e.props,i=o.stroke,a=o.fill;switch(r){case"Line":n=i;break;case"Area":case"Radar":n=i&&"none"!==i?i:a;break;default:n=a}return n},XW=function(e,t,n,r,o){var i=ij(t.props.children,DW).filter((function(e){return function(e,t,n){return!!mO(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,o,e.props.direction)}));if(i&&i.length){var a=i.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=qW(t,n);if(mO(r))return e;var o=Array.isArray(r)?[hB(r),lB(r)]:[r,r],i=a.reduce((function(e,n){var r=qW(t,n,0),i=o[0]-Math.abs(Array.isArray(r)?r[0]:r),a=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]}),[1/0,-1/0])}return null},GW=function(e,t,n,r,o){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&XW(e,t,i,r)||KW(e,i,n,o)}));if("number"===n)return i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return i.reduce((function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e}),[])},ZW=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},JW=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,i=e.type,a=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/s:0;if(l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*NO(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)){var c=(e.ticks||e.niceTicks).map((function(e){var t=o?o.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}));return c.filter((function(e){return!AO(e.coordinate)}))}return e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}})):r.ticks&&!n?r.ticks(e.tickCount).map((function(e){return{coordinate:r(e)+l,value:e,offset:l}})):r.domain().map((function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}}))},QW=new WeakMap,eV=function(e,t){if("function"!=typeof t)return e;QW.has(e)||QW.set(e,new WeakMap);var n=QW.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},tV=function(e,t,n){var r=e.scale,o=e.type,i=e.layout,a=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===a?{scale:YI(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:mL(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:GI(),realScaleType:"point"}:"category"===o?{scale:YI(),realScaleType:"band"}:{scale:mL(),realScaleType:"linear"};if(xO(r)){var s="scale".concat($j(r));return{scale:(eB[s]||GI)(),realScaleType:eB[s]?s:"point"}}return Ck(r)?{scale:r}:{scale:GI(),realScaleType:"point"}},nV=1e-4,rV=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-nV,i=Math.max(r[0],r[1])+nV,a=e(t[0]),s=e(t[n-1]);(a<o||a>i||s<o||s>i)&&e.domain([t[0],t[n-1]])}},oV={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0,a=0;a<t;++a){var s=AO(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}HP(e,t)}},none:HP,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}HP(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,HP(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0;i<t;++i){var a=AO(e[i][n][1])?e[i][n][0]:e[i][n][1];a>=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},iV=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),o=oV[n],i=function(){var e=Hj([]),t=qP,n=HP,r=KP;function o(o){var i,a,s=Array.from(e.apply(this,arguments),YP),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=oP(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:Hj(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:Hj(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?qP:"function"==typeof e?e:Hj(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=e??HP,o):n},o}().keys(r).value((function(e,t){return+qW(e,t,0)})).order(qP).offset(o);return i(e)},aV=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,i=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var l=e.domain();if(!l.length)return null;var c=_W(l,o,a);return e.domain([hB(c),lB(c)]),{niceTicks:c}}if(o&&"number"===r){var u=e.domain();return{niceTicks:SW(u,o,a)}}return null};function sV(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!mO(o[t.dataKey])){var s=WO(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=qW(o,mO(a)?t.dataKey:a);return mO(l)?null:t.scale(l)}var lV=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=qW(i,t.dataKey,t.domain[a]);return mO(s)?null:t.scale(s)-o/2+r},cV=function(e,t,n){return Object.keys(e).reduce((function(r,o){var i=e[o].stackedData.reduce((function(e,r){var o=function(e){return e.reduce((function(e,t){return[hB(t.concat([e[0]]).filter(DO)),lB(t.concat([e[1]]).filter(DO))]}),[1/0,-1/0])}(r.slice(t,n+1));return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]}),[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},uV=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dV=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fV=function(e,t,n){if(Ck(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(DO(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(uV.test(e[0])){var o=+uV.exec(e[0])[1];r[0]=t[0]-o}else Ck(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(DO(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(dV.test(e[1])){var i=+dV.exec(e[1])[1];r[1]=t[1]+i}else Ck(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},pV=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=FM(t,(function(e){return e.coordinate})),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min((l.coordinate||0)-(c.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},hV=function(e,t,n){return e&&e.length&&!EB(e,pO(n,"type.defaultProps.domain"))?e:t},mV=function(e,t){var n=e.type.defaultProps?$W($W({},e.type.defaultProps),e.props):e.props,r=n.dataKey,o=n.name,i=n.unit,a=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return $W($W({},uj(e,!1)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:YW(e),value:qW(t,r),type:s,payload:t,chartType:l,hide:c})};function yV(e){return yV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yV(e)}function gV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gV(Object(n),!0).forEach((function(t){bV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bV(e,t,n){return t=function(e){var t=function(e){if("object"!=yV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wV=Math.PI/180,_V=function(e){return 180*e/Math.PI},SV=function(e,t,n,r){return{x:e+Math.cos(-wV*r)*n,y:t+Math.sin(-wV*r)*n}},kV=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},EV=function(e,t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},OV=function(e,t){var n=function(e,t){var n=e.x,r=e.y,o=t.cx,i=t.cy,a=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(r-i,2))}({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:_V(l),angleInRadian:l}}({x:e.x,y:e.y},t),r=n.radius,o=n.angle,i=t.innerRadius,a=t.outerRadius;if(r<i||r>a)return!1;if(0===r)return!0;var s,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}}(t),c=l.startAngle,u=l.endAngle,d=o;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;s=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;s=d>=u&&d<=c}return s?vV(vV({},t),{},{radius:r,angle:EV(d,t)}):null},jV=function(e){return(0,s.isValidElement)(e)||Ck(e)||"boolean"==typeof e?"":e.className};function PV(e){return PV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PV(e)}var CV=["offset"];function TV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function AV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function NV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AV(Object(n),!0).forEach((function(t){MV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function MV(e,t,n){return t=function(e){var t=function(e){if("object"!=PV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=PV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==PV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DV(){return DV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DV.apply(this,arguments)}function IV(e){var t,n=e.offset,r=NV({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,CV)),o=r.viewBox,i=r.position,a=r.value,l=r.children,c=r.content,u=r.className,d=void 0===u?"":u,f=r.textBreakAll;if(!o||mO(a)&&mO(l)&&!(0,s.isValidElement)(c)&&!Ck(c))return null;if((0,s.isValidElement)(c))return(0,s.cloneElement)(c,r);if(Ck(c)){if(t=(0,s.createElement)(c,r),(0,s.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=mO(e.children)?t:e.children;return Ck(n)?n(r):r}(r);var p=function(e){return"cx"in e&&DO(e.cx)}(o),h=uj(r,!0);if(p&&("insideStart"===i||"insideEnd"===i||"end"===i))return function(e,t,n){var r,o,i=e.position,a=e.viewBox,l=e.offset,c=e.className,u=a,d=u.cx,f=u.cy,p=u.innerRadius,h=u.outerRadius,m=u.startAngle,y=u.endAngle,g=u.clockWise,v=(p+h)/2,b=function(e,t){return NO(t-e)*Math.min(Math.abs(t-e),360)}(m,y),x=b>=0?1:-1;"insideStart"===i?(r=m+x*l,o=g):"insideEnd"===i?(r=y-x*l,o=!g):"end"===i&&(r=y+x*l,o=g),o=b<=0?o:!o;var w=SV(d,f,v,r),_=SV(d,f,v,r+359*(o?1:-1)),S="M".concat(w.x,",").concat(w.y,"\n A").concat(v,",").concat(v,",0,1,").concat(o?0:1,",\n ").concat(_.x,",").concat(_.y),k=mO(e.id)?LO("recharts-radial-line-"):e.id;return s.createElement("text",DV({},n,{dominantBaseline:"central",className:Ve("recharts-radial-bar-label",c)}),s.createElement("defs",null,s.createElement("path",{id:k,d:S})),s.createElement("textPath",{xlinkHref:"#".concat(k)},t))}(r,t,h);var m=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t,i=o.cx,a=o.cy,s=o.innerRadius,l=o.outerRadius,c=(o.startAngle+o.endAngle)/2;if("outside"===r){var u=SV(i,a,l+n,c),d=u.x;return{x:d,y:u.y,textAnchor:d>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"end"};var f=SV(i,a,(s+l)/2,c);return{x:f.x,y:f.y,textAnchor:"middle",verticalAnchor:"middle"}}(r):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t,a=i.x,s=i.y,l=i.width,c=i.height,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",h=l>=0?1:-1,m=h*r,y=h>0?"end":"start",g=h>0?"start":"end";if("top"===o)return NV(NV({},{x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===o)return NV(NV({},{x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===o){var v={x:a-m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"};return NV(NV({},v),n?{width:Math.max(v.x-n.x,0),height:c}:{})}if("right"===o){var b={x:a+l+m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return NV(NV({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:c}:{})}var x=n?{width:l,height:c}:{};return"insideLeft"===o?NV({x:a+m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},x):"insideRight"===o?NV({x:a+l-m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"},x):"insideTop"===o?NV({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},x):"insideBottom"===o?NV({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},x):"insideTopLeft"===o?NV({x:a+m,y:s+d,textAnchor:g,verticalAnchor:p},x):"insideTopRight"===o?NV({x:a+l-m,y:s+d,textAnchor:y,verticalAnchor:p},x):"insideBottomLeft"===o?NV({x:a+m,y:s+c-d,textAnchor:g,verticalAnchor:f},x):"insideBottomRight"===o?NV({x:a+l-m,y:s+c-d,textAnchor:y,verticalAnchor:f},x):Ek(o)&&(DO(o.x)||MO(o.x))&&(DO(o.y)||MO(o.y))?NV({x:a+FO(o.x,l),y:s+FO(o.y,c),textAnchor:"end",verticalAnchor:"end"},x):NV({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(r);return s.createElement(wI,DV({className:Ve("recharts-label",d)},h,m,{breakAll:f}),t)}IV.displayName="Label";var RV=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,h=e.width,m=e.height,y=e.clockWise,g=e.labelViewBox;if(g)return g;if(DO(h)&&DO(m)){if(DO(u)&&DO(d))return{x:u,y:d,width:h,height:m};if(DO(f)&&DO(p))return{x:f,y:p,width:h,height:m}}return DO(u)&&DO(d)?{x:u,y:d,width:0,height:0}:DO(t)&&DO(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:y}:e.viewBox?e.viewBox:{}};IV.parseViewBox=RV,IV.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=RV(e),i=ij(r,IV).map((function(e,n){return(0,s.cloneElement)(e,{viewBox:t||o,key:"label-".concat(n)})}));if(!n)return i;var a=function(e,t){return e?!0===e?s.createElement(IV,{key:"label-implicit",viewBox:t}):IO(e)?s.createElement(IV,{key:"label-implicit",viewBox:t,value:e}):(0,s.isValidElement)(e)?e.type===IV?(0,s.cloneElement)(e,{key:"label-implicit",viewBox:t}):s.createElement(IV,{key:"label-implicit",content:e,viewBox:t}):Ck(e)?s.createElement(IV,{key:"label-implicit",content:e,viewBox:t}):Ek(e)?s.createElement(IV,DV({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||o);return[a].concat(function(e){return function(e){if(Array.isArray(e))return TV(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return TV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TV(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i))};var LV=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const FV=B(LV);function zV(e){return zV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zV(e)}var BV=["valueAccessor"],WV=["data","dataKey","clockWise","id","textBreakAll"];function VV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function UV(){return UV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UV.apply(this,arguments)}function $V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function HV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$V(Object(n),!0).forEach((function(t){qV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qV(e,t,n){return t=function(e){var t=function(e){if("object"!=zV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=zV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KV(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var YV=function(e){return Array.isArray(e.value)?FV(e.value):e.value};function XV(e){var t=e.valueAccessor,n=void 0===t?YV:t,r=KV(e,BV),o=r.data,i=r.dataKey,a=r.clockWise,l=r.id,c=r.textBreakAll,u=KV(r,WV);return o&&o.length?s.createElement(xj,{className:"recharts-label-list"},o.map((function(e,t){var r=mO(i)?n(e,t):qW(e&&e.payload,i),o=mO(l)?{}:{id:"".concat(l,"-").concat(t)};return s.createElement(IV,UV({},uj(e,!0),u,o,{parentViewBox:e.parentViewBox,value:r,textBreakAll:c,viewBox:IV.parseViewBox(mO(a)?e:HV(HV({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}function GV(e){return GV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},GV(e)}function ZV(){return ZV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZV.apply(this,arguments)}function JV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JV(Object(n),!0).forEach((function(t){eU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eU(e,t,n){return t=function(e){var t=function(e){if("object"!=GV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}XV.displayName="LabelList",XV.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=ij(e.children,XV).map((function(e,n){return(0,s.cloneElement)(e,{data:t,key:"labelList-".concat(n)})}));if(!n)return r;var o=function(e,t){return e?!0===e?s.createElement(XV,{key:"labelList-implicit",data:t}):s.isValidElement(e)||Ck(e)?s.createElement(XV,{key:"labelList-implicit",data:t,content:e}):Ek(e)?s.createElement(XV,UV({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[o].concat(function(e){return function(e){if(Array.isArray(e))return VV(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return VV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VV(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r))};var tU=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+r,u=Math.asin(s/c)/wV,d=l?o:o+i*u,f=l?o-i*u:o;return{center:SV(t,n,c,d),circleTangency:SV(t,n,r,d),lineTangency:SV(t,n,c*Math.cos(u*wV),f),theta:u}},nU=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=function(e,t){return NO(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),s=i+a,l=SV(t,n,o,i),c=SV(t,n,o,s),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i>s),",\n ").concat(c.x,",").concat(c.y,"\n ");if(r>0){var d=SV(t,n,r,i),f=SV(t,n,r,s);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i<=s),",\n ").concat(d.x,",").concat(d.y," Z")}else u+="L ".concat(t,",").concat(n," Z");return u},rU={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},oU=function(e){var t=QV(QV({},rU),e),n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=t.className;if(i<o||u===d)return null;var p,h=Ve("recharts-sector",f),m=i-o,y=FO(a,m,0,!0);return p=y>0&&Math.abs(u-d)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=NO(c-l),d=tU({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,h=d.theta,m=tU({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),y=m.circleTangency,g=m.lineTangency,v=m.theta,b=s?Math.abs(l-c):Math.abs(l-c)-h-v;if(b<0)return a?"M ".concat(p.x,",").concat(p.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):nU({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(o,",").concat(o,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n ");if(r>0){var w=tU({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),_=w.circleTangency,S=w.lineTangency,k=w.theta,E=tU({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),O=E.circleTangency,j=E.lineTangency,P=E.theta,C=s?Math.abs(l-c):Math.abs(l-c)-k-P;if(C<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(j.x,",").concat(j.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(O.x,",").concat(O.y,"\n A").concat(r,",").concat(r,",0,").concat(+(C>180),",").concat(+(u>0),",").concat(_.x,",").concat(_.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x}({cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:Math.min(y,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):nU({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:u,endAngle:d}),s.createElement("path",ZV({},uj(t,!0),{className:h,d:p,role:"img"}))};function iU(e){return iU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iU(e)}function aU(){return aU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aU.apply(this,arguments)}function sU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sU(Object(n),!0).forEach((function(t){cU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cU(e,t,n){return t=function(e){var t=function(e){if("object"!=iU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=iU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==iU(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uU,dU,fU,pU,hU={curveBasisClosed:function(e){return new NP(e)},curveBasisOpen:function(e){return new MP(e)},curveBasis:function(e){return new AP(e)},curveBumpX:function(e){return new dP(e,!0)},curveBumpY:function(e){return new dP(e,!1)},curveLinearClosed:function(e){return new DP(e)},curveLinear:aP,curveMonotoneX:function(e){return new zP(e)},curveMonotoneY:function(e){return new BP(e)},curveNatural:function(e){return new VP(e)},curveStep:function(e){return new $P(e,.5)},curveStepAfter:function(e){return new $P(e,1)},curveStepBefore:function(e){return new $P(e,0)}},mU=function(e){return e.x===+e.x&&e.y===+e.y},yU=function(e){return e.x},gU=function(e){return e.y},vU=function(e){var t=e.className,n=e.points,r=e.path,o=e.pathRef;if(!(n&&n.length||r))return null;var i=n&&n.length?function(e){var t,n=e.type,r=void 0===n?"linear":n,o=e.points,i=void 0===o?[]:o,a=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,u=function(e,t){if(Ck(e))return e;var n="curve".concat($j(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?hU[n]||aP:hU["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),d=c?i.filter((function(e){return mU(e)})):i;if(Array.isArray(a)){var f=c?a.filter((function(e){return mU(e)})):a,p=d.map((function(e,t){return lU(lU({},e),{},{base:f[t]})}));return t="vertical"===s?uP().y(gU).x1(yU).x0((function(e){return e.base.x})):uP().x(yU).y1(gU).y0((function(e){return e.base.y})),t.defined(mU).curve(u),t(p)}return(t="vertical"===s&&DO(a)?uP().y(gU).x1(yU).x0(a):DO(a)?uP().x(yU).y1(gU).y0(a):cP().x(yU).y(gU)).defined(mU).curve(u),t(d)}(e):r;return s.createElement("path",aU({},uj(e,!1),YO(e),{className:Ve("recharts-curve",t),d:i,ref:o}))},bU={exports:{}};bU.exports=function(){if(pU)return fU;pU=1;var e=dU?uU:(dU=1,uU="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,fU=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},fU}()();const xU=B(bU.exports);var wU=Object.getOwnPropertyNames,_U=Object.getOwnPropertySymbols,SU=Object.prototype.hasOwnProperty;function kU(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function EU(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);var o=r.cache,i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r);return o.delete(t),o.delete(n),s}}function OU(e){return wU(e).concat(_U(e))}var jU=Object.hasOwn||function(e,t){return SU.call(e,t)};function PU(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var CU="_owner",TU=Object.getOwnPropertyDescriptor,AU=Object.keys;function NU(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 MU(e,t){return PU(e.getTime(),t.getTime())}function DU(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),s=0;(r=a.next())&&!r.done;){for(var l=t.entries(),c=!1,u=0;(o=l.next())&&!o.done;){var d=r.value,f=d[0],p=d[1],h=o.value,m=h[0],y=h[1];!c&&!i[u]&&(c=n.equals(f,m,s,u,e,t,n)&&n.equals(p,y,f,m,e,t,n))&&(i[u]=!0),u++}if(!c)return!1;s++}return!0}function IU(e,t,n){var r,o=AU(e),i=o.length;if(AU(t).length!==i)return!1;for(;i-- >0;)if((r=o[i])===CU&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jU(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function RU(e,t,n){var r,o,i,a=OU(e),s=a.length;if(OU(t).length!==s)return!1;for(;s-- >0;)if((r=a[s])===CU&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jU(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=TU(e,r),i=TU(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function LU(e,t){return PU(e.valueOf(),t.valueOf())}function FU(e,t){return e.source===t.source&&e.flags===t.flags}function zU(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var s=t.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!i[c]&&(l=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(i[c]=!0),c++;if(!l)return!1}return!0}function BU(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 WU=Array.isArray,VU="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,UU=Object.assign,$U=Object.prototype.toString.call.bind(Object.prototype.toString),HU=qU();function qU(e){void 0===e&&(e={});var t=e.circular,n=void 0!==t&&t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=void 0!==i&&i,s=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?RU:NU,areDatesEqual:MU,areMapsEqual:r?kU(DU,RU):DU,areObjectsEqual:r?RU:IU,arePrimitiveWrappersEqual:LU,areRegExpsEqual:FU,areSetsEqual:r?kU(zU,RU):zU,areTypedArraysEqual:r?RU:BU};if(n&&(o=UU({},o,n(o))),t){var i=EU(o.areArraysEqual),a=EU(o.areMapsEqual),s=EU(o.areObjectsEqual),l=EU(o.areSetsEqual);o=UU({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}(e),l=function(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(e,c,u){if(e===c)return!0;if(null==e||null==c||"object"!=typeof e||"object"!=typeof c)return e!=e&&c!=c;var d=e.constructor;if(d!==c.constructor)return!1;if(d===Object)return o(e,c,u);if(WU(e))return t(e,c,u);if(null!=VU&&VU(e))return l(e,c,u);if(d===Date)return n(e,c,u);if(d===RegExp)return a(e,c,u);if(d===Map)return r(e,c,u);if(d===Set)return s(e,c,u);var f=$U(e);return"[object Date]"===f?n(e,c,u):"[object RegExp]"===f?a(e,c,u):"[object Map]"===f?r(e,c,u):"[object Set]"===f?s(e,c,u):"[object Object]"===f?"function"!=typeof e.then&&"function"!=typeof c.then&&o(e,c,u):"[object Arguments]"===f?o(e,c,u):("[object Boolean]"===f||"[object Number]"===f||"[object String]"===f)&&i(e,c,u)}}(s),c=r?r(l):function(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}(l);return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var s=r(),l=s.cache,c=void 0===l?t?new WeakMap:void 0:l,u=s.meta;return n(e,a,{cache:c,equals:o,meta:u,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:n,comparator:l,createState:o,equals:c,strict:a})}function KU(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame((function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}(r)}))}function YU(e){return YU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YU(e)}function XU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GU(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return XU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XU(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r),i=o[0],a=o.slice(1);return"number"==typeof i?void KU(n.bind(null,a),i):(n(i),void KU(n.bind(null,a)))}"object"===YU(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function ZU(e){return ZU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ZU(e)}function JU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JU(Object(n),!0).forEach((function(t){e$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function e$(e,t,n){return t=function(e){var t=function(e){if("object"!==ZU(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==ZU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ZU(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}qU({strict:!0}),qU({circular:!0}),qU({circular:!0,strict:!0}),qU({createInternalComparator:function(){return PU}}),qU({strict:!0,createInternalComparator:function(){return PU}}),qU({circular:!0,createInternalComparator:function(){return PU}}),qU({circular:!0,createInternalComparator:function(){return PU},strict:!0});var t$=function(e){return e},n$=function(e,t){return Object.keys(t).reduce((function(n,r){return QU(QU({},n),{},e$({},r,e(r,t[r])))}),{})},r$=function(e,t,n){return e.map((function(e){return"".concat(function(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}))}(e)," ").concat(t,"ms ").concat(n)})).join(",")};function o$(e,t){if(e){if("string"==typeof e)return i$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i$(e,t)}}function i$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a$=1e-4,s$=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},l$=function(e,t){return e.map((function(e,n){return e*Math.pow(t,n)})).reduce((function(e,t){return e+t}))},c$=function(e,t){return function(n){var r=s$(e,t);return l$(r,n)}},u$=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,i=1,a=1;break;case"ease":r=.25,o=.1,i=.25,a=1;break;case"ease-in":r=.42,o=0,i=1,a=1;break;case"ease-out":r=.42,o=0,i=.58,a=1;break;case"ease-in-out":r=0,o=0,i=.58,a=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||o$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s[1].split(")")[0].split(",").map((function(e){return parseFloat(e)})),4);r=l[0],o=l[1],i=l[2],a=l[3]}}[r,i,o,a].every((function(e){return"number"==typeof e&&e>=0&&e<=1}));var c=c$(r,i),u=c$(o,a),d=function(e,t){return function(n){var r=s$(e,t),o=[].concat(function(e){return function(e){if(Array.isArray(e))return i$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r.map((function(e,t){return e*t})).slice(1)),[0]);return l$(o,n)}}(r,i),f=function(e){return e>1?1:e<0?0:e},p=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=c(n)-t,i=d(n);if(Math.abs(o-t)<a$||i<a$)return u(n);n=f(n-o/i)}return u(n)};return p.isStepper=!1,p};function d$(e){return d$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d$(e)}function f$(e){return function(e){if(Array.isArray(e))return g$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p$(Object(n),!0).forEach((function(t){m$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m$(e,t,n){return t=function(e){var t=function(e){if("object"!==d$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==d$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d$(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y$(e,t){if(e){if("string"==typeof e)return g$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g$(e,t)}}function g$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v$=function(e,t,n){return e+(t-e)*n},b$=function(e){return e.from!==e.to},x$=function e(t,n,r){var o=n$((function(e,n){if(b$(n)){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||y$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t(n.from,n.to,n.velocity),2),o=r[0],i=r[1];return h$(h$({},n),{},{from:o,velocity:i})}return n}),n);return r<1?n$((function(e,t){return b$(t)?h$(h$({},t),{},{velocity:v$(t.velocity,o[e].velocity,r),from:v$(t.from,o[e].from,r)}):t}),n):e(t,o,r-1)};function w$(e){return w$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w$(e)}var _$=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function S$(e){return function(e){if(Array.isArray(e))return k$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return k$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k$(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E$(Object(n),!0).forEach((function(t){j$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j$(e,t,n){return(t=P$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P$(e){var t=function(e){if("object"!==w$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==w$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===w$(t)?t:String(t)}function C$(e,t){return(C$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function T$(e,t){if(t&&("object"===w$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return A$(e)}function A$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N$(e){return N$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N$(e)}var M$=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C$(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=N$(e);if(t){var o=N$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T$(this,n)}}(n);function n(e,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var i=(o=t.call(this,e,r)).props,a=i.isActive,s=i.attributeName,l=i.from,c=i.to,u=i.steps,d=i.children,f=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(A$(o)),o.changeStyle=o.changeStyle.bind(A$(o)),!a||f<=0)return o.state={style:{}},"function"==typeof d&&(o.state={style:c}),T$(o);if(u&&u.length)o.state={style:u[0].style};else if(l){if("function"==typeof d)return o.state={style:l},T$(o);o.state={style:s?j$({},s,l):l}}else o.state={style:{}};return o}return function(e,t){t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P$(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,i=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(r){if(!n){var c={style:o?j$({},o,a):a};return void(this.state&&l&&(o&&l[o]!==a||!o&&l!==a)&&this.setState(c))}if(!(HU(e.to,a)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var d=u||i?s:e.to;if(this.state&&l){var f={style:o?j$({},o,d):d};(o&&l[o]!==d||!o&&l!==d)&&this.setState(f)}this.runAnimation(O$(O$({},this.props),{},{from:d,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,i=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=function(e,t,n,r,o){var i,a,s=function(e,t){return[Object.keys(e),Object.keys(t)].reduce((function(e,t){return e.filter((function(e){return t.includes(e)}))}))}(e,t),l=s.reduce((function(n,r){return h$(h$({},n),{},m$({},r,[e[r],t[r]]))}),{}),c=s.reduce((function(n,r){return h$(h$({},n),{},m$({},r,{from:e[r],velocity:0,to:t[r]}))}),{}),u=-1,d=function(){return null};return d=n.isStepper?function(r){i||(i=r);var a=(r-i)/n.dt;c=x$(n,c,a),o(h$(h$(h$({},e),t),n$((function(e,t){return t.from}),c))),i=r,!Object.values(c).filter(b$).length||(u=requestAnimationFrame(d))}:function(i){a||(a=i);var s=(i-a)/r,c=n$((function(e,t){return v$.apply(void 0,f$(t).concat([n(s)]))}),l);if(o(h$(h$(h$({},e),t),c)),s<1)u=requestAnimationFrame(d);else{var f=n$((function(e,t){return v$.apply(void 0,f$(t).concat([n(1)]))}),l);o(h$(h$(h$({},e),t),f))}},function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(u)}}}(n,r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return u$(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,s=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,s=r*a/1e3+e;return Math.abs(s-t)<a$&&Math.abs(i)<a$?[t,0]:[s,i]};return s.isStepper=!0,s.dt=a,s}();default:if("cubic-bezier"===r.split("(")[0])return u$(r)}return"function"==typeof r?r:null}(i),o,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,i=n[0],a=i.style,s=i.duration,l=void 0===s?0:s;return this.manager.start([o].concat(S$(n.reduce((function(e,r,o){if(0===o)return e;var i=r.duration,a=r.easing,s=void 0===a?"ease":a,l=r.style,c=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,f=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(S$(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:i,easing:s}),i]);var p=r$(f,i,s),h=O$(O$(O$({},d.style),l),{},{transition:p});return[].concat(S$(e),[h,i,u]).filter(t$)}),[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=GU());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,i=e.easing,a=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof c&&"spring"!==i)if(l.length>1)this.runStepAnimation(e);else{var d=r?j$({},r,o):o,f=r$(Object.keys(d),n,i);u.start([a,t,O$(O$({},d),{},{transition:f}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_$),i=s.Children.count(t),a=this.state.style;if("function"==typeof t)return t(a);if(!r||0===i||n<=0)return t;var l=function(e){var t=e.props,n=t.style,r=void 0===n?{}:n,i=t.className;return(0,s.cloneElement)(e,O$(O$({},o),{},{style:O$(O$({},r),a),className:i}))};return 1===i?l(s.Children.only(t)):s.createElement("div",null,s.Children.map(t,(function(e){return l(e)})))}}]),n}(s.PureComponent);function D$(e){return D$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D$(e)}function I$(){return I$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I$.apply(this,arguments)}function R$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function L$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L$(Object(n),!0).forEach((function(t){z$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z$(e,t,n){return t=function(e){var t=function(e){if("object"!=D$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=D$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D$(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}M$.displayName="Animate",M$.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},M$.propTypes={from:xU.oneOfType([xU.object,xU.string]),to:xU.oneOfType([xU.object,xU.string]),attributeName:xU.string,duration:xU.number,begin:xU.number,easing:xU.oneOfType([xU.string,xU.func]),steps:xU.arrayOf(xU.shape({duration:xU.number.isRequired,style:xU.object.isRequired,easing:xU.oneOfType([xU.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),xU.func]),properties:xU.arrayOf("string"),onAnimationEnd:xU.func})),children:xU.oneOfType([xU.node,xU.func]),isActive:xU.bool,canBegin:xU.bool,onAnimationEnd:xU.func,shouldReAnimate:xU.bool,onAnimationStart:xU.func,onAnimationReStart:xU.func},xU.object,xU.object,xU.object,xU.element,xU.object,xU.object,xU.object,xU.oneOfType([xU.array,xU.element]),xU.any;var B$=function(e,t,n,r,o){var i,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>a?a:o[d];i="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),i+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),i+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),i+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var f=Math.min(a,o);i="M ".concat(e,",").concat(t+s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+n-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*f,"\n L ").concat(e+n,",").concat(t+r-s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n-l*f,",").concat(t+r,"\n L ").concat(e+l*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*f," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},W$=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,i=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(o,o+a),c=Math.max(o,o+a),u=Math.min(i,i+s),d=Math.max(i,i+s);return n>=l&&n<=c&&r>=u&&r<=d}return!1},V$={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},U$=function(e){var t=F$(F$({},V$),e),n=(0,s.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return R$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R$(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)(-1),2),o=r[0],i=r[1];(0,s.useEffect)((function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch{}}),[]);var a=t.x,l=t.y,c=t.width,u=t.height,d=t.radius,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,y=t.isAnimationActive,g=t.isUpdateAnimationActive;if(a!==+a||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var v=Ve("recharts-rectangle",f);return g?s.createElement(M$,{canBegin:o>0,from:{width:c,height:u,x:a,y:l},to:{width:c,height:u,x:a,y:l},duration:h,animationEasing:p,isActive:g},(function(e){var r=e.width,i=e.height,a=e.x,l=e.y;return s.createElement(M$,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,isActive:y,easing:p},s.createElement("path",I$({},uj(t,!0),{className:v,d:B$(a,l,r,i,d),ref:n})))})):s.createElement("path",I$({},uj(t,!0),{className:v,d:B$(a,l,c,u,d)}))},$$=["points","className","baseLinePoints","connectNulls"];function H$(){return H$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H$.apply(this,arguments)}function q$(e){return function(e){if(Array.isArray(e))return K$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return K$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K$(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Y$=function(e){return e&&e.x===+e.x&&e.y===+e.y},X$=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach((function(e){Y$(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])})),Y$(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce((function(e,t){return[].concat(q$(e),q$(t))}),[])]);var r=n.map((function(e){return e.reduce((function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)}),"")})).join("");return 1===n.length?"".concat(r,"Z"):r},G$=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$$);if(!t||!t.length)return null;var a=Ve("recharts-polygon",n);if(r&&r.length){var l=i.stroke&&"none"!==i.stroke,c=function(e,t,n){var r=X$(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(X$(t.reverse(),n).slice(1))}(t,r,o);return s.createElement("g",{className:a},s.createElement("path",H$({},uj(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",stroke:"none",d:c})),l?s.createElement("path",H$({},uj(i,!0),{fill:"none",d:X$(t,o)})):null,l?s.createElement("path",H$({},uj(i,!0),{fill:"none",d:X$(r,o)})):null)}var u=X$(t,o);return s.createElement("path",H$({},uj(i,!0),{fill:"Z"===u.slice(-1)?i.fill:"none",className:a,d:u}))};function Z$(){return Z$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Z$.apply(this,arguments)}var J$=function(e){var t=e.cx,n=e.cy,r=e.r,o=Ve("recharts-dot",e.className);return t===+t&&n===+n&&r===+r?s.createElement("circle",Z$({},uj(e,!1),YO(e),{className:o,cx:t,cy:n,r})):null};function Q$(e){return Q$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q$(e)}var eH=["x","y","top","left","width","height","className"];function tH(){return tH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tH.apply(this,arguments)}function nH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rH(e,t,n){return t=function(e){var t=function(e){if("object"!=Q$(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Q$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q$(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oH=function(e,t,n,r,o,i){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)},iH=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.top,a=void 0===i?0:i,l=e.left,c=void 0===l?0:l,u=e.width,d=void 0===u?0:u,f=e.height,p=void 0===f?0:f,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nH(Object(n),!0).forEach((function(t){rH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({x:n,y:o,top:a,left:c,width:d,height:p},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,eH));return DO(n)&&DO(o)&&DO(d)&&DO(p)&&DO(a)&&DO(c)?s.createElement("path",tH({},uj(m,!0),{className:Ve("recharts-cross",h),d:oH(n,o,d,p,a,c)})):null},aH=nB,sH=rB,lH=pN,cH=function(e,t){return e&&e.length?aH(e,lH(t),sH):void 0};const uH=B(cH);var dH=nB,fH=pN,pH=cB,hH=function(e,t){return e&&e.length?dH(e,fH(t),pH):void 0};const mH=B(hH);var yH=["cx","cy","angle","ticks","axisLine"],gH=["ticks","tick","angle","tickFormatter","stroke"];function vH(e){return vH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vH(e)}function bH(){return bH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bH.apply(this,arguments)}function xH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xH(Object(n),!0).forEach((function(t){jH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _H(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function SH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PH(r.key),r)}}function kH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kH=function(){return!!e})()}function EH(e){return EH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},EH(e)}function OH(e,t){return(OH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jH(e,t,n){return(t=PH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=function(e){if("object"!=vH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vH(t)?t:t+""}var CH=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=EH(t),function(e,t){if(t&&("object"===vH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kH()?Reflect.construct(t,n||[],EH(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OH(e,t)}(t,e),function(e,t,n){return t&&SH(e.prototype,t),n&&SH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return SV(o,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=uH(o,(function(e){return e.coordinate||0})),a=mH(o,(function(e){return e.coordinate||0}));return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:a.coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=e.axisLine,a=_H(e,yH),l=o.reduce((function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]}),[1/0,-1/0]),c=SV(t,n,l[0],r),u=SV(t,n,l[1],r),d=wH(wH(wH({},uj(a,!1)),{},{fill:"none"},uj(i,!1)),{},{x1:c.x,y1:c.y,x2:u.x,y2:u.y});return s.createElement("line",bH({className:"recharts-polar-radius-axis-line"},d))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,o=n.tick,i=n.angle,a=n.tickFormatter,l=n.stroke,c=_H(n,gH),u=this.getTickTextAnchor(),d=uj(c,!1),f=uj(o,!1),p=r.map((function(n,r){var c=e.getTickValueCoord(n),p=wH(wH(wH(wH({textAnchor:u,transform:"rotate(".concat(90-i,", ").concat(c.x,", ").concat(c.y,")")},d),{},{stroke:"none",fill:l},f),{},{index:r},c),{},{payload:n});return s.createElement(xj,bH({className:Ve("recharts-polar-radius-axis-tick",jV(o)),key:"tick-".concat(n.coordinate)},XO(e.props,n,r)),t.renderTickItem(o,p,a?a(n.value,r):n.value))}));return s.createElement(xj,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?s.createElement(xj,{className:Ve("recharts-polar-radius-axis",this.props.className)},n&&this.renderAxisLine(),r&&this.renderTicks(),IV.renderCallByParent(this.props,this.getViewBox())):null}}],[{key:"renderTickItem",value:function(e,t,n){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement(wI,bH({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}}])}(s.PureComponent);function TH(e){return TH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TH(e)}function AH(){return AH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AH.apply(this,arguments)}function NH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NH(Object(n),!0).forEach((function(t){FH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function DH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,zH(r.key),r)}}function IH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(IH=function(){return!!e})()}function RH(e){return RH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},RH(e)}function LH(e,t){return(LH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function FH(e,t,n){return(t=zH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zH(e){var t=function(e){if("object"!=TH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TH(t)?t:t+""}jH(CH,"displayName","PolarRadiusAxis"),jH(CH,"axisType","radiusAxis"),jH(CH,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var BH=Math.PI/180,WH=1e-5,VH=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=RH(t),function(e,t){if(t&&("object"===TH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,IH()?Reflect.construct(t,n||[],RH(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LH(e,t)}(t,e),function(e,t,n){return t&&DH(e.prototype,t),n&&DH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.orientation,a=t.tickSize||8,s=SV(n,r,o,e.coordinate),l=SV(n,r,o+("inner"===i?-1:1)*a,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*BH);return n>WH?"outer"===t?"start":"end":n<-WH?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,a=MH(MH({},uj(this.props,!1)),{},{fill:"none"},uj(o,!1));if("circle"===i)return s.createElement(J$,AH({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r}));var l=this.props.ticks.map((function(e){return SV(t,n,r,e.coordinate)}));return s.createElement(G$,AH({className:"recharts-polar-angle-axis-line"},a,{points:l}))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,o=n.tick,i=n.tickLine,a=n.tickFormatter,l=n.stroke,c=uj(this.props,!1),u=uj(o,!1),d=MH(MH({},c),{},{fill:"none"},uj(i,!1)),f=r.map((function(n,r){var f=e.getTickLineCoord(n),p=MH(MH(MH({textAnchor:e.getTickTextAnchor(n)},c),{},{stroke:"none",fill:l},u),{},{index:r,payload:n,x:f.x2,y:f.y2});return s.createElement(xj,AH({className:Ve("recharts-polar-angle-axis-tick",jV(o)),key:"tick-".concat(n.coordinate)},XO(e.props,n,r)),i&&s.createElement("line",AH({className:"recharts-polar-angle-axis-tick-line"},d,f)),o&&t.renderTickItem(o,p,a?a(n.value,r):n.value))}));return s.createElement(xj,{className:"recharts-polar-angle-axis-ticks"},f)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:s.createElement(xj,{className:Ve("recharts-polar-angle-axis",this.props.className)},r&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(e,t,n){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement(wI,AH({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}])}(s.PureComponent);FH(VH,"displayName","PolarAngleAxis"),FH(VH,"axisType","angleAxis"),FH(VH,"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 UH=NT(Object.getPrototypeOf,Object),$H=hk,HH=UH,qH=mk,KH=Function.prototype,YH=Object.prototype,XH=KH.toString,GH=YH.hasOwnProperty,ZH=XH.call(Object),JH=function(e){if(!qH(e)||"[object Object]"!=$H(e))return!1;var t=HH(e);if(null===t)return!0;var n=GH.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&XH.call(n)==ZH};const QH=B(JH);var eq=hk,tq=mk,nq=function(e){return!0===e||!1===e||tq(e)&&"[object Boolean]"==eq(e)};const rq=B(nq);function oq(e){return oq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oq(e)}function iq(){return iq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iq.apply(this,arguments)}function aq(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sq(Object(n),!0).forEach((function(t){cq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cq(e,t,n){return t=function(e){var t=function(e){if("object"!=oq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oq(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uq,dq=function(e,t,n,r,o){var i,a=n-r;return i="M ".concat(e,",").concat(t),i+="L ".concat(e+n,",").concat(t),i+="L ".concat(e+n-a/2,",").concat(t+o),(i+="L ".concat(e+n-a/2-r,",").concat(t+o))+"L ".concat(e,",").concat(t," Z")},fq={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},pq=function(e){var t=lq(lq({},fq),e),n=(0,s.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return aq(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return aq(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,s.useState)(-1),2),o=r[0],i=r[1];(0,s.useEffect)((function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch{}}),[]);var a=t.x,l=t.y,c=t.upperWidth,u=t.lowerWidth,d=t.height,f=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,y=t.isUpdateAnimationActive;if(a!==+a||l!==+l||c!==+c||u!==+u||d!==+d||0===c&&0===u||0===d)return null;var g=Ve("recharts-trapezoid",f);return y?s.createElement(M$,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:d,x:a,y:l},to:{upperWidth:c,lowerWidth:u,height:d,x:a,y:l},duration:h,animationEasing:p,isActive:y},(function(e){var r=e.upperWidth,i=e.lowerWidth,a=e.height,l=e.x,c=e.y;return s.createElement(M$,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,easing:p},s.createElement("path",iq({},uj(t,!0),{className:g,d:dq(l,c,r,i,a),ref:n})))})):s.createElement("g",null,s.createElement("path",iq({},uj(t,!0),{className:g,d:dq(a,l,c,u,d)})))},hq=["option","shapeType","propTransformer","activeClassName","isActive"];function mq(e){return mq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mq(e)}function yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yq(Object(n),!0).forEach((function(t){vq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vq(e,t,n){return t=function(e){var t=function(e){if("object"!=mq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mq(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bq(e,t){return gq(gq({},t),e)}function xq(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return s.createElement(U$,n);case"trapezoid":return s.createElement(pq,n);case"sector":return s.createElement(oU,n);case"symbols":if(function(e){return"symbols"===e}(t))return s.createElement(rC,n);break;default:return null}}function wq(e){var t,n=e.option,r=e.shapeType,o=e.propTransformer,i=void 0===o?bq:o,a=e.activeClassName,l=void 0===a?"recharts-active-shape":a,c=e.isActive,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,hq);if((0,s.isValidElement)(n))t=(0,s.cloneElement)(n,gq(gq({},u),function(e){return(0,s.isValidElement)(e)?e.props:e}(n)));else if(Ck(n))t=n(u);else if(QH(n)&&!rq(n)){var d=i(n,u);t=s.createElement(xq,{shapeType:r,elementProps:d})}else{var f=u;t=s.createElement(xq,{shapeType:r,elementProps:f})}return c?s.createElement(xj,{className:l},t):t}function _q(e,t){return null!=t&&"trapezoids"in e.props}function Sq(e,t){return null!=t&&"sectors"in e.props}function kq(e,t){return null!=t&&"points"in e.props}function Eq(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,i=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&i}function Oq(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function jq(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function Pq(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return _q(e,t)?n="trapezoids":Sq(e,t)?n="sectors":kq(e,t)&&(n="points"),n}(n,t),i=function(e,t){var n,r;return _q(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Sq(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:kq(e,t)?t.payload:{}}(n,t),a=r.filter((function(e,r){var a=EB(i,e),s=n.props[o].filter((function(e){var r=function(e,t){var n;return _q(e,t)?n=Eq:Sq(e,t)?n=Oq:kq(e,t)&&(n=jq),n}(n,t);return r(e,t)})),l=n.props[o].indexOf(s[s.length-1]);return a&&r===l}));return r.indexOf(a[a.length-1])}function Cq(e){return Cq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cq(e)}function Tq(){return Tq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tq.apply(this,arguments)}function Aq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Aq(Object(n),!0).forEach((function(t){Lq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Mq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fq(r.key),r)}}function Dq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Dq=function(){return!!e})()}function Iq(e){return Iq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Iq(e)}function Rq(e,t){return(Rq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Lq(e,t,n){return(t=Fq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fq(e){var t=function(e){if("object"!=Cq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Cq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Cq(t)?t:t+""}var zq=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Lq(n=function(e,t,n){return t=Iq(t),function(e,t){if(t&&("object"===Cq(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Dq()?Reflect.construct(t,n||[],Iq(e).constructor):t.apply(e,n))}(this,t,[e]),"pieRef",null),Lq(n,"sectorRefs",[]),Lq(n,"id",LO("recharts-pie-")),Lq(n,"handleAnimationEnd",(function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ck(e)&&e()})),Lq(n,"handleAnimationStart",(function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ck(e)&&e()})),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rq(e,t)}(t,e),function(e,t,n){return t&&Mq(e.prototype,t),n&&Mq(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.label,o=n.labelLine,i=n.dataKey,a=n.valueKey,l=uj(this.props,!1),c=uj(r,!1),u=uj(o,!1),d=r&&r.offsetRadius||20,f=e.map((function(e,n){var f=(e.startAngle+e.endAngle)/2,p=SV(e.cx,e.cy,e.outerRadius+d,f),h=Nq(Nq(Nq(Nq({},l),e),{},{stroke:"none"},c),{},{index:n,textAnchor:t.getTextAnchor(p.x,e.cx)},p),m=Nq(Nq(Nq(Nq({},l),e),{},{fill:"none",stroke:e.fill},u),{},{index:n,points:[SV(e.cx,e.cy,e.outerRadius,f),p]}),y=i;return mO(i)&&mO(a)?y="value":mO(i)&&(y=a),s.createElement(xj,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(n)},o&&t.renderLabelLineItem(o,m,"line"),t.renderLabelItem(r,h,qW(e,y)))}));return s.createElement(xj,{className:"recharts-pie-labels"},f)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.activeShape,o=n.blendStroke,i=n.inactiveShape;return e.map((function(n,a){if(0===(null==n?void 0:n.startAngle)&&0===(null==n?void 0:n.endAngle)&&1!==e.length)return null;var l=t.isActiveIndex(a),c=i&&t.hasActiveIndex()?i:null,u=l?r:c,d=Nq(Nq({},n),{},{stroke:o?n.fill:n.stroke,tabIndex:-1});return s.createElement(xj,Tq({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},XO(t.props,n,a),{key:"sector-".concat(null==n?void 0:n.startAngle,"-").concat(null==n?void 0:n.endAngle,"-").concat(n.midAngle,"-").concat(a)}),s.createElement(wq,Tq({option:u,isActive:l,shapeType:"sector"},d)))}))}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,o=t.animationBegin,i=t.animationDuration,a=t.animationEasing,l=t.animationId,c=this.state,u=c.prevSectors,d=c.prevIsAnimationActive;return s.createElement(M$,{begin:o,duration:i,isActive:r,easing:a,from:{t:0},to:{t:1},key:"pie-".concat(l,"-").concat(d),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},(function(t){var r=t.t,o=[],i=(n&&n[0]).startAngle;return n.forEach((function(e,t){var n=u&&u[t],a=t>0?pO(e,"paddingAngle",0):0;if(n){var s=BO(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=Nq(Nq({},e),{},{startAngle:i+a,endAngle:i+s(r)+a});o.push(l),i=l.endAngle}else{var c=e.endAngle,d=e.startAngle,f=BO(0,c-d)(r),p=Nq(Nq({},e),{},{startAngle:i+a,endAngle:i+f+a});o.push(p),i=p.endAngle}})),s.createElement(xj,null,e.renderSectorsStatically(o))}))}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&EB(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,o=t.className,i=t.label,a=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.isAnimationActive,f=this.state.isAnimationFinished;if(n||!r||!r.length||!DO(a)||!DO(l)||!DO(c)||!DO(u))return null;var p=Ve("recharts-pie",o);return s.createElement(xj,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),i&&this.renderLabels(r),IV.renderCallByParent(this.props,null,!1),(!d||f)&&XV.renderCallByParent(this.props,r,!1))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,n){if(s.isValidElement(e))return s.cloneElement(e,t);if(Ck(e))return e(t);var r=Ve("recharts-pie-label-line","boolean"!=typeof e?e.className:"");return s.createElement(vU,Tq({},t,{key:n,type:"linear",className:r}))}},{key:"renderLabelItem",value:function(e,t,n){if(s.isValidElement(e))return s.cloneElement(e,t);var r=n;if(Ck(e)&&(r=e(t),s.isValidElement(r)))return r;var o=Ve("recharts-pie-label-text","boolean"==typeof e||Ck(e)?"":e.className);return s.createElement(wI,Tq({},t,{alignmentBaseline:"middle",className:o}),r)}}])}(s.PureComponent);uq=zq,Lq(zq,"displayName","Pie"),Lq(zq,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!lD.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),Lq(zq,"parseDeltaAngle",(function(e,t){return NO(t-e)*Math.min(Math.abs(t-e),360)})),Lq(zq,"getRealPieData",(function(e){var t=e.data,n=e.children,r=uj(e,!1),o=ij(n,BD);return t&&t.length?t.map((function(e,t){return Nq(Nq(Nq({payload:e},r),e),o&&o[t]&&o[t].props)})):o&&o.length?o.map((function(e){return Nq(Nq({},r),e.props)})):[]})),Lq(zq,"parseCoordinateOfPie",(function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=kV(o,i);return{cx:r+FO(e.cx,o,o/2),cy:n+FO(e.cy,i,i/2),innerRadius:FO(e.innerRadius,a,0),outerRadius:FO(e.outerRadius,a,.8*a),maxRadius:e.maxRadius||Math.sqrt(o*o+i*i)/2}})),Lq(zq,"getComposedData",(function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?Nq(Nq({},t.type.defaultProps),t.props):t.props,o=uq.getRealPieData(r);if(!o||!o.length)return null;var i=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,d=r.valueKey,f=r.tooltipType,p=Math.abs(r.minAngle),h=uq.parseCoordinateOfPie(r,n),m=uq.parseDeltaAngle(a,s),y=Math.abs(m),g=c;mO(c)&&mO(d)?(wj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),g="value"):mO(c)&&(wj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),g=d);var v,b,x=o.filter((function(e){return 0!==qW(e,g,0)})).length,w=y-x*p-(y>=360?x:x-1)*l,_=o.reduce((function(e,t){var n=qW(t,g,0);return e+(DO(n)?n:0)}),0);return _>0&&(v=o.map((function(e,t){var n,r=qW(e,g,0),o=qW(e,u,t),s=(DO(r)?r:0)/_,c=(n=t?b.endAngle+NO(m)*l*(0!==r?1:0):a)+NO(m)*((0!==r?p:0)+s*w),d=(n+c)/2,y=(h.innerRadius+h.outerRadius)/2,v=[{name:o,value:r,payload:e,dataKey:g,type:f}],x=SV(h.cx,h.cy,y,d);return b=Nq(Nq(Nq({percent:s,cornerRadius:i,name:o,tooltipPayload:v,midAngle:d,middleRadius:y,tooltipPosition:x},e),h),{},{value:qW(e,g),startAngle:n,endAngle:c,payload:e,paddingAngle:NO(m)*l})}))),Nq(Nq({},h),{},{sectors:v,data:o})}));var Bq=Math.ceil,Wq=Math.max,Vq=TD,Uq=1/0,$q=function(e){return e?(e=Vq(e))===Uq||e===-Uq?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},Hq=function(e,t,n,r){for(var o=-1,i=Wq(Bq((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},qq=MM,Kq=$q;const Yq=B(function(e){return function(t,n,r){return r&&"number"!=typeof r&&qq(t,n,r)&&(n=r=void 0),t=Kq(t),void 0===n?(n=t,t=0):n=Kq(n),r=void 0===r?t<n?1:-1:Kq(r),Hq(t,n,r,e)}}());function Xq(e){return Xq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xq(e)}function Gq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gq(Object(n),!0).forEach((function(t){Jq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Jq(e,t,n){return t=function(e){var t=function(e){if("object"!=Xq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Xq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xq(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qq=["Webkit","Moz","O","ms"];function eK(e){return eK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eK(e)}function tK(){return tK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tK.apply(this,arguments)}function nK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nK(Object(n),!0).forEach((function(t){lK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cK(r.key),r)}}function iK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(iK=function(){return!!e})()}function aK(e){return aK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aK(e)}function sK(e,t){return(sK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lK(e,t,n){return(t=cK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cK(e){var t=function(e){if("object"!=eK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eK(t)?t:t+""}var uK=function(e){return e.changedTouches&&!!e.changedTouches.length},dK=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),lK(n=function(e,t,n){return t=aK(t),function(e,t){if(t&&("object"===eK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iK()?Reflect.construct(t,n||[],aK(e).constructor):t.apply(e,n))}(this,t,[e]),"handleDrag",(function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)})),lK(n,"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])})),lK(n,"handleDragEnd",(function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:t,startIndex:o})})),n.detachDragEndListener()})),lK(n,"handleLeaveWrapper",(function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))})),lK(n,"handleEnterSlideOrTraveller",(function(){n.setState({isTextActive:!0})})),lK(n,"handleLeaveSlideOrTraveller",(function(){n.setState({isTextActive:!1})})),lK(n,"handleSlideDragStart",(function(e){var t=uK(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()})),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sK(e,t)}(t,e),function(e,t,n){return t&&oK(e.prototype,t),n&&oK(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,o=this.state.scaleValues,i=this.props,a=i.gap,s=i.data.length-1,l=Math.min(n,r),c=Math.max(n,r),u=t.getIndexInRange(o,l),d=t.getIndexInRange(o,c);return{startIndex:u-u%a,endIndex:d===s?s:d-d%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=qW(n[e],o,e);return Ck(r)?r(i,e):i}},{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(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,s=i.width,l=i.travellerWidth,c=i.startIndex,u=i.endIndex,d=i.onChange,f=e.pageX-n;f>0?f=Math.min(f,a+s-l-o,a+s-l-r):f<0&&(f=Math.max(f,a-r,a-o));var p=this.getIndex({startX:r+f,endX:o+f});(p.startIndex!==c||p.endIndex!==u)&&d&&d(p),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=uK(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,i=t.startX,a=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,h={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,l+c-u-a):m<0&&(m=Math.max(m,l-a)),h[r]=a+m;var y=this.getIndex(h),g=y.startIndex,v=y.endIndex;this.setState(lK(lK({},r,a+m),"brushMoveStartX",e.pageX),(function(){d&&function(){var e=p.length-1;return"startX"===r&&(o>i?g%f==0:v%f==0)||o<i&&v===e||"endX"===r&&(o>i?v%f==0:g%f==0)||o>i&&v===e}()&&d(y)}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=a||"endX"===t&&u<=i||this.setState(lK({},t,u),(function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.fill,a=e.stroke;return s.createElement("rect",{stroke:a,fill:i,x:t,y:n,width:r,height:o})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.data,a=e.children,l=e.padding,c=s.Children.only(a);return c?s.cloneElement(c,{x:t,y:n,width:r,height:o,margin:l,compact:!0,data:i}):null}},{key:"renderTravellerLayer",value:function(e,n){var r,o,i=this,a=this.props,l=a.y,c=a.travellerWidth,u=a.height,d=a.traveller,f=a.ariaLabel,p=a.data,h=a.startIndex,m=a.endIndex,y=Math.max(e,this.props.x),g=rK(rK({},uj(this.props,!1)),{},{x:y,y:l,width:c,height:u}),v=f||"Min value: ".concat(null===(r=p[h])||void 0===r?void 0:r.name,", Max value: ").concat(null===(o=p[m])||void 0===o?void 0:o.name);return s.createElement(xj,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),i.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){i.setState({isTravellerFocused:!0})},onBlur:function(){i.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(d,g))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,o=n.height,i=n.stroke,a=n.travellerWidth,l=Math.min(e,t)+a,c=Math.max(Math.abs(t-e)-a,0);return s.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:l,y:r,width:c,height:o})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,o=e.height,i=e.travellerWidth,a=e.stroke,l=this.state,c=l.startX,u=l.endX,d={pointerEvents:"none",fill:a};return s.createElement(xj,{className:"recharts-brush-texts"},s.createElement(wI,tK({textAnchor:"end",verticalAnchor:"middle",x:Math.min(c,u)-5,y:r+o/2},d),this.getTextOfTick(t)),s.createElement(wI,tK({textAnchor:"start",verticalAnchor:"middle",x:Math.max(c,u)+i+5,y:r+o/2},d),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,o=e.x,i=e.y,a=e.width,l=e.height,c=e.alwaysShowText,u=this.state,d=u.startX,f=u.endX,p=u.isTextActive,h=u.isSlideMoving,m=u.isTravellerMoving,y=u.isTravellerFocused;if(!t||!t.length||!DO(o)||!DO(i)||!DO(a)||!DO(l)||a<=0||l<=0)return null;var g=Ve("recharts-brush",n),v=1===s.Children.count(r),b=function(e,t){var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=Qq.reduce((function(e,r){return Zq(Zq({},e),{},Jq({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return s.createElement(xj,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(d,f),this.renderTravellerLayer(d,"startX"),this.renderTravellerLayer(f,"endX"),(p||h||m||y||c)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.stroke,a=Math.floor(n+o/2)-1;return s.createElement(s.Fragment,null,s.createElement("rect",{x:t,y:n,width:r,height:o,fill:i,stroke:"none"}),s.createElement("line",{x1:t+1,y1:a,x2:t+r-1,y2:a,fill:"none",stroke:"#fff"}),s.createElement("line",{x1:t+1,y1:a+2,x2:t+r-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return s.isValidElement(e)?s.cloneElement(e,n):Ck(e)?e(n):t.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return rK({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,i=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=GI().domain(Yq(0,s)).range([o,o+i-a]),c=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:i,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var c=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}])}(s.PureComponent);lK(dK,"displayName","Brush"),lK(dK,"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 fK=eM,pK=TC,hK=pN,mK=function(e,t){var n;return fK(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},yK=QS,gK=MM,vK=function(e,t,n){var r=yK(e)?pK:mK;return n&&gK(e,t,n)&&(t=void 0),r(e,hK(t))};const bK=B(vK);var xK=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},wK=bM,_K=function(e,t,n){"__proto__"==t&&wK?wK(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},SK=JN,kK=pN,EK=function(e,t){var n={};return t=kK(t),SK(e,(function(e,r,o){_K(n,r,t(e,r,o))})),n};const OK=B(EK);var jK=eM,PK=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},CK=function(e,t){var n=!0;return jK(e,(function(e,r,o){return n=!!t(e,r,o)})),n},TK=pN,AK=QS,NK=MM,MK=function(e,t,n){var r=AK(e)?PK:CK;return n&&NK(e,t,n)&&(t=void 0),r(e,TK(t))};const DK=B(MK);var IK=["x","y"];function RK(e){return RK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},RK(e)}function LK(){return LK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LK.apply(this,arguments)}function FK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FK(Object(n),!0).forEach((function(t){BK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BK(e,t,n){return t=function(e){var t=function(e){if("object"!=RK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=RK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==RK(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WK(e,t){var n=e.x,r=e.y,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,IK),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return zK(zK(zK(zK(zK({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function VK(e){return s.createElement(wq,LK({shapeType:"rectangle",propTransformer:WK,activeClassName:"recharts-active-bar"},e))}var UK,$K=["value","background"];function HK(e){return HK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},HK(e)}function qK(){return qK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qK.apply(this,arguments)}function KK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KK(Object(n),!0).forEach((function(t){QK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eY(r.key),r)}}function GK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(GK=function(){return!!e})()}function ZK(e){return ZK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ZK(e)}function JK(e,t){return(JK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function QK(e,t,n){return(t=eY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eY(e){var t=function(e){if("object"!=HK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=HK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==HK(t)?t:t+""}var tY=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return QK(e=function(e,t,n){return t=ZK(t),function(e,t){if(t&&("object"===HK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GK()?Reflect.construct(t,n||[],ZK(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),QK(e,"id",LO("recharts-bar-")),QK(e,"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),QK(e,"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JK(e,t)}(t,e),function(e,t,n){return t&&XK(e.prototype,t),n&&XK(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,r=n.shape,o=n.dataKey,i=n.activeIndex,a=n.activeBar,l=uj(this.props,!1);return e&&e.map((function(e,n){var c=n===i,u=c?a:r,d=YK(YK(YK({},l),e),{},{isActive:c,option:u,index:n,dataKey:o,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return s.createElement(xj,qK({className:"recharts-bar-rectangle"},XO(t.props,e,n),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),s.createElement(VK,d))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,o=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,l=t.animationEasing,c=t.animationId,u=this.state.prevData;return s.createElement(M$,{begin:i,duration:a,isActive:o,easing:l,from:{t:0},to:{t:1},key:"bar-".concat(c),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var o=t.t,i=n.map((function(e,t){var n=u&&u[t];if(n){var i=BO(n.x,e.x),a=BO(n.y,e.y),s=BO(n.width,e.width),l=BO(n.height,e.height);return YK(YK({},e),{},{x:i(o),y:a(o),width:s(o),height:l(o)})}if("horizontal"===r){var c=BO(0,e.height)(o);return YK(YK({},e),{},{y:e.y+e.height-c,height:c})}var d=BO(0,e.width)(o);return YK(YK({},e),{},{width:d})}));return s.createElement(xj,null,e.renderRectanglesStatically(i))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&EB(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,o=t.activeIndex,i=uj(this.props.background,!1);return n.map((function(t,n){t.value;var a=t.background,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,$K);if(!a)return null;var c=YK(YK(YK(YK(YK({},l),{},{fill:"#eee"},a),i),XO(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return s.createElement(VK,qK({key:"background-bar-".concat(n),option:e.props.background,isActive:n===o},c))}))}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,o=n.xAxis,i=n.yAxis,a=n.layout,l=ij(n.children,DW);if(!l)return null;var c="vertical"===a?r[0].height/2:r[0].width/2,u=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:qW(e,t)}},d={clipPath:e?"url(#clipPath-".concat(t,")"):null};return s.createElement(xj,d,l.map((function(e){return s.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:o,yAxis:i,layout:a,offset:c,dataPointFormatter:u})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,o=e.xAxis,i=e.yAxis,a=e.left,l=e.top,c=e.width,u=e.height,d=e.isAnimationActive,f=e.background,p=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,m=Ve("recharts-bar",r),y=o&&o.allowDataOverflow,g=i&&i.allowDataOverflow,v=y||g,b=mO(p)?this.id:p;return s.createElement(xj,{className:m},y||g?s.createElement("defs",null,s.createElement("clipPath",{id:"clipPath-".concat(b)},s.createElement("rect",{x:y?a:a-c/2,y:g?l:l-u/2,width:y?c:2*c,height:g?u:2*u}))):null,s.createElement(xj,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(b,")"):null},f?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,b),(!d||h)&&XV.renderCallByParent(this.props,n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}])}(s.PureComponent);function nY(e){return nY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nY(e)}function rY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sY(r.key),r)}}function oY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oY(Object(n),!0).forEach((function(t){aY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aY(e,t,n){return(t=sY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sY(e){var t=function(e){if("object"!=nY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nY(t)?t:t+""}UK=tY,QK(tY,"displayName","Bar"),QK(tY,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!lD.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),QK(tY,"getComposedData",(function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!p)return null;var h=t.layout,m=n.type.defaultProps,y=void 0!==m?YK(YK({},m),n.props):n.props,g=y.dataKey,v=y.children,b=y.minPointSize,x="horizontal"===h?a:i,w=c?x.scale.domain():null,_=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:x}),S=ij(v,BD),k=d.map((function(e,t){var r,d,f,m,y,v;c?r=function(e,t){if(!t||2!==t.length||!DO(t[0])||!DO(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!DO(e[0])||e[0]<n)&&(o[0]=n),(!DO(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],w):(r=qW(e,g),Array.isArray(r)||(r=[_,r]));var x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o="number"==typeof n;return o?e(n,r):(o||kW(),t)}}(b,UK.defaultProps.minPointSize)(r[1],t);if("horizontal"===h){var k,E=[a.scale(r[0]),a.scale(r[1])],O=E[0],j=E[1];d=lV({axis:i,ticks:s,bandSize:o,offset:p.offset,entry:e,index:t}),f=null!==(k=j??O)&&void 0!==k?k:void 0,m=p.size;var P=O-j;if(y=Number.isNaN(P)?0:P,v={x:d,y:a.y,width:m,height:a.height},Math.abs(x)>0&&Math.abs(y)<Math.abs(x)){var C=NO(y||x)*(Math.abs(x)-Math.abs(y));f-=C,y+=C}}else{var T=[i.scale(r[0]),i.scale(r[1])],A=T[0],N=T[1];d=A,f=lV({axis:a,ticks:l,bandSize:o,offset:p.offset,entry:e,index:t}),m=N-A,y=p.size,v={x:i.x,y:f,width:i.width,height:y},Math.abs(x)>0&&Math.abs(m)<Math.abs(x)&&(m+=NO(m||x)*(Math.abs(x)-Math.abs(m)))}return YK(YK(YK({},e),{},{x:d,y:f,width:m,height:y,value:c?r:r[1],payload:e,background:v},S&&S[t]&&S[t].props),{},{tooltipPayload:[mV(n,e)],tooltipPosition:{x:d+m/2,y:f+y/2}})}));return YK({data:k,layout:h},f)}));var lY=function(e,t,n,r,o){var i=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},d=!!aj(l,tY);return c.reduce((function(i,a){var l,c,f,p,h,m=t[a],y=m.orientation,g=m.domain,v=m.padding,b=void 0===v?{}:v,x=m.mirror,w=m.reversed,_="".concat(y).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var S=g[1]-g[0],k=1/0,E=m.categoricalDomain.sort();if(E.forEach((function(e,t){t>0&&(k=Math.min((e||0)-(E[t-1]||0),k))})),Number.isFinite(k)){var O=k/S,j="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(l=O*j/2),"no-gap"===m.padding){var P=FO(e.barCategoryGap,O*j),C=O*j/2;l=C-P-(C-P)/j*P}}}c="xAxis"===r?[n.left+(b.left||0)+(l||0),n.left+n.width-(b.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(l||0),n.top+n.height-(b.bottom||0)-(l||0)]:m.range,w&&(c=[c[1],c[0]]);var T=tV(m,o,d),A=T.scale,N=T.realScaleType;A.domain(g).range(c),rV(A);var M=aV(A,iY(iY({},m),{},{realScaleType:N}));"xAxis"===r?(h="top"===y&&!x||"bottom"===y&&x,f=n.left,p=u[_]-h*m.height):"yAxis"===r&&(h="left"===y&&!x||"right"===y&&x,f=u[_]-h*m.width,p=n.top);var D=iY(iY(iY({},m),M),{},{realScaleType:N,x:f,y:p,scale:A,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return D.bandSize=pV(D,M),m.hide||"xAxis"!==r?m.hide||(u[_]+=(h?-1:1)*D.width):u[_]+=(h?-1:1)*D.height,iY(iY({},i),{},aY({},a,D))}),{})},cY=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},uY=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.scale=t}return function(e,t,n){return t&&rY(e.prototype,t),n&&rY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(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(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:"create",value:function(t){return new e(t)}}])}();aY(uY,"EPS",1e-4);var dY=function(e){var t=Object.keys(e).reduce((function(t,n){return iY(iY({},t),{},aY({},n,uY.create(e[n])))}),{});return iY(iY({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return OK(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:o})}))},isInRange:function(e){return DK(e,(function(e,n){return t[n].isInRange(e)}))}})},fY=pN,pY=zT,hY=UT,mY=$q,yY=hN,gY=pN,vY=function(e){var t=mY(e),n=t%1;return t==t?n?t-n:t:0},bY=Math.max;var xY=WE((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("")})),wY=(0,s.createContext)(void 0),_Y=(0,s.createContext)(void 0),SY=(0,s.createContext)(void 0),kY=(0,s.createContext)({}),EY=(0,s.createContext)(void 0),OY=(0,s.createContext)(0),jY=(0,s.createContext)(0),PY=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,o=t.offset,i=e.clipPathId,a=e.children,l=e.width,c=e.height,u=xY(o);return s.createElement(wY.Provider,{value:n},s.createElement(_Y.Provider,{value:r},s.createElement(kY.Provider,{value:o},s.createElement(SY.Provider,{value:u},s.createElement(EY.Provider,{value:i},s.createElement(OY.Provider,{value:c},s.createElement(jY.Provider,{value:l},a)))))))},CY=function(e){var t=(0,s.useContext)(wY);null==t&&kW();var n=t[e];return null==n&&kW(),n},TY=function(e){var t=(0,s.useContext)(_Y);null==t&&kW();var n=t[e];return null==n&&kW(),n},AY=function(){return(0,s.useContext)(jY)},NY=function(){return(0,s.useContext)(OY)};function MY(e){return MY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MY(e)}function DY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(DY=function(){return!!e})()}function IY(e){return IY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},IY(e)}function RY(e,t){return(RY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function LY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function FY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LY(Object(n),!0).forEach((function(t){zY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function zY(e,t,n){return(t=BY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BY(e){var t=function(e){if("object"!=MY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=MY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==MY(t)?t:t+""}function WY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VY(){return VY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VY.apply(this,arguments)}function UY(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,i=e.yAxisId,a=e.shape,l=e.className,c=e.alwaysShow,u=(0,s.useContext)(EY),d=CY(o),f=TY(i),p=(0,s.useContext)(SY);if(!u||!p)return null;wj(void 0===c,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=function(e,t,n,r,o,i,a,s,l){var c=o.x,u=o.y,d=o.width,f=o.height;if(n){var p=l.y,h=e.y.apply(p,{position:i});if(xK(l,"discard")&&!e.y.isInRange(h))return null;var m=[{x:c+d,y:h},{x:c,y:h}];return"left"===s?m.reverse():m}if(t){var y=l.x,g=e.x.apply(y,{position:i});if(xK(l,"discard")&&!e.x.isInRange(g))return null;var v=[{x:g,y:u+f},{x:g,y:u}];return"top"===a?v.reverse():v}if(r){var b=l.segment.map((function(t){return e.apply(t,{position:i})}));return xK(l,"discard")&&bK(b,(function(t){return!e.isInRange(t)}))?null:b}return null}(dY({x:d.scale,y:f.scale}),IO(t),IO(n),r&&2===r.length,p,e.position,d.orientation,f.orientation,e);if(!h)return null;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return WY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WY(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2),y=m[0],g=y.x,v=y.y,b=m[1],x=b.x,w=b.y,_=FY(FY({clipPath:xK(e,"hidden")?"url(#".concat(u,")"):void 0},uj(e,!0)),{},{x1:g,y1:v,x2:x,y2:w});return s.createElement(xj,{className:Ve("recharts-reference-line",l)},function(e,t){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement("line",VY({},t,{className:"recharts-reference-line-line"}))}(a,_),IV.renderCallByParent(e,function(e){return cY({x:e.x1,y:e.y1},{x:e.x2,y:e.y2})}({x1:g,y1:v,x2:x,y2:w})))}var $Y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=IY(t),function(e,t){if(t&&("object"===MY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,DY()?Reflect.construct(t,n||[],IY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RY(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BY(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return s.createElement(UY,this.props)}}])}(s.Component);function HY(){return HY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HY.apply(this,arguments)}function qY(e){return qY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qY(e)}function KY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KY(Object(n),!0).forEach((function(t){JY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function XY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(XY=function(){return!!e})()}function GY(e){return GY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},GY(e)}function ZY(e,t){return(ZY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function JY(e,t,n){return(t=QY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QY(e){var t=function(e){if("object"!=qY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qY(t)?t:t+""}zY($Y,"displayName","ReferenceLine"),zY($Y,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var eX=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=GY(t),function(e,t){if(t&&("object"===qY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,XY()?Reflect.construct(t,n||[],GY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZY(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QY(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,o=e.r,i=e.alwaysShow,a=e.clipPathId,l=IO(n),c=IO(r);if(wj(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!l||!c)return null;var u=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,i=dY({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return xK(e,"discard")&&!i.isInRange(a)?null:a}(this.props);if(!u)return null;var d=u.x,f=u.y,p=this.props,h=p.shape,m=p.className,y=YY(YY({clipPath:xK(this.props,"hidden")?"url(#".concat(a,")"):void 0},uj(this.props,!0)),{},{cx:d,cy:f});return s.createElement(xj,{className:Ve("recharts-reference-dot",m)},t.renderDot(h,y),IV.renderCallByParent(this.props,{x:d-o,y:f-o,width:2*o,height:2*o}))}}])}(s.Component);function tX(){return tX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tX.apply(this,arguments)}function nX(e){return nX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nX(e)}function rX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rX(Object(n),!0).forEach((function(t){lX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(iX=function(){return!!e})()}function aX(e){return aX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},aX(e)}function sX(e,t){return(sX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lX(e,t,n){return(t=cX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cX(e){var t=function(e){if("object"!=nX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nX(t)?t:t+""}JY(eX,"displayName","ReferenceDot"),JY(eX,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),JY(eX,"renderDot",(function(e,t){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement(J$,HY({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))}));var uX=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=aX(t),function(e,t){if(t&&("object"===nX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iX()?Reflect.construct(t,n||[],aX(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sX(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cX(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,n=e.x1,r=e.x2,o=e.y1,i=e.y2,a=e.className,l=e.alwaysShow,c=e.clipPathId;wj(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var u=IO(n),d=IO(r),f=IO(o),p=IO(i),h=this.props.shape;if(!(u||d||f||p||h))return null;var m=function(e,t,n,r,o){var i=o.x1,a=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var d=dY({x:c.scale,y:u.scale}),f={x:e?d.x.apply(i,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},p={x:t?d.x.apply(a,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!xK(o,"discard")||d.isInRange(f)&&d.isInRange(p)?cY(f,p):null}(u,d,f,p,this.props);if(!m&&!h)return null;var y=xK(this.props,"hidden")?"url(#".concat(c,")"):void 0;return s.createElement(xj,{className:Ve("recharts-reference-area",a)},t.renderRect(h,oX(oX({clipPath:y},uj(this.props,!0)),m)),IV.renderCallByParent(this.props,m))}}])}(s.Component);function dX(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function fX(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function pX(e){return pX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pX(e)}function hX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hX(Object(n),!0).forEach((function(t){yX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yX(e,t,n){return t=function(e){var t=function(e){if("object"!=pX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pX(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gX(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(DO(l)||lD.isSsr)return function(e,t){return dX(e,t+1)}(o,"number"==typeof l&&DO(l)?l:0);var f=[],p="top"===s||"bottom"===s?"width":"height",h=u&&"width"===p?YD(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(e,r){var o=Ck(c)?c(e.value,r):e.value;return"width"===p?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}(YD(o,{fontSize:t,letterSpacing:n}),h,d):YD(o,{fontSize:t,letterSpacing:n})[p]},y=o.length>=2?NO(o[1].coordinate-o[0].coordinate):1,g=function(e,t,n){var r="width"===n,o=e.x,i=e.y,a=e.width,s=e.height;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(i,y,p);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:dX(r,u)};var i,a=c,f=function(){return void 0===i&&(i=n(t,a)),i},p=t.coordinate,h=0===c||fX(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+o),c+=u)};u<=a.length;)if(i=f())return i.v;return[]}(y,g,m,o,a):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=mX(mX({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),fX(e,u.tickCoord,(function(){return d}),l,c)&&(c=u.tickCoord-e*(d/2+o),a[s-1]=mX(mX({},u),{},{isShow:!0}))}for(var p=i?s-1:s,h=function(t){var r,i=a[t],s=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var u=e*(i.coordinate-e*s()/2-l);a[t]=i=mX(mX({},i),{},{tickCoord:u<0?i.coordinate-u*e:i.coordinate})}else a[t]=i=mX(mX({},i),{},{tickCoord:i.coordinate});fX(e,i.tickCoord,s,l,c)&&(l=i.tickCoord+e*(s()/2+o),a[t]=mX(mX({},i),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(y,g,m,o,a,"preserveStartEnd"===l):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,l=t.end,c=function(t){var r,c=i[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===a-1){var d=e*(c.coordinate+e*u()/2-l);i[t]=c=mX(mX({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else i[t]=c=mX(mX({},c),{},{tickCoord:c.coordinate});fX(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),i[t]=mX(mX({},c),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}(y,g,m,o,a),f.filter((function(e){return e.isShow})))}lX(uX,"displayName","ReferenceArea"),lX(uX,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),lX(uX,"renderRect",(function(e,t){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement(U$,tX({},t,{className:"recharts-reference-area-rect"}))}));var vX=["viewBox"],bX=["viewBox"],xX=["ticks"];function wX(e){return wX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wX(e)}function _X(){return _X=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_X.apply(this,arguments)}function SX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SX(Object(n),!0).forEach((function(t){TX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function OX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,AX(r.key),r)}}function jX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jX=function(){return!!e})()}function PX(e){return PX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},PX(e)}function CX(e,t){return(CX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function TX(e,t,n){return(t=AX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AX(e){var t=function(e){if("object"!=wX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wX(t)?t:t+""}var NX=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=PX(t),function(e,t){if(t&&("object"===wX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jX()?Reflect.construct(t,n||[],PX(e).constructor):t.apply(e,n))}(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CX(e,t)}(t,e),function(e,t,n){return t&&OX(e.prototype,t),n&&OX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=EX(e,vX),o=this.props,i=o.viewBox,a=EX(o,bX);return!VO(n,i)||!VO(r,a)||!VO(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,i,a,s=this.props,l=s.x,c=s.y,u=s.width,d=s.height,f=s.orientation,p=s.tickSize,h=s.mirror,m=s.tickMargin,y=h?-1:1,g=e.tickSize||p,v=DO(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=n=e.coordinate,a=(r=(o=c+ +!h*d)-y*g)-y*m,i=v;break;case"left":r=o=e.coordinate,i=(t=(n=l+ +!h*u)-y*g)-y*m,a=v;break;case"right":r=o=e.coordinate,i=(t=(n=l+ +h*u)+y*g)+y*m,a=v;break;default:t=n=e.coordinate,a=(r=(o=c+ +h*d)+y*g)+y*m,i=v}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.orientation,a=e.mirror,l=e.axisLine,c=kX(kX(kX({},uj(this.props,!1)),uj(l,!1)),{},{fill:"none"});if("top"===i||"bottom"===i){var u=+("top"===i&&!a||"bottom"===i&&a);c=kX(kX({},c),{},{x1:t,y1:n+u*o,x2:t+r,y2:n+u*o})}else{var d=+("left"===i&&!a||"right"===i&&a);c=kX(kX({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+o})}return s.createElement("line",_X({},c,{className:Ve("recharts-cartesian-axis-line",pO(l,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var o=this,i=this.props,a=i.tickLine,l=i.stroke,c=i.tick,u=i.tickFormatter,d=i.unit,f=gX(kX(kX({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=uj(this.props,!1),y=uj(c,!1),g=kX(kX({},m),{},{fill:"none"},uj(a,!1)),v=f.map((function(e,n){var r=o.getTickLineCoord(e),i=r.line,v=r.tick,b=kX(kX(kX(kX({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:l},y),v),{},{index:n,payload:e,visibleTicksCount:f.length,tickFormatter:u});return s.createElement(xj,_X({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},XO(o.props,e,n)),a&&s.createElement("line",_X({},g,i,{className:Ve("recharts-cartesian-axis-tick-line",pO(a,"className"))})),c&&t.renderTickItem(c,b,"".concat(Ck(u)?u(e.value,n):e.value).concat(d||"")))}));return s.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,o=t.height,i=t.ticksGenerator,a=t.className;if(t.hide)return null;var l=this.props,c=l.ticks,u=EX(l,xX),d=c;return Ck(i)&&(d=c&&c.length>0?i(this.props):i(u)),r<=0||o<=0||!d||!d.length?null:s.createElement(xj,{className:Ve("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(d,this.state.fontSize,this.state.letterSpacing),IV.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(e,t,n){return s.isValidElement(e)?s.cloneElement(e,t):Ck(e)?e(t):s.createElement(wI,_X({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}])}(s.Component);TX(NX,"displayName","CartesianAxis"),TX(NX,"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 MX=["type","layout","connectNulls","ref"],DX=["key"];function IX(e){return IX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},IX(e)}function RX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function LX(){return LX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LX.apply(this,arguments)}function FX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FX(Object(n),!0).forEach((function(t){qX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BX(e){return function(e){if(Array.isArray(e))return WX(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return WX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WX(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KX(r.key),r)}}function UX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(UX=function(){return!!e})()}function $X(e){return $X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$X(e)}function HX(e,t){return(HX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qX(e,t,n){return(t=KX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KX(e){var t=function(e){if("object"!=IX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=IX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==IX(t)?t:t+""}var YX=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return qX(e=function(e,t,n){return t=$X(t),function(e,t){if(t&&("object"===IX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,UX()?Reflect.construct(t,n||[],$X(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),qX(e,"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),qX(e,"getStrokeDasharray",(function(n,r,o){var i=o.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,n);for(var a=Math.floor(n/i),s=n%i,l=r-n,c=[],u=0,d=0;u<o.length;d+=o[u],++u)if(d+o[u]>s){c=[].concat(BX(o.slice(0,u)),[s-d]);break}var f=c.length%2==0?[0,l]:[l];return[].concat(BX(t.repeat(o,a)),BX(c),f).map((function(e){return"".concat(e,"px")})).join(", ")})),qX(e,"id",LO("recharts-line-")),qX(e,"pathRef",(function(t){e.mainCurve=t})),qX(e,"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),qX(e,"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HX(e,t)}(t,e),function(e,t,n){return t&&VX(e.prototype,t),n&&VX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,o=n.xAxis,i=n.yAxis,a=n.layout,l=ij(n.children,DW);if(!l)return null;var c=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:qW(e.payload,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return s.createElement(xj,u,l.map((function(e){return s.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:r,xAxis:o,yAxis:i,layout:a,dataPointFormatter:c})})))}},{key:"renderDots",value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.dot,a=o.points,l=o.dataKey,c=uj(this.props,!1),u=uj(i,!0),d=a.map((function(e,n){var r=zX(zX(zX({key:"dot-".concat(n),r:3},c),u),{},{value:e.value,dataKey:l,cx:e.x,cy:e.y,index:n,payload:e.payload});return t.renderDotItem(i,r)})),f={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return s.createElement(xj,LX({className:"recharts-line-dots",key:"dots"},f),d)}},{key:"renderCurveStatically",value:function(e,t,n,r){var o=this.props,i=o.type,a=o.layout,l=o.connectNulls;o.ref;var c=RX(o,MX),u=zX(zX(zX({},uj(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r),{},{type:i,layout:a,connectNulls:l});return s.createElement(vU,LX({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,o=r.points,i=r.strokeDasharray,a=r.isAnimationActive,l=r.animationBegin,c=r.animationDuration,u=r.animationEasing,d=r.animationId,f=r.animateNewValues,p=r.width,h=r.height,m=this.state,y=m.prevPoints,g=m.totalLength;return s.createElement(M$,{begin:l,duration:c,isActive:a,easing:u,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var a=r.t;if(y){var s=y.length/o.length,l=o.map((function(e,t){var n=Math.floor(t*s);if(y[n]){var r=y[n],o=BO(r.x,e.x),i=BO(r.y,e.y);return zX(zX({},e),{},{x:o(a),y:i(a)})}if(f){var l=BO(2*p,e.x),c=BO(h/2,e.y);return zX(zX({},e),{},{x:l(a),y:c(a)})}return zX(zX({},e),{},{x:e.x,y:e.y})}));return n.renderCurveStatically(l,e,t)}var c,u=BO(0,g)(a);if(i){var d="".concat(i).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));c=n.getStrokeDasharray(u,g,d)}else c=n.generateSimpleStrokeDasharray(g,u);return n.renderCurveStatically(o,e,t,{strokeDasharray:c})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,s=i.totalLength;return o&&r&&r.length&&(!a&&s>0||!EB(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,o=t.points,i=t.className,a=t.xAxis,l=t.yAxis,c=t.top,u=t.left,d=t.width,f=t.height,p=t.isAnimationActive,h=t.id;if(n||!o||!o.length)return null;var m=this.state.isAnimationFinished,y=1===o.length,g=Ve("recharts-line",i),v=a&&a.allowDataOverflow,b=l&&l.allowDataOverflow,x=v||b,w=mO(h)?this.id:h,_=null!==(e=uj(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},S=_.r,k=void 0===S?3:S,E=_.strokeWidth,O=void 0===E?2:E,j=(cj(r)?r:{}).clipDot,P=void 0===j||j,C=2*k+O;return s.createElement(xj,{className:g},v||b?s.createElement("defs",null,s.createElement("clipPath",{id:"clipPath-".concat(w)},s.createElement("rect",{x:v?u:u-d/2,y:b?c:c-f/2,width:v?d:2*d,height:b?f:2*f})),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(w)},s.createElement("rect",{x:u-C/2,y:c-C/2,width:d+C,height:f+C}))):null,!y&&this.renderCurve(x,w),this.renderErrorBar(x,w),(y||r)&&this.renderDots(x,P,w),(!p||m)&&XV.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(BX(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(BX(r),BX(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(s.isValidElement(e))n=s.cloneElement(e,t);else if(Ck(e))n=e(t);else{var r=t.key,o=RX(t,DX),i=Ve("recharts-line-dot","boolean"!=typeof e?e.className:"");n=s.createElement(J$,LX({key:r},o,{className:i}))}return n}}])}(s.PureComponent);qX(YX,"displayName","Line"),qX(YX,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!lD.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),qX(YX,"getComposedData",(function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map((function(e,t){var l=qW(e,a);return"horizontal"===u?{x:sV({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:mO(l)?null:r.scale(l),value:l,payload:e}:{x:mO(l)?null:n.scale(l),y:sV({axis:r,ticks:i,bandSize:s,entry:e,index:t}),value:l,payload:e}}));return zX({points:d,layout:u},c)}));var XX,GX=["layout","type","stroke","connectNulls","isRange","ref"],ZX=["key"];function JX(e){return JX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JX(e)}function QX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function eG(){return eG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eG.apply(this,arguments)}function tG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tG(Object(n),!0).forEach((function(t){sG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lG(r.key),r)}}function oG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(oG=function(){return!!e})()}function iG(e){return iG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},iG(e)}function aG(e,t){return(aG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sG(e,t,n){return(t=lG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lG(e){var t=function(e){if("object"!=JX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=JX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==JX(t)?t:t+""}var cG=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return sG(e=function(e,t,n){return t=iG(t),function(e,t){if(t&&("object"===JX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oG()?Reflect.construct(t,n||[],iG(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0}),sG(e,"id",LO("recharts-area-")),sG(e,"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),Ck(t)&&t()})),sG(e,"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),Ck(t)&&t()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aG(e,t)}(t,e),function(e,t,n){return t&&rG(e.prototype,t),n&&rG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderDots",value:function(e,n,r){var o=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(o&&!i)return null;var a=this.props,l=a.dot,c=a.points,u=a.dataKey,d=uj(this.props,!1),f=uj(l,!0),p=c.map((function(e,n){var r=nG(nG(nG({key:"dot-".concat(n),r:3},d),f),{},{index:n,cx:e.x,cy:e.y,dataKey:u,value:e.value,payload:e.payload,points:c});return t.renderDotItem(l,r)})),h={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return s.createElement(xj,eG({className:"recharts-area-dots"},h),p)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,o=t.strokeWidth,i=r[0].x,a=r[r.length-1].x,l=e*Math.abs(i-a),c=lB(r.map((function(e){return e.y||0})));return DO(n)&&"number"==typeof n?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(lB(n.map((function(e){return e.y||0}))),c)),DO(c)?s.createElement("rect",{x:i<a?i:i-l,y:0,width:l,height:Math.floor(c+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,o=t.strokeWidth,i=r[0].y,a=r[r.length-1].y,l=e*Math.abs(i-a),c=lB(r.map((function(e){return e.x||0})));return DO(n)&&"number"==typeof n?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(lB(n.map((function(e){return e.x||0}))),c)),DO(c)?s.createElement("rect",{x:0,y:i<a?i:i-l,width:c+(o?parseInt("".concat(o),10):1),height:Math.floor(l)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,n,r){var o=this.props,i=o.layout,a=o.type,l=o.stroke,c=o.connectNulls,u=o.isRange;o.ref;var d=QX(o,GX);return s.createElement(xj,{clipPath:n?"url(#clipPath-".concat(r,")"):null},s.createElement(vU,eG({},uj(d,!0),{points:e,connectNulls:c,type:a,baseLine:t,layout:i,stroke:"none",className:"recharts-area-area"})),"none"!==l&&s.createElement(vU,eG({},uj(this.props,!1),{className:"recharts-area-curve",layout:i,type:a,connectNulls:c,fill:"none",points:e})),"none"!==l&&u&&s.createElement(vU,eG({},uj(this.props,!1),{className:"recharts-area-curve",layout:i,type:a,connectNulls:c,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var n=this,r=this.props,o=r.points,i=r.baseLine,a=r.isAnimationActive,l=r.animationBegin,c=r.animationDuration,u=r.animationEasing,d=r.animationId,f=this.state,p=f.prevPoints,h=f.prevBaseLine;return s.createElement(M$,{begin:l,duration:c,isActive:a,easing:u,from:{t:0},to:{t:1},key:"area-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var a=r.t;if(p){var l,c=p.length/o.length,u=o.map((function(e,t){var n=Math.floor(t*c);if(p[n]){var r=p[n],o=BO(r.x,e.x),i=BO(r.y,e.y);return nG(nG({},e),{},{x:o(a),y:i(a)})}return e}));return l=DO(i)&&"number"==typeof i?BO(h,i)(a):mO(i)||AO(i)?BO(h,0)(a):i.map((function(e,t){var n=Math.floor(t*c);if(h[n]){var r=h[n],o=BO(r.x,e.x),i=BO(r.y,e.y);return nG(nG({},e),{},{x:o(a),y:i(a)})}return e})),n.renderAreaStatically(u,l,e,t)}return s.createElement(xj,null,s.createElement("defs",null,s.createElement("clipPath",{id:"animationClipPath-".concat(t)},n.renderClipRect(a))),s.createElement(xj,{clipPath:"url(#animationClipPath-".concat(t,")")},n.renderAreaStatically(o,i,e,t)))}))}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,s=a.prevPoints,l=a.prevBaseLine,c=a.totalLength;return i&&r&&r.length&&(!s&&c>0||!EB(s,r)||!EB(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,o=t.points,i=t.className,a=t.top,l=t.left,c=t.xAxis,u=t.yAxis,d=t.width,f=t.height,p=t.isAnimationActive,h=t.id;if(n||!o||!o.length)return null;var m=this.state.isAnimationFinished,y=1===o.length,g=Ve("recharts-area",i),v=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,x=v||b,w=mO(h)?this.id:h,_=null!==(e=uj(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},S=_.r,k=void 0===S?3:S,E=_.strokeWidth,O=void 0===E?2:E,j=(cj(r)?r:{}).clipDot,P=void 0===j||j,C=2*k+O;return s.createElement(xj,{className:g},v||b?s.createElement("defs",null,s.createElement("clipPath",{id:"clipPath-".concat(w)},s.createElement("rect",{x:v?l:l-d/2,y:b?a:a-f/2,width:v?d:2*d,height:b?f:2*f})),!P&&s.createElement("clipPath",{id:"clipPath-dots-".concat(w)},s.createElement("rect",{x:l-C/2,y:a-C/2,width:d+C,height:f+C}))):null,y?null:this.renderArea(x,w),(r||y)&&this.renderDots(x,P,w),(!p||m)&&XV.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}])}(s.PureComponent);function uG(e){return uG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uG(e)}function dG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(dG=function(){return!!e})()}function fG(e){return fG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fG(e)}function pG(e,t){return(pG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hG(e,t,n){return(t=mG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mG(e){var t=function(e){if("object"!=uG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=uG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==uG(t)?t:t+""}function yG(){return yG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yG.apply(this,arguments)}function gG(e){var t=e.xAxisId,n=AY(),r=NY(),o=CY(t);return null==o?null:s.createElement(NX,yG({},o,{className:Ve("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return JW(e,!0)}}))}XX=cG,sG(cG,"displayName","Area"),sG(cG,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!lD.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),sG(cG,"getBaseValue",(function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue??i;if(DO(a)&&"number"==typeof a)return a;var s="horizontal"===o?r:n,l=s.scale.domain();if("number"===s.type){var c=Math.max(l[0],l[1]),u=Math.min(l[0],l[1]);return"dataMin"===a?u:"dataMax"===a||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return"dataMin"===a?l[0]:"dataMax"===a?l[1]:l[0]})),sG(cG,"getComposedData",(function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,y=XX.getBaseValue(n,r,o,i),g="horizontal"===h,v=!1,b=f.map((function(e,t){var n;m?n=u[d+t]:(n=qW(e,c),Array.isArray(n)?v=!0:n=[y,n]);var r=null==n[1]||m&&null==qW(e,c);return g?{x:sV({axis:o,ticks:a,bandSize:l,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:sV({axis:i,ticks:s,bandSize:l,entry:e,index:t}),value:n,payload:e}}));return t=m||v?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}})):g?i.scale(y):o.scale(y),nG({points:b,baseLine:t,layout:h,isRange:v},p)})),sG(cG,"renderDotItem",(function(e,t){var n;if(s.isValidElement(e))n=s.cloneElement(e,t);else if(Ck(e))n=e(t);else{var r=Ve("recharts-area-dot","boolean"!=typeof e?e.className:""),o=t.key,i=QX(t,ZX);n=s.createElement(J$,eG({},i,{key:o,className:r}))}return n}));var vG=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=fG(t),function(e,t){if(t&&("object"===uG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dG()?Reflect.construct(t,n||[],fG(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pG(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return s.createElement(gG,this.props)}}])}(s.Component);function bG(e){return bG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bG(e)}function xG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xG=function(){return!!e})()}function wG(e){return wG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wG(e)}function _G(e,t){return(_G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function SG(e,t,n){return(t=kG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kG(e){var t=function(e){if("object"!=bG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bG(t)?t:t+""}function EG(){return EG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EG.apply(this,arguments)}hG(vG,"displayName","XAxis"),hG(vG,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var OG=function(e){var t=e.yAxisId,n=AY(),r=NY(),o=TY(t);return null==o?null:s.createElement(NX,EG({},o,{className:Ve("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return JW(e,!0)}}))},jG=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=wG(t),function(e,t){if(t&&("object"===bG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,xG()?Reflect.construct(t,n||[],wG(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_G(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return s.createElement(OG,this.props)}}])}(s.Component);function PG(e){return function(e){if(Array.isArray(e))return CG(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return CG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CG(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function CG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}SG(jG,"displayName","YAxis"),SG(jG,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var TG=function(e,t,n,r,o){var i=ij(e,$Y),a=ij(e,eX),s=[].concat(PG(i),PG(a)),l=ij(e,uX),c="".concat(r,"Id"),u=r[0],d=t;if(s.length&&(d=s.reduce((function(e,t){if(t.props[c]===n&&xK(t.props,"extendDomain")&&DO(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e}),d)),l.length){var f="".concat(u,"1"),p="".concat(u,"2");d=l.reduce((function(e,t){if(t.props[c]===n&&xK(t.props,"extendDomain")&&DO(t.props[f])&&DO(t.props[p])){var r=t.props[f],o=t.props[p];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e}),d)}return o&&o.length&&(d=o.reduce((function(e,t){return DO(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),d)),d},AG={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn===t&&(!o||s.once)&&(!r||s.context===r)&&a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(AG);var NG=new(B(AG.exports)),MG="recharts.syncMouseEvents";function DG(e){return DG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DG(e)}function IG(e,t,n){return(t=RG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RG(e){var t=function(e){if("object"!=DG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=DG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==DG(t)?t:t+""}var LG=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),IG(this,"activeIndex",0),IG(this,"coordinateList",[]),IG(this,"layout","horizontal")}),[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,i=void 0===o?null:o,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=r??this.coordinateList)&&void 0!==t?t:[],this.container=i??this.container,this.layout=s??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=d??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,i=n.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+a+s,u=o+this.offset.top+i/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}])}();function FG(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[SV(t,n,r,o),SV(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function zG(e,t,n){var r,o,i,a;if("horizontal"===e)i=r=t.x,o=n.top,a=n.top+n.height;else if("vertical"===e)a=o=t.y,r=n.left,i=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return FG(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,f=SV(s,l,c,d),p=SV(s,l,u,d);r=f.x,o=f.y,i=p.x,a=p.y}return[{x:r,y:o},{x:i,y:a}]}function BG(e){return BG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},BG(e)}function WG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WG(Object(n),!0).forEach((function(t){UG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function UG(e,t,n){return t=function(e){var t=function(e){if("object"!=BG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BG(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $G(e){var t,n,r=e.element,o=e.tooltipEventType,i=e.isActive,a=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,h=null!==(t=r.props.cursor)&&void 0!==t?t:null===(n=r.type.defaultProps)||void 0===n?void 0:n.cursor;if(!r||!h||!i||!a||"ScatterChart"!==p&&"axis"!==o)return null;var m,y=vU;if("ScatterChart"===p)m=a,y=iH;else if("BarChart"===p)m=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(f,a,c,d),y=U$;else if("radial"===f){var g=FG(a),v=g.cx,b=g.cy,x=g.radius;m={cx:v,cy:b,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:x,outerRadius:x},y=oU}else m={points:zG(f,a,c)},y=vU;var w=VG(VG(VG(VG({stroke:"#ccc",pointerEvents:"none"},c),m),uj(h,!1)),{},{payload:l,payloadIndex:u,className:Ve("recharts-tooltip-cursor",h.className)});return(0,s.isValidElement)(h)?(0,s.cloneElement)(h,w):(0,s.createElement)(y,w)}var HG=["item"],qG=["children","className","width","height","style","compact","title","desc"];function KG(e){return KG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},KG(e)}function YG(){return YG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YG.apply(this,arguments)}function XG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||tZ(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)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}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ZG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ZG=function(){return!!e})()}function JG(e){return JG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},JG(e)}function QG(e,t){return(QG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eZ(e){return function(e){if(Array.isArray(e))return nZ(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||tZ(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tZ(e,t){if(e){if("string"==typeof e)return nZ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nZ(e,t)}}function nZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rZ(Object(n),!0).forEach((function(t){iZ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rZ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iZ(e,t,n){return(t=aZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aZ(e){var t=function(e){if("object"!=KG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=KG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==KG(t)?t:t+""}var sZ={xAxis:["bottom","top"],yAxis:["left","right"]},lZ={width:"100%",height:"100%"},cZ={x:0,y:0};function uZ(e){return e}var dZ=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,i=(n??[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(eZ(e),eZ(n)):e}),[]);return i.length>0?i:e&&e.length&&DO(r)&&DO(o)?e.slice(r,o+1):[]};function fZ(e){return"number"===e?[0,"auto"]:void 0}var pZ=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=dZ(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce((function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(c=i.dataKey&&!i.allowDuplicatedCategory?WO(void 0===u?a:u,i.dataKey,r):u&&u[n]||a[n])?[].concat(eZ(o),[mV(s,c)]):o}),[])},hZ=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<a;l++){var c=l>0?r[l-1].coordinate:r[a-1].coordinate,u=r[l].coordinate,d=l>=a-1?r[0].coordinate:r[l+1].coordinate,f=void 0;if(NO(u-c)!==NO(d-u)){var p=[];if(NO(d-u)===NO(s[1]-s[0])){f=d;var h=u+s[1]-s[0];p[0]=Math.min(h,(h+c)/2),p[1]=Math.max(h,(h+c)/2)}else{f=c;var m=d+s[1]-s[0];p[0]=Math.min(u,(m+u)/2),p[1]=Math.max(u,(m+u)/2)}var y=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>y[0]&&e<=y[1]||e>=p[0]&&e<=p[1]){i=r[l].index;break}}else{var g=Math.min(c,d),v=Math.max(c,d);if(e>(g+u)/2&&e<=(v+u)/2){i=r[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}return i}(i,a,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=pZ(e,t,c,u),f=function(e,t,n,r){var o=t.find((function(e){return e&&e.index===n}));if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var i=o.coordinate,a=r.radius;return oZ(oZ(oZ({},r),SV(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,l=r.angle;return oZ(oZ(oZ({},r),SV(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return cZ}(n,a,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:f}}return null},mZ=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=ij(c,o),f={};return d&&d.length?f=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,f=ZW(c,o);return n.reduce((function(t,n){var p,h=void 0!==n.type.defaultProps?oZ(oZ({},n.type.defaultProps),n.props):n.props,m=h.type,y=h.dataKey,g=h.allowDataOverflow,v=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,_=h[i];if(t[_])return t;var S,k,E,O=dZ(e.data,{graphicalItems:r.filter((function(e){var t;return(i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i])===_})),dataStartIndex:s,dataEndIndex:l}),j=O.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&DO(r)&&DO(o))return!0}return!1})(h.domain,g,m)&&(S=fV(h.domain,null,g),f&&("number"===m||"auto"!==b)&&(E=KW(O,y,"category")));var P=fZ(m);if(!S||0===S.length){var C,T=null!==(C=h.domain)&&void 0!==C?C:P;if(y){if(S=KW(O,y,m),"category"===m&&f){var A=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(S);v&&A?(k=S,S=Yq(0,j)):v||(S=hV(T,S,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(eZ(e),[t])}),[]))}else if("category"===m)S=v?S.filter((function(e){return""!==e&&!mO(e)})):hV(T,S,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||mO(t)?e:[].concat(eZ(e),[t])}),[]);else if("number"===m){var N=function(e,t,n,r,o){var i=t.map((function(t){return XW(e,t,n,o,r)})).filter((function(e){return!mO(e)}));return i&&i.length?i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(O,r.filter((function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===_&&(w||!o)})),y,o,c);N&&(S=N)}f&&("number"===m||"auto"!==b)&&(E=KW(O,y,"category"))}else S=f?Yq(0,j):a&&a[_]&&a[_].hasStack&&"number"===m?"expand"===d?[0,1]:cV(a[_].stackGroups,s,l):GW(O,r.filter((function(e){var t=i in e.props?e.props[i]:e.type.defaultProps[i],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===_&&(w||!n)})),m,c,!0);if("number"===m)S=TG(u,S,_,o,x),T&&(S=fV(T,S,g));else if("category"===m&&T){var M=T;S.every((function(e){return M.indexOf(e)>=0}))&&(S=M)}}return oZ(oZ({},t),{},iZ({},_,oZ(oZ({},h),{},{axisType:o,domain:S,categoricalDomain:E,duplicateDomain:k,originalDomain:null!==(p=h.domain)&&void 0!==p?p:P,isCategorical:f,layout:c})))}),{})}(e,{axes:d,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):i&&i.length&&(f=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=dZ(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),f=d.length,p=ZW(c,o),h=-1;return n.reduce((function(e,t){var m,y=(void 0!==t.type.defaultProps?oZ(oZ({},t.type.defaultProps),t.props):t.props)[i],g=fZ("number");return e[y]?e:(h++,p?m=Yq(0,f):a&&a[y]&&a[y].hasStack?(m=cV(a[y].stackGroups,s,l),m=TG(u,m,y,o)):(m=fV(g,GW(d,n.filter((function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===y&&!o})),"number",c),r.defaultProps.allowDataOverflow),m=TG(u,m,y,o)),oZ(oZ({},e),{},iZ({},y,oZ(oZ({axisType:o},r.defaultProps),{},{hide:!0,orientation:pO(sZ,"".concat(o,".").concat(h%2),null),domain:m,originalDomain:g,isCategorical:p,layout:c}))))}),{})}(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),f},yZ=function(e){var t=e.children,n=e.defaultShowTooltip,r=aj(t,dK),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},gZ=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},vZ=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},bZ=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,o=void 0===r?"axis":r,i=e.validateTooltipEventTypes,a=void 0===i?["axis"]:i,l=e.axisComponents,c=e.legendContent,u=e.formatAxisMap,d=e.defaultProps,f=function(e,r){var o=e.props,i=e.dataStartIndex,a=e.dataEndIndex,s=e.updateId;if(!sj({props:o}))return null;var c=o.children,d=o.layout,f=o.stackOffset,p=o.data,h=o.reverseStackOrder,m=gZ(d),y=m.numericAxisName,g=m.cateAxisName,v=ij(c,n),b=function(e,t,n,r,o,i){if(!e)return null;var a=(i?t.reverse():t).reduce((function(e,t){var o,i=null!==(o=t.type)&&void 0!==o&&o.defaultProps?$W($W({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(i.hide)return e;var s=i[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(IO(a)){var c=l.stackGroups[a]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[LO("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return $W($W({},e),{},HW({},s,l))}),{});return Object.keys(a).reduce((function(t,i){var s=a[i];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce((function(t,i){var a=s.stackGroups[i];return $W($W({},t),{},HW({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:iV(e,a.items,o)}))}),{})),$W($W({},t),{},HW({},i,s))}),{})}(p,v,"".concat(y,"Id"),"".concat(g,"Id"),f,h),x=l.reduce((function(e,t){var n="".concat(t.axisType,"Map");return oZ(oZ({},e),{},iZ({},n,mZ(o,oZ(oZ({},t),{},{graphicalItems:v,stackGroups:t.axisType===y&&b,dataStartIndex:i,dataEndIndex:a}))))}),{}),w=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,i=e.yAxisMap,a=void 0===i?{}:i,s=n.width,l=n.height,c=n.children,u=n.margin||{},d=aj(c,dK),f=aj(c,UN),p=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:oZ(oZ({},e),{},iZ({},r,e[r]+n.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:oZ(oZ({},e),{},iZ({},r,pO(e,"".concat(r))+n.height))}),{top:u.top||0,bottom:u.bottom||0}),m=oZ(oZ({},h),p),y=m.bottom;d&&(m.bottom+=d.props.height||dK.defaultProps.height),f&&t&&(m=function(e,t,n,r){var o=n.children,i=n.width,a=n.margin,s=i-(a.left||0)-(a.right||0),l=zW({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,d=c.height,f=l.align,p=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===p)&&"center"!==f&&DO(e[f]))return $W($W({},e),{},HW({},f,e[f]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===f)&&"middle"!==p&&DO(e[p]))return $W($W({},e),{},HW({},p,e[p]+(d||0)))}return e}(m,0,n,t));var g=s-m.left-m.right,v=l-m.top-m.bottom;return oZ(oZ({brushBottom:y},m),{},{width:Math.max(g,0),height:Math.max(v,0)})}(oZ(oZ({},x),{},{props:o,graphicalItems:v}),null==r?void 0:r.legendBBox);Object.keys(x).forEach((function(e){x[e]=u(o,x[e],w,e.replace("Map",""),t)}));var _=function(e){var t=zO(e),n=JW(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:FM(n,(function(e){return e.coordinate})),tooltipAxis:t,tooltipAxisBandSize:pV(t,n)}}(x["".concat(g,"Map")]),S=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,i=t.updateId,a=t.dataStartIndex,s=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,h=gZ(u),m=h.numericAxisName,y=h.cateAxisName,g=function(e){return!(!e||!e.length)&&e.some((function(e){var t=tj(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),v=[];return n.forEach((function(n,h){var b=dZ(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:s}),x=void 0!==n.type.defaultProps?oZ(oZ({},n.type.defaultProps),n.props):n.props,w=x.dataKey,_=x.maxBarSize,S=x["".concat(m,"Id")],k=x["".concat(y,"Id")],E=l.reduce((function(e,n){var r=t["".concat(n.axisType,"Map")],o=x["".concat(n.axisType,"Id")];r&&r[o]||"zAxis"===n.axisType||kW();var i=r[o];return oZ(oZ({},e),{},iZ(iZ({},n.axisType,i),"".concat(n.axisType,"Ticks"),JW(i)))}),{}),O=E[y],j=E["".concat(y,"Ticks")],P=r&&r[S]&&r[S].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?$W($W({},e.type.defaultProps),e.props):e.props).stackId;if(IO(r)){var o=t[r];if(o){var i=o.items.indexOf(e);return i>=0?o.stackedData[i]:null}}return null}(n,r[S].stackGroups),C=tj(n.type).indexOf("Bar")>=0,T=pV(O,j),A=[],N=g&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var i={},a=Object.keys(o),s=0,l=a.length;s<l;s++)for(var c=o[a[s]].stackGroups,u=Object.keys(c),d=0,f=u.length;d<f;d++){var p=c[u[d]],h=p.items,m=p.cateAxisId,y=h.filter((function(e){return tj(e.type).indexOf("Bar")>=0}));if(y&&y.length){var g=y[0].type.defaultProps,v=void 0!==g?$W($W({},g),y[0].props):y[0].props,b=v.barSize,x=v[m];i[x]||(i[x]=[]);var w=mO(b)?t:b;i[x].push({item:y[0],stackList:y.slice(1),barSize:mO(w)?void 0:FO(w,n,0)})}}return i}({barSize:c,stackGroups:r,totalSize:vZ(E,y)});if(C){var M,D,I=mO(_)?p:_,R=null!==(M=null!==(D=pV(O,j,!0))&&void 0!==D?D:I)&&void 0!==M?M:0;A=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,i=void 0===o?[]:o,a=e.maxBarSize,s=i.length;if(s<1)return null;var l,c=FO(t,r,0,!0),u=[];if(i[0].barSize===+i[0].barSize){var d=!1,f=r/s,p=i.reduce((function(e,t){return e+t.barSize||0}),0);(p+=(s-1)*c)>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,p=s*(f*=.9));var h={offset:((r-p)/2|0)-c,size:0};l=i.reduce((function(e,t){var n={item:t.item,position:{offset:h.offset+h.size+c,size:d?f:t.barSize}},r=[].concat(WW(e),[n]);return h=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:h})})),r}),u)}else{var m=FO(n,r,0,!0);r-2*m-(s-1)*c<=0&&(c=0);var y=(r-2*m-(s-1)*c)/s;y>1&&(y>>=0);var g=a===+a?Math.min(y,a):y;l=i.reduce((function(e,t,n){var r=[].concat(WW(e),[{item:t.item,position:{offset:m+(y+c)*n+(y-g)/2,size:g}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),u)}return l}({barGap:d,barCategoryGap:f,bandSize:R!==T?R:T,sizeList:N[k],maxBarSize:I}),R!==T&&(A=A.map((function(e){return oZ(oZ({},e),{},{position:oZ(oZ({},e.position),{},{offset:e.position.offset-R/2})})})))}var L=n&&n.type&&n.type.getComposedData;L&&v.push({props:oZ(oZ({},L(oZ(oZ({},E),{},{displayedData:b,props:e,dataKey:w,item:n,bandSize:T,barPosition:A,offset:o,stackedData:P,layout:u,dataStartIndex:a,dataEndIndex:s}))),{},iZ(iZ(iZ({key:n.key||"item-".concat(h)},m,E[m]),y,E[y]),"animationId",i)),childIndex:hj(n,e.children),item:n})})),v}(o,oZ(oZ({},x),{},{dataStartIndex:i,dataEndIndex:a,updateId:s,graphicalItems:v,stackGroups:b,offset:w}));return oZ(oZ({formattedGraphicalItems:S,graphicalItems:v,offset:w,stackGroups:b},_),x)},p=function(e){function n(e){var r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),iZ(i=function(e,t,n){return t=JG(t),function(e,t){if(t&&("object"===KG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ZG()?Reflect.construct(t,n||[],JG(e).constructor):t.apply(e,n))}(this,n,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),iZ(i,"accessibilityManager",new LG),iZ(i,"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;i.setState(oZ({legendBBox:e},f({props:i.props,dataStartIndex:n,dataEndIndex:r,updateId:o},oZ(oZ({},i.state),{},{legendBBox:e}))))}})),iZ(i,"handleReceiveSyncEvent",(function(e,t,n){if(i.props.syncId===e){if(n===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),iZ(i,"handleBrushChange",(function(e){var t=e.startIndex,n=e.endIndex;if(t!==i.state.dataStartIndex||n!==i.state.dataEndIndex){var r=i.state.updateId;i.setState((function(){return oZ({dataStartIndex:t,dataEndIndex:n},f({props:i.props,dataStartIndex:t,dataEndIndex:n,updateId:r},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}})),iZ(i,"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var n=oZ(oZ({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseEnter;Ck(r)&&r(n,e)}})),iZ(i,"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),n=t?oZ(oZ({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseMove;Ck(r)&&r(n,e)})),iZ(i,"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),iZ(i,"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),iZ(i,"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),iZ(i,"handleMouseLeave",(function(e){i.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var n=i.props.onMouseLeave;Ck(n)&&n(t,e)})),iZ(i,"handleOuterEvent",(function(e){var t,n=function(e){var t=e&&e.type;return t&&ej[t]?ej[t]:null}(e),r=pO(i.props,"".concat(n));n&&Ck(r)&&r(null!==(t=/.*touch.*/i.test(n)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),iZ(i,"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var n=oZ(oZ({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onClick;Ck(r)&&r(n,e)}})),iZ(i,"handleMouseDown",(function(e){var t=i.props.onMouseDown;Ck(t)&&t(i.getMouseInfo(e),e)})),iZ(i,"handleMouseUp",(function(e){var t=i.props.onMouseUp;Ck(t)&&t(i.getMouseInfo(e),e)})),iZ(i,"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),iZ(i,"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),iZ(i,"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),iZ(i,"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&NG.emit(MG,i.props.syncId,e,i.eventEmitterSymbol)})),iZ(i,"applySyncEvent",(function(e){var t=i.props,n=t.layout,r=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(oZ({dataStartIndex:a,dataEndIndex:s},f({props:i.props,dataStartIndex:a,dataEndIndex:s,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,d=i.state,p=d.offset,h=d.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(h,e);else if("value"===r){u=-1;for(var m=0;m<h.length;m++)if(h[m].value===e.activeLabel){u=m;break}}var y=oZ(oZ({},p),{},{x:p.left,y:p.top}),g=Math.min(l,y.x+y.width),v=Math.min(c,y.y+y.height),b=h[u]&&h[u].value,x=pZ(i.state,i.props.data,u),w=h[u]?{x:"horizontal"===n?h[u].coordinate:g,y:"horizontal"===n?v:h[u].coordinate}:cZ;i.setState(oZ(oZ({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),iZ(i,"renderCursor",(function(e){var n,r=i.state,o=r.isTooltipActive,a=r.activeCoordinate,l=r.activePayload,c=r.offset,u=r.activeTooltipIndex,d=r.tooltipAxisBandSize,f=i.getTooltipEventType(),p=null!==(n=e.props.active)&&void 0!==n?n:o,h=i.props.layout,m=e.key||"_recharts-cursor";return s.createElement($G,{key:m,activeCoordinate:a,activePayload:l,activeTooltipIndex:u,chartName:t,element:e,isActive:p,layout:h,offset:c,tooltipAxisBandSize:d,tooltipEventType:f})})),iZ(i,"renderPolarAxis",(function(e,t,n){var r=pO(e,"type.axisType"),o=pO(i.state,"".concat(r,"Map")),a=e.type.defaultProps,l=void 0!==a?oZ(oZ({},a),e.props):e.props,c=o&&o[l["".concat(r,"Id")]];return(0,s.cloneElement)(e,oZ(oZ({},c),{},{className:Ve(r,c.className),key:e.key||"".concat(t,"-").concat(n),ticks:JW(c,!0)}))})),iZ(i,"renderPolarGrid",(function(e){var t=e.props,n=t.radialLines,r=t.polarAngles,o=t.polarRadius,a=i.state,l=a.radiusAxisMap,c=a.angleAxisMap,u=zO(l),d=zO(c),f=d.cx,p=d.cy,h=d.innerRadius,m=d.outerRadius;return(0,s.cloneElement)(e,{polarAngles:Array.isArray(r)?r:JW(d,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:JW(u,!0).map((function(e){return e.coordinate})),cx:f,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:n})})),iZ(i,"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,n=t.children,r=t.width,o=t.height,a=i.props.margin||{},l=r-(a.left||0)-(a.right||0),u=zW({children:n,formattedGraphicalItems:e,legendWidth:l,legendContent:c});if(!u)return null;var d=u.item,f=GG(u,HG);return(0,s.cloneElement)(d,oZ(oZ({},f),{},{chartWidth:r,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),iZ(i,"renderTooltip",(function(){var e,t=i.props,n=t.children,r=t.accessibilityLayer,o=aj(n,vD);if(!o)return null;var a=i.state,l=a.isTooltipActive,c=a.activeCoordinate,u=a.activePayload,d=a.activeLabel,f=a.offset,p=null!==(e=o.props.active)&&void 0!==e?e:l;return(0,s.cloneElement)(o,{viewBox:oZ(oZ({},f),{},{x:f.left,y:f.top}),active:p,label:d,payload:p?u:[],coordinate:c,accessibilityLayer:r})})),iZ(i,"renderBrush",(function(e){var t=i.props,n=t.margin,r=t.data,o=i.state,a=o.offset,l=o.dataStartIndex,c=o.dataEndIndex,u=o.updateId;return(0,s.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:eV(i.handleBrushChange,e.props.onChange),data:r,x:DO(e.props.x)?e.props.x:a.left,y:DO(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(n.bottom||0),width:DO(e.props.width)?e.props.width:a.width,startIndex:l,endIndex:c,updateId:"brush-".concat(u)})})),iZ(i,"renderReferenceElement",(function(e,t,n){if(!e)return null;var r=i.clipPathId,o=i.state,a=o.xAxisMap,l=o.yAxisMap,c=o.offset,u=e.type.defaultProps||{},d=e.props,f=d.xAxisId,p=void 0===f?u.xAxisId:f,h=d.yAxisId,m=void 0===h?u.yAxisId:h;return(0,s.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:a[p],yAxis:l[m],viewBox:{x:c.left,y:c.top,width:c.width,height:c.height},clipPathId:r})})),iZ(i,"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,o=e.basePoint,i=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?oZ(oZ({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,d=oZ(oZ({index:i,dataKey:c.dataKey,cx:r.x,cy:r.y,r:4,fill:YW(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},uj(u,!1)),YO(u));return s.push(n.renderActiveDot(u,d,"".concat(l,"-activePoint-").concat(i))),o?s.push(n.renderActiveDot(u,oZ(oZ({},d),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(i))):a&&s.push(null),s})),iZ(i,"renderGraphicChild",(function(e,t,n){var r=i.filterFormatItem(e,t,n);if(!r)return null;var o=i.getTooltipEventType(),a=i.state,l=a.isTooltipActive,c=a.tooltipAxis,u=a.activeTooltipIndex,d=a.activeLabel,f=aj(i.props.children,vD),p=r.props,h=p.points,m=p.isRange,y=p.baseLine,g=void 0!==r.item.type.defaultProps?oZ(oZ({},r.item.type.defaultProps),r.item.props):r.item.props,v=g.activeDot,b=g.hide,x=g.activeBar,w=g.activeShape,_=!(b||!l||!f||!(v||x||w)),S={};"axis"!==o&&f&&"click"===f.props.trigger?S={onClick:eV(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(S={onMouseLeave:eV(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:eV(i.handleItemMouseEnter,e.props.onMouseEnter)});var k=(0,s.cloneElement)(e,oZ(oZ({},r.props),S));if(_){if(!(u>=0)){var E,O=(null!==(E=i.getItemByXY(i.state.activeCoordinate))&&void 0!==E?E:{graphicalItem:k}).graphicalItem,j=O.item,P=void 0===j?e:j,C=O.childIndex,T=oZ(oZ(oZ({},r.props),S),{},{activeIndex:C});return[(0,s.cloneElement)(P,T),null,null]}var A,N;if(c.dataKey&&!c.allowDuplicatedCategory){var M="function"==typeof c.dataKey?function(e){return"function"==typeof c.dataKey?c.dataKey(e.payload):null}:"payload.".concat(c.dataKey.toString());A=WO(h,M,d),N=m&&y&&WO(y,M,d)}else A=null==h?void 0:h[u],N=m&&y&&y[u];if(w||x){var D=void 0!==e.props.activeIndex?e.props.activeIndex:u;return[(0,s.cloneElement)(e,oZ(oZ(oZ({},r.props),S),{},{activeIndex:D})),null,null]}if(!mO(A))return[k].concat(eZ(i.renderActivePoints({item:r,activePoint:A,basePoint:N,childIndex:u,isRange:m})))}return m?[k,null,null]:[k,null]})),iZ(i,"renderCustomized",(function(e,t,n){return(0,s.cloneElement)(e,oZ(oZ({key:"recharts-customized-".concat(n)},i.props),i.state))})),iZ(i,"renderMap",{CartesianGrid:{handler:uZ,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:uZ},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:uZ},YAxis:{handler:uZ},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(r=e.id)&&void 0!==r?r:LO("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=zD(i.triggeredAfterMouseMove,null!==(o=e.throttleDelay)&&void 0!==o?o:1e3/60),i.state={},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QG(e,t)}(n,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aZ(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=aj(t,vD);if(i){var a=i.props.defaultIndex;if(!("number"!=typeof a||a<0||a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=pZ(this.state,n,a,s),c=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},f=this.state.formattedGraphicalItems.find((function(e){return"Scatter"===e.item.type.name}));f&&(d=oZ(oZ({},d),f.props.points[a].tooltipPosition),l=f.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(p),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){dj([aj(e.children,vD)],[aj(this.props.children,vD)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=aj(this.props.children,vD);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return a.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},i=n.width/t.offsetWidth||1,a=this.inRange(o.chartX,o.chartY,i);if(!a)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&l&&c){var u=zO(l).scale,d=zO(c).scale,f=u&&u.invert?u.invert(o.chartX):null,p=d&&d.invert?d.invert(o.chartY):null;return oZ(oZ({},o),{},{xValue:f,yValue:p})}var h=hZ(this.state,this.props.data,this.props.layout,a);return h?oZ(oZ({},o),h):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=zO(l);return OV({x:o,y:i},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=aj(e,vD),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),oZ(oZ({},YO(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){NG.on(MG,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){NG.removeListener(MG,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;o<i;o++){var a=r[o];if(a.item===e||a.props.key===e.key||t===tj(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,o=t.height,i=t.width;return s.createElement("defs",null,s.createElement("clipPath",{id:e},s.createElement("rect",{x:n,y:r,height:o,width:i})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=XG(t,2),r=n[0],o=n[1];return oZ(oZ({},e),{},iZ({},r,o.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=XG(t,2),r=n[0],o=n[1];return oZ(oZ({},e),{},iZ({},r,o.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,i=n.length;o<i;o++){var a=n[o],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?oZ(oZ({},l.type.defaultProps),l.props):l.props,u=tj(l.type);if("Bar"===u){var d=(s.data||[]).find((function(t){return W$(e,t)}));if(d)return{graphicalItem:a,payload:d}}else if("RadialBar"===u){var f=(s.data||[]).find((function(t){return OV(e,t)}));if(f)return{graphicalItem:a,payload:f}}else if(_q(a,r)||Sq(a,r)||kq(a,r)){var p=Pq({graphicalItem:a,activeTooltipItem:r,itemData:c.data}),h=void 0===c.activeIndex?p:c.activeIndex;return{graphicalItem:oZ(oZ({},a),{},{childIndex:h}),payload:kq(a,r)?c.data[p]:a.props.data[p]}}}return null}},{key:"render",value:function(){var e=this;if(!sj(this))return null;var t,n,r=this.props,o=r.children,i=r.className,a=r.width,l=r.height,c=r.style,u=r.compact,d=r.title,f=r.desc,p=GG(r,qG),h=uj(p,!1);if(u)return s.createElement(PY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},s.createElement(gj,YG({},h,{width:a,height:l,title:d,desc:f}),this.renderClipPath(),pj(o,this.renderMap)));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(n=this.props.role)&&void 0!==n?n:"application",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return s.createElement(PY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},s.createElement("div",YG({className:Ve("recharts-wrapper",i),style:oZ({position:"relative",cursor:"default",width:a,height:l},c)},m,{ref:function(t){e.container=t}}),s.createElement(gj,YG({},h,{width:a,height:l,title:d,desc:f,style:lZ}),this.renderClipPath(),pj(o,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(s.Component);iZ(p,"displayName",t),iZ(p,"defaultProps",oZ({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),iZ(p,"getDerivedStateFromProps",(function(e,t){var n=e.dataKey,r=e.data,o=e.children,i=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,d=t.dataEndIndex;if(void 0===t.updateId){var p=yZ(e);return oZ(oZ(oZ({},p),{},{updateId:0},f(oZ(oZ({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||i!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!VO(c,t.prevMargin)){var h=yZ(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},y=oZ(oZ({},hZ(t,r,s)),{},{updateId:t.updateId+1}),g=oZ(oZ(oZ({},h),m),y);return oZ(oZ(oZ({},g),f(oZ({props:e},g),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!dj(o,t.prevChildren)){var v,b,x,w,_=aj(o,dK),S=_&&null!==(v=null===(b=_.props)||void 0===b?void 0:b.startIndex)&&void 0!==v?v:u,k=_&&null!==(x=null===(w=_.props)||void 0===w?void 0:w.endIndex)&&void 0!==x?x:d,E=S!==u||k!==d,O=mO(r)||E?t.updateId+1:t.updateId;return oZ(oZ({updateId:O},f(oZ(oZ({props:e},t),{},{updateId:O,dataStartIndex:S,dataEndIndex:k}),t)),{},{prevChildren:o,dataStartIndex:S,dataEndIndex:k})}return null})),iZ(p,"renderActiveDot",(function(e,t,n){var r;return r=(0,s.isValidElement)(e)?(0,s.cloneElement)(e,t):Ck(e)?e(t):s.createElement(J$,t),s.createElement(xj,{className:"recharts-active-dot",key:n},r)}));var h=(0,s.forwardRef)((function(e,t){return s.createElement(p,YG({},e,{ref:t}))}));return h.displayName=p.displayName,h};bZ({chartName:"LineChart",GraphicalChild:YX,axisComponents:[{axisType:"xAxis",AxisComp:vG},{axisType:"yAxis",AxisComp:jG}],formatAxisMap:lY}),bZ({chartName:"BarChart",GraphicalChild:tY,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:vG},{axisType:"yAxis",AxisComp:jG}],formatAxisMap:lY}),bZ({chartName:"PieChart",GraphicalChild:zq,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:VH},{axisType:"radiusAxis",AxisComp:CH}],formatAxisMap:function(e,t,n,r,o){var i=e.width,a=e.height,s=e.startAngle,l=e.endAngle,c=FO(e.cx,i,i/2),u=FO(e.cy,a,a/2),d=kV(i,a,n),f=FO(e.innerRadius,d,0),p=FO(e.outerRadius,d,.8*d);return Object.keys(t).reduce((function(e,n){var i,a=t[n],d=a.domain,h=a.reversed;if(mO(a.range))"angleAxis"===r?i=[s,l]:"radiusAxis"===r&&(i=[f,p]),h&&(i=[i[1],i[0]]);else{var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return xV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xV(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i=a.range,2);s=m[0],l=m[1]}var y=tV(a,o),g=y.realScaleType,v=y.scale;v.domain(d).range(i),rV(v);var b=aV(v,vV(vV({},a),{},{realScaleType:g})),x=vV(vV(vV({},a),b),{},{range:i,radius:p,realScaleType:g,scale:v,cx:c,cy:u,innerRadius:f,outerRadius:p,startAngle:s,endAngle:l});return vV(vV({},e),{},bV({},n,x))}),{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),bZ({chartName:"AreaChart",GraphicalChild:cG,axisComponents:[{axisType:"xAxis",AxisComp:vG},{axisType:"yAxis",AxisComp:jG}],formatAxisMap:lY});const xZ=s.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,L.jsx)("div",{ref:a,className:Ue("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,L.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,L.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,L.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value)))}):null));xZ.displayName="ChartLegendContent";const wZ=s.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:d="name",labelKey:f},p)=>{if(!e||null==t||!t.length)return null;const h=1===t.length&&"dot"!==r;return(0,L.jsxs)("div",{ref:p,className:Ue("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:[h?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[f]||a;return n?(0,L.jsx)("div",{className:Ue("font-medium",l),children:n}):null})(),(0,L.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=u||e.color||"#000";return(0,L.jsxs)("div",{className:Ue("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,L.jsx)("div",{className:Ue({"size-2.5":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,L.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,L.jsx)("span",{children:e[d]||e.dataKey}),(0,L.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));wZ.displayName="ChartTooltipContent";const _Z=s.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:d="name",labelKey:f},p)=>{if(!e||null==t||!t.length)return null;const h=1===t.length&&"dot"!==r;return(0,L.jsxs)("div",{ref:p,className:Ue("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:[h?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[f]||a;return n?(0,L.jsx)("div",{className:Ue("font-medium",l),children:n}):null})(),(0,L.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=u||e.color||"#000";return(0,L.jsxs)("div",{className:Ue("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,L.jsx)("div",{className:Ue({"size-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,L.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,L.jsx)("span",{children:e[d]||e.dataKey}),(0,L.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));_Z.displayName="ChartTooltipContent";const SZ=s.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:d="name",labelKey:f},p)=>{if(!e||null==t||!t.length)return null;const h=1===t.length&&"dot"!==r;return(0,L.jsxs)("div",{ref:p,className:Ue("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:[h?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[f]||a;return n?(0,L.jsx)("div",{className:Ue("font-medium",l),children:n}):null})(),(0,L.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{var n;const o=e.color||(null==(n=e.payload)?void 0:n.fill)||u||"#000";return(0,L.jsxs)("div",{className:Ue("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,L.jsx)("div",{className:Ue({"h-2.5 w-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?o:"",borderColor:"dashed"===r?o:""}}),(0,L.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,L.jsx)("span",{children:e[d]||e.dataKey}),(0,L.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));SZ.displayName="ChartTooltipContent";const kZ=s.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value"},i)=>n.length?(0,L.jsx)("div",{ref:i,className:Ue("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,L.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,L.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,L.jsx)("span",{className:"capitalize",children:e[o]})]},e.value)))}):null));kZ.displayName="ChartLegendContent";const EZ=s.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,L.jsx)("div",{ref:a,className:Ue("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,L.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,L.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,L.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value)))}):null));EZ.displayName="ChartLegendContent";const OZ=(0,s.forwardRef)((({active:e,payload:t,className:n,indicator:r,hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:l,labelClassName:c,formatter:u,color:d,nameKey:f="name",labelKey:p},h)=>{const m=(0,s.useMemo)((()=>{if(o||null==t||!t.length)return null;const[e]=t,n=l?l(a||""):e[p]||a;return n?(0,L.jsx)("div",{className:Ue("font-medium",c),children:n}):null}),[a,l,t,o,c,p]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r;return(0,L.jsxs)("div",{ref:h,className:Ue("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:[y?null:m,(0,L.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=d||e.color||"#000";return(0,L.jsxs)("div",{className:Ue("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,L.jsx)("div",{className:Ue({"size-2.5":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,L.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,L.jsx)("span",{children:e[f]||e.dataKey}),(0,L.jsx)("span",{className:"font-mono font-medium",children:u?u(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));OZ.displayName="ChartTooltipContent",(0,s.createContext)(null);const jZ=(0,s.createContext)(void 0),PZ=()=>{const e=(0,s.useContext)(jZ);if(!e)throw new Error("Table components must be used within Table component");return e},CZ=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const o={checkboxSelection:n},i=s.Children.toArray(e).find((e=>s.isValidElement(e)&&e.type===IZ)),a=s.Children.toArray(e).filter((e=>s.isValidElement(e)&&e.type!==IZ));return(0,L.jsx)(jZ.Provider,{value:o,children:(0,L.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:[(0,L.jsx)("div",{className:"overflow-x-auto w-full",children:(0,L.jsx)("div",{className:"relative",children:(0,L.jsx)("table",{className:Ue("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:a})})}),i]})})},TZ=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:i,...a})=>{const{checkboxSelection:s}=PZ();return(0,L.jsx)("thead",{className:Ue("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:(0,L.jsxs)("tr",{children:[s&&(0,L.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,L.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,L.jsx)(St,{size:"sm",checked:n,indeterminate:o,disabled:i,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},AZ=({children:e,className:t,...n})=>(0,L.jsx)("th",{scope:"col",className:Ue("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),NZ=({children:e,className:t,...n})=>(0,L.jsx)("tbody",{className:Ue("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),MZ=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...i})=>{const{checkboxSelection:a}=PZ();return(0,L.jsxs)("tr",{className:Ue("hover:bg-background-secondary",t&&"bg-background-secondary",r),...i,children:[a&&(0,L.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,L.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,L.jsx)(St,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},DZ=({children:e,className:t,...n})=>(0,L.jsx)("td",{className:Ue("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),IZ=({children:e,className:t,...n})=>{const{checkboxSelection:r}=PZ();return(0,L.jsx)("div",{className:Ue("px-3 py-3",r&&"px-4",t),...n,children:e})};CZ.displayName="Table",TZ.displayName="Table.Head",AZ.displayName="Table.HeadCell",NZ.displayName="Table.Body",MZ.displayName="Table.Row",DZ.displayName="Table.Cell",IZ.displayName="Table.Footer",CZ.Head=TZ,CZ.HeadCell=AZ,CZ.Body=NZ,CZ.Row=MZ,CZ.Cell=DZ,CZ.Footer=IZ;const RZ=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim();var LZ={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"};const FZ=(0,s.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...l},c)=>(0,s.createElement)("svg",{ref:c,...LZ,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:RZ("lucide",o),...l},[...a.map((([e,t])=>(0,s.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),zZ=(e,t)=>{const n=(0,s.forwardRef)((({className:n,...r},o)=>{return(0,s.createElement)(FZ,{ref:o,iconNode:t,className:RZ(`lucide-${i=e,i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...r});var i}));return n.displayName=`${e}`,n},BZ=zZ("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),WZ=zZ("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),VZ=zZ("FileText",[["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"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),UZ=zZ("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]),$Z=zZ("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"}]]),HZ=window.wp.i18n;var qZ={dashboard:{path:"dashboard"},widgets:{path:"widgets"},templates:{path:"templates"},settings:{path:"settings"},onboarding:{path:"onboarding"},upgrade:{path:"upgrade"},headerFooterBuilder:{path:"elementor-hf"}},KZ=function(){return KZ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KZ.apply(this,arguments)},YZ=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},XZ=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},GZ={rssFeedURL:"",selector:"",loaderIcon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t<circle cx="50" cy="50" fill="none" stroke="#9f9f9f" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">\n\t\t<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>\n\t</circle>\n\t</svg>',viewAll:{link:"",label:"View All"},triggerButton:{icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.61703 13.1998C8.04294 13.1503 7.46192 13.125 6.875 13.125H6.25C4.17893 13.125 2.5 11.4461 2.5 9.375C2.5 7.30393 4.17893 5.625 6.25 5.625H6.875C7.46192 5.625 8.04294 5.59972 8.61703 5.55018M8.61703 13.1998C8.82774 14.0012 9.1031 14.7764 9.43719 15.5195C9.64341 15.9782 9.48685 16.5273 9.05134 16.7787L8.50441 17.0945C8.04492 17.3598 7.45466 17.1921 7.23201 16.7106C6.70983 15.5811 6.30451 14.3866 6.03155 13.1425M8.61703 13.1998C8.29598 11.9787 8.125 10.6968 8.125 9.375C8.125 8.05316 8.29598 6.77125 8.61703 5.55018M8.61703 13.1998C11.25 13.427 13.737 14.1643 15.9789 15.3124M8.61703 5.55018C11.25 5.323 13.737 4.58569 15.9789 3.43757M15.9789 3.43757C15.8808 3.12162 15.7751 2.80903 15.662 2.5M15.9789 3.43757C16.4247 4.87356 16.7131 6.37885 16.8238 7.93326M15.9789 15.3124C15.8808 15.6284 15.7751 15.941 15.662 16.25M15.9789 15.3124C16.4247 13.8764 16.7131 12.3711 16.8238 10.8167M16.8238 7.93326C17.237 8.2772 17.5 8.79539 17.5 9.375C17.5 9.95461 17.237 10.4728 16.8238 10.8167M16.8238 7.93326C16.8578 8.40942 16.875 8.8902 16.875 9.375C16.875 9.8598 16.8578 10.3406 16.8238 10.8167" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',beforeBtn:"",afterBtn:"",className:"",onClick:function(){}},notification:{setLastPostUnixTime:null,getLastPostUnixTime:null},flyout:{title:"What's New?",innerContent:{titleLink:!0,additionalClasses:[]},excerpt:{wordLimit:500,moreSymbol:"…",readMore:{label:"Read More",className:""}},className:"",closeOnEsc:!0,closeOnOverlayClick:!0,closeBtnIcon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 18L18 6M6 6L18 18" stroke="#94A3B8" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',formatDate:null,onOpen:function(){},onClose:function(){},onReady:function(){}}},ZZ=function(){function e(e){this.rssFeedURLs=[],this.lastPostUnixTime=0,this.multiLastPostUnixTime={},this.notificationsCount=0,this.multiNotificationCount={},this.hasNewFeeds=!1,this.multiHasNewFeeds={},this.validateArgs(e),this.parseDefaults(e),this.setElement(),this.getElement()?(this.setID(),this.setRSSFeedURLs(),JZ.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new QZ(this),this.RSS_View_Instance=new eJ(this),this.setNotificationsCount(),this.setTriggers()):console.warn("WNR: Cannot find element with",this.getArgs().selector)}return e.prototype.validateArgs=function(e){["rssFeedURL","selector"].map((function(t){if(!e[t])throw new Error("".concat(t," is a required argument. It cannot be empty or undefined."));if("rssFeedURL"===t){var n=e[t];Array.isArray(n)&&n.forEach((function(e){if(!(null==e?void 0:e.key))throw new Error('The parameter "key" is required for "'.concat(t,'" parameter in multi-feed mode.'));if(e.key.includes(" "))throw new Error('The parameter "key" cannot have spaces for "'.concat(t,'" parameter in multi-feed mode. Ref Key: "').concat(e.key,'"'))}))}}))},e.prototype.parseDefaults=function(e){var t,n;this.args=KZ(KZ(KZ({},GZ),e),{viewAll:KZ(KZ({},GZ.viewAll),null==e?void 0:e.viewAll),triggerButton:KZ(KZ({},GZ.triggerButton),null==e?void 0:e.triggerButton),flyout:KZ(KZ(KZ({},GZ.flyout),null==e?void 0:e.flyout),{innerContent:KZ(KZ({},GZ.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:KZ(KZ({},GZ.flyout.excerpt),null===(n=null==e?void 0:e.flyout)||void 0===n?void 0:n.excerpt)})})},e.prototype.getArgs=function(){return this.args},e.prototype.setElement=function(){this.element=document.querySelector(this.args.selector)},e.prototype.getElement=function(){return this.element},e.prototype.setID=function(){var e=[this.getArgs().selector],t=this.getArgs().rssFeedURL;Array.isArray(t)?t.forEach((function(t){e.push(t.key)})):e.push(t),this.ID=btoa(e.join("-")).slice(-12).replace(/=/g,"")},e.prototype.isMultiFeedRSS=function(){return"string"!=typeof this.getArgs().rssFeedURL},e.prototype.setRSSFeedURLs=function(){var e=this,t=this.getArgs().rssFeedURL;this.isMultiFeedRSS()?Array.isArray(t)&&t.forEach((function(t){e.rssFeedURLs.push(t)})):this.rssFeedURLs.push({key:null,label:"",url:t.toString()})},e.prototype.getRSSFeedURLs=function(){return this.rssFeedURLs},e.prototype.getID=function(){return this.ID},e.prototype.setNotificationsCount=function(){return YZ(this,void 0,void 0,(function(){var e=this;return XZ(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.getRSSFeedURLs().map((function(t){var n=t.key;return YZ(e,void 0,void 0,(function(){var e;return XZ(this,(function(t){switch(t.label){case 0:return e=0,"function"!=typeof this.getArgs().notification.getLastPostUnixTime?[3,2]:[4,this.getArgs().notification.getLastPostUnixTime(n,this)];case 1:return e=t.sent(),[3,3];case 2:e=JZ.getLastPostUnixTime(n),t.label=3;case 3:return this.isMultiFeedRSS()?this.multiLastPostUnixTime[n]=+e:this.lastPostUnixTime=+e,[2]}}))}))})))];case 1:return t.sent(),[4,this.RSS_Fetch_Instance.fetchData().then((function(t){Object.keys(t).forEach((function(n){var r=t[n];if(r.length){e.multiNotificationCount[n]=0;var o=+r[0].date,i=e.isMultiFeedRSS()?e.multiLastPostUnixTime[n]:e.lastPostUnixTime;o>i&&(r.forEach((function(t){t.date>i&&(e.isMultiFeedRSS()&&(e.multiNotificationCount[n]++,e.multiHasNewFeeds[n]=!0),e.notificationsCount++,e.hasNewFeeds=!0)})),e.RSS_View_Instance.setNotification(e.notificationsCount))}}))}))];case 2:return t.sent(),[2]}}))}))},e.prototype.getNotificationsCount=function(){return this.notificationsCount},e.prototype.setTriggers=function(){var e=this,t=document.getElementById(this.RSS_View_Instance.getTriggerButtonID()),n=document.getElementById(this.RSS_View_Instance.getFlyoutID()),r=n.querySelector(".whats-new-rss-flyout-inner-content"),o=document.getElementById(this.RSS_View_Instance.getFlyoutCloseBtnID()),i=document.getElementById(this.RSS_View_Instance.getFlyoutMultiFeedNavID()),a=function(t){e.RSS_Fetch_Instance.fetchData().then((function(o){r.innerHTML="";var i=o[t];if(i.length){var a=+i[0].date,s=e.isMultiFeedRSS()?e.multiLastPostUnixTime[t]:e.lastPostUnixTime;i.forEach((function(n){var o=!!s&&n.date>s,i=e.getArgs().flyout.innerContent.titleLink?'<a href="'.concat(n.postLink,'" target="_blank">\n\t\t\t\t\t\t\t\t<h2>').concat(n.title,"</h2>\n\t\t\t\t\t\t\t</a>"):"<h2>".concat(n.title,"</h2>"),a='\n\t\t\t\t\t\t\t\t<div class="rss-content-header">\n\t\t\t\t\t\t\t\t\t<p>'.concat(e.RSS_View_Instance.formatDate(new Date(n.date)),"</p>\n\t\t\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.createExcerpt(n.description,n.postLink,e.getArgs().flyout.excerpt),"\n\t\t\t\t\t\t\t\t").concat(e.RSS_View_Instance.listChildrenPosts(n.children),"\n\t\t\t\t\t\t\t"),l=e.getArgs().flyout.innerContent.additionalClasses;t&&l.push("`inner-content-item-feed-key-${key}`"),r.innerHTML+=e.RSS_View_Instance.innerContentWrapper(a,o,l.join(" "))})),e.getArgs().viewAll.link&&(r.innerHTML+=e.RSS_View_Instance.innerContentWrapper('\n\t\t\t\t\t\t\t<a href="'.concat(e.getArgs().viewAll.link,'" class="button view-all">').concat(e.getArgs().viewAll.label,"</a>\n\t\t\t\t\t\t\t"))),e.RSS_View_Instance.setIsLoading(!1),n.classList.add("ready"),e.getArgs().flyout.onReady(e),n.focus(),e.isMultiFeedRSS()||(e.lastPostUnixTime=a,e.hasNewFeeds&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(a,t):JZ.setLastPostUnixTime(a,t)))}}))};t.addEventListener("click",(function(t){if(t.preventDefault(),e.getArgs().triggerButton.onClick(e),e.RSS_View_Instance.setIsLoading(!0),n.classList.remove("closed"),n.classList.add("open"),document.body.classList.add("whats-new-rss-is-active"),e.getArgs().flyout.onOpen(e),!e.isMultiFeedRSS())return a(null);var r=i.querySelectorAll("button");r.forEach((function(t){e.RSS_View_Instance.setMultiFeedTabNotificationCount(t.dataset.feedKey,e.multiNotificationCount[t.dataset.feedKey]),t.addEventListener("click",(function(n){n.preventDefault();var o=t.dataset.feedKey;e.multiNotificationCount[o]=0,e.RSS_Fetch_Instance.fetchData().then((function(t){var n=t[o][0].date;e.multiLastPostUnixTime[o]=n,!0===e.multiHasNewFeeds[o]&&("function"==typeof e.getArgs().notification.setLastPostUnixTime?e.getArgs().notification.setLastPostUnixTime(n,o):JZ.setLastPostUnixTime(n,o)),e.multiHasNewFeeds[o]=!1})),r.forEach((function(e){e.classList.remove("selected");var t=e.dataset.feedKey,n=".inner-content-item-feed-key-".concat(t);document.querySelectorAll(n).forEach((function(e){o!==t?e.classList.add("hidden"):e.classList.remove("hidden")}))})),t.classList.add("selected"),a(o)}))})),r[0].click()}));var s=function(){n.classList.add("closed"),n.classList.remove("open"),n.classList.remove("ready"),document.body.classList.remove("whats-new-rss-is-active"),e.isMultiFeedRSS()?e.RSS_View_Instance.setNotification(Object.values(e.multiNotificationCount).filter(Boolean).length):(e.hasNewFeeds=!1,e.RSS_View_Instance.setNotification(!1)),r.innerHTML="",e.getArgs().flyout.onClose(e),t.focus()};this.getArgs().flyout.closeOnEsc&&document.addEventListener("keydown",(function(e){"Escape"===e.key&&n.classList.contains("open")&&s()})),this.getArgs().flyout.closeOnOverlayClick&&n.querySelector(".whats-new-rss-flyout-overlay").addEventListener("click",s),o.addEventListener("click",s)},e}(),JZ=function(){function e(){}return e.setInstanceID=function(e){this.instanceID||(this.instanceID=e)},e.prefixer=function(e,t){if(void 0===t&&(t=""),!this.instanceID)throw new Error("Instance ID not set.");return t?"".concat(this.keys[e],"-").concat(this.instanceID,"-").concat(t):"".concat(this.keys[e],"-").concat(this.instanceID)},e._setDataExpiry=function(e){void 0===e&&(e="");var t=(new Date).getTime()+864e5;sessionStorage.setItem(this.prefixer("SESSION_DATA_EXPIRY",e),JSON.stringify(t))},e._isDataExpired=function(e){void 0===e&&(e="");var t=this.prefixer("SESSION_DATA_EXPIRY",e),n=window.sessionStorage.getItem(t);if(!n)return!0;var r=JSON.parse(n);return(new Date).getTime()>r&&(window.sessionStorage.removeItem(t),!0)},e.setSessionData=function(e,t){return void 0===t&&(t=""),this._setDataExpiry(t),window.sessionStorage.setItem(this.prefixer("SESSION",t),e)},e.getSessionData=function(e){return void 0===e&&(e=""),this._isDataExpired(e)?"{}":window.sessionStorage.getItem(this.prefixer("SESSION",e))},e.setLastPostUnixTime=function(e,t){return void 0===t&&(t=""),window.localStorage.setItem(this.prefixer("LAST_LATEST_POST",t),e.toString())},e.getLastPostUnixTime=function(e){return void 0===e&&(e=""),+window.localStorage.getItem(this.prefixer("LAST_LATEST_POST",e))},e.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"},e}(),QZ=function(){function e(e){var t=this;this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach((function(e){var n=JSON.parse(JZ.getSessionData(e.key));n&&n.length&&(t.data[e.key]=n)}))}return e.prototype.fetchData=function(){return YZ(this,void 0,void 0,(function(){var e,t=this;return XZ(this,(function(n){switch(n.label){case 0:return Object.keys(this.data).length?[2,this.data]:(e=this.RSS.getRSSFeedURLs().map((function(e){return YZ(t,void 0,void 0,(function(){var t,n,r=this;return XZ(this,(function(o){switch(o.label){case 0:return this.data[e.key]=[],[4,fetch(e.url)];case 1:return[4,o.sent().text()];case 2:return t=(t=o.sent()).replace(/»/g,"&raquo;"),n=new DOMParser,n.parseFromString(t,"text/xml").querySelectorAll("item").forEach((function(t){var n,o=t.querySelector("title").textContent,i=t.querySelector("link").textContent,a=t.querySelector("content\\:encoded, encoded"),s=a?a.textContent:"",l=t.querySelector("pubDate").innerHTML;r.data[e.key].push({title:o,date:l?+new Date(l):null,postLink:i,description:s.replace(/<a\b((?:(?!target=)[^>])*)>/g,'<a$1 target="_blank">').replace(/<p>\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})})),JZ.setSessionData(JSON.stringify(this.data[e.key]),e.key),[2]}}))}))})),[4,Promise.all(e)]);case 1:return n.sent(),[2,this.data]}}))}))},e}(),eJ=function(){function e(e){this.RSS=e,this.createTriggerButton(),this.createFlyOut()}return e.prototype.getTriggerButtonID=function(){return"whats-new-rss-btn-".concat(this.RSS.getID())},e.prototype.getFlyoutID=function(){return"whats-new-rss-flyout-".concat(this.RSS.getID())},e.prototype.getFlyoutCloseBtnID=function(){return"whats-new-rss-flyout-close-".concat(this.RSS.getID())},e.prototype.getFlyoutMultiFeedNavID=function(){return"whats-new-rss-flyout-multi-feed-nav-".concat(this.RSS.getID())},e.prototype.setIsLoading=function(e){void 0===e&&(e=!1);var t=document.getElementById(this.getFlyoutID());e?t.classList.add("is-loading"):t.classList.remove("is-loading")},e.prototype.setNotification=function(e){var t=document.querySelector("#".concat(this.getTriggerButtonID()," .whats-new-rss-notification-badge"));e?(this.RSS.isMultiFeedRSS()?(t.innerHTML="",t.classList.add("is-multi-feed")):t.innerHTML=e>9?"9+":e.toString(),t.classList.remove("hide")):t.classList.add("hide")},e.prototype.createTriggerButton=function(){var e="\n\t\t".concat(this.RSS.getArgs().triggerButton.beforeBtn,'\n\t\t<a class="whats-new-rss-trigger-button" id="').concat(this.getTriggerButtonID(),'">\n\t\t\t').concat(this.RSS.getArgs().triggerButton.icon,'\n\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t</a>\n\t\t').concat(this.RSS.getArgs().triggerButton.afterBtn,"\n\t\t");this.RSS.getElement().innerHTML+=e},e.prototype.createFlyOut=function(){var e=["whats-new-rss-flyout","closed"];this.RSS.getArgs().flyout.className&&e.push(this.RSS.getArgs().flyout.className);var t=[];this.RSS.isMultiFeedRSS()&&(t.push('<nav id="'.concat(this.getFlyoutMultiFeedNavID(),'" class="whats-new-rss-multi-feed-nav">')),this.RSS.getRSSFeedURLs().forEach((function(e){t.push('<button type="button" data-feed-key="'.concat(e.key,'">\n\t\t\t\t\t\t').concat(e.label,'\n\t\t\t\t\t\t<div class="new-notification-count"></div>\n\t\t\t\t\t</button>\n\t\t\t\t\t'))})),t.push("</nav>"));var n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.innerHTML='\n\t\t<div class="whats-new-rss-flyout-contents">\n\n\t\t\t<div class="whats-new-rss-flyout-inner-header">\n\n\t\t\t\t<div class="whats-new-rss-flyout-inner-header__title-icon-wrapper">\n\t\t\t\t\t<h3>'.concat(this.RSS.getArgs().flyout.title,'</h3>\n\n\t\t\t\t\t<span class="whats-new-rss-flyout-inner-header__loading-icon">\n\t\t\t\t\t').concat(this.RSS.getArgs().loaderIcon,'\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<button type="button" id="').concat(this.getFlyoutCloseBtnID(),'">').concat(this.RSS.getArgs().flyout.closeBtnIcon,"</button>\n\t\t\t</div>\n\n\t\t\t").concat(t.join(""),'\n\n\t\t\t<div class="whats-new-rss-flyout-inner-content">\n\t\t\t\t<div class="skeleton-container">\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<div class="whats-new-rss-flyout-overlay"></div>\n\t\t'),document.body.appendChild(n)},e.prototype.setMultiFeedTabNotificationCount=function(e,t){void 0===t&&(t=0);var n=document.querySelector("#".concat(this.getFlyoutMultiFeedNavID(),' button[data-feed-key="').concat(e,'"]'));if(n){var r=n.querySelector(".new-notification-count");if(t){var o=t>9?"9+":t;r.innerHTML=o.toString()}else r.innerHTML=""}},e.prototype.innerContentWrapper=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n="");var r=["whats-new-rss-flyout-inner-content-item"];return t&&r.push("rss-new-post"),n&&r.push(n),'\n\t\t<div class="'.concat(r.join(" "),'">\n\t\t\t').concat(t?'<small class="new-post-badge">New ✨</small>':"","\n\t\t\t").concat(e,"\n\t\t</div>\n\t\t")},e.prototype.createExcerpt=function(e,t,n){var r=n.wordLimit,o=n.moreSymbol,i=n.readMore;if(!r)return e;var a=e.replace(/<[^>]*>/g,"").split(/\s+/),s=a.slice(0,r).join(" ");return o&&(s+=o),r>a.length?e:t&&(null==i?void 0:i.label)?"<p>".concat(s,' <a href="').concat(t,'" target="_blank" class="').concat(i.className,'">').concat(i.label,"</a></p>"):"<p>".concat(s,"</p>")},e.prototype.listChildrenPosts=function(e){var t=this,n=Object.values(e);if(!n.length)return"";var r=document.createElement("details"),o=document.createElement("summary"),i=document.createElement("div");return n.forEach((function(e){var n=(new DOMParser).parseFromString(e.post_content,"text/html"),r=document.createElement("div");r.classList.add("sub-version-item"),r.innerHTML='\n\t\t\t\t<div class="sub-version-header">\n\t\t\t\t\t<h4 class="sub-version-title">'.concat(e.post_title,'</h4>\n\t\t\t\t\t<span class="sub-version-date">').concat(t.formatDate(new Date(e.post_date)),'</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="sub-version-content">').concat(n.documentElement.textContent,"</div>\n\t\t\t"),i.appendChild(r)})),o.innerHTML='<p class="text-see-more">See More</p><p class="text-see-less">See Less</p>',r.appendChild(o),r.appendChild(i),i.classList.add("sub-version-items-wrapper"),r.classList.add("whats-new-rss-sub-version-details"),r.outerHTML},e.prototype.formatDate=function(e){if("function"==typeof this.RSS.getArgs().flyout.formatDate)return this.RSS.getArgs().flyout.formatDate(e);var t=new Date,n=e.getTime(),r=t.getTime()-n,o=36e5,i=24*o,a=7*i,s=30*i;if(r<6e4)return"Just now";if(r<o){var l=Math.floor(r/6e4);return"".concat(l," minute").concat(l>1?"s":""," ago")}if(r<i){var c=Math.floor(r/o);return"".concat(c," hour").concat(c>1?"s":""," ago")}if(r<a){var u=Math.floor(r/i);return"".concat(u," day").concat(u>1?"s":""," ago")}if(r<s){var d=Math.floor(r/a);return"".concat(d," week").concat(d>1?"s":""," ago")}var f=Math.floor(r/s);return"".concat(f," month").concat(f>1?"s":""," ago")},e}();function tJ(){var e=window.location.hash;document.querySelectorAll("#adminmenu #toplevel_page_hfe a").forEach((function(t){var n=t.getAttribute("href"),r=t.closest("li"),o=t.textContent.trim();n&&(e.includes(n.split("#")[1])||"#dashboard"===e&&"Dashboard"===o)?r.classList.add("current"):r.classList.remove("current")}))}const nJ=function(){var e=a((0,s.useState)(!1),2),t=(e[0],e[1]);(0,s.useEffect)((function(){return tJ(),window.addEventListener("hashchange",tJ),function(){window.removeEventListener("hashchange",tJ)}}),[]);var n=window.location.hash,r=function(e){return n.includes(e)},o=function(e){return{color:r(e)?"#111827":"#4B5563",borderBottom:r(e)?"2px solid #6005FF":"none",paddingBottom:"22px",marginBottom:"-16px"}},i=function(e){window.open(e,"_blank"),t(!1)};return function({selector:e,...t}){const n=(0,s.useRef)(null);(0,s.useEffect)((()=>{var r;return async function(){const e="whats-new-rss-styles";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=await async function(){return".whats-new-rss-is-active{overflow:hidden}.whats-new-rss-trigger-button{display:flex;align-items:center;position:relative;width:auto;padding:5px;cursor:pointer}.whats-new-rss-trigger-button .whats-new-rss-notification-badge{position:absolute;top:-8px;right:-5px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red;transition:transform .2s ease-in-out}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.is-multi-feed{top:-2px;right:-2px;font-size:0;width:10px;height:10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.hide{display:none}.whats-new-rss-trigger-button:hover .whats-new-rss-notification-badge{transform:scale(1.2)}.whats-new-rss-flyout{position:fixed;top:0;right:0;bottom:0;width:100%;z-index:99999;transition:visibility .3s ease-in-out;font-family:Arial,Helvetica,sans-serif}.whats-new-rss-flyout .lightbox-trigger,.whats-new-rss-flyout.hidden{display:none}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon{display:block;margin:auto}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon svg{display:block;background:0 0;width:25px;height:25px}.whats-new-rss-flyout .whats-new-rss-flyout-contents{position:fixed;display:flex;right:0;width:30%;height:100%;flex-direction:column;background-color:#fff;transition:transform .3s ease-in-out;z-index:9999}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 24px;border-bottom:1px solid #ccc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header button{border:none;background:0 0;font-size:30px;cursor:pointer;color:#94a3b8;padding:0;margin:0;box-shadow:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper{display:flex;gap:10px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper h3{margin:0;padding:0;color:#0f172a;font-weight:600;font-size:16px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav{display:flex;padding:0 30px;border-bottom:1px solid #ccc;gap:2em;overflow:auto;white-space:nowrap}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button{position:relative;background:0 0;color:inherit;padding:15px 0;border-bottom:2px solid transparent}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:focus,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:hover{border-color:inherit}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button.selected{border-color:#5d5d5d}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button .new-notification-count{position:absolute;top:0;right:-10px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content{flex:1;overflow-y:auto}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .skeleton-container{margin:30px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item{border-bottom:1px solid #d8dfe9;padding:30px 24px;color:#475569;font-weight:400;font-size:14px;line-height:20px;display:flex;flex-direction:column;gap:13px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>*{margin:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.skeleton-row{height:25vh;margin:40px 0;background:linear-gradient(90deg,#eee 25%,#ddd 50%,#eee 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post{position:relative}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post .new-post-badge{background:#ff3d3d;border-radius:5px;position:absolute;right:45px;padding:0 5px;color:#fff}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header{display:flex;flex-direction:column;gap:15px;padding:0 0 8px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header p{color:#94a3b8;margin:0;padding:0;font-weight:600;font-size:14px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header h2{margin:0;color:#0f172a;font-weight:700;line-height:28px;font-size:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h2{font-weight:700;font-size:18px;line-height:24px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h3{font-weight:700;font-size:16px;line-height:22px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h4{font-weight:700;font-size:15px;line-height:20px;margin-top:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h5{font-weight:700;font-size:14px;line-height:18px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h6{font-weight:700;font-size:13px;line-height:16px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p{padding:0;font-size:14px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p:last-child{margin-bottom:0;padding-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item a{color:#1170ff;text-decoration:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure{margin:10px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure.wp-block-embed.is-type-video{position:relative;width:100%;height:0;padding-bottom:56.25%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item video{vertical-align:middle;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item strong{font-weight:600}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{padding-inline-start:20px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li{margin-bottom:5px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{list-style-type:disc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol{list-style-type:decimal}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details{line-height:20px;font-size:.9em;margin:10px 0;background:#f9fafb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary{display:flex;justify-content:space-between;cursor:pointer;padding:20px 15px;height:1em;line-height:20px;font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary::after{content:'⌃';font-size:20px;transform:rotateX(180deg);font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-more{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-less{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary{border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary::after{transform:rotateX(45deg)}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-more{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-less{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item{position:relative;padding:1em;border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-header{display:flex;justify-content:space-between}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-content{margin-top:1em}.whats-new-rss-flyout .whats-new-rss-flyout-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);transition:all .3s ease-in-out}.whats-new-rss-flyout.closed{visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-overlay{opacity:0;visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-contents{transform:translateX(100%)}.whats-new-rss-flyout .whats-new-rss-flyout-inner-header__loading-icon{display:none}@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@media screen and (max-width:1024px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:40%}}@media screen and (max-width:768px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:85%}}"}(),document.head.appendChild(t)}}(),n.current||(n.current=(r={selector:e,...t},new ZZ(r))),()=>{n.current&&"function"==typeof n.current.destroy&&n.current.destroy()}}),[e,...Object.values(t)]),n.current}({rssFeedURL:"https://ultimateelementor.com/whats-new/feed/",selector:"#hfe-whats-new",triggerButton:{beforeBtn:'<div class="w-4 sm:w-8 h-8 sm:h-10 flex items-center whitespace-nowrap justify-center cursor-pointer rounded-full border border-slate-200">',icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#434141" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-megaphone"><path d="m3 11 18-5v12L3 14v-3z"></path><path d="M11.6 16.8a3 3 0 1 1-5.8-1.6"></path></svg>',afterBtn:"</div>"},flyout:{title:(0,HZ.__)("What's New?","astra-sites"),formatDate:function(e){var t=e.toLocaleDateString("en-US",{weekday:"long"}),n=e.toLocaleDateString("en-US",{month:"long"}),r=e.getDate(),o=e.getFullYear();return"".concat(t," ").concat(n," ").concat(r,", ").concat(o)}}}),c().createElement(Pw,{className:"hfe-nav-menu relative",style:{width:"unset",padding:"0.5rem",zIndex:"9",paddingTop:"1rem"}},c().createElement("div",{className:"flex flex-col lg:flex-row items-start md:items-center w-full"},c().createElement("div",{className:"flex flex-row md:items-center md:gap-8 w-full"},c().createElement(Pw.Left,null,c().createElement(Pw.Item,null,c().createElement(D,{to:qZ.dashboard.path},c().createElement("img",{src:"".concat(hfeSettingsData.icon_url),alt:"Icon",className:"ml-4 cursor-pointer",style:{height:"35px",width:"35px"}})))),c().createElement(Pw.Middle,{className:"flex-grow",align:"left"},c().createElement(Pw.Item,null,c().createElement("nav",{className:"flex flex-wrap gap-6 mt-2 md:mt-0 cursor-pointer"},c().createElement(D,{to:qZ.dashboard.path,className:"".concat(r("dashboard")?"active-link":""),style:o("dashboard")},(0,HZ.__)("Dashboard","header-footer-elementor")),c().createElement(D,{to:qZ.headerFooterBuilder.path,className:"".concat(r("edit.php?post_type=elementor-hf")?"active-link":""),style:o("edit.php?post_type=elementor-hf"),onClick:function(){console.log("Navigating to Header & Footer Builder")}},(0,HZ.__)("Header & Footer Builder","header-footer-elementor")),c().createElement(D,{to:qZ.widgets.path,className:"".concat(r("widgets")?"active-link":""),style:o("widgets")},(0,HZ.__)("Widgets","header-footer-elementor")),c().createElement(D,{to:qZ.templates.path,className:"".concat(r("templates")?"active-link":""),style:o("templates")},(0,HZ.__)("Templates","header-footer-elementor")),c().createElement(D,{to:qZ.settings.path,className:"".concat(r("settings")?"active-link":""),style:o("settings")},(0,HZ.__)("Settings","header-footer-elementor")),c().createElement(D,{to:qZ.upgrade.path,className:"".concat(r("upgrade")?"active-link":""),style:o("upgrade")},(0,HZ.__)("Free vs Pro","header-footer-elementor")))),c().createElement(Pw.Item,null,c().createElement(Xe,{icon:c().createElement(BZ,null),iconPosition:"right",variant:"ghost",className:"hfe-remove-ring mb-2",style:{color:"#6005FF",background:"none",border:"none",padding:0,cursor:"pointer"},onClick:function(){return i("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=navigation-bar&utm_campaign=uae-lite-upgrade")}},(0,HZ.__)("Get Pro","header-footer-elementor")))),c().createElement(Pw.Right,{className:"gap-4"},c().createElement(Pw.Item,null,c().createElement(u_,{placement:"bottom-end"},c().createElement(u_.Trigger,null,c().createElement(vi,{label:(0,HZ.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"}),c().createElement("span",{className:"sr-only"},"Open Menu")),c().createElement(u_.Portal,null,c().createElement(u_.Content,{className:"w-60"},c().createElement(u_.List,null,c().createElement(u_.Item,null,(0,HZ.__)("Version","header-footer-elementor")),c().createElement(u_.Item,null,c().createElement("div",{className:"flex justify-between w-full"},"".concat(hfeSettingsData.uaelite_current_version),c().createElement(vi,{label:(0,HZ.__)("Free","header-footer-elementor"),size:"xs",variant:"neutral"})))))))),c().createElement(Pw.Item,{className:"gap-4 cursor-pointer"},c().createElement(u_,{placement:"bottom-end"},c().createElement(u_.Trigger,null,c().createElement(WZ,null)),c().createElement(u_.Portal,null,c().createElement(u_.Content,{className:"w-60"},c().createElement(u_.List,null,c().createElement(u_.Item,null,(0,HZ.__)("Useful Resources","header-footer-elementor")),c().createElement(u_.Item,{className:"text-text-primary",style:{color:"black"},onClick:function(){return i("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/")}},c().createElement(VZ,{style:{color:"black"}}),(0,HZ.__)("Getting Started","header-footer-elementor")),c().createElement(u_.Item,{onClick:function(){return i("https://ultimateelementor.com/docs-category/widgets/")}},c().createElement(VZ,null),(0,HZ.__)("How to use widgets","header-footer-elementor")),c().createElement(u_.Item,{onClick:function(){return i("https://ultimateelementor.com/docs-category/features/")}},c().createElement(VZ,null),(0,HZ.__)("How to use features","header-footer-elementor")),c().createElement(u_.Item,{onClick:function(){return i("https://ultimateelementor.com/docs-category/templates/")}},c().createElement(VZ,null),(0,HZ.__)("How to use templates","header-footer-elementor")),c().createElement(u_.Item,{onClick:function(){return i("https://ultimateelementor.com/contact/")}},c().createElement(UZ,null),(0,HZ.__)("Contact us","header-footer-elementor")))))),c().createElement("div",{className:"pb-1",id:"hfe-whats-new"})),c().createElement(D,{to:qZ.settings.path},c().createElement($Z,{className:"cursor-pointer hfe-user-icon",style:{color:"black"}}))))))};function rJ(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||i(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const oJ=zZ("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),iJ=window.wp.apiFetch;var aJ=o.n(iJ),sJ=[],lJ=function(){0!==sJ.length&&sJ.shift()()};const cJ=function(e){var t=e.widget,n=e.updateCounter,r=e.showTooltip,o=t.id,i=t.icon,l=t.title,u=(t.infoText,t.is_pro),d=(t.is_active,t.slug,t.demo_url),f=t.doc_url,p=t.description,h=(t.is_new,a((0,s.useState)(t.is_active),2)),m=h[0],y=h[1],g=a((0,s.useState)(!1),2),v=g[0],b=g[1];(0,s.useEffect)((function(){y(t.is_active)}),[t.is_active,n]);var x=function(e){var t=e?"hfe_deactivate_widget":"hfe_activate_widget",n=new window.FormData;n.append("action",t),n.append("nonce",hfe_admin_data.nonce),n.append("module_id",o),n.append("is_pro",u);try{var r=aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:n});r.success?y(m):r.error}catch(e){}finally{b(!1),lJ()}};return c().createElement(Kp,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:""},c().createElement("div",{className:"flex items-center justify-between w-full"},c().createElement("div",{className:"h-10 w-10 mb-5 ".concat(null==i?void 0:i.props),style:{fontSize:"22px"}},i),c().createElement("div",{className:"flex items-center gap-x-2",style:{marginBottom:"15px"}},u&&c().createElement(vi,{label:"PRO",size:"xs",type:"pill",variant:"inverse"}),!u&&c().createElement(Qe,{onChange:function(){v||(b(!0),m?(y(!1),sJ.push((function(){return x(m)}))):(y(!0),sJ.push((function(){return x(m)}))),1===sJ.length&&lJ())},size:"sm",value:m,className:"hfe-remove-ring"}))),c().createElement("div",{className:"flex flex-col w-full"},c().createElement("p",{className:"text-sm font-medium text-text-primary pt-3 m-0 pb-1"},l),c().createElement("div",{className:"flex items-center justify-between w-full"},d&&c().createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-text-tertiary m-0 mb-1 hfe-remove-ring",style:{textDecoration:"none",lineHeight:"1.5rem"}},(0,HZ.__)("View Demo","header-footer-elementor")),r&&c().createElement("div",{className:"".concat(d?"":"hfe-tooltip-wrap")},c().createElement(fi,{arrow:!0,content:c().createElement("div",null,c().createElement("span",{className:"font-semibold block mb-2"},l),c().createElement("span",{className:"block mb-2"},p),f&&c().createElement("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"cursor-pointer",style:{color:"#B498E5",textDecoration:"none"}},c().createElement(VZ,{style:{color:"#B498E5",width:"11px",height:"11px",marginRight:"3px"}}),(0,HZ.__)("Read Documentation","header-footer-elementor"))),placement:"bottom",title:"",triggers:["click"],variant:"dark",size:"xs"},c().createElement(oJ,{className:"h-5 w-5",size:18,color:"#A0A5B2"}))))))},uJ=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1],l=a((0,s.useState)(!0),2),u=l[0];return l[1],(0,s.useEffect)((function(){i(!0),aJ()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:c().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),i(!1)})).catch((function(e){i(!1)}))}),[]),c().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},c().createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},c().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},"Widgets / Features"),c().createElement("div",{className:"flex items-center gap-x-2 mr-7"},c().createElement(D,{to:qZ.widgets.path,className:"text-sm text-text-primary cursor-pointer",style:{lineHeight:"1rem"}},"View All",c().createElement(BZ,{className:"ml-1",size:13})))),c().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4"},o?c().createElement(Kp,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},rJ(Array(16)).map((function(e,t){return c().createElement(Kp.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},c().createElement(qx,{className:"w-12 h-2 rounded-md"}),c().createElement(qx,{className:"w-16 h-2 rounded-md"}),c().createElement(qx,{className:"w-12 h-2 rounded-md"}))}))):c().createElement(Kp,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},null==t?void 0:t.slice(0,16).map((function(e){return c().createElement(Kp.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},c().createElement(cJ,{widget:e,showTooltip:u,key:e.id,updateCounter:0}))})))))},dJ=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1],r=a((0,s.useState)(null),2),o=r[0],i=r[1],l=a((0,s.useState)(null),2),u=l[0],d=l[1];if((0,s.useEffect)((function(){n(!0),aJ()({path:"/hfe/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.uael_nonce_action}}).then((function(e){i(e.templates_status),e.redirect_url&&d(e.redirect_url),n(!1)})).catch((function(e){n(!1)}))}),[]),!t)return c().createElement("div",{className:"box-border hfe-dashboard-templates p-4 bg-white rounded-lg shadow-md mb-6 hfe-subheading"},c().createElement("div",{className:"mb-4"},c().createElement("img",{src:"".concat(hfeSettingsData.templates_url),alt:"Template Showcase",className:"w-full h-auto rounded"})),c().createElement(wi,{className:"mt-2",icon:null,iconPosition:"right",size:"xs",tag:"h2",title:(0,HZ.__)("Build Websites 10x Faster with Templates","header-footer-elementor")}),c().createElement("p",{className:"text-text-secondary text-text-tertiary mt-2 mb-2 text-sm"},(0,HZ.__)("Choose from our professionally designed websites to build your site faster, with easy customization options.","header-footer-elementor")),"Activated"!==o?c().createElement(D,{to:qZ.templates.path,className:"w-full"},c().createElement(Xe,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary"},(0,HZ.__)("View Templates","header-footer-elementor"))):c().createElement(Xe,{className:"w-full mt-4",icon:null,iconPosition:"left",size:"md",variant:"secondary",onClick:function(e){"Activated"===o&&u&&window.open(u,"_blank")}},(0,HZ.__)("View Templates","header-footer-elementor")))},fJ=zZ("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),pJ=zZ("NotepadText",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"16",height:"18",x:"4",y:"4",rx:"2",key:"1u9h20"}],["path",{d:"M8 10h6",key:"3oa6kw"}],["path",{d:"M8 14h8",key:"1fgep2"}],["path",{d:"M8 18h5",key:"17enja"}]]),hJ=function(){return c().createElement("div",{className:"box-border hfe-dashboard-quick-access p-4 bg-white rounded-lg shadow-md",style:{width:"-webkit-fill-available"}},c().createElement(wi,{className:"mb-2",icon:null,iconPosition:"right",size:"xs",tag:"h3",title:(0,HZ.__)("Quick Access","header-footer-elementor")}),c().createElement(Kp,{align:"stretch",className:"p-1 rounded-lg gap-1",containerType:"flex",direction:"column",gap:"",justify:"start",style:{width:"100%",backgroundColor:"#F9FAFB"}},c().createElement(Kp.Item,{alignSelf:"auto",className:"p-4 bg-white rounded-lg shadow-container-item",order:"none",shrink:1},c().createElement(Xe,{className:"text-black hfe-remove-ring",icon:c().createElement(fJ,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/contact/","_blank")}},(0,HZ.__)("Contact Us","header-footer-elementor"))),c().createElement(Kp.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},c().createElement(Xe,{className:"text-black hfe-remove-ring",icon:c().createElement(WZ,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ultimateelementor.com/docs/","_blank")}},(0,HZ.__)("Help Centre","header-footer-elementor"))),c().createElement(Kp.Item,{className:"p-4 bg-white rounded-lg shadow-container-item"},c().createElement(Xe,{className:"text-black hfe-remove-ring",icon:c().createElement(pJ,null),iconPosition:"left",variant:"link",onClick:function(){window.open("https://ideas.ultimateelementor.com/boards/feature-requests","_blank")}},(0,HZ.__)("Request a Feature","header-footer-elementor")))))},mJ=zZ("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),yJ=zZ("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),gJ=function(){return c().createElement(wi,{className:"hfe-header-title my-4",description:"",icon:null,iconPosition:"right",size:"xs",tag:"h6",title:(0,HZ.__)("Formerly Elementor Header & Footer Builder","header-footer-elementor")})},vJ=function(){return c().createElement("div",null,c().createElement(Kp,{align:"center",className:"bg-background-primary border-[0.5px] border-subtle rounded-xl shadow-sm mb-6 p-8 flex flex-col lg:flex-row",containerType:"flex",direction:"row",gap:"sm"},c().createElement(Kp.Item,{shrink:1},c().createElement(wi,{description:"",icon:null,iconPosition:"right",className:"max-w-lg",size:"lg",tag:"h3",title:(0,HZ.__)("Welcome to Ultimate Addons for Elementor!","header-footer-elementor")}),c().createElement(gJ,null),c().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0 mt-2"},(0,HZ.__)("We're excited to help you supercharge your website-building experience. Effortlessly design stunning websites with our comprehensive range of free and premium widgets and features.","header-footer-elementor")),c().createElement("div",{className:"flex items-center pt-6 gap-2"},c().createElement(Xe,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] hfe-remove-ring",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#4B00CC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="#6005FF"},onClick:function(){window.open(hfeSettingsData.hfe_post_url,"_blank")}},(0,HZ.__)("Create Header/Footer","header-footer-elementor")),c().createElement(Xe,{icon:c().createElement(mJ,null),iconPosition:"right",variant:"outline",className:"hfe-remove-ring",style:{color:"#7D4CDB",borderColor:"#E9DFFC"},onMouseEnter:function(e){return e.currentTarget.style.color="#000000"},onMouseLeave:function(e){return(e.currentTarget.style.color="#7D4CDB")&&(e.currentTarget.style.borderColor="#E9DFFC")},onClick:function(){window.open(hfeSettingsData.elementor_page_url,"_blank")}},(0,HZ.__)("Create New Page","header-footer-elementor")),c().createElement("div",{style:{color:"black",background:"none",border:"none",padding:0,cursor:"pointer"},onMouseEnter:function(e){return e.currentTarget.style.color="#6005ff"},onMouseLeave:function(e){return e.currentTarget.style.color="black"},onClick:function(){window.open("https://ultimateelementor.com/docs/getting-started-with-ultimate-addons-for-elementor-lite/","_blank")}},c().createElement(Xe,{icon:c().createElement(yJ,null),iconPosition:"right",variant:"link",className:"hfe-remove-ring text-black"},(0,HZ.__)("Read full guide","header-footer-elementor")))))))},bJ=zZ("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),xJ=zZ("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),wJ=function(){var e=[{id:1,icon:"",title:(0,HZ.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,HZ.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,HZ.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,HZ.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,HZ.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,HZ.__)("Form Stylers and more...","header-footer-elementor")}];return c().createElement("div",null,c().createElement(Kp,{className:"bg-background-primary p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"row",justify:"between",gap:"xs"},c().createElement(Kp.Item,{className:"flex flex-col pt-6 pb-3 justify-between",style:{width:"65%"}},c().createElement("div",null,c().createElement(wi,{description:"",icon:c().createElement(bJ,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),c().createElement(wi,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,HZ.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-[12px]"}),c().createElement("p",{className:"text-sm m-0 text-text-secondary"},(0,HZ.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),c().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return c().createElement(wi,{key:e.id,description:"",icon:c().createElement(xJ,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)(e.title,"header-footer-elementor"),className:"text-[14px]"})}))),c().createElement("div",{className:"flex items-center pb-3 gap-4"},c().createElement(Xe,{variant:"secondary",className:"hfe-remove-ring",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-dashboard&utm_medium=unlock-ultimate-feature&utm_campaign=uae-lite-upgrade","_blank")}},(0,HZ.__)("Upgrade Now","header-footer-elementor")),c().createElement(D,{className:"text-black cursor-pointer",to:qZ.upgrade.path},(0,HZ.__)("Compare Free vs Pro","header-footer-elementor")))),c().createElement(Kp.Item,{className:"flex justify-center items-center",style:{width:"34%"}},c().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,HZ.__)("Column Showcase","header-footer-elementor"),className:"w-full h-auto rounded"}))))};function _J(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function SJ(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_J(i,r,o,a,s,"next",e)}function s(e){_J(i,r,o,a,s,"throw",e)}a(void 0)}))}}const kJ=window.regeneratorRuntime;var EJ=o.n(kJ);const OJ=function(e){var t=e.plugin,n=e.setUpdateCounter,r=t.path,o=t.slug,i=t.siteUrl,l=t.icon,u=t.type,d=t.name,f=t.zipUrl,p=t.desc,h=(t.wporg,t.isFree),m=(t.action,t.status),y=t.settings_url,g=a((0,s.useState)(!1),2),v=g[0],b=g[1],x=a((0,s.useState)(null),2),w=x[0],_=x[1],S=function(e){b(!1);var t=new window.FormData;t.append("action","hfe_recommended_plugin_activate"),t.append("nonce",hfe_admin_data.nonce),t.append("plugin",e.init),t.append("type",e.type),t.append("slug",e.slug);var r=document.querySelector('[data-slug="'.concat(e.slug,'"]')),o=r.querySelector("span");o.innerText=(0,HZ.__)("Activating..","header-footer-elementor"),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(t){if(t.success)o&&(r.style.color="#16A34A",r.dataset.action="site_redirect",r.classList.add("hfe-plugin-activated"),o.innerText=(0,HZ.__)("Activated","header-footer-elementor"),window.open(y,"_blank"),setTimeout((function(){n((function(e){return e+1}))}),5e3));else{e.type;var i=document.querySelector('[data-slug="'.concat(e.slug,'"]'));if(i){var a=i.querySelector("span");a&&(a.innerText=(0,HZ.__)("Activate","header-footer-elementor"))}}}))};return c().createElement(Kp,{align:"center",containerType:"flex",direction:"column",justify:"between",gap:"lg"},c().createElement("div",{className:"flex items-center justify-between w-full"},c().createElement("div",{className:"h-5 w-5"},c().createElement("img",{src:l,alt:"Recommended Plugins/Themes",className:"w-full h-auto rounded",style:{width:"24px",height:"24px"}})),c().createElement("div",{className:"flex items-center gap-x-2"},h&&c().createElement(vi,{label:(0,HZ.__)("Free","header-footer-elementor"),size:"xs",type:"pill",variant:"green"}),c().createElement(Xe,{size:"xs",variant:"link",className:"cursor-pointer hfe-remove-ring",onClick:function(e){var t=e.currentTarget.dataset.action,n=new window.FormData,r={init:e.currentTarget.dataset.init,type:e.currentTarget.dataset.type,slug:e.currentTarget.dataset.slug,name:e.currentTarget.dataset.pluginname};switch(t){case"hfe_recommended_plugin_activate":"theme"===r.type?(_(r),b(!0)):S(r);break;case"hfe_recommended_plugin_install":n.append("action","theme"===r.type?"hfe_recommended_theme_install":"hfe_recommended_plugin_install"),n.append("_ajax_nonce",hfe_admin_data.installer_nonce),n.append("slug",r.slug),e.target.innerText=(0,HZ.__)("Installing..","header-footer-elementor"),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:n}).then((function(t){t.success||"folder_exists"===t.errorCode?(e.target.innerText=(0,HZ.__)("Installed","header-footer-elementor"),"theme"===r.type?(document.querySelector('[data-slug="'.concat(r.slug,'"]')).dataset.action="hfe_recommended_plugin_activate",e.target.innerText=(0,HZ.__)("Activate","header-footer-elementor")):S(r)):(e.target.innerText=(0,HZ.__)("Install","header-footer-elementor"),alert("theme"===r.type?(0,HZ.__)("Theme Installation failed, Please try again later.","header-footer-elementor"):(0,HZ.__)("Plugin Installation failed, Please try again later.","header-footer-elementor")))}));break;case"site_redirect":window.open(i,"_blank")}},"data-plugin":f,"data-type":u,"data-pluginname":d,"data-slug":o,"data-site":i,"data-init":r,"data-action":function(e){return"Activated"===e?"site_redirect":"Installed"===e?"hfe_recommended_plugin_activate":"hfe_recommended_plugin_install"}(m),style:{color:"Activated"===m?"#16A34A":"#6005FF"}},"Activated"===m?(0,HZ.__)("Visit Site","header-footer-elementor"):"Installed"===m?"Activate":m),c().createElement(vw,{design:"simple",open:v,setOpen:b},c().createElement(vw.Backdrop,null),c().createElement(vw.Panel,null,c().createElement(vw.Header,null,c().createElement("div",{className:"flex items-center justify-between"},c().createElement(vw.Title,null,(0,HZ.__)("Activate Theme","header-footer-elementor"))),c().createElement(vw.Description,null,(0,HZ.__)("Are you sure you want to switch your current theme to Astra?","header-footer-elementor"))),c().createElement(vw.Footer,null,c().createElement(Xe,{onClick:function(){return S(w)}},(0,HZ.__)("Yes","header-footer-elementor")),c().createElement(Xe,{variant:"outline",onClick:function(){return b(!1)}},(0,HZ.__)("Close","header-footer-elementor"))))))),c().createElement("div",{className:"flex flex-col w-full pb-4"},c().createElement("p",{className:"text-sm font-medium text-text-primary pb-1 m-0 cursor-pointer",onClick:function(){return window.open(t.siteurl,"_blank")}},(0,HZ.__)(d,"header-footer-elementor")),c().createElement("p",{className:"text-sm font-medium text-text-tertiary m-0"},(0,HZ.__)(p,"header-footer-elementor"))))};function jJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const PJ=function(){var e=a((0,s.useState)([]),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1],l=a((0,s.useState)(0),2),u=l[0],d=l[1],f=a((0,s.useState)(!1),2),p=f[0],h=f[1];function y(e){return Object.keys(e).map((function(t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jJ(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({path:t},e[t])}))}return(0,s.useEffect)((function(){var e=function(){var e=SJ(EJ().mark((function e(){var t,r,o;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i(!0),e.prev=1,e.next=4,aJ()({path:"/hfe/v1/plugins",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}});case 4:t=e.sent,r=y(t),n(r),o=r.every((function(e){return e.is_installed})),h(o),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching plugins:",e.t0);case 14:return e.prev=14,i(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(){return e.apply(this,arguments)}}();e()}),[u]),p?null:c().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},c().createElement("div",{className:"flex items-center justify-between p-4",style:{paddingBottom:"0"}},c().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary"},(0,HZ.__)("Extend Your Website","header-footer-elementor")),c().createElement("div",{className:"flex items-center gap-x-2 mr-7"})),c().createElement("div",{className:"flex flex-col rounded-lg p-4",style:{backgroundColor:"#F9FAFB"}},o?c().createElement(Kp,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start"},rJ(Array(2)).map((function(e,t){return c().createElement(Kp.Item,{key:t,alignSelf:"auto",style:{height:"150px"},className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},c().createElement("div",{className:"flex flex-col gap-6",style:{marginTop:"40px"}},c().createElement(qx,{className:"w-12 h-2 rounded-md"}),c().createElement(qx,{className:"w-16 h-2 rounded-md"}),c().createElement(qx,{className:"w-12 h-2 rounded-md"})))}))):c().createElement(Kp,{align:"stretch",className:"gap-1 p-1 grid grid-cols-1 md:grid-cols-2",containerType:"grid",justify:"start"},t.slice(0,4).map((function(e){return c().createElement(Kp.Item,{key:e.slug,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},c().createElement(OJ,{plugin:e,setUpdateCounter:d}))})))))},CJ=function(){return(0,s.useEffect)((function(){var e="admin.php?page=hfe#dashboard";window.location.href.includes(e)&&window.history.pushState(null,"",e);var t=function(t){window.location.href.includes(e)&&(t.preventDefault(),window.history.pushState(null,"",e))};return window.addEventListener("popstate",t),function(){window.removeEventListener("popstate",t)}}),[]),c().createElement(c().Fragment,null,c().createElement(nJ,null),c().createElement("div",null,c().createElement(Kp,{align:"stretch",className:"p-6 flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},c().createElement(Kp.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:0},c().createElement(vJ,null),c().createElement(uJ,null),c().createElement(wJ,null)),c().createElement(Kp.Item,{className:"p-2 w-full hfe-35-width",shrink:1},c().createElement(dJ,null),c().createElement(PJ,null),c().createElement(hJ,null)))))},TJ=function(){var e=[{id:1,icon:"",title:(0,HZ.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,HZ.__)("Advanced Heading","header-footer-elementor")},{id:1,icon:"",title:(0,HZ.__)("Post Layouts","header-footer-elementor")},{id:1,icon:"",title:(0,HZ.__)("Info Box","header-footer-elementor")},{id:1,icon:"",title:(0,HZ.__)("Pricing Cards","header-footer-elementor")},{id:1,icon:"",title:(0,HZ.__)("Form Stylers and more...","header-footer-elementor")}];return c().createElement("div",{className:"pt-4"},c().createElement(Kp,{className:"bg-background-primary gap-1 p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"column",justify:"between",gap:"xs"},c().createElement(Kp.Item,{className:"flex flex-col justify-center items-center"},c().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,HZ.__)("Column Showcase","header-footer-elementor"),className:"h-auto rounded w-1/2"})),c().createElement(Kp.Item,{className:"flex flex-col justify-between"},c().createElement("div",null,c().createElement(wi,{description:"",icon:c().createElement(bJ,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),c().createElement(wi,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,HZ.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-sm"}),c().createElement("p",{className:"text-md m-0 text-text-secondary"},(0,HZ.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),c().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return c().createElement(wi,{key:e.id,description:"",icon:c().createElement(xJ,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xxs",tag:"h6",title:e.title,className:"text-md m-0 text-text-secondary hfe-compare-section"})}))),c().createElement("div",{className:"flex items-center pb-3 gap-4"},c().createElement(Xe,{iconPosition:"right",variant:"secondary",className:"hfe-remove-ring",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-FreevsPro&utm_medium=unlock-ultimate-feature&utm_campaign=uae-lite-upgrade","_blank")}},(0,HZ.__)("Upgrade Now","header-footer-elementor")),c().createElement(D,{className:"text-black cursor-pointer",to:qZ.upgrade.path},(0,HZ.__)("Compare Free vs Pro","header-footer-elementor"))))))},AJ=zZ("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),NJ=zZ("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);function MJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MJ(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const IJ=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(""),2),o=r[0],i=r[1],l=a((0,s.useState)(!1),2),u=l[0],d=l[1],f=a((0,s.useState)(!1),2),p=f[0],h=f[1],m=a((0,s.useState)(!0),2),y=m[0],g=m[1],v=a((0,s.useState)(0),2),b=v[0],x=v[1],w=a((0,s.useState)(!0),2),_=w[0];w[1],(0,s.useEffect)((function(){g(!0),aJ()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:c().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),g(!1)})).catch((function(e){g(!1)}))}),[]);var S=null==t?void 0:t.filter((function(e){var t;return e.title.toLowerCase().includes(o)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(o)})))})),k=function(){var e=SJ(EJ().mark((function e(){var t;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d(!0),(t=new window.FormData).append("action","hfe_bulk_activate_widgets"),t.append("nonce",hfe_admin_data.nonce),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){d(!1),e.success?(n((function(e){return e.map((function(e){return DJ(DJ({},e),{},{is_active:!0})}))})),x((function(e){return e+1}))):e.error&&(d(!1),console.error("Error during AJAX request:",error))})).catch((function(e){d(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e=SJ(EJ().mark((function e(){var t;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h(!0),(t=new window.FormData).append("action","hfe_bulk_deactivate_widgets"),t.append("nonce",hfe_admin_data.nonce),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){h(!1),e.success?(n((function(e){return e.map((function(e){return DJ(DJ({},e),{},{is_active:!1})}))})),x((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){h(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c().createElement("div",{className:"rounded-lg bg-white w-full mb-4"},c().createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between p-4",style:{paddingBottom:"0"}},c().createElement("p",{className:"m-0 text-sm font-semibold text-text-primary mb-2 md:mb-0"},(0,HZ.__)("Widgets / Features","header-footer-elementor")),c().createElement("div",{className:"flex flex-col md:flex-row items-center gap-y-2 md:gap-x-2 md:mr-7 relative"},c().createElement(AJ,{className:"absolute top-1/2 transform -translate-y-1/2 text-gray-400",style:{backgroundColor:"#F9FAFB",left:"2%",width:"18px",height:"18px"}}),c().createElement("input",{type:"search",placeholder:(0,HZ.__)("Search...","header-footer-elementor"),className:"mr-2 pl-10 w-full md:w-auto",style:{height:"40px",borderColor:"#e0e0e0",outline:"none",boxShadow:"none",backgroundColor:"#F9FAFB"},onFocus:function(e){return e.target.style.borderColor="#6005FF"},onBlur:function(e){return e.target.style.borderColor="#e0e0e0"},onChange:function(e){i(e.target.value.toLowerCase())}}),c().createElement("div",{className:"flex flex-row gap-2 w-full md:w-auto"},c().createElement(Xe,{icon:u?c().createElement(NJ,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"hfe-bulk-action-button",onClick:k,disabled:!!o},u?(0,HZ.__)("Activating...","header-footer-elementor"):(0,HZ.__)("Activate All","header-footer-elementor")),c().createElement(Xe,{icon:p?c().createElement(NJ,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:E,className:"hfe-bulk-action-button",disabled:!!o},p?(0,HZ.__)("Deactivating...","header-footer-elementor"):(0,HZ.__)("Deactivate All","header-footer-elementor"))))),c().createElement("div",{className:"flex bg-black flex-col rounded-lg p-4",style:{minHeight:"800px"}},y?c().createElement(Kp,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},rJ(Array(30)).map((function(e,t){return c().createElement(Kp.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-6 space-y-2"},c().createElement(qx,{className:"w-12 h-2 rounded-md"}),c().createElement(qx,{className:"w-16 h-2 rounded-md"}),c().createElement(qx,{className:"w-12 h-2 rounded-md"}))}))):c().createElement(Kp,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{backgroundColor:"#F9FAFB"}},null==S?void 0:S.map((function(e){return c().createElement(Kp.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},c().createElement(cJ,{widget:DJ(DJ({},e),{},{updateCounter:b}),showTooltip:_,key:e.id,updateCounter:b}))})))))},RJ=function(){return c().createElement(c().Fragment,null,c().createElement(nJ,null),c().createElement("div",null,c().createElement(Kp,{align:"stretch",className:"p-6 flex flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},c().createElement(Kp.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:1},c().createElement(IJ,null)),c().createElement(Kp.Item,{className:"p-2 hfe-35-width",shrink:1},c().createElement(dJ,null),c().createElement(PJ,null),c().createElement(TJ,null),c().createElement("div",{className:"",style:{paddingTop:"16px"}},c().createElement(hJ,null))))))},LJ=function(){var e=a((0,s.useState)(!0),2),t=e[0],n=e[1],r=a((0,s.useState)(null),2),o=r[0],i=r[1],l=a((0,s.useState)(null),2),u=l[0],d=l[1],f=[{id:1,icon:"",title:(0,HZ.__)("250+ templates for every niche","header-footer-elementor")},{id:2,icon:"",title:(0,HZ.__)("Modern, timeless designs","header-footer-elementor")},{id:3,icon:"",title:(0,HZ.__)("Full design flexibility for easy customization","header-footer-elementor")},{id:4,icon:"",title:(0,HZ.__)("100% responsive across all devices","header-footer-elementor")}];if((0,s.useEffect)((function(){n(!0),aJ()({path:"/hfe/v1/templates",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){i(e.templates_status),e.redirect_url&&d(e.redirect_url),n(!1)})).catch((function(e){n(!1)}))}),[]),!t){var p="Install"===o?(0,HZ.__)("Install Starter Templates","header-footer-elementor"):(0,HZ.__)("Activate Starter Templates","header-footer-elementor"),h=function(){var e=new window.FormData,t="astra-sites/astra-sites.php",n="astra-sites";"Installed"!==hfeSettingsData.st_pro_status||"Install"!==hfeSettingsData.st_status&&"Installed"!==hfeSettingsData.st_status||(t="astra-pro-sites/astra-pro-sites.php",n="astra-pro-sites"),e.append("action","hfe_recommended_plugin_activate"),e.append("nonce",hfe_admin_data.nonce),e.append("plugin",t),e.append("type","plugin"),e.append("slug",n),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:e}).then((function(e){if(e.success){var t=document.querySelector(".hfe-starter-template-button");if(t){var n=t.querySelector("span");n&&(n.innerText=(0,HZ.__)("Activating Starter Templates...","header-footer-elementor"),t.classList.add("hfe-plugin-activated"),n.innerText=(0,HZ.__)("Activated Starter Templates","header-footer-elementor"),location.reload())}}else{var r=document.querySelector(".hfe-starter-template-button");if(r){var o=r.querySelector("span");o&&(o.innerText=(0,HZ.__)("Activate Starter Templates","header-footer-elementor"))}}}))};return c().createElement("div",null,c().createElement(Kp,{className:"flex gap-2 flex-col md:flex-row bg-background-primary p-6 md:p-10 border-[0.5px] border-subtle rounded-xl shadow-sm flex-col-reverse",containerType:"flex",gap:"xs"},c().createElement(Kp.Item,{className:"flex flex-col justify-between w-full mt-4 md:w-1/2 mb-4 md:mb-0"},c().createElement("div",null,c().createElement(wi,{description:"",icon:c().createElement(bJ,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)("Design Your Website in Minutes","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600 mb-2"}),c().createElement(wi,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,HZ.__)("Build your website faster using our prebuilt templates","header-footer-elementor"),className:"py-1 text-sm mb-2"}),c().createElement("p",{className:"text-sm md:text-md m-0 text-text-secondary text-text-tertiary"},(0,HZ.__)("Stop building your site from scratch. Use our professional templates for your stunning website.It is easy to customize and completely responsive. Explore hundreds of designs and bring your vision to life in no time.","header-footer-elementor"))),c().createElement("div",{className:"grid grid-cols-1 gap-1 my-4"},f.map((function(e){return c().createElement(wi,{key:e.id,description:"",icon:c().createElement(xJ,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)(e.title,"header-footer-elementor"),className:""})}))),c().createElement("div",{className:"flex flex-col md:flex-row items-center pb-3 gap-4",style:{marginTop:"15px"}},c().createElement(Xe,{icon:c().createElement(mJ,null),iconPosition:"right",variant:"secondary",style:{backgroundColor:"#6005FF",outlineWidth:"0px"},className:"w-auto hfe-starter-template-button hfe-remove-ring cursor-pointer",onClick:function(e){if(u)window.open(u,"_blank");else{var t=document.querySelector(".hfe-starter-template-button span"),n=new window.FormData;n.append("action","hfe_recommended_plugin_install"),n.append("_ajax_nonce",hfe_admin_data.installer_nonce),n.append("slug","astra-sites"),t&&"Install"===o&&(t.innerText=(0,HZ.__)("Installing Starter Templates...","header-footer-elementor"),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:n}).then((function(e){e.success||"folder_exists"===e.errorCode?(t.innerText=(0,HZ.__)("Installed Starter Templates","header-footer-elementor"),h()):t.innerText=(0,HZ.__)("Install Starter Templates","header-footer-elementor")}))),t&&"Installed"===o&&(t.innerText=(0,HZ.__)("Activating Starter Templates...","header-footer-elementor"),h())}}},"Activated"===o?(0,HZ.__)("Explore Templates","header-footer-elementor"):p),c().createElement(Xe,{icon:"",iconPosition:"right",variant:"ghost",className:"w-auto hfe-link-color hfe-remove-ring",onClick:function(){window.open("https://startertemplates.com/","_blank")}},(0,HZ.__)("Learn More","header-footer-elementor")))),c().createElement(Kp.Item,{className:"flex justify-center md:justify-end w-full md:w-1/2"},c().createElement("img",{src:"".concat(hfeSettingsData.template_url),alt:"Column Showcase",className:"object-contain w-full md:w-5/6"}))))}},FJ=function(){return c().createElement(c().Fragment,null,c().createElement(nJ,null),c().createElement("div",{className:""},c().createElement(Kp,{align:"stretch",className:"p-2",containerType:"flex",direction:"row",gap:"sm",justify:"center",style:{width:"100%"}},c().createElement(Kp.Item,{className:"p-2",alignSelf:"auto",order:"none",shrink:1,style:{width:"90%"}},c().createElement(LJ,null)))))},zJ=function(e){var t=e.items,n=e.onSelectItem,r=a((0,s.useState)(null),2),o=r[0],i=r[1];return c().createElement("div",{style:{padding:"1rem",width:"100%"}},t.map((function(e){return c().createElement("div",{key:e.id,className:"mb-2"},e.main&&c().createElement("p",{className:"text-sm text-text-tertiary font-normal mb-2"},e.main),c().createElement("div",{className:"h-10 flex items-center justify-start gap-2 px-2 rounded-md cursor-pointer ".concat(o===e.id?"bg-gray-100":"bg-background-primary"),style:{backgroundColor:o===e.id?"#F9FAFB":""},onClick:function(){return function(e){i(e.id),n(e)}(e)}},c().createElement("span",null,o===e.id?e.selected:e.icon),c().createElement("p",{className:"m-0 text-base font-normal"},e.title)))})))},BJ=function(e){var t=e.selectedItem;return c().createElement("div",{className:"p-6",style:{marginLeft:"4px"}},c().createElement("div",null,null==t?void 0:t.content))};let WJ={data:""},VJ=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||WJ,UJ=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,$J=/\/\*[^]*?\*\/| +/g,HJ=/\n+/g,qJ=(e,t)=>{let n="",r="",o="";for(let i in e){let a=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+a+";":r+="f"==i[1]?qJ(a,i):i+"{"+qJ(a,"k"==i[1]?"":t)+"}":"object"==typeof a?r+=qJ(a,t?t.replace(/([^,])+/g,(e=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=a&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=qJ.p?qJ.p(i,a):i+":"+a+";")}return n+(t&&o?t+"{"+o+"}":o)+r},KJ={},YJ=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+YJ(e[n]);return t}return e};function XJ(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,o)=>{let i=YJ(e),a=KJ[i]||(KJ[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!KJ[a]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=UJ.exec(e.replace($J,""));)t[4]?r.shift():t[3]?(n=t[3].replace(HJ," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(HJ," ").trim();return r[0]})(e);KJ[a]=qJ(o?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&KJ.g?KJ.g:null;return n&&(KJ.g=KJ[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(KJ[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":qJ(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,VJ(t.target),t.g,t.o,t.k)}XJ.bind({g:1});let GJ,ZJ,JJ,QJ=XJ.bind({k:1});function eQ(e,t){let n=this||{};return function(){let r=arguments;function o(i,a){let s=Object.assign({},i),l=s.className||o.className;n.p=Object.assign({theme:ZJ&&ZJ()},s),n.o=/ *go\d+/.test(l),s.className=XJ.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;return e[0]&&(c=s.as||e,delete s.as),JJ&&c[0]&&JJ(s),GJ(c,s)}return t?t(o):o}}var tQ=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,nQ=(()=>{let e=0;return()=>(++e).toString()})(),rQ=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),oQ=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return oQ(e,{type:e.toasts.find((e=>e.id===n.id))?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,dismissed:!0,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+o})))}}},iQ=[],aQ={toasts:[],pausedAt:void 0},sQ=e=>{aQ=oQ(aQ,e),iQ.forEach((e=>{e(aQ)}))},lQ={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},cQ=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||nQ()}))(t,e,n);return sQ({type:2,toast:r}),r.id},uQ=(e,t)=>cQ("blank")(e,t);uQ.error=cQ("error"),uQ.success=cQ("success"),uQ.loading=cQ("loading"),uQ.custom=cQ("custom"),uQ.dismiss=e=>{sQ({type:3,toastId:e})},uQ.remove=e=>sQ({type:4,toastId:e}),uQ.promise=(e,t,n)=>{let r=uQ.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then((e=>{let o=t.success?tQ(t.success,e):void 0;return o?uQ.success(o,{id:r,...n,...null==n?void 0:n.success}):uQ.dismiss(r),e})).catch((e=>{let o=t.error?tQ(t.error,e):void 0;o?uQ.error(o,{id:r,...n,...null==n?void 0:n.error}):uQ.dismiss(r)})),e};var dQ=(e,t)=>{sQ({type:1,toast:{id:e,height:t}})},fQ=()=>{sQ({type:5,time:Date.now()})},pQ=new Map,hQ=QJ` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,mQ=QJ` from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; }`,yQ=QJ` from { transform: scale(0) rotate(90deg); opacity: 0; } to { transform: scale(1) rotate(90deg); opacity: 1; }`,gQ=eQ("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#ff4b4b"}; position: relative; transform: rotate(45deg); animation: ${hQ} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after, &:before { content: ''; animation: ${mQ} 0.15s ease-out forwards; animation-delay: 150ms; position: absolute; border-radius: 3px; opacity: 0; background: ${e=>e.secondary||"#fff"}; bottom: 9px; left: 4px; height: 2px; width: 12px; } &:before { animation: ${yQ} 0.15s ease-out forwards; animation-delay: 180ms; transform: rotate(90deg); } `,vQ=QJ` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `,bQ=eQ("div")` width: 12px; height: 12px; box-sizing: border-box; border: 2px solid; border-radius: 100%; border-color: ${e=>e.secondary||"#e0e0e0"}; border-right-color: ${e=>e.primary||"#616161"}; animation: ${vQ} 1s linear infinite; `,xQ=QJ` from { transform: scale(0) rotate(45deg); opacity: 0; } to { transform: scale(1) rotate(45deg); opacity: 1; }`,wQ=QJ` 0% { height: 0; width: 0; opacity: 0; } 40% { height: 0; width: 6px; opacity: 1; } 100% { opacity: 1; height: 10px; }`,_Q=eQ("div")` width: 20px; opacity: 0; height: 20px; border-radius: 10px; background: ${e=>e.primary||"#61d345"}; position: relative; transform: rotate(45deg); animation: ${xQ} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 100ms; &:after { content: ''; box-sizing: border-box; animation: ${wQ} 0.2s ease-out forwards; opacity: 0; animation-delay: 200ms; position: absolute; border-right: 2px solid; border-bottom: 2px solid; border-color: ${e=>e.secondary||"#fff"}; bottom: 6px; left: 6px; height: 10px; width: 6px; } `,SQ=eQ("div")` position: absolute; `,kQ=eQ("div")` position: relative; display: flex; justify-content: center; align-items: center; min-width: 20px; min-height: 20px; `,EQ=QJ` from { transform: scale(0.6); opacity: 0.4; } to { transform: scale(1); opacity: 1; }`,OQ=eQ("div")` position: relative; transform: scale(0.6); opacity: 0.4; min-width: 20px; animation: ${EQ} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; `,jQ=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?s.createElement(OQ,null,t):t:"blank"===n?null:s.createElement(kQ,null,s.createElement(bQ,{...r}),"loading"!==n&&s.createElement(SQ,null,"error"===n?s.createElement(gQ,{...r}):s.createElement(_Q,{...r})))},PQ=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,CQ=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,TQ=eQ("div")` display: flex; align-items: center; background: #fff; color: #363636; line-height: 1.3; will-change: transform; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); max-width: 350px; pointer-events: auto; padding: 8px 10px; border-radius: 8px; `,AQ=eQ("div")` display: flex; justify-content: center; margin: 4px 10px; color: inherit; flex: 1 1 auto; white-space: pre-line; `,NQ=s.memo((({toast:e,position:t,style:n,children:r})=>{let o=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,o]=rQ()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[PQ(n),CQ(n)];return{animation:t?`${QJ(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${QJ(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},i=s.createElement(jQ,{toast:e}),a=s.createElement(AQ,{...e.ariaProps},tQ(e.message,e));return s.createElement(TQ,{className:e.className,style:{...o,...n,...e.style}},"function"==typeof r?r({icon:i,message:a}):s.createElement(s.Fragment,null,i,a))}));!function(e){qJ.p=void 0,GJ=e,ZJ=void 0,JJ=void 0}(s.createElement);var MQ=({id:e,className:t,style:n,onHeightUpdate:r,children:o})=>{let i=s.useCallback((t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}}),[e,r]);return s.createElement("div",{ref:i,className:t,style:n},o)},DQ=XJ` z-index: 9999; > * { pointer-events: auto; } `,IQ=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:o,containerStyle:i,containerClassName:a})=>{let{toasts:l,handlers:c}=(e=>{let{toasts:t,pausedAt:n}=((e={})=>{let[t,n]=(0,s.useState)(aQ),r=(0,s.useRef)(aQ);(0,s.useEffect)((()=>(r.current!==aQ&&n(aQ),iQ.push(n),()=>{let e=iQ.indexOf(n);e>-1&&iQ.splice(e,1)})),[]);let o=t.toasts.map((t=>{var n,r,o;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||lQ[t.type],style:{...e.style,...null==(o=e[t.type])?void 0:o.style,...t.style}}}));return{...t,toasts:o}})(e);(0,s.useEffect)((()=>{if(n)return;let e=Date.now(),r=t.map((t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout((()=>uQ.dismiss(t.id)),n);t.visible&&uQ.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,s.useCallback)((()=>{n&&sQ({type:6,time:Date.now()})}),[n]),o=(0,s.useCallback)(((e,n)=>{let{reverseOrder:r=!1,gutter:o=8,defaultPosition:i}=n||{},a=t.filter((t=>(t.position||i)===(e.position||i)&&t.height)),s=a.findIndex((t=>t.id===e.id)),l=a.filter(((e,t)=>t<s&&e.visible)).length;return a.filter((e=>e.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+o),0)}),[t]);return(0,s.useEffect)((()=>{t.forEach((e=>{if(e.dismissed)((e,t=1e3)=>{if(pQ.has(e))return;let n=setTimeout((()=>{pQ.delete(e),sQ({type:4,toastId:e})}),t);pQ.set(e,n)})(e.id,e.removeDelay);else{let t=pQ.get(e.id);t&&(clearTimeout(t),pQ.delete(e.id))}}))}),[t]),{toasts:t,handlers:{updateHeight:dQ,startPause:fQ,endPause:r,calculateOffset:o}}})(n);return s.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...i},className:a,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map((n=>{let i=n.position||t,a=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},o=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:rQ()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...o}})(i,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return s.createElement(MQ,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?DQ:"",style:a},"custom"===n.type?tQ(n.message,n):o?o(n):s.createElement(NQ,{toast:n,position:i}))})))},RQ=uQ,LQ=[{id:"1",title:(0,HZ.__)("Option 1 (Recommended)","header-footer-elementor"),description:(0,HZ.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"1"},{id:"2",title:(0,HZ.__)("Option 2","header-footer-elementor"),description:(0,HZ.__)("This option will automatically replace your theme's header and footer files with custom templates from the plugin. It works with most themes and is selected by default.","header-footer-elementor"),value:"2"}];const FQ=function(){if("no"===hfeSettingsData.show_theme_support)return null;var e=a((0,s.useState)(hfeSettingsData.theme_option),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2),o=r[0],i=r[1];(0,s.useEffect)((function(){i(!1)}),[]);var l=function(e){var t=e.target.value;n(t),o||u(t)},u=function(){var e=SJ(EJ().mark((function e(t){var n;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(hfe_admin_data.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"save_theme_compatibility_option",hfe_compatibility_option:t,nonce:hfe_admin_data.nonce})});case 3:return n=e.sent,e.next=6,n.json();case 6:e.sent.success?RQ.success((0,HZ.__)("Settings saved successfully!","header-footer-elementor")):RQ.error((0,HZ.__)("Failed to save settings!","header-footer-elementor")),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),RQ.error((0,HZ.__)("Failed to save settings!","header-footer-elementor"));case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t){return e.apply(this,arguments)}}();return c().createElement(c().Fragment,null,c().createElement(wi,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,HZ.__)("Theme Support","header-footer-elementor")}),c().createElement(Kp,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px",maxWidth:"696px"}},c().createElement(Kp.Item,{className:"flex flex-col space-y-1"},c().createElement("p",{className:"text-base font-semibold m-0"},(0,HZ.__)("Select Option to Add Theme Support","header-footer-elementor")),c().createElement("p",{className:"text-sm font-normal m-0"},(0,HZ.__)("To ensure compatibility between the header/footer and your theme, please choose one of the following options to enable theme support:","header-footer-elementor"))),c().createElement(Kp.Item,{className:"p-2 space-y-4",alignSelf:"auto",order:"none"},LQ.map((function(e){return c().createElement("div",{key:e.id,className:"flex items-start gap-1 justify-center cursor-pointer"},c().createElement("input",{id:e.id,value:e.value,type:"radio",className:"mt-1 cursor-pointer hfe-radio-field",name:"theme-support-option",onChange:l,checked:t===e.value}),c().createElement("div",{className:"flex flex-col cursor-pointer"},c().createElement(Ze,{size:"sm",variant:"neutral",className:"text-sm font-semibold text-text-secondary cursor-pointer flex flex-col items-start justify-start",htmlFor:e.id},e.title,":",c().createElement("p",{className:"m-0 text-sm font-normal text-text-secondary cursor-pointer"},e.description))))}))),c().createElement("div",{className:"flex items-center p-4 border rounded-lg text-start",style:{paddingTop:"16px",paddingBottom:"16px",backgroundColor:"#F3F0FF"}},c().createElement("p",{className:"m-0 text-sm"},c().createElement("strong",null,(0,HZ.__)("Note:","header-footer-elementor"))," ",(0,HZ.__)("If neither option works, please contact your theme author to add support for this plugin.","header-footer-elementor")))),c().createElement(IQ,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"80px"},toastOptions:{duration:5e3,style:{background:"white"},success:{duration:3e3,style:{color:""},iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}))},zQ=function(){var e=hfeSettingsData.uaelite_versions,t=(0,s.useRef)(e?e[0].value:""),n=a((0,s.useState)(e?e[0].value:""),2),r=n[0],o=n[1],i=a((0,s.useState)("elementor-header-footer"),2),l=(i[0],i[1]),u=a((0,s.useState)(!1),2),d=u[0],f=u[1];return(0,s.useEffect)((function(){}),[d]),c().createElement(c().Fragment,null,c().createElement(wi,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,HZ.__)("Version Control","header-footer-elementor")}),c().createElement("div",{className:"box-border bg-background-primary p-6 rounded-lg",style:{marginTop:"24px"}},c().createElement(Kp,{align:"center",className:"flex flex-col lg:flex-row",containerType:"flex",direction:"column",gap:"sm",justify:"start"},c().createElement(Kp.Item,{className:"shrink flex flex-col space-y-1"},c().createElement("p",{className:"text-base font-semibold m-0"},(0,HZ.__)("Rollback to Previous Version","header-footer-elementor")),c().createElement("p",{className:"text-sm font-normal m-0"},(0,HZ.__)("Experiencing an issue with current version? Roll back to a previous version to help troubleshoot the issue.","header-footer-elementor"))),c().createElement(Kp.Item,{className:"p-2 flex space-y-4",alignSelf:"auto",order:"none"},c().createElement("div",{className:"bsf-rollback-version"},c().createElement("input",{type:"hidden",name:"product-name",id:"bsf-product-name",value:"header-footer-elementor"}),c().createElement("select",{id:"uaeliteVersionRollback",ref:t,onBlur:function(){l("elementor-header-footer")},onChange:function(e){o(e.target.value)},style:{padding:"8px",marginRight:"10px",marginTop:"16px",cursor:"pointer",borderRadius:"4px",height:"40px",width:"100px",outline:"none",boxShadow:"none"},onFocus:function(e){return e.target.style.borderColor="#6005FF"}},e.map((function(e){return c().createElement("option",{key:e.value,value:e.value},e.label)})))),c().createElement("div",{className:"flex flex-col cursor-pointer"},c().createElement(vw,{design:"simple",exitOnEsc:!0,scrollLock:!0,open:d,setOpen:f,trigger:c().createElement(Xe,{style:{backgroundColor:"#6005ff"}},(0,HZ.__)("Rollback","header-footer-elementor"))},c().createElement(vw.Backdrop,null),c().createElement(vw.Panel,null,c().createElement(vw.Header,null,c().createElement("div",{className:"flex items-center justify-between"},c().createElement(vw.Title,null,(0,HZ.__)("Rollback to Previous Version","header-footer-elementor")),c().createElement(vw.CloseButton,null))),c().createElement(vw.Body,null,(0,HZ.__)("Are you sure you want to rollback to Ultimate Addons for Elementor v".concat(r,"?"),"header-footer-elementor")),c().createElement(vw.Footer,null,c().createElement(Xe,{onClick:function(){var e=hfeSettingsData.uaelite_rollback_url.replace("VERSION",r);f(!1),window.location.href=e}},(0,HZ.__)("Rollback","header-footer-elementor")),c().createElement(Xe,{onClick:function(){f(!1)}},(0,HZ.__)("Cancel","header-footer-elementor"))))))))))},BQ=function(){return c().createElement(c().Fragment,null,c().createElement(wi,{description:"",icon:null,iconPosition:"right",size:"sm",tag:"h2",title:(0,HZ.__)("My Account","header-footer-elementor")}),c().createElement(Kp,{align:"stretch",className:"bg-background-primary p-6 rounded-lg",containerType:"flex",direction:"column",gap:"sm",justify:"start",style:{marginTop:"24px"}},c().createElement(Kp.Item,{className:"flex flex-col space-y-2"},c().createElement("p",{className:"text-base font-semibold m-0"},(0,HZ.__)("License Key","header-footer-elementor")),c().createElement("p",{className:"text-sm font-normal m-0"},(0,HZ.__)("You are using the free version of Ultimate Addons for Elementor, no license key is needed.. "))),c().createElement("div",{className:"flex items-center justify-between px-4 rounded-xl",style:{paddingTop:"6px",paddingBottom:"6px",backgroundColor:"#F3F0FF"}},c().createElement("span",{className:"flex items-center gap-x-2 text-base font-semibold"},(0,HZ.__)("Unlock Pro Features","header-footer-elementor"),c().createElement("p",{className:"text-base font-normal"},(0,HZ.__)("Get access to advanced blocks and premium features.","header-footer-elementor"))),c().createElement(Xe,{icon:c().createElement(BZ,null),iconPosition:"right",variant:"link",style:{color:"#6005FF",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",fontSize:"16px"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-settings&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,HZ.__)("Upgrade Now","header-footer-elementor")))))},WQ=function(){var e=[{id:1,icon:c().createElement("img",{src:"".concat(hfeSettingsData.user_url),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:c().createElement("img",{src:"".concat(hfeSettingsData.user__selected_url),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),title:(0,HZ.__)("My Account","header-footer-elementor"),content:c().createElement(BQ,null)},{id:2,icon:c().createElement("img",{src:"".concat(hfeSettingsData.theme_url),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:c().createElement("img",{src:"".concat(hfeSettingsData.theme_url_selected),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,HZ.__)("Editor","header-footer-elementor"),title:(0,HZ.__)("Theme Support","header-footer-elementor"),content:c().createElement(FQ,null)},{id:3,icon:c().createElement("img",{src:"".concat(hfeSettingsData.version_url),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),selected:c().createElement("img",{src:"".concat(hfeSettingsData.version__selected_url),alt:(0,HZ.__)("Custom SVG","header-footer-elementor"),className:"object-contain"}),main:(0,HZ.__)("Utilities","header-footer-elementor"),title:(0,HZ.__)("Version Control","header-footer-elementor"),content:c().createElement(zQ,null)}].filter((function(e){return"no"!==hfeSettingsData.show_theme_support||2!==e.id})),t=a((0,s.useState)((function(){var t=localStorage.getItem("hfeSelectedItemId");return e.find((function(e){return e.id===Number(t)}))||e[0]})),2),n=t[0],r=t[1];return(0,s.useEffect)((function(){localStorage.setItem("hfeSelectedItemId",n.id.toString())}),[n]),(0,s.useEffect)((function(){var t=new URLSearchParams(window.location.search).get("tab");if(t){var n=Number(t),o=e.find((function(e){return e.id===n}));o&&r(o)}}),[]),c().createElement(c().Fragment,null,c().createElement(nJ,{onSettingsTabClick:function(){r(e[0])}}),c().createElement("div",{className:""},c().createElement(Kp,{align:"stretch",className:"p-1 flex-col lg:flex-row hfe-settings-page",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{height:"100%"}},c().createElement(Kp.Item,{className:"p-2 hfe-sticky-outer-wrapper",alignSelf:"auto",order:"none",shrink:1,style:{backgroundColor:"#ffffff"}},c().createElement("div",{className:"hfe-sticky-sidebar"},c().createElement(zJ,{items:e,onSelectItem:function(e){r(e)},selectedItemId:n.id}))),c().createElement(Kp.Item,{className:"p-2 flex w-full justify-center items-start hfe-hide-scrollbar",alignSelf:"auto",order:"none",shrink:1,style:{height:"calc(100vh - 1px)",overflowY:"auto"}},c().createElement("div",{className:"hfe-78-width"},c().createElement(BJ,{selectedItem:n}))))))},VQ=zZ("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),UQ=function(){var e=[{title:(0,HZ.__)("Essentials","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("White Label Option","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("24/7 Premium Support","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Cross-Domain Copy-Paste","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Dynamic Header & Footer Widgets","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Post Info","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:2,content:(0,HZ.__)("Scroll to Top","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:3,content:(0,HZ.__)("Breadcrumbs","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:4,content:(0,HZ.__)("Retina Logo","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:5,content:(0,HZ.__)("Copyright","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:6,content:(0,HZ.__)("Page Title","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:7,content:(0,HZ.__)("Site Tagline","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:8,content:(0,HZ.__)("Site Logo","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:9,content:(0,HZ.__)("Search","header-footer-elementor"),iconFree:!0,iconPro:!1},{id:10,content:(0,HZ.__)("Navigation Menu","header-footer-elementor"),iconFree:!0,iconPro:!1}]},{title:(0,HZ.__)("Creative & Advanced Design Widgets","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Advanced Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Dual Color Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Fancy Heading","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Multi-Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,HZ.__)("Image Hotspots","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Content & Media Widgets","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Content Toggle Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Image Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Video Gallery","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,HZ.__)("Timeline","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,HZ.__)("Google Map","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:7,content:(0,HZ.__)("Before & After Slider","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:8,content:(0,HZ.__)("Info Box","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:9,content:(0,HZ.__)("Video","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:10,content:(0,HZ.__)("Conditional Display","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:11,content:(0,HZ.__)("Login Form","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:12,content:(0,HZ.__)("User Registeration Form","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Marketing & Engagement Widgets","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Marketing Button","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Pricing Table","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Price List","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Countdown Timer","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,HZ.__)("Business Hours","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:6,content:(0,HZ.__)("Modal Popup","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("E-Commerce Integration","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("WooCommerce: Add to Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("WooCommerce: Product Category","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("WooCommerce: Mini Cart","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("WooCommerce: Product","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,HZ.__)("WooCommerce: Checkout","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Forms Integration","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Contact Form 7","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Gravity Forms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("WPForms","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Fluent Forms","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("SEO Widgets","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("FAQ with Schema","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("How-To","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Table of Contents","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Business Reviews","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Creative Features","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Presets","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Welcome Music","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Particles","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Party Propz","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:5,content:(0,HZ.__)("Shape Divider","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Social Media Integration","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Instagram Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Twitter Feed","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Social Share","header-footer-elementor"),iconFree:!1,iconPro:!0}]},{title:(0,HZ.__)("Advanced Features","header-footer-elementor"),items:[{id:1,content:(0,HZ.__)("Retina Image","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:2,content:(0,HZ.__)("Team Member","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:3,content:(0,HZ.__)("Post Layout","header-footer-elementor"),iconFree:!1,iconPro:!0},{id:4,content:(0,HZ.__)("Off Canvas","header-footer-elementor"),iconFree:!1,iconPro:!0}]}],t=function(e){return e?c().createElement(xJ,{color:"#16A34A"}):c().createElement(VQ,{color:"#DC2626"})};return c().createElement("div",{className:"rounded-lg bg-white w-full mb-6"},c().createElement("div",{className:"flex items-center justify-between p-5",style:{paddingBottom:"0"}},c().createElement("div",{className:"flex flex-col"},c().createElement("p",{className:"m-0 text-xl font-semibold pt-4 text-text-primary"},(0,HZ.__)("Free Vs Pro","header-footer-elementor")),c().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,HZ.__)("Ultimate Addons for Elementor Pro offers 50+ widgets and features!","header-footer-elementor")),c().createElement("p",{className:"m-0 text-sm font-normal pt-1 text-text-secondary"},(0,HZ.__)("Compare the popular features/widgets to find the best option for your website.","header-footer-elementor"))),c().createElement("div",{className:"flex items-center gap-x-2 mr-7"},c().createElement(Xe,{iconPosition:"right",variant:"primary",style:{color:"white",borderColor:"#6005FF",transition:"color 0.3s ease, border-color 0.3s ease",backgroundColor:"#6005ff"},className:"hfe-remove-ring text-[#6005FF]",onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-FreevsPro&utm_medium=get-uae-pro&utm_campaign=uae-lite-upgrade","_blank")}},(0,HZ.__)("Upgrade Now","header-footer-elementor")))),c().createElement("div",{className:"px-4"},c().createElement("div",{className:"flex flex-col space-y-2 pt-5"},e.map((function(e){return c().createElement(c().Fragment,{key:e.title},c().createElement("div",{className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item",style:{backgroundColor:"#F9FAFB"}},c().createElement("p",{className:"text-sm text-text-primary font-medium"},e.title),c().createElement("div",{className:"flex flex-row items-center",style:{gap:"12rem"}},c().createElement("p",{className:"text-sm text-text-primary font-medium"},(0,HZ.__)("Free","header-footer-elementor")),c().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:"50px"}},(0,HZ.__)("Pro","header-footer-elementor")))),e.items.map((function(e){return c().createElement("div",{key:e.id,className:"flex fle-row py-4 px-5 items-center h-4 justify-between rounded-lg shadow-container-item"},c().createElement("p",{className:"text-sm text-text-secondary font-medium"},e.content),c().createElement("div",{className:"flex flex-row items-center justify-between",style:{gap:10===e.id&&e.content===(0,HZ.__)("Navigation Menu","header-footer-elementor")?"10.7rem":"12rem"}},c().createElement("p",{className:"text-sm text-text-primary font-medium"},10===e.id&&e.content===(0,HZ.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,HZ.__)("Advanced","header-footer-elementor"):(0,HZ.__)("Basic","header-footer-elementor"):t(e.iconFree)),c().createElement("p",{className:"text-sm text-text-primary font-medium",style:{marginRight:10===e.id&&e.content===(0,HZ.__)("Navigation Menu","header-footer-elementor")?"25px":"50px"}},10===e.id&&e.content===(0,HZ.__)("Navigation Menu","header-footer-elementor")?e.iconPro?(0,HZ.__)("Basic","header-footer-elementor"):(0,HZ.__)("Advanced","header-footer-elementor"):t(e.iconPro))))})))})))))},$Q=function(){var e=[{id:1,icon:"",title:(0,HZ.__)("Modal Popup","header-footer-elementor")},{id:2,icon:"",title:(0,HZ.__)("Advanced Heading","header-footer-elementor")},{id:3,icon:"",title:(0,HZ.__)("Post Layouts","header-footer-elementor")},{id:4,icon:"",title:(0,HZ.__)("Info Box","header-footer-elementor")},{id:5,icon:"",title:(0,HZ.__)("Pricing Cards","header-footer-elementor")},{id:6,icon:"",title:(0,HZ.__)("Form Stylers and more...","header-footer-elementor")}];return c().createElement("div",{className:"",style:{paddingBottom:"16px"}},c().createElement(Kp,{className:"bg-background-primary gap-1 p-4 border-[0.5px] border-subtle rounded-xl shadow-sm",containerType:"flex",direction:"column",justify:"between",gap:"xs"},c().createElement(Kp.Item,{className:"flex flex-col justify-center items-center"},c().createElement("img",{src:"".concat(hfeSettingsData.column_url),alt:(0,HZ.__)("Column Showcase","header-footer-elementor"),className:"h-auto rounded w-1/2"})),c().createElement(Kp.Item,{className:"flex flex-col justify-between"},c().createElement("div",null,c().createElement(wi,{description:"",icon:c().createElement(bJ,null),iconPosition:"left",size:"xs",tag:"h6",title:(0,HZ.__)("Unlock Ultimate Features","header-footer-elementor"),className:"text-xs font-semibold text-brand-primary-600"}),c().createElement(wi,{description:"",icon:"",iconPosition:"left",tag:"h6",title:(0,HZ.__)("Create Stunning Designs with the Pro Version!","header-footer-elementor"),className:"py-1 text-sm"}),c().createElement("p",{className:"text-md m-0 text-text-secondary"},(0,HZ.__)("Get access to advanced widgets and features to create the website that stands out!","header-footer-elementor"))),c().createElement("div",{className:"grid grid-cols-2 grid-flow-row gap-1 my-4"},e.map((function(e){return c().createElement(wi,{key:e.id,description:"",icon:c().createElement(xJ,{className:"text-brand-primary-600 mr-1 h-3 w-3"}),iconPosition:"left",size:"xs",tag:"h6",title:e.title,className:"text-md m-0 text-text-secondary hfe-compare-section"})}))),c().createElement("div",{className:""},c().createElement(Xe,{iconPosition:"right",variant:"secondary",className:"hfe-remove-ring",style:{width:"100%"},onClick:function(){window.open("https://ultimateelementor.com/pricing/?utm_source=uae-lite-free-vs-pro&utm_medium=My-accounts&utm_campaign=uae-lite-upgrade","_blank")}},(0,HZ.__)("Upgrade Now","header-footer-elementor"))))))},HQ=function(){return c().createElement(c().Fragment,null,c().createElement(nJ,null),c().createElement("div",null,c().createElement(Kp,{align:"stretch",className:"p-6 flex-col lg:flex-row box-border",containerType:"flex",direction:"row",gap:"sm",justify:"start",style:{width:"100%"}},c().createElement(Kp.Item,{className:"p-2 hfe-65-width",alignSelf:"auto",order:"none",shrink:0},c().createElement(UQ,null)),c().createElement(Kp.Item,{className:"p-2 w-full hfe-35-width",shrink:1},c().createElement($Q,null),c().createElement(PJ,null),c().createElement(hJ,null)))))},qQ=zZ("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),KQ=zZ("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function YQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YQ(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const GQ=function(){var e=a((0,s.useState)(null),2),t=e[0],n=e[1],r=a((0,s.useState)(""),2),o=r[0],i=(r[1],a((0,s.useState)(!1),2)),l=i[0],u=i[1],d=a((0,s.useState)(!1),2),f=d[0],p=d[1],h=a((0,s.useState)(!0),2),m=h[0],y=h[1],g=a((0,s.useState)(0),2),v=g[0],b=g[1];(0,s.useEffect)((function(){y(!0),aJ()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:c().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);n(t),y(!1)})).catch((function(e){y(!1)}))}),[]);var x=null==t?void 0:t.filter((function(e){var t;return e.title.toLowerCase().includes(o)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(o)})))})),w=function(){var e=SJ(EJ().mark((function e(){var t;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(!0),(t=new window.FormData).append("action","hfe_bulk_activate_widgets"),t.append("nonce",hfe_admin_data.nonce),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){u(!1),e.success?(n((function(e){return e.map((function(e){return XQ(XQ({},e),{},{is_active:!0})}))})),b((function(e){return e+1}))):e.error&&(u(!1),console.error("Error during AJAX request:",error))})).catch((function(e){u(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_=function(){var e=SJ(EJ().mark((function e(){var t;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(!0),(t=new window.FormData).append("action","hfe_bulk_deactivate_widgets"),t.append("nonce",hfe_admin_data.nonce),aJ()({url:hfe_admin_data.ajax_url,method:"POST",body:t}).then((function(e){p(!1),e.success?(n((function(e){return e.map((function(e){return XQ(XQ({},e),{},{is_active:!1})}))})),b((function(e){return e+1}))):e.error&&console.error("AJAX request failed:",e.error)})).catch((function(e){p(!1),console.error("Error during AJAX request:",e)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return c().createElement("div",{className:"rounded-lg w-full mb-4"},c().createElement("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between p-4",style:{paddingTop:"1.5rem"}},c().createElement("h4",{className:"m-0 font-semibold text-text-primary mb-2 md:mb-0"},(0,HZ.__)("WIDGETS","header-footer-elementor")),c().createElement("div",{className:"flex flex-col md:flex-row items-center gap-y-2 md:gap-x-2 md:mr-7 relative",style:{paddingRight:"0.75rem"}},c().createElement("div",{className:"flex flex-row w-full md:w-auto"},c().createElement(Xe,{icon:l?c().createElement(NJ,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",className:"hfe-bulk-action-button hfe-remove-ring",onClick:w,disabled:!!o,style:{borderTopRightRadius:"0px",borderBottomRightRadius:"0px",borderRight:"0px",fontSize:"0.9em"}},l?(0,HZ.__)("Activating...","header-footer-elementor"):(0,HZ.__)("Activate All","header-footer-elementor")),c().createElement(Xe,{icon:f?c().createElement(NJ,{className:"animate-spin"}):null,iconPosition:"left",variant:"outline",onClick:_,className:"hfe-bulk-action-button hfe-remove-ring",disabled:!!o,style:{borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px",fontSize:"0.9em"}},f?(0,HZ.__)("Deactivating...","header-footer-elementor"):(0,HZ.__)("Deactivate All","header-footer-elementor"))))),c().createElement("div",{className:"hfe-custom-scrollbar bg-background-secondary p-1 rounded-lg max-h-80",style:{overflow:"auto",maxHeight:"20rem",paddingTop:"0"}},c().createElement("div",{className:"flex bg-black flex-col p-3",style:{minHeight:"800px",paddingTop:"0"}},m?c().createElement(Kp,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},rJ(Array(30)).map((function(e,t){return c().createElement(Kp.Item,{key:t,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-8 space-y-2"},c().createElement(qx,{className:"w-12 h-2 rounded-md"}),c().createElement(qx,{className:"w-16 h-2 rounded-md"}),c().createElement(qx,{className:"w-12 h-2 rounded-md"}))}))):c().createElement(Kp,{align:"stretch",className:"p-1 gap-1.5 grid-cols-2 md:grid-cols-4",containerType:"grid",gap:"",justify:"start",style:{paddingTop:"0"}},null==x?void 0:x.map((function(e){return c().createElement(Kp.Item,{key:e.id,alignSelf:"auto",className:"text-wrap rounded-md shadow-container-item bg-background-primary p-4"},c().createElement(cJ,{widget:XQ(XQ({},e),{},{updateCounter:v}),key:e.id,updateCounter:v}))}))))))};function ZQ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JQ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZQ(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZQ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const QQ=function(e){e.widgets;var t=e.updateCounter,n=e.setCurrentStep,r=a((0,s.useState)([]),2),o=(r[0],r[1]),i=a((0,s.useState)(!1),2),l=(i[0],i[1]);(0,s.useEffect)((function(){var e=function(){var e=SJ(EJ().mark((function e(){var t;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,l(!0),e.next=4,aJ()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}});case 4:t=e.sent,o(u(t)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.error("Failed to fetch widgets:",e.t0);case 11:return e.prev=11,l(!1),e.finish(11);case 14:case"end":return e.stop()}}),e,null,[[0,8,11,14]])})));return function(){return e.apply(this,arguments)}}();e()}),[t]);var u=function(e){return Object.entries(e).map((function(e){var t=a(e,2),n=t[0],r=t[1];return JQ(JQ({id:n},r),{},{is_active:void 0===r.is_activate||r.is_activate})}))};return c().createElement("div",{className:"flex flex-col gap-4"},c().createElement("div",{className:"bg-background-secondary hfe-min-700"},c().createElement("form",null,c().createElement("div",{className:"md:w-[47rem] box-border mx-auto space-y-4"},c().createElement(GQ,null)))),c().createElement("div",{className:"flex justify-between items-center pt-1 px-4 gap-4 hfe-onboarding-bottom"},c().createElement(Xe,{className:"flex items-center gap-1 hfe-remove-ring",icon:c().createElement(KQ,null),variant:"outline",onClick:function(){return n(1)}},(0,HZ.__)("Back","header-footer-elementor")),c().createElement("div",{className:"flex justify-end items-center gap-3"},c().createElement(Xe,{className:"hfe-remove-ring",variant:"ghost",onClick:function(){return n(3)}}," ",(0,HZ.__)("Skip","header-footer-elementor")),c().createElement(Xe,{className:"flex items-center gap-1 hfe-remove-ring",icon:c().createElement(qQ,null),iconPosition:"right",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease",padding:"12px"},onClick:function(){return n(3)}},(0,HZ.__)(" Continue Setup","header-footer-elementor")))))},e0=function(e){var t=e.setCurrentStep,n=a((0,s.useState)(null),2),r=n[0],o=n[1],i=a((0,s.useState)(""),2),l=i[0],u=(i[1],a((0,s.useState)(!1),2)),d=(u[0],u[1],a((0,s.useState)(!1),2)),f=(d[0],d[1],a((0,s.useState)(!0),2)),p=f[0],h=f[1],m=a((0,s.useState)(0),2),y=m[0];m[1],(0,s.useEffect)((function(){h(!0),aJ()({path:"/hfe/v1/widgets",headers:{"Content-Type":"application/json","X-WP-Nonce":hfeSettingsData.hfe_nonce_action}}).then((function(e){var t=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.push({id:n,slug:r.slug,title:r.title,keywords:r.keywords,icon:c().createElement("i",{className:r.icon}),title_url:r.title_url,default:r.default,doc_url:r.doc_url,is_pro:r.is_pro,description:r.description,is_active:void 0===r.is_activate||r.is_activate,demo_url:void 0!==r.demo_url?r.demo_url:r.doc_url})}return t}(e);o(t),h(!1)})).catch((function(e){h(!1)})),history.pushState(null,"",window.location.href);var e=function(e){e.preventDefault(),localStorage.setItem("currentStep","1"),window.location.reload()};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[]);var g=null==r?void 0:r.filter((function(e){var t;return e.title.toLowerCase().includes(l)||(null===(t=e.keywords)||void 0===t?void 0:t.some((function(e){return e.toLowerCase().includes(l)})))}));return c().createElement("div",{className:"rounded-lg bg-white p-6 hfe-onboarding-customize"},c().createElement("h1",{className:"text-text-primary m-0 mb-2",style:{fontSize:"1.4rem",lineHeight:"1.3em"}},(0,HZ.__)("Customize Your UAE Setup","header-footer-elementor")),c().createElement("span",{className:"text-md font-medium text-text-tertiary m-0",style:{lineHeight:"1.6em"}},(0,HZ.__)("Activate only what you need to keep your website fast and optimized.","header-footer-elementor")),c().createElement("div",{className:"flex bg-black flex-col rounded-lg",style:{marginTop:"2rem"}},p?c().createElement(Kp,{align:"stretch",className:"p-2 gap-1.5 grid grid-cols-2 md:grid-cols-4",style:{backgroundColor:"#F9FAFB"},containerType:"grid",gap:"",justify:"start"},rJ(Array(30)).map((function(e,t){return c().createElement(Kp.Item,{key:t,alignSelf:"auto",style:{padding:"3.5rem"},className:"text-wrap rounded-md shadow-container-item bg-background-primary space-y-2"},c().createElement(qx,{className:"w-12 h-2 rounded-md"}),c().createElement(qx,{className:"w-16 h-2 rounded-md"}),c().createElement(qx,{className:"w-12 h-2 rounded-md"}))}))):c().createElement(Kp,{align:"stretch"},c().createElement(QQ,{setCurrentStep:t,widgets:g,updateCounter:y}))))};var t0=[{label:"Welcome",component:function(e){var t=e.setCurrentStep;return c().createElement("div",{className:"bg-background-primary border-[0.5px] items-start justify-center border-subtle rounded-xl shadow-sm mb-6 p-8 flex flex-col",style:{maxWidth:"55%"}},c().createElement("div",{className:"px-1"},c().createElement("div",{className:"flex flex-col"},c().createElement("h1",{className:"text-text-primary m-0 mb-2 hfe-65-width",style:{fontSize:"1.6rem",lineHeight:"1.3em"}},c().createElement("span",{className:"block"},(0,HZ.__)("Thank You For Choosing","header-footer-elementor")),c().createElement("span",{className:"block"},(0,HZ.__)("Ultimate Addons for Elementor","header-footer-elementor"))),c().createElement("span",{className:"text-md font-medium text-text-tertiary m-0 mb-6 hfe-88-width",style:{lineHeight:"1.5em"}},(0,HZ.__)("We're excited to have you onboard. Get ready to create stunning headers, footers, and custom blocks with ease while keeping your website lightweight and fast.","header-footer-elementor"))),c().createElement("img",{alt:"Welcome",className:"w-full h-auto mb-6 mt-2",src:"".concat(hfeSettingsData.welcome_banner),loading:"lazy"}),c().createElement(Xe,{iconPosition:"right",variant:"primary",className:"bg-[#6005FF] hfe-remove-ring p-3 px-5 font-bold mt-2",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#4B00CC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="#6005FF"},onClick:function(){return t(2)}},(0,HZ.__)("Let's Get Started","header-footer-elementor"))))}},{label:"Configure",component:function(e){var t=e.setCurrentStep;return c().createElement(e0,{setCurrentStep:t})}},{label:"Create",component:function(e){e.setCurrentStep;var t=a((0,s.useState)(!0),2),n=t[0],r=t[1];(0,s.useEffect)((function(){r("yes"===hfeSettingsData.analytics_status),history.pushState(null,"",window.location.href);var e=function(e){e.preventDefault(),localStorage.setItem("currentStep","2"),window.location.reload()};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[hfeSettingsData.user_email]);var o=function(){var e=SJ(EJ().mark((function e(){var t,o;return EJ().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r(t=!n),e.prev=2,e.next=5,fetch(hfe_admin_data.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"save_analytics_option",bsf_analytics_optin:t?"yes":"no",nonce:hfe_admin_data.nonce})});case 5:return o=e.sent,e.next=8,o.json();case 8:e.sent.success?RQ.success((0,HZ.__)("Settings saved successfully!","header-footer-elementor")):RQ.error((0,HZ.__)("Failed to save settings!","header-footer-elementor")),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),RQ.error((0,HZ.__)("Failed to save settings!","header-footer-elementor"));case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(){return e.apply(this,arguments)}}();return c().createElement("div",{className:"bg-background-primary border-[0.5px] border-subtle rounded-xl shadow-sm mb-6 p-8",style:{maxWidth:"55%"}},c().createElement("div",{className:"flex items-start hfe-display-flex"},c().createElement("div",{className:"flex flex-col items-start",style:{paddingRight:"35px"}},c().createElement("h1",{className:"text-text-primary m-0 mb-2",style:{fontSize:"1.6rem",lineHeight:"1.3em"}},(0,HZ.__)("You're all set!🚀","header-footer-elementor")),c().createElement("span",{className:"text-md font-medium text-text-tertiary m-0 mb-4 hfe-88-width",style:{lineHeight:"1.6em"}},(0,HZ.__)("Start creating headers, footers, or pages with UAE and take your website to the next level","header-footer-elementor")),c().createElement("span",{className:"font-bold m-0 pt-2"},(0,HZ.__)("Here’s how to get started:","header-footer-elementor")),c().createElement("ol",{className:"list-decimal text-text-tertiary text-sm",style:{marginLeft:"1.4em",lineHeight:"1.6em",paddingBottom:"0.5rem"}},c().createElement("li",null,(0,HZ.__)("Click on “Create” button","header-footer-elementor")),c().createElement("li",null,(0,HZ.__)("Choose the type of template you want to create and customize the selected option","header-footer-elementor")),c().createElement("li",null,(0,HZ.__)("Use the Elementor editor to customize your template according to your preferences using UAE widgets","header-footer-elementor")),c().createElement("li",null,(0,HZ.__)("Click “Publish” to make it live","header-footer-elementor")))),c().createElement("div",{className:"w-1/2",style:{textAlign:"end"}},c().createElement("img",{alt:"Build",className:"w-full object-contain",style:{height:"255px",width:"auto"},src:"".concat(hfeSettingsData.build_banner),loading:"lazy"}))),c().createElement("div",{className:"flex flex-row gap-1 pb-4 hfe-display-flex"},c().createElement(Xe,{icon:c().createElement(qQ,null),iconPosition:"right",variant:"primary",className:"bg-[#6005FF] hfe-remove-ring",style:{backgroundColor:"#6005FF",transition:"background-color 0.3s ease"},onMouseEnter:function(e){return e.currentTarget.style.backgroundColor="#4B00CC"},onMouseLeave:function(e){return e.currentTarget.style.backgroundColor="#6005FF"},onClick:function(){window.open(hfeSettingsData.hfe_post_url,"_self")}},(0,HZ.__)("Create Header/Footer","header-footer-elementor")),c().createElement(D,{to:qZ.dashboard.path},c().createElement(Xe,{icon:c().createElement(qQ,null),iconPosition:"right",variant:"ghost",className:"hfe-remove-ring",onMouseLeave:function(e){return(e.currentTarget.style.color="#000000")&&(e.currentTarget.style.borderColor="#000000")},onMouseEnter:function(e){return(e.currentTarget.style.color="#6005FF")&&(e.currentTarget.style.borderColor="#6005FF")}},(0,HZ.__)("Go To Dashboard","header-footer-elementor")))),c().createElement("hr",{className:"w-full border-b-0 border-x-0 border-t border-solid border-t-border-subtle",style:{marginTop:"34px",marginBottom:"34px",borderColor:"#E5E7EB"}}),c().createElement("div",{className:"bg-badge-background-gray border-[0.5px] border-subtle p-6",style:{borderRadius:"5px"}},c().createElement("div",{className:"flex flex-row items-center justify-start px-1 gap-3"},c().createElement(Qe,{onChange:o,size:"sm",value:n,className:"hfe-remove-ring"}),c().createElement("span",{className:"font-bold text-text-primary m-0"},(0,HZ.__)("Help make UAE Better","header-footer-elementor"))),c().createElement(IQ,{position:"top-right",reverseOrder:!1,gutter:8,containerStyle:{top:20,right:20,marginTop:"40px"},toastOptions:{duration:1e3,style:{background:"white"},success:{duration:2e3,style:{color:""},iconTheme:{primary:"#6005ff",secondary:"#fff"}}}}),c().createElement("span",{className:"flex flex-row items-center justify-start mt-4 gap-3",style:{lineHeight:"1.5em",fontSize:"0.95em"}},(0,HZ.__)("Help us improve by sharing anonymous data about your website setup. This includes non-sensitive info about plugins, themes, and settings, so we can create a better product for you. Your privacy is always our top priority. Learn more in our privacy policy.","header-footer-elementor"))))}}];const n0=function(){var e,t=a(c().useState((function(){var e=localStorage.getItem("currentStep");return e?parseInt(e,10):1})),2),n=t[0],r=t[1];(0,s.useEffect)((function(){localStorage.setItem("currentStep",n)}),[n]),(0,s.useEffect)((function(){var e=setTimeout((function(){localStorage.removeItem("currentStep")}),18e4);return function(){return clearTimeout(e)}}),[]);var o=null===(e=t0[n-1])||void 0===e?void 0:e.component;return c().createElement("div",null,c().createElement("div",{className:"w-full pb-10"},c().createElement("div",{className:"flex flex-col items-center justify-center"},c().createElement(Pw,{className:"bg-none",style:{background:"none"}},c().createElement(Pw.Left,null,c().createElement(Pw.Item,null,hfeSettingsData.icon_svg&&c().createElement(D,{to:qZ.dashboard.path},c().createElement("img",{src:"".concat(hfeSettingsData.icon_svg),alt:"Logo",className:"cursor-pointer",style:{height:"35px"}})))),c().createElement(Pw.Middle,null,c().createElement(Pw.Item,null,c().createElement(Ux,{currentStep:n,className:"uae-steps",variant:"number"},t0.map((function(e,t){return c().createElement(Ux.Step,{key:t,className:"font-bold",labelText:e.label,size:"md"})}))))),c().createElement(Pw.Right,null,c().createElement(Pw.Item,null,c().createElement(D,{className:"hfe-remove-ring",to:qZ.dashboard.path,style:{marginLeft:"125px"}}," ",c().createElement(Xe,{icon:c().createElement(VQ,{className:"size-4"}),iconPosition:"right",size:"xs",variant:"ghost",className:"hfe-remove-ring"}))))))),c().createElement("div",{className:"flex items-center justify-center"},o&&c().createElement(o,{currentStep:n,setCurrentStep:r})))},r0=function(){return c().createElement(c().Fragment,null,c().createElement(n0,null))},o0=function(){var e;return React.createElement(R,{routes:qZ,defaultRoute:null==qZ||null===(e=qZ.dashboard)||void 0===e?void 0:e.path},React.createElement(C,{path:qZ.dashboard.path},React.createElement(CJ,null)),React.createElement(C,{path:qZ.onboarding.path},React.createElement(r0,null)),React.createElement(C,{path:qZ.widgets.path},React.createElement(RJ,null)),React.createElement(C,{path:qZ.templates.path},React.createElement(FJ,null)),React.createElement(C,{path:qZ.settings.path},React.createElement(WQ,null)),React.createElement(C,{path:qZ.upgrade.path},React.createElement(HQ,null)))},i0=function(){var e=a((0,s.useState)(!1),2),t=e[0],n=e[1],r=a((0,s.useState)(!0),2);return r[0],r[1],window.onhashchange=function(){window.scrollTo(0,0)},(0,s.useEffect)((function(){setTimeout((function(){n(!0)}),1e3)}),[]),t?React.createElement("div",{className:"app-container font-figtree"},React.createElement(o0,null)):React.createElement("div",{className:"loading-spinner flex items-center justify-center h-screen",style:{background:"#F9FAFB"}},React.createElement(_i,{icon:null,size:"lg",variant:"primary"}))};n()((function(){var t=document.getElementById("hfe-settings-app");if(t&&(0,e.H)(t).render(React.createElement(i0,null)),"yes"===hfe_admin_data.show_view_all||window.location.href===hfeSettingsData.header_footer_builder||"yes"===hfeSettingsData.is_hfe_post){var n=document.getElementById("hfe-admin-top-bar-root");if(n){var r=document.createElement("div");r.id="hfe-settings-app",n.appendChild(r),(0,e.H)(r).render(React.createElement(nJ,null))}}}))})()})(); //# sourceMappingURL=main.js.map