From 471c15ae52ba7a499e67848a6832ba617ee6c9b9 Mon Sep 17 00:00:00 2001 From: “wangming” <“wangming@antissoft.com”> Date: Mon, 2 Mar 2026 22:52:33 +0800 Subject: [PATCH] Update index.html to reference new JavaScript file, remove obsolete asset, and enhance LabelTemplatesView and PeopleView components with phone number fields and styling adjustments. --- 美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js | 463 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js | 463 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 美国版/Food Labeling Management Platform/build/index.html | 2 +- 美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx | 5 ++--- 美国版/Food Labeling Management Platform/src/components/people/PeopleView.tsx | 20 ++++++++++++++++++-- 5 files changed, 484 insertions(+), 469 deletions(-) delete mode 100644 美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js create mode 100644 美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js diff --git a/美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js b/美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js deleted file mode 100644 index 14104cf..0000000 --- a/美国版/Food Labeling Management Platform/build/assets/index-CSLBXRYd.js +++ /dev/null @@ -1,463 +0,0 @@ -function U5(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var bf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function it(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $v={exports:{}},kl={},Bv={exports:{}},Ve={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gj;function W5(){if(gj)return Ve;gj=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function m(M){return M===null||typeof M!="object"?null:(M=h&&M[h]||M["@@iterator"],typeof M=="function"?M:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function w(M,$,Q){this.props=M,this.context=$,this.refs=y,this.updater=Q||g}w.prototype.isReactComponent={},w.prototype.setState=function(M,$){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,$,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=w.prototype;function O(M,$,Q){this.props=M,this.context=$,this.refs=y,this.updater=Q||g}var E=O.prototype=new S;E.constructor=O,b(E,w.prototype),E.isPureReactComponent=!0;var C=Array.isArray,A=Object.prototype.hasOwnProperty,N={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function R(M,$,Q){var ae,pe={},ye=null,oe=null;if($!=null)for(ae in $.ref!==void 0&&(oe=$.ref),$.key!==void 0&&(ye=""+$.key),$)A.call($,ae)&&!T.hasOwnProperty(ae)&&(pe[ae]=$[ae]);var me=arguments.length-2;if(me===1)pe.children=Q;else if(1>>1,$=B[M];if(0>>1;Mi(pe,ee))ye<$&&0>i(oe,pe)?(B[M]=oe,B[ye]=ee,M=ye):(B[M]=pe,B[ae]=ee,M=ae);else if(ye<$&&0>i(oe,ee))B[M]=oe,B[ye]=ee,M=ye;else break e}}return Z}function i(B,Z){var ee=B.sortIndex-Z.sortIndex;return ee!==0?ee:B.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var f=[],c=[],d=1,h=null,m=3,g=!1,b=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(B){for(var Z=r(c);Z!==null;){if(Z.callback===null)n(c);else if(Z.startTime<=B)n(c),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=r(c)}}function C(B){if(y=!1,E(B),!b)if(r(f)!==null)b=!0,K(A);else{var Z=r(c);Z!==null&&X(C,Z.startTime-B)}}function A(B,Z){b=!1,y&&(y=!1,S(R),R=-1),g=!0;var ee=m;try{for(E(Z),h=r(f);h!==null&&(!(h.expirationTime>Z)||B&&!L());){var M=h.callback;if(typeof M=="function"){h.callback=null,m=h.priorityLevel;var $=M(h.expirationTime<=Z);Z=e.unstable_now(),typeof $=="function"?h.callback=$:h===r(f)&&n(f),E(Z)}else n(f);h=r(f)}if(h!==null)var Q=!0;else{var ae=r(c);ae!==null&&X(C,ae.startTime-Z),Q=!1}return Q}finally{h=null,m=ee,g=!1}}var N=!1,T=null,R=-1,I=5,q=-1;function L(){return!(e.unstable_now()-qB||125M?(B.sortIndex=ee,t(c,B),r(f)===null&&B===r(c)&&(y?(S(R),R=-1):y=!0,X(C,ee-M))):(B.sortIndex=$,t(f,B),b||g||(b=!0,K(A))),B},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(B){var Z=m;return function(){var ee=m;m=Z;try{return B.apply(this,arguments)}finally{m=ee}}}})(qv)),qv}var _j;function K5(){return _j||(_j=1,Fv.exports=G5()),Fv.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Sj;function X5(){if(Sj)return yr;Sj=1;var e=Vh(),t=K5();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,v=1;v"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},h={};function m(o){return f.call(h,o)?!0:f.call(d,o)?!1:c.test(o)?h[o]=!0:(d[o]=!0,!1)}function g(o,l,v,x){if(v!==null&&v.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return x?!1:v!==null?!v.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function b(o,l,v,x){if(l===null||typeof l>"u"||g(o,l,v,x))return!0;if(x)return!1;if(v!==null)switch(v.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function y(o,l,v,x,_,j,k){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=x,this.attributeNamespace=_,this.mustUseProperty=v,this.propertyName=o,this.type=l,this.sanitizeURL=j,this.removeEmptyString=k}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){w[o]=new y(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];w[l]=new y(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){w[o]=new y(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){w[o]=new y(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){w[o]=new y(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){w[o]=new y(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){w[o]=new y(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){w[o]=new y(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){w[o]=new y(o,5,!1,o.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function O(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!0,!0)});function E(o,l,v,x){var _=w.hasOwnProperty(l)?w[l]:null;(_!==null?_.type!==0:x||!(2F||_[k]!==j[F]){var W=` -`+_[k].replace(" at new "," at ");return o.displayName&&W.includes("")&&(W=W.replace("",o.displayName)),W}while(1<=k&&0<=F);break}}}finally{Q=!1,Error.prepareStackTrace=v}return(o=o?o.displayName||o.name:"")?$(o):""}function pe(o){switch(o.tag){case 5:return $(o.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return o=ae(o.type,!1),o;case 11:return o=ae(o.type.render,!1),o;case 1:return o=ae(o.type,!0),o;default:return""}}function ye(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case L:return(o.displayName||"Context")+".Consumer";case q:return(o._context.displayName||"Context")+".Provider";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:ye(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return ye(o(l))}catch{}}return null}function oe(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ie(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(o){var l=ie(o)?"checked":"value",v=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),x=""+o[l];if(!o.hasOwnProperty(l)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,j=v.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(k){x=""+k,j.call(this,k)}}),Object.defineProperty(o,l,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(k){x=""+k},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ve(o){o._valueTracker||(o._valueTracker=ue(o))}function re(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var v=l.getValue(),x="";return o&&(x=ie(o)?o.checked?"true":"false":o.value),o=x,o!==v?(l.setValue(o),!0):!1}function De(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Te(o,l){var v=l.checked;return ee({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??o._wrapperState.initialChecked})}function Ke(o,l){var v=l.defaultValue==null?"":l.defaultValue,x=l.checked!=null?l.checked:l.defaultChecked;v=me(l.value!=null?l.value:v),o._wrapperState={initialChecked:x,initialValue:v,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function lt(o,l){l=l.checked,l!=null&&E(o,"checked",l,!1)}function vt(o,l){lt(o,l);var v=me(l.value),x=l.type;if(v!=null)x==="number"?(v===0&&o.value===""||o.value!=v)&&(o.value=""+v):o.value!==""+v&&(o.value=""+v);else if(x==="submit"||x==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Or(o,l.type,v):l.hasOwnProperty("defaultValue")&&Or(o,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function dr(o,l,v){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var x=l.type;if(!(x!=="submit"&&x!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,v||l===o.value||(o.value=l),o.defaultValue=l}v=o.name,v!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,v!==""&&(o.name=v)}function Or(o,l,v){(l!=="number"||De(o.ownerDocument)!==o)&&(v==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+v&&(o.defaultValue=""+v))}var jr=Array.isArray;function Kt(o,l,v,x){if(o=o.options,l){l={};for(var _=0;_"+l.valueOf().toString()+"",l=fu.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Ks(o,l){if(l){var v=o.firstChild;if(v&&v===o.lastChild&&v.nodeType===3){v.nodeValue=l;return}}o.textContent=l}var Xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},G3=["Webkit","ms","Moz","O"];Object.keys(Xs).forEach(function(o){G3.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Xs[l]=Xs[o]})});function k_(o,l,v){return l==null||typeof l=="boolean"||l===""?"":v||typeof l!="number"||l===0||Xs.hasOwnProperty(o)&&Xs[o]?(""+l).trim():l+"px"}function R_(o,l){o=o.style;for(var v in l)if(l.hasOwnProperty(v)){var x=v.indexOf("--")===0,_=k_(v,l[v],x);v==="float"&&(v="cssFloat"),x?o.setProperty(v,_):o[v]=_}}var K3=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yp(o,l){if(l){if(K3[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Qp(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zp=null;function Jp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var em=null,ao=null,oo=null;function M_(o){if(o=gl(o)){if(typeof em!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Mu(l),em(o.stateNode,o.type,l))}}function I_(o){ao?oo?oo.push(o):oo=[o]:ao=o}function D_(){if(ao){var o=ao,l=oo;if(oo=ao=null,M_(o),l)for(o=0;o>>=0,o===0?32:31-(a4(o)/o4|0)|0}var vu=64,gu=4194304;function Js(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function yu(o,l){var v=o.pendingLanes;if(v===0)return 0;var x=0,_=o.suspendedLanes,j=o.pingedLanes,k=v&268435455;if(k!==0){var F=k&~_;F!==0?x=Js(F):(j&=k,j!==0&&(x=Js(j)))}else k=v&~_,k!==0?x=Js(k):j!==0&&(x=Js(j));if(x===0)return 0;if(l!==0&&l!==x&&(l&_)===0&&(_=x&-x,j=l&-l,_>=j||_===16&&(j&4194240)!==0))return l;if((x&4)!==0&&(x|=v&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=x;0v;v++)l.push(o);return l}function el(o,l,v){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ln(l),o[l]=v}function u4(o,l){var v=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var x=o.eventTimes;for(o=o.expirationTimes;0=ll),uS=" ",fS=!1;function dS(o,l){switch(o){case"keyup":return $4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var co=!1;function z4(o,l){switch(o){case"compositionend":return hS(l);case"keypress":return l.which!==32?null:(fS=!0,uS);case"textInput":return o=l.data,o===uS&&fS?null:o;default:return null}}function F4(o,l){if(co)return o==="compositionend"||!ym&&dS(o,l)?(o=iS(),Su=dm=Ei=null,co=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:v,offset:l-o};o=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=bS(v)}}function _S(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?_S(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function SS(){for(var o=window,l=De();l instanceof o.HTMLIFrameElement;){try{var v=typeof l.contentWindow.location.href=="string"}catch{v=!1}if(v)o=l.contentWindow;else break;l=De(o.document)}return l}function wm(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Y4(o){var l=SS(),v=o.focusedElem,x=o.selectionRange;if(l!==v&&v&&v.ownerDocument&&_S(v.ownerDocument.documentElement,v)){if(x!==null&&wm(v)){if(l=x.start,o=x.end,o===void 0&&(o=l),"selectionStart"in v)v.selectionStart=l,v.selectionEnd=Math.min(o,v.value.length);else if(o=(l=v.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var _=v.textContent.length,j=Math.min(x.start,_);x=x.end===void 0?j:Math.min(x.end,_),!o.extend&&j>x&&(_=x,x=j,j=_),_=wS(v,j);var k=wS(v,x);_&&k&&(o.rangeCount!==1||o.anchorNode!==_.node||o.anchorOffset!==_.offset||o.focusNode!==k.node||o.focusOffset!==k.offset)&&(l=l.createRange(),l.setStart(_.node,_.offset),o.removeAllRanges(),j>x?(o.addRange(l),o.extend(k.node,k.offset)):(l.setEnd(k.node,k.offset),o.addRange(l)))}}for(l=[],o=v;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,uo=null,_m=null,dl=null,Sm=!1;function OS(o,l,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Sm||uo==null||uo!==De(x)||(x=uo,"selectionStart"in x&&wm(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),dl&&fl(dl,x)||(dl=x,x=Tu(_m,"onSelect"),0vo||(o.current=Im[vo],Im[vo]=null,vo--)}function dt(o,l){vo++,Im[vo]=o.current,o.current=l}var Ci={},Jt=Ni(Ci),hr=Ni(!1),ca=Ci;function go(o,l){var v=o.type.contextTypes;if(!v)return Ci;var x=o.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===l)return x.__reactInternalMemoizedMaskedChildContext;var _={},j;for(j in v)_[j]=l[j];return x&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=_),_}function pr(o){return o=o.childContextTypes,o!=null}function Iu(){yt(hr),yt(Jt)}function BS(o,l,v){if(Jt.current!==Ci)throw Error(r(168));dt(Jt,l),dt(hr,v)}function zS(o,l,v){var x=o.stateNode;if(l=l.childContextTypes,typeof x.getChildContext!="function")return v;x=x.getChildContext();for(var _ in x)if(!(_ in l))throw Error(r(108,oe(o)||"Unknown",_));return ee({},v,x)}function Du(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ci,ca=Jt.current,dt(Jt,o),dt(hr,hr.current),!0}function FS(o,l,v){var x=o.stateNode;if(!x)throw Error(r(169));v?(o=zS(o,l,ca),x.__reactInternalMemoizedMergedChildContext=o,yt(hr),yt(Jt),dt(Jt,o)):yt(hr),dt(hr,v)}var Xn=null,Lu=!1,Dm=!1;function qS(o){Xn===null?Xn=[o]:Xn.push(o)}function l5(o){Lu=!0,qS(o)}function Ti(){if(!Dm&&Xn!==null){Dm=!0;var o=0,l=ct;try{var v=Xn;for(ct=1;o>=k,_-=k,Yn=1<<32-ln(l)+_|v<<_|x,Qn=j+o}else Yn=1<$e?(Wt=Re,Re=null):Wt=Re.sibling;var Ye=se(Y,Re,J[$e],fe);if(Ye===null){Re===null&&(Re=Wt);break}o&&Re&&Ye.alternate===null&&l(Y,Re),G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye,Re=Wt}if($e===J.length)return v(Y,Re),bt&&fa(Y,$e),Pe;if(Re===null){for(;$e$e?(Wt=Re,Re=null):Wt=Re.sibling;var zi=se(Y,Re,Ye.value,fe);if(zi===null){Re===null&&(Re=Wt);break}o&&Re&&zi.alternate===null&&l(Y,Re),G=j(zi,G,$e),ke===null?Pe=zi:ke.sibling=zi,ke=zi,Re=Wt}if(Ye.done)return v(Y,Re),bt&&fa(Y,$e),Pe;if(Re===null){for(;!Ye.done;$e++,Ye=J.next())Ye=ce(Y,Ye.value,fe),Ye!==null&&(G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return bt&&fa(Y,$e),Pe}for(Re=x(Y,Re);!Ye.done;$e++,Ye=J.next())Ye=xe(Re,Y,$e,Ye.value,fe),Ye!==null&&(o&&Ye.alternate!==null&&Re.delete(Ye.key===null?$e:Ye.key),G=j(Ye,G,$e),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return o&&Re.forEach(function(q5){return l(Y,q5)}),bt&&fa(Y,$e),Pe}function Nt(Y,G,J,fe){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case A:e:{for(var Pe=J.key,ke=G;ke!==null;){if(ke.key===Pe){if(Pe=J.type,Pe===T){if(ke.tag===7){v(Y,ke.sibling),G=_(ke,J.props.children),G.return=Y,Y=G;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===K&&KS(Pe)===ke.type){v(Y,ke.sibling),G=_(ke,J.props),G.ref=yl(Y,ke,J),G.return=Y,Y=G;break e}v(Y,ke);break}else l(Y,ke);ke=ke.sibling}J.type===T?(G=xa(J.props.children,Y.mode,fe,J.key),G.return=Y,Y=G):(fe=df(J.type,J.key,J.props,null,Y.mode,fe),fe.ref=yl(Y,G,J),fe.return=Y,Y=fe)}return k(Y);case N:e:{for(ke=J.key;G!==null;){if(G.key===ke)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){v(Y,G.sibling),G=_(G,J.children||[]),G.return=Y,Y=G;break e}else{v(Y,G);break}else l(Y,G);G=G.sibling}G=Rv(J,Y.mode,fe),G.return=Y,Y=G}return k(Y);case K:return ke=J._init,Nt(Y,G,ke(J._payload),fe)}if(jr(J))return _e(Y,G,J,fe);if(Z(J))return Ee(Y,G,J,fe);Fu(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,G!==null&&G.tag===6?(v(Y,G.sibling),G=_(G,J),G.return=Y,Y=G):(v(Y,G),G=kv(J,Y.mode,fe),G.return=Y,Y=G),k(Y)):v(Y,G)}return Nt}var wo=XS(!0),YS=XS(!1),qu=Ni(null),Uu=null,_o=null,qm=null;function Um(){qm=_o=Uu=null}function Wm(o){var l=qu.current;yt(qu),o._currentValue=l}function Hm(o,l,v){for(;o!==null;){var x=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,x!==null&&(x.childLanes|=l)):x!==null&&(x.childLanes&l)!==l&&(x.childLanes|=l),o===v)break;o=o.return}}function So(o,l){Uu=o,qm=_o=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(mr=!0),o.firstContext=null)}function Gr(o){var l=o._currentValue;if(qm!==o)if(o={context:o,memoizedValue:l,next:null},_o===null){if(Uu===null)throw Error(r(308));_o=o,Uu.dependencies={lanes:0,firstContext:o}}else _o=_o.next=o;return l}var da=null;function Vm(o){da===null?da=[o]:da.push(o)}function QS(o,l,v,x){var _=l.interleaved;return _===null?(v.next=v,Vm(l)):(v.next=_.next,_.next=v),l.interleaved=v,Zn(o,x)}function Zn(o,l){o.lanes|=l;var v=o.alternate;for(v!==null&&(v.lanes|=l),v=o,o=o.return;o!==null;)o.childLanes|=l,v=o.alternate,v!==null&&(v.childLanes|=l),v=o,o=o.return;return v.tag===3?v.stateNode:null}var ki=!1;function Gm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZS(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Jn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Ri(o,l,v){var x=o.updateQueue;if(x===null)return null;if(x=x.shared,(Xe&2)!==0){var _=x.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),x.pending=l,Zn(o,v)}return _=x.interleaved,_===null?(l.next=l,Vm(x)):(l.next=_.next,_.next=l),x.interleaved=l,Zn(o,v)}function Wu(o,l,v){if(l=l.updateQueue,l!==null&&(l=l.shared,(v&4194240)!==0)){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}function JS(o,l){var v=o.updateQueue,x=o.alternate;if(x!==null&&(x=x.updateQueue,v===x)){var _=null,j=null;if(v=v.firstBaseUpdate,v!==null){do{var k={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};j===null?_=j=k:j=j.next=k,v=v.next}while(v!==null);j===null?_=j=l:j=j.next=l}else _=j=l;v={baseState:x.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:x.shared,effects:x.effects},o.updateQueue=v;return}o=v.lastBaseUpdate,o===null?v.firstBaseUpdate=l:o.next=l,v.lastBaseUpdate=l}function Hu(o,l,v,x){var _=o.updateQueue;ki=!1;var j=_.firstBaseUpdate,k=_.lastBaseUpdate,F=_.shared.pending;if(F!==null){_.shared.pending=null;var W=F,te=W.next;W.next=null,k===null?j=te:k.next=te,k=W;var le=o.alternate;le!==null&&(le=le.updateQueue,F=le.lastBaseUpdate,F!==k&&(F===null?le.firstBaseUpdate=te:F.next=te,le.lastBaseUpdate=W))}if(j!==null){var ce=_.baseState;k=0,le=te=W=null,F=j;do{var se=F.lane,xe=F.eventTime;if((x&se)===se){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var _e=o,Ee=F;switch(se=l,xe=v,Ee.tag){case 1:if(_e=Ee.payload,typeof _e=="function"){ce=_e.call(xe,ce,se);break e}ce=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ee.payload,se=typeof _e=="function"?_e.call(xe,ce,se):_e,se==null)break e;ce=ee({},ce,se);break e;case 2:ki=!0}}F.callback!==null&&F.lane!==0&&(o.flags|=64,se=_.effects,se===null?_.effects=[F]:se.push(F))}else xe={eventTime:xe,lane:se,tag:F.tag,payload:F.payload,callback:F.callback,next:null},le===null?(te=le=xe,W=ce):le=le.next=xe,k|=se;if(F=F.next,F===null){if(F=_.shared.pending,F===null)break;se=F,F=se.next,se.next=null,_.lastBaseUpdate=se,_.shared.pending=null}}while(!0);if(le===null&&(W=ce),_.baseState=W,_.firstBaseUpdate=te,_.lastBaseUpdate=le,l=_.shared.interleaved,l!==null){_=l;do k|=_.lane,_=_.next;while(_!==l)}else j===null&&(_.shared.lanes=0);ma|=k,o.lanes=k,o.memoizedState=ce}}function eO(o,l,v){if(o=l.effects,l.effects=null,o!==null)for(l=0;lv?v:4,o(!0);var x=Zm.transition;Zm.transition={};try{o(!1),l()}finally{ct=v,Zm.transition=x}}function xO(){return Kr().memoizedState}function d5(o,l,v){var x=Li(o);if(v={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null},bO(o))wO(l,v);else if(v=QS(o,l,v,x),v!==null){var _=sr();pn(v,o,x,_),_O(v,l,x)}}function h5(o,l,v){var x=Li(o),_={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null};if(bO(o))wO(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var k=l.lastRenderedState,F=j(k,v);if(_.hasEagerState=!0,_.eagerState=F,cn(F,k)){var W=l.interleaved;W===null?(_.next=_,Vm(l)):(_.next=W.next,W.next=_),l.interleaved=_;return}}catch{}finally{}v=QS(o,l,_,x),v!==null&&(_=sr(),pn(v,o,x,_),_O(v,l,x))}}function bO(o){var l=o.alternate;return o===St||l!==null&&l===St}function wO(o,l){_l=Ku=!0;var v=o.pending;v===null?l.next=l:(l.next=v.next,v.next=l),o.pending=l}function _O(o,l,v){if((v&4194240)!==0){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}var Qu={readContext:Gr,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},p5={readContext:Gr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Gr,useEffect:fO,useImperativeHandle:function(o,l,v){return v=v!=null?v.concat([o]):null,Xu(4194308,4,pO.bind(null,l,o),v)},useLayoutEffect:function(o,l){return Xu(4194308,4,o,l)},useInsertionEffect:function(o,l){return Xu(4,2,o,l)},useMemo:function(o,l){var v=Tn();return l=l===void 0?null:l,o=o(),v.memoizedState=[o,l],o},useReducer:function(o,l,v){var x=Tn();return l=v!==void 0?v(l):l,x.memoizedState=x.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},x.queue=o,o=o.dispatch=d5.bind(null,St,o),[x.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:cO,useDebugValue:av,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=cO(!1),l=o[0];return o=f5.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,v){var x=St,_=Tn();if(bt){if(v===void 0)throw Error(r(407));v=v()}else{if(v=l(),Ut===null)throw Error(r(349));(pa&30)!==0||iO(x,l,v)}_.memoizedState=v;var j={value:v,getSnapshot:l};return _.queue=j,fO(oO.bind(null,x,j,o),[o]),x.flags|=2048,jl(9,aO.bind(null,x,j,v,l),void 0,null),v},useId:function(){var o=Tn(),l=Ut.identifierPrefix;if(bt){var v=Qn,x=Yn;v=(x&~(1<<32-ln(x)-1)).toString(32)+v,l=":"+l+"R"+v,v=Sl++,0<\/script>",o=o.removeChild(o.firstChild)):typeof x.is=="string"?o=k.createElement(v,{is:x.is}):(o=k.createElement(v),v==="select"&&(k=o,x.multiple?k.multiple=!0:x.size&&(k.size=x.size))):o=k.createElementNS(o,v),o[Nn]=l,o[vl]=x,qO(o,l,!1,!1),l.stateNode=o;e:{switch(k=Qp(v,x),v){case"dialog":gt("cancel",o),gt("close",o),_=x;break;case"iframe":case"object":case"embed":gt("load",o),_=x;break;case"video":case"audio":for(_=0;_Po&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304)}else{if(!x)if(o=Vu(k),o!==null){if(l.flags|=128,x=!0,v=o.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),El(j,!0),j.tail===null&&j.tailMode==="hidden"&&!k.alternate&&!bt)return tr(l),null}else 2*Pt()-j.renderingStartTime>Po&&v!==1073741824&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304);j.isBackwards?(k.sibling=l.child,l.child=k):(v=j.last,v!==null?v.sibling=k:l.child=k,j.last=k)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=Pt(),l.sibling=null,v=_t.current,dt(_t,x?v&1|2:v&1),l):(tr(l),null);case 22:case 23:return Nv(),x=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==x&&(l.flags|=8192),x&&(l.mode&1)!==0?(Nr&1073741824)!==0&&(tr(l),l.subtreeFlags&6&&(l.flags|=8192)):tr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function _5(o,l){switch($m(l),l.tag){case 1:return pr(l.type)&&Iu(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Oo(),yt(hr),yt(Jt),Qm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Xm(l),null;case 13:if(yt(_t),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));bo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return yt(_t),null;case 4:return Oo(),null;case 10:return Wm(l.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var tf=!1,rr=!1,S5=typeof WeakSet=="function"?WeakSet:Set,be=null;function Eo(o,l){var v=o.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){Ot(o,l,x)}else v.current=null}function gv(o,l,v){try{v()}catch(x){Ot(o,l,x)}}var HO=!1;function O5(o,l){if(Nm=wu,o=SS(),wm(o)){if("selectionStart"in o)var v={start:o.selectionStart,end:o.selectionEnd};else e:{v=(v=o.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var _=x.anchorOffset,j=x.focusNode;x=x.focusOffset;try{v.nodeType,j.nodeType}catch{v=null;break e}var k=0,F=-1,W=-1,te=0,le=0,ce=o,se=null;t:for(;;){for(var xe;ce!==v||_!==0&&ce.nodeType!==3||(F=k+_),ce!==j||x!==0&&ce.nodeType!==3||(W=k+x),ce.nodeType===3&&(k+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)se=ce,ce=xe;for(;;){if(ce===o)break t;if(se===v&&++te===_&&(F=k),se===j&&++le===x&&(W=k),(xe=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=xe}v=F===-1||W===-1?null:{start:F,end:W}}else v=null}v=v||{start:0,end:0}}else v=null;for(Cm={focusedElem:o,selectionRange:v},wu=!1,be=l;be!==null;)if(l=be,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,be=o;else for(;be!==null;){l=be;try{var _e=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(_e!==null){var Ee=_e.memoizedProps,Nt=_e.memoizedState,Y=l.stateNode,G=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:fn(l.type,Ee),Nt);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(fe){Ot(l,l.return,fe)}if(o=l.sibling,o!==null){o.return=l.return,be=o;break}be=l.return}return _e=HO,HO=!1,_e}function Al(o,l,v){var x=l.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var _=x=x.next;do{if((_.tag&o)===o){var j=_.destroy;_.destroy=void 0,j!==void 0&&gv(l,v,j)}_=_.next}while(_!==x)}}function rf(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var v=l=l.next;do{if((v.tag&o)===o){var x=v.create;v.destroy=x()}v=v.next}while(v!==l)}}function yv(o){var l=o.ref;if(l!==null){var v=o.stateNode;switch(o.tag){case 5:o=v;break;default:o=v}typeof l=="function"?l(o):l.current=o}}function VO(o){var l=o.alternate;l!==null&&(o.alternate=null,VO(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Nn],delete l[vl],delete l[Mm],delete l[o5],delete l[s5])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function GO(o){return o.tag===5||o.tag===3||o.tag===4}function KO(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||GO(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function xv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.nodeType===8?v.parentNode.insertBefore(o,l):v.insertBefore(o,l):(v.nodeType===8?(l=v.parentNode,l.insertBefore(o,v)):(l=v,l.appendChild(o)),v=v._reactRootContainer,v!=null||l.onclick!==null||(l.onclick=Ru));else if(x!==4&&(o=o.child,o!==null))for(xv(o,l,v),o=o.sibling;o!==null;)xv(o,l,v),o=o.sibling}function bv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.insertBefore(o,l):v.appendChild(o);else if(x!==4&&(o=o.child,o!==null))for(bv(o,l,v),o=o.sibling;o!==null;)bv(o,l,v),o=o.sibling}var Yt=null,dn=!1;function Mi(o,l,v){for(v=v.child;v!==null;)XO(o,l,v),v=v.sibling}function XO(o,l,v){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(mu,v)}catch{}switch(v.tag){case 5:rr||Eo(v,l);case 6:var x=Yt,_=dn;Yt=null,Mi(o,l,v),Yt=x,dn=_,Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?o.parentNode.removeChild(v):o.removeChild(v)):Yt.removeChild(v.stateNode));break;case 18:Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?Rm(o.parentNode,v):o.nodeType===1&&Rm(o,v),al(o)):Rm(Yt,v.stateNode));break;case 4:x=Yt,_=dn,Yt=v.stateNode.containerInfo,dn=!0,Mi(o,l,v),Yt=x,dn=_;break;case 0:case 11:case 14:case 15:if(!rr&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){_=x=x.next;do{var j=_,k=j.destroy;j=j.tag,k!==void 0&&((j&2)!==0||(j&4)!==0)&&gv(v,l,k),_=_.next}while(_!==x)}Mi(o,l,v);break;case 1:if(!rr&&(Eo(v,l),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(F){Ot(v,l,F)}Mi(o,l,v);break;case 21:Mi(o,l,v);break;case 22:v.mode&1?(rr=(x=rr)||v.memoizedState!==null,Mi(o,l,v),rr=x):Mi(o,l,v);break;default:Mi(o,l,v)}}function YO(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var v=o.stateNode;v===null&&(v=o.stateNode=new S5),l.forEach(function(x){var _=R5.bind(null,o,x);v.has(x)||(v.add(x),x.then(_,_))})}}function hn(o,l){var v=l.deletions;if(v!==null)for(var x=0;x_&&(_=k),x&=~j}if(x=_,x=Pt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*E5(x/1960))-x,10o?16:o,Di===null)var x=!1;else{if(o=Di,Di=null,lf=0,(Xe&6)!==0)throw Error(r(331));var _=Xe;for(Xe|=4,be=o.current;be!==null;){var j=be,k=j.child;if((be.flags&16)!==0){var F=j.deletions;if(F!==null){for(var W=0;WPt()-Sv?ga(o,0):_v|=v),gr(o,l)}function cj(o,l){l===0&&((o.mode&1)===0?l=1:(l=gu,gu<<=1,(gu&130023424)===0&&(gu=4194304)));var v=sr();o=Zn(o,l),o!==null&&(el(o,l,v),gr(o,v))}function k5(o){var l=o.memoizedState,v=0;l!==null&&(v=l.retryLane),cj(o,v)}function R5(o,l){var v=0;switch(o.tag){case 13:var x=o.stateNode,_=o.memoizedState;_!==null&&(v=_.retryLane);break;case 19:x=o.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(l),cj(o,v)}var uj;uj=function(o,l,v){if(o!==null)if(o.memoizedProps!==l.pendingProps||hr.current)mr=!0;else{if((o.lanes&v)===0&&(l.flags&128)===0)return mr=!1,b5(o,l,v);mr=(o.flags&131072)!==0}else mr=!1,bt&&(l.flags&1048576)!==0&&US(l,Bu,l.index);switch(l.lanes=0,l.tag){case 2:var x=l.type;ef(o,l),o=l.pendingProps;var _=go(l,Jt.current);So(l,v),_=ev(null,l,x,o,_,v);var j=tv();return l.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(x)?(j=!0,Du(l)):j=!1,l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Gm(l),_.updater=Zu,l.stateNode=_,_._reactInternals=l,sv(l,x,o,v),l=fv(null,l,x,!0,j,v)):(l.tag=0,bt&&j&&Lm(l),or(null,l,_,v),l=l.child),l;case 16:x=l.elementType;e:{switch(ef(o,l),o=l.pendingProps,_=x._init,x=_(x._payload),l.type=x,_=l.tag=I5(x),o=fn(x,o),_){case 0:l=uv(null,l,x,o,v);break e;case 1:l=DO(null,l,x,o,v);break e;case 11:l=TO(null,l,x,o,v);break e;case 14:l=kO(null,l,x,fn(x.type,o),v);break e}throw Error(r(306,x,""))}return l;case 0:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),uv(o,l,x,_,v);case 1:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),DO(o,l,x,_,v);case 3:e:{if(LO(l),o===null)throw Error(r(387));x=l.pendingProps,j=l.memoizedState,_=j.element,ZS(o,l),Hu(l,x,null,v);var k=l.memoizedState;if(x=k.element,j.isDehydrated)if(j={element:x,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){_=jo(Error(r(423)),l),l=$O(o,l,x,v,_);break e}else if(x!==_){_=jo(Error(r(424)),l),l=$O(o,l,x,v,_);break e}else for(Pr=Pi(l.stateNode.containerInfo.firstChild),Ar=l,bt=!0,un=null,v=YS(l,null,x,v),l.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(bo(),x===_){l=ei(o,l,v);break e}or(o,l,x,v)}l=l.child}return l;case 5:return tO(l),o===null&&zm(l),x=l.type,_=l.pendingProps,j=o!==null?o.memoizedProps:null,k=_.children,Tm(x,_)?k=null:j!==null&&Tm(x,j)&&(l.flags|=32),IO(o,l),or(o,l,k,v),l.child;case 6:return o===null&&zm(l),null;case 13:return BO(o,l,v);case 4:return Km(l,l.stateNode.containerInfo),x=l.pendingProps,o===null?l.child=wo(l,null,x,v):or(o,l,x,v),l.child;case 11:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),TO(o,l,x,_,v);case 7:return or(o,l,l.pendingProps,v),l.child;case 8:return or(o,l,l.pendingProps.children,v),l.child;case 12:return or(o,l,l.pendingProps.children,v),l.child;case 10:e:{if(x=l.type._context,_=l.pendingProps,j=l.memoizedProps,k=_.value,dt(qu,x._currentValue),x._currentValue=k,j!==null)if(cn(j.value,k)){if(j.children===_.children&&!hr.current){l=ei(o,l,v);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var F=j.dependencies;if(F!==null){k=j.child;for(var W=F.firstContext;W!==null;){if(W.context===x){if(j.tag===1){W=Jn(-1,v&-v),W.tag=2;var te=j.updateQueue;if(te!==null){te=te.shared;var le=te.pending;le===null?W.next=W:(W.next=le.next,le.next=W),te.pending=W}}j.lanes|=v,W=j.alternate,W!==null&&(W.lanes|=v),Hm(j.return,v,l),F.lanes|=v;break}W=W.next}}else if(j.tag===10)k=j.type===l.type?null:j.child;else if(j.tag===18){if(k=j.return,k===null)throw Error(r(341));k.lanes|=v,F=k.alternate,F!==null&&(F.lanes|=v),Hm(k,v,l),k=j.sibling}else k=j.child;if(k!==null)k.return=j;else for(k=j;k!==null;){if(k===l){k=null;break}if(j=k.sibling,j!==null){j.return=k.return,k=j;break}k=k.return}j=k}or(o,l,_.children,v),l=l.child}return l;case 9:return _=l.type,x=l.pendingProps.children,So(l,v),_=Gr(_),x=x(_),l.flags|=1,or(o,l,x,v),l.child;case 14:return x=l.type,_=fn(x,l.pendingProps),_=fn(x.type,_),kO(o,l,x,_,v);case 15:return RO(o,l,l.type,l.pendingProps,v);case 17:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),ef(o,l),l.tag=1,pr(x)?(o=!0,Du(l)):o=!1,So(l,v),OO(l,x,_),sv(l,x,_,v),fv(null,l,x,!0,o,v);case 19:return FO(o,l,v);case 22:return MO(o,l,v)}throw Error(r(156,l.tag))};function fj(o,l){return W_(o,l)}function M5(o,l,v,x){this.tag=o,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,l,v,x){return new M5(o,l,v,x)}function Tv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function I5(o){if(typeof o=="function")return Tv(o)?1:0;if(o!=null){if(o=o.$$typeof,o===D)return 11;if(o===V)return 14}return 2}function Bi(o,l){var v=o.alternate;return v===null?(v=Yr(o.tag,l,o.key,o.mode),v.elementType=o.elementType,v.type=o.type,v.stateNode=o.stateNode,v.alternate=o,o.alternate=v):(v.pendingProps=l,v.type=o.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=o.flags&14680064,v.childLanes=o.childLanes,v.lanes=o.lanes,v.child=o.child,v.memoizedProps=o.memoizedProps,v.memoizedState=o.memoizedState,v.updateQueue=o.updateQueue,l=o.dependencies,v.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},v.sibling=o.sibling,v.index=o.index,v.ref=o.ref,v}function df(o,l,v,x,_,j){var k=2;if(x=o,typeof o=="function")Tv(o)&&(k=1);else if(typeof o=="string")k=5;else e:switch(o){case T:return xa(v.children,_,j,l);case R:k=8,_|=8;break;case I:return o=Yr(12,v,l,_|2),o.elementType=I,o.lanes=j,o;case U:return o=Yr(13,v,l,_),o.elementType=U,o.lanes=j,o;case H:return o=Yr(19,v,l,_),o.elementType=H,o.lanes=j,o;case X:return hf(v,_,j,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case q:k=10;break e;case L:k=9;break e;case D:k=11;break e;case V:k=14;break e;case K:k=16,x=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Yr(k,v,l,_),l.elementType=o,l.type=x,l.lanes=j,l}function xa(o,l,v,x){return o=Yr(7,o,x,l),o.lanes=v,o}function hf(o,l,v,x){return o=Yr(22,o,x,l),o.elementType=X,o.lanes=v,o.stateNode={isHidden:!1},o}function kv(o,l,v){return o=Yr(6,o,null,l),o.lanes=v,o}function Rv(o,l,v){return l=Yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=v,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function D5(o,l,v,x,_){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=om(0),this.expirationTimes=om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=om(0),this.identifierPrefix=x,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Mv(o,l,v,x,_,j,k,F,W){return o=new D5(o,l,v,F,W),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),o.current=j,j.stateNode=o,j.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gm(j),o}function L5(o,l,v){var x=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zv.exports=X5(),zv.exports}var jj;function Y5(){if(jj)return wf;jj=1;var e=cR();return wf.createRoot=e.createRoot,wf.hydrateRoot=e.hydrateRoot,wf}var Q5=Y5(),P=Vh();const z=it(P),X1=U5({__proto__:null,default:z},[P]);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Z5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Ej=e=>{const t=J5(e);return t.charAt(0).toUpperCase()+t.slice(1)},uR=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var eB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tB=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},f)=>P.createElement("svg",{ref:f,...eB,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:uR("lucide",i),...u},[...s.map(([c,d])=>P.createElement(c,d)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ce=(e,t)=>{const r=P.forwardRef(({className:n,...i},a)=>P.createElement(tB,{ref:a,iconNode:t,className:uR(`lucide-${Z5(Ej(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Ej(e),r};/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rB=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]],nB=Ce("arrow-down-a-z",rB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iB=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],aB=Ce("arrow-down-right",iB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const oB=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sB=Ce("arrow-left",oB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lB=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],cB=Ce("arrow-up-down",lB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uB=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fR=Ce("arrow-up-right",uB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fB=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]],dB=Ce("barcode",fB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hB=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],pB=Ce("bell",hB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mB=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],vB=Ce("calendar",mB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gB=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],yB=Ce("chart-column",gB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xB=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],dR=Ce("check",xB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bB=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cc=Ce("chevron-down",bB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wB=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_B=Ce("chevron-left",wB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const SB=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cd=Ce("chevron-right",SB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OB=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jB=Ce("chevron-up",OB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const EB=[["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"}]],cb=Ce("circle-help",EB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],PB=Ce("circle-user",AB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const NB=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],CB=Ce("coffee",NB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TB=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Y1=Ce("download",TB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kB=[["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"}]],hR=Ce("ellipsis",kB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RB=[["path",{d:"M14.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"16lz6z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 13.1a2 2 0 0 0-1 1.76v3.24a2 2 0 0 0 .97 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01Z",key:"99pj1s"}],["path",{d:"M7 17v5",key:"1yj1jh"}],["path",{d:"M11.7 14.2 7 17l-4.7-2.8",key:"1yk8tc"}]],MB=Ce("file-box",RB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IB=[["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"}]],uc=Ce("file-text",IB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DB=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],LB=Ce("grid-3x3",DB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $B=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ia=Ce("image",$B);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BB=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zB=Ce("layers",BB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FB=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],qB=Ce("layout-dashboard",FB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UB=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],WB=Ce("list",UB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HB=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],VB=Ce("log-out",HB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GB=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Gh=Ce("map-pin",GB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KB=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],XB=Ce("menu",KB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YB=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],ub=Ce("package",YB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QB=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],pR=Ce("palette",QB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZB=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],jd=Ce("pencil",ZB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JB=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],e8=Ce("pin",JB);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t8=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ur=Ce("plus",t8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r8=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],mR=Ce("printer",r8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const n8=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],i8=Ce("refresh-cw",n8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a8=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],o8=Ce("save",a8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const s8=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Q1=Ce("search",s8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const l8=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vR=Ce("settings",l8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c8=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],u8=Ce("shield",c8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f8=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Uo=Ce("square-pen",f8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const d8=[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]],h8=Ce("store",d8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const p8=[["path",{d:"m18 2 4 4",key:"22kx64"}],["path",{d:"m17 7 3-3",key:"1w1zoj"}],["path",{d:"M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5",key:"1exhtz"}],["path",{d:"m9 11 4 4",key:"rovt3i"}],["path",{d:"m5 19-3 3",key:"59f2uf"}],["path",{d:"m14 4 6 6",key:"yqp9t2"}]],Uv=Ce("syringe",p8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const m8=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]],v8=Ce("tablet",m8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g8=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],fb=Ce("tag",g8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y8=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],x8=Ce("timer",y8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b8=[["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"}]],Aj=Ce("trash-2",b8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w8=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],_8=Ce("trending-up",w8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S8=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],Z1=Ce("type",S8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O8=[["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"}]],j8=Ce("upload",O8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E8=[["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"}]],A8=Ce("user",E8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],gR=Ce("users",P8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N8=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],C8=Ce("utensils",N8);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ec=Ce("x",T8);function yR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),xR=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",Pj=[],M8="arbitrary..",I8=e=>{const t=L8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return D8(s);const u=s.split(Td),f=u[0]===""&&u.length>1?1:0;return bR(u,f,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const f=n[s],c=r[s];return f?c?k8(c,f):f:c||Pj}return r[s]||Pj}}},bR=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const c=bR(e,t+1,a);if(c)return c}const s=r.validators;if(s===null)return;const u=t===0?e.join(Td):e.slice(t).join(Td),f=s.length;for(let c=0;ce.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?M8+n:void 0})(),L8=e=>{const{theme:t,classGroups:r}=e;return $8(r,t)},$8=(e,t)=>{const r=xR();for(const n in e){const i=e[n];J1(i,r,n,t)}return r},J1=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){z8(e,t,r);return}if(typeof e=="function"){F8(e,t,r,n);return}q8(e,t,r,n)},z8=(e,t,r)=>{const n=e===""?t:wR(t,e);n.classGroupId=r},F8=(e,t,r,n)=>{if(U8(e)){J1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(R8(r,e))},q8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,W8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},db="!",Nj=":",H8=[],Cj=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),V8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,u=0,f=0,c;const d=i.length;for(let y=0;yf?c-f:void 0;return Cj(a,g,m,b)};if(t){const i=t+Nj,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Cj(H8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},G8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},K8=e=>({cache:W8(e.cacheSize),parseClassName:V8(e),sortModifiers:G8(e),...I8(e)}),X8=/\s+/,Y8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],u=e.trim().split(X8);let f="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:y}=r(d);if(h){f=d+(f.length>0?" "+f:f);continue}let w=!!y,S=n(w?b.substring(0,y):b);if(!S){if(!w){f=d+(f.length>0?" "+f:f);continue}if(S=n(b),!S){f=d+(f.length>0?" "+f:f);continue}w=!1}const O=m.length===0?"":m.length===1?m[0]:a(m).join(":"),E=g?O+db:O,C=E+S;if(s.indexOf(C)>-1)continue;s.push(C);const A=i(S,w);for(let N=0;N0?" "+f:f)}return f},Q8=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const s=f=>{const c=t.reduce((d,h)=>h(d),e());return r=K8(c),n=r.cache.get,i=r.cache.set,a=u,u(f)},u=f=>{const c=n(f);if(c)return c;const d=Y8(f,r);return i(f,d),d};return a=s,(...f)=>a(Q8(...f))},J8=[],Dt=e=>{const t=r=>r[e]||J8;return t.isThemeGetter=!0,t},SR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e6=/^\d+\/\d+$/,t6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r6=/\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$/,n6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,i6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Co=e=>e6.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Fi=e=>!!e&&Number.isInteger(Number(e)),Wv=e=>e.endsWith("%")&&He(e.slice(0,-1)),ri=e=>t6.test(e),o6=()=>!0,s6=e=>r6.test(e)&&!n6.test(e),jR=()=>!1,l6=e=>i6.test(e),c6=e=>a6.test(e),u6=e=>!Se(e)&&!Oe(e),f6=e=>Ts(e,PR,jR),Se=e=>SR.test(e),ba=e=>Ts(e,NR,s6),Hv=e=>Ts(e,v6,He),Tj=e=>Ts(e,ER,jR),d6=e=>Ts(e,AR,c6),_f=e=>Ts(e,CR,l6),Oe=e=>OR.test(e),Rl=e=>ks(e,NR),h6=e=>ks(e,g6),kj=e=>ks(e,ER),p6=e=>ks(e,PR),m6=e=>ks(e,AR),Sf=e=>ks(e,CR,!0),Ts=(e,t,r)=>{const n=SR.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ks=(e,t,r=!1)=>{const n=OR.exec(e);return n?n[1]?t(n[1]):r:!1},ER=e=>e==="position"||e==="percentage",AR=e=>e==="image"||e==="url",PR=e=>e==="length"||e==="size"||e==="bg-size",NR=e=>e==="length",v6=e=>e==="number",g6=e=>e==="family-name",CR=e=>e==="shadow",y6=()=>{const e=Dt("color"),t=Dt("font"),r=Dt("text"),n=Dt("font-weight"),i=Dt("tracking"),a=Dt("leading"),s=Dt("breakpoint"),u=Dt("container"),f=Dt("spacing"),c=Dt("radius"),d=Dt("shadow"),h=Dt("inset-shadow"),m=Dt("text-shadow"),g=Dt("drop-shadow"),b=Dt("blur"),y=Dt("perspective"),w=Dt("aspect"),S=Dt("ease"),O=Dt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...C(),Oe,Se],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[Oe,Se,f],I=()=>[Co,"full","auto",...R()],q=()=>[Fi,"none","subgrid",Oe,Se],L=()=>["auto",{span:["full",Fi,Oe,Se]},Fi,Oe,Se],D=()=>[Fi,"auto",Oe,Se],U=()=>["auto","min","max","fr",Oe,Se],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],X=()=>[Co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[e,Oe,Se],Z=()=>[...C(),kj,Tj,{position:[Oe,Se]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",p6,f6,{size:[Oe,Se]}],$=()=>[Wv,Rl,ba],Q=()=>["","none","full",c,Oe,Se],ae=()=>["",He,Rl,ba],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[He,Wv,kj,Tj],me=()=>["","none",b,Oe,Se],ie=()=>["none",He,Oe,Se],ue=()=>["none",He,Oe,Se],ve=()=>[He,Oe,Se],re=()=>[Co,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[o6],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[u6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",He],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Co,Se,Oe,w]}],container:["container"],columns:[{columns:[He,Se,Oe,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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"],sr:["sr-only","not-sr-only"],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:A()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Fi,"auto",Oe,Se]}],basis:[{basis:[Co,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Co,"auto","initial","none",Se]}],grow:[{grow:["",He,Oe,Se]}],shrink:[{shrink:["",He,Oe,Se]}],order:[{order:[Fi,"first","last","none",Oe,Se]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Rl,ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Oe,Hv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wv,Se]}],"font-family":[{font:[h6,Se,t]}],"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-fractions"],tracking:[{tracking:[i,Oe,Se]}],"line-clamp":[{"line-clamp":[He,"none",Oe,Hv]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",Oe,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Oe,ba]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[He,"auto",Oe,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Oe,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fi,Oe,Se],radial:["",Oe,Se],conic:[Fi,Oe,Se]},m6,d6]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Oe,Se]}],"outline-w":[{outline:["",He,Rl,ba]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,Sf,_f]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Sf,_f]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[He,ba]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",m,Sf,_f]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[He,Oe,Se]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Oe,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,Se]}],filter:[{filter:["","none",Oe,Se]}],blur:[{blur:me()}],brightness:[{brightness:[He,Oe,Se]}],contrast:[{contrast:[He,Oe,Se]}],"drop-shadow":[{"drop-shadow":["","none",g,Sf,_f]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",He,Oe,Se]}],"hue-rotate":[{"hue-rotate":[He,Oe,Se]}],invert:[{invert:["",He,Oe,Se]}],saturate:[{saturate:[He,Oe,Se]}],sepia:[{sepia:["",He,Oe,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,Se]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[He,Oe,Se]}],"backdrop-contrast":[{"backdrop-contrast":[He,Oe,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Oe,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Oe,Se]}],"backdrop-invert":[{"backdrop-invert":["",He,Oe,Se]}],"backdrop-opacity":[{"backdrop-opacity":[He,Oe,Se]}],"backdrop-saturate":[{"backdrop-saturate":[He,Oe,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Oe,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Oe,Se]}],ease:[{ease:["linear","initial",S,Oe,Se]}],delay:[{delay:[He,Oe,Se]}],animate:[{animate:["none",O,Oe,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Oe,Se]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Oe,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Oe,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",Oe,Se]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[He,Rl,ba,Hv]}],stroke:[{stroke:["none",...B()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x6=Z8(y6);function Ie(...e){return x6(Ue(e))}var Kc=cR();const b6=it(Kc);function Rj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rs(...e){return t=>{let r=!1;const n=e.map(i=>{const a=Rj(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(O6);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function _6(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=E6(i),u=j6(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S6=Symbol("radix.slottable");function O6(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S6}function j6(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function E6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var A6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=A6.reduce((e,t)=>{const r=w6(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function P6(e,t){e&&Kc.flushSync(()=>e.dispatchEvent(t))}var Rt=globalThis?.document?P.useLayoutEffect:()=>{};function N6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var Un=e=>{const{present:t,children:r}=e,n=C6(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=Je(n.ref,T6(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};Un.displayName="Presence";function C6(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),s=e?"mounted":"unmounted",[u,f]=N6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Of(n.current);a.current=u==="mounted"?c:"none"},[u]),Rt(()=>{const c=n.current,d=i.current;if(d!==e){const m=a.current,g=Of(c);e?f("MOUNT"):g==="none"||c?.display==="none"?f("UNMOUNT"):f(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=g=>{const y=Of(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&y&&(f("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=g=>{g.target===t&&(a.current=Of(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:P.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Of(e){return e?.animationName||"none"}function T6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function k6(e,t){const r=P.createContext(t),n=a=>{const{children:s,...u}=a,f=P.useMemo(()=>u,Object.values(u));return p.jsx(r.Provider,{value:f,children:s})};n.displayName=e+"Provider";function i(a){const s=P.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function gi(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s),f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,R6(i,...t)]}function R6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ar(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>t.current?.(...r),[])}var M6=P.createContext(void 0);function Kh(e){const t=P.useContext(M6);return e||t||"ltr"}function hb(e,[t,r]){return Math.min(r,Math.max(t,e))}function Fe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function I6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var ew="ScrollArea",[TR]=gi(ew),[D6,on]=TR(ew),kR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:a=600,...s}=e,[u,f]=P.useState(null),[c,d]=P.useState(null),[h,m]=P.useState(null),[g,b]=P.useState(null),[y,w]=P.useState(null),[S,O]=P.useState(0),[E,C]=P.useState(0),[A,N]=P.useState(!1),[T,R]=P.useState(!1),I=Je(t,L=>f(L)),q=Kh(i);return p.jsx(D6,{scope:r,type:n,dir:q,scrollHideDelay:a,scrollArea:u,viewport:c,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:O,onCornerHeightChange:C,children:p.jsx(We.div,{dir:q,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});kR.displayName=ew;var RR="ScrollAreaViewport",MR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...a}=e,s=on(RR,r),u=P.useRef(null),f=Je(t,u,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(We.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});MR.displayName=RR;var Wn="ScrollAreaScrollbar",IR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,u=e.orientation==="horizontal";return P.useEffect(()=>(u?a(!0):s(!0),()=>{u?a(!1):s(!1)}),[u,a,s]),i.type==="hover"?p.jsx(L6,{...n,ref:t,forceMount:r}):i.type==="scroll"?p.jsx($6,{...n,ref:t,forceMount:r}):i.type==="auto"?p.jsx(DR,{...n,ref:t,forceMount:r}):i.type==="always"?p.jsx(tw,{...n,ref:t}):null});IR.displayName=Wn;var L6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),[a,s]=P.useState(!1);return P.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const c=()=>{window.clearTimeout(f),s(!0)},d=()=>{f=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",c),u.addEventListener("pointerleave",d),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",c),u.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(Un,{present:r||a,children:p.jsx(DR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),$6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Yh(()=>f("SCROLL_END"),100),[u,f]=I6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return P.useEffect(()=>{if(u==="idle"){const c=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[u,i.scrollHideDelay,f]),P.useEffect(()=>{const c=i.viewport,d=a?"scrollLeft":"scrollTop";if(c){let h=c[d];const m=()=>{const g=c[d];h!==g&&(f("SCROLL"),s()),h=g};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,a,f,s]),p.jsx(Un,{present:r||u!=="hidden",children:p.jsx(tw,{"data-state":u==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Fe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Fe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),DR=P.forwardRef((e,t)=>{const r=on(Wn,e.__scopeScrollArea),{forceMount:n,...i}=e,[a,s]=P.useState(!1),u=e.orientation==="horizontal",f=Yh(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,i=on(Wn,e.__scopeScrollArea),a=P.useRef(null),s=P.useRef(0),[u,f]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FR(u.viewport,u.content),d={...n,sizes:u,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,g){return W6(m,s.current,u,g)}return r==="horizontal"?p.jsx(B6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=Mj(m,u,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):r==="vertical"?p.jsx(z6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=Mj(m,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),B6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarXChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Rd(s.paddingLeft),paddingEnd:Rd(s.paddingRight)}})}})}),z6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarYChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Rd(s.paddingTop),paddingEnd:Rd(s.paddingBottom)}})}})}),[F6,LR]=TR(Wn),$R=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:c,onWheelScroll:d,onResize:h,...m}=e,g=on(Wn,r),[b,y]=P.useState(null),w=Je(t,I=>y(I)),S=P.useRef(null),O=P.useRef(""),E=g.viewport,C=n.content-n.viewport,A=ar(d),N=ar(f),T=Yh(h,10);function R(I){if(S.current){const q=I.clientX-S.current.left,L=I.clientY-S.current.top;c({x:q,y:L})}}return P.useEffect(()=>{const I=q=>{const L=q.target;b?.contains(L)&&A(q,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[E,b,C,A]),P.useEffect(N,[n,N]),is(b,T),is(g.content,T),p.jsx(F6,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:ar(a),onThumbPointerUp:ar(s),onThumbPositionChange:N,onThumbPointerDown:ar(u),children:p.jsx(We.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:Fe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),S.current=b.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Fe(e.onPointerMove,R),onPointerUp:Fe(e.onPointerUp,I=>{const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=O.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),kd="ScrollAreaThumb",BR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=LR(kd,e.__scopeScrollArea);return p.jsx(Un,{present:r||i.hasThumb,children:p.jsx(q6,{ref:t,...n})})}),q6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,a=on(kd,r),s=LR(kd,r),{onThumbPositionChange:u}=s,f=Je(t,h=>s.onThumbChange(h)),c=P.useRef(void 0),d=Yh(()=>{c.current&&(c.current(),c.current=void 0)},100);return P.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!c.current){const g=H6(h,u);c.current=g,u()}};return u(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,u]),p.jsx(We.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Fe(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,y=h.clientY-g.top;s.onThumbPointerDown({x:b,y})}),onPointerUp:Fe(e.onPointerUp,s.onThumbPointerUp)})});BR.displayName=kd;var rw="ScrollAreaCorner",zR=P.forwardRef((e,t)=>{const r=on(rw,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(U6,{...e,ref:t}):null});zR.displayName=rw;var U6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=on(rw,r),[a,s]=P.useState(0),[u,f]=P.useState(0),c=!!(a&&u);return is(i.scrollbarX,()=>{const d=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(d),f(d)}),is(i.scrollbarY,()=>{const d=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(d),s(d)}),c?p.jsx(We.div,{...n,ref:t,style:{width:a,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rd(e){return e?parseInt(e,10):0}function FR(e,t){const r=e/t;return isNaN(r)?0:r}function Xh(e){const t=FR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function W6(e,t,r,n="ltr"){const i=Xh(r),a=i/2,s=t||a,u=i-s,f=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-u,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return qR([f,c],h)(e)}function Mj(e,t,r="ltr"){const n=Xh(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,s=t.content-t.viewport,u=a-n,f=r==="ltr"?[0,s]:[s*-1,0],c=hb(e,f);return qR([0,s],[0,u])(c)}function qR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function UR(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,u=r.top!==a.top;(s||u)&&t(),r=a,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)};function Yh(e,t){const r=ar(e),n=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),P.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function is(e,t){const r=ar(t);Rt(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var V6=kR,G6=MR,K6=zR;function fc({className:e,children:t,...r}){return p.jsxs(V6,{"data-slot":"scroll-area",className:Ie("relative",e),...r,children:[p.jsx(G6,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),p.jsx(X6,{}),p.jsx(K6,{})]})}function X6({className:e,orientation:t="vertical",...r}){return p.jsx(IR,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ie("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:p.jsx(BR,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Y6="/assets/773f0c39e1986271e9144596caac519f934a6ae6-Cou8J2R8.png";function Q6({currentView:e,setCurrentView:t}){const[r,n]=P.useState(!0),i=[{name:"Dashboard",icon:qB,type:"item"},{type:"header",name:"MODULES"},{name:"Labeling",icon:fb,type:"sub",isOpen:r,toggle:()=>n(!r),children:[{name:"Labels",icon:fb},{name:"Label Categories",icon:zB},{name:"Label Types",icon:Z1},{name:"Label Templates",icon:MB},{name:"Multiple Options",icon:vR}]},{type:"header",name:"MANAGEMENT"},{name:"Location Manager",icon:Gh,type:"item"},{name:"Account Management",icon:gR,type:"item"},{name:"Menu Manager",icon:ub,type:"item"},{name:"Reports",icon:uc,type:"item"},{name:"Support",icon:cb,type:"item"},{name:"Log Out",icon:VB,type:"item"}];return p.jsxs("div",{className:"w-64 bg-[#1e3a8a] text-white flex flex-col h-screen border-r border-blue-800 shadow-xl z-20 shrink-0",children:[p.jsx("div",{className:"flex items-center justify-center border-b border-blue-800/50 bg-white px-4 shrink-0",style:{height:90},children:p.jsx("img",{src:Y6,alt:"MedVantage",className:"h-16 w-auto object-contain"})}),p.jsx(fc,{className:"flex-1 py-4",children:p.jsx("div",{className:"px-3 space-y-1",children:i.map((a,s)=>a.type==="header"?p.jsx("div",{className:"px-4 py-2 mt-4 text-xs font-semibold text-blue-300 uppercase tracking-wider",children:a.name},s):a.type==="sub"?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("button",{onClick:a.toggle,className:Ie("w-full flex items-center justify-between px-4 py-2.5 text-sm font-medium rounded-lg transition-colors","hover:bg-blue-800/50 text-blue-100"),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]}),a.isOpen?p.jsx(cc,{className:"w-4 h-4"}):p.jsx(Cd,{className:"w-4 h-4"})]}),a.isOpen&&p.jsx("div",{className:"pl-4 space-y-1",children:a.children?.map((u,f)=>p.jsxs("button",{onClick:()=>t(u.name),className:Ie("w-full flex items-center gap-3 px-4 py-2 text-sm font-medium rounded-lg transition-colors border-l-2",e===u.name?"bg-blue-800 border-blue-400 text-white":"border-transparent hover:bg-blue-800/30 text-blue-200 hover:text-white"),children:[p.jsx("div",{className:"w-1 h-1 rounded-full bg-current"}),u.name]},f))})]},s):p.jsxs("button",{onClick:()=>t(a.name),className:Ie("w-full flex items-center gap-3 px-4 py-2.5 text-sm font-medium rounded-lg transition-colors",e===a.name?"bg-blue-700 text-white shadow-md shadow-blue-900/20":a.name==="Log Out"?"text-red-300 hover:bg-red-900/20 hover:text-red-200":"text-blue-100 hover:bg-blue-800 hover:text-white"),children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]},s))})})]})}function Be({className:e,type:t,...r}){return p.jsx("input",{type:t,"data-slot":"input",className:Ie("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var Z6=Symbol.for("react.lazy"),Md=X1[" use ".trim().toString()];function J6(e){return typeof e=="object"&&e!==null&&"then"in e}function WR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Z6&&"_payload"in e&&J6(e._payload)}function nw(e){const t=ez(e),r=P.forwardRef((n,i)=>{let{children:a,...s}=n;WR(a)&&typeof Md=="function"&&(a=Md(a._payload));const u=P.Children.toArray(a),f=u.find(rz);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var HR=nw("Slot");function ez(e){const t=P.forwardRef((r,n)=>{let{children:i,...a}=r;if(WR(i)&&typeof Md=="function"&&(i=Md(i._payload)),P.isValidElement(i)){const s=iz(i),u=nz(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tz=Symbol("radix.slottable");function rz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tz}function nz(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function iz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Ij=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dj=Ue,VR=(e,t)=>r=>{var n;if(t?.variants==null)return Dj(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(c=>{const d=r?.[c],h=a?.[c];if(d===null)return null;const m=Ij(d)||Ij(h);return i[c][m]}),u=r&&Object.entries(r).reduce((c,d)=>{let[h,m]=d;return m===void 0||(c[h]=m),c},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(b=>{let[y,w]=b;return Array.isArray(w)?w.includes({...a,...u}[y]):{...a,...u}[y]===w})?[...c,h,m]:c},[]);return Dj(e,s,f,r?.class,r?.className)},az=VR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function Ne({className:e,variant:t,size:r,asChild:n=!1,...i}){const a=n?HR:"button";return p.jsx(a,{"data-slot":"button",className:Ie(az({variant:t,size:r,className:e})),...i})}function oz(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s);u.displayName=a+"Context";const f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,sz(i,...t)]}function sz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var lz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iw=lz.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Vv={exports:{}},Gv={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Lj;function cz(){if(Lj)return Gv;Lj=1;var e=Vh();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(h,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),y=b[0].inst,w=b[1];return a(function(){y.value=g,y.getSnapshot=m,f(y)&&w({inst:y})},[h,g,m]),i(function(){return f(y)&&w({inst:y}),h(function(){f(y)&&w({inst:y})})},[h]),s(g),g}function f(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!r(h,g)}catch{return!0}}function c(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;return Gv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Gv}var $j;function uz(){return $j||($j=1,Vv.exports=cz()),Vv.exports}var fz=uz();function dz(){return fz.useSyncExternalStore(hz,()=>!0,()=>!1)}function hz(){return()=>{}}var aw="Avatar",[pz]=oz(aw),[mz,GR]=pz(aw),KR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=P.useState("idle");return p.jsx(mz,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:p.jsx(iw.span,{...n,ref:t})})});KR.displayName=aw;var XR="AvatarImage",YR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,s=GR(XR,r),u=vz(n,a),f=ar(c=>{i(c),s.onImageLoadingStatusChange(c)});return Rt(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?p.jsx(iw.img,{...a,ref:t,src:n}):null});YR.displayName=XR;var QR="AvatarFallback",ZR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=GR(QR,r),[s,u]=P.useState(n===void 0);return P.useEffect(()=>{if(n!==void 0){const f=window.setTimeout(()=>u(!0),n);return()=>window.clearTimeout(f)}},[n]),s&&a.imageLoadingStatus!=="loaded"?p.jsx(iw.span,{...i,ref:t}):null});ZR.displayName=QR;function Bj(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vz(e,{referrerPolicy:t,crossOrigin:r}){const n=dz(),i=P.useRef(null),a=n?(i.current||(i.current=new window.Image),i.current):null,[s,u]=P.useState(()=>Bj(a,e));return Rt(()=>{u(Bj(a,e))},[a,e]),Rt(()=>{const f=h=>()=>{u(h)};if(!a)return;const c=f("loaded"),d=f("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,r,t]),s}var gz=KR,yz=YR,xz=ZR;function bz({className:e,...t}){return p.jsx(gz,{"data-slot":"avatar",className:Ie("relative flex size-10 shrink-0 overflow-hidden rounded-full",e),...t})}function wz({className:e,...t}){return p.jsx(yz,{"data-slot":"avatar-image",className:Ie("aspect-square size-full",e),...t})}function _z({className:e,...t}){return p.jsx(xz,{"data-slot":"avatar-fallback",className:Ie("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Sz({title:e}){const t=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return p.jsxs("header",{className:"bg-white border-b border-gray-200 px-8 flex items-center justify-between shadow-sm sticky top-0 z-10 shrink-0",style:{height:90},children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-2xl font-bold",style:{color:"rgb(43, 50, 143)"},children:[e," Overview"]}),p.jsxs("p",{className:"text-sm text-gray-500 mt-1 flex items-center gap-2",children:[t," | Last updated: Just now"]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center w-64 h-9 rounded-md border border-gray-200 bg-gray-50 focus-within:bg-white focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring transition-colors overflow-hidden",children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx(Be,{type:"search",placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full"})]}),p.jsx(Ne,{variant:"ghost",size:"icon",className:"text-gray-500 hover:text-gray-700",children:p.jsx(vR,{className:"w-5 h-5"})}),p.jsx("div",{className:"h-8 w-px bg-gray-200 mx-2"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"text-right hidden md:block",children:[p.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Admin User"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Administrator"})]}),p.jsxs(bz,{className:"h-10 w-10 border border-gray-200",children:[p.jsx(wz,{src:"https://github.com/shadcn.png"}),p.jsx(_z,{children:"AD"})]})]})]})]})}function Oz({children:e,currentView:t,setCurrentView:r}){return p.jsxs("div",{className:"flex h-screen bg-gray-50 overflow-hidden font-sans",children:[p.jsx(Q6,{currentView:t,setCurrentView:r}),p.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[p.jsx(Sz,{title:t}),p.jsx("div",{className:"px-8 mt-8 shrink-0",children:p.jsxs("nav",{className:"flex items-center gap-2 text-sm font-normal","aria-label":"Breadcrumb",children:[p.jsx("button",{type:"button",onClick:()=>r("Dashboard"),className:"text-gray-500 hover:text-gray-700 transition-colors",children:"Home"}),p.jsx(Cd,{className:"w-4 h-4 text-gray-500 shrink-0"}),p.jsx("span",{style:{color:"rgb(43, 50, 143)"},children:t})]})}),p.jsx("main",{className:"flex-1 overflow-y-auto p-8",children:p.jsx("div",{className:"w-full h-full",children:e})})]})]})}function Ir({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Ie("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yn({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Ie("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function xn({className:e,...t}){return p.jsx("h4",{"data-slot":"card-title",className:Ie("leading-none",e),...t})}function Id({className:e,...t}){return p.jsx("p",{"data-slot":"card-description",className:Ie("text-muted-foreground",e),...t})}function tn({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Ie("px-6 [&:last-child]:pb-6",e),...t})}const jz=VR("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Rn({className:e,variant:t,asChild:r=!1,...n}){const i=r?HR:"span";return p.jsx(i,{"data-slot":"badge",className:Ie(jz({variant:t}),e),...n})}var Kv,zj;function Sr(){if(zj)return Kv;zj=1;var e=Array.isArray;return Kv=e,Kv}var Xv,Fj;function JR(){if(Fj)return Xv;Fj=1;var e=typeof bf=="object"&&bf&&bf.Object===Object&&bf;return Xv=e,Xv}var Yv,qj;function Hn(){if(qj)return Yv;qj=1;var e=JR(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yv=r,Yv}var Qv,Uj;function Xc(){if(Uj)return Qv;Uj=1;var e=Hn(),t=e.Symbol;return Qv=t,Qv}var Zv,Wj;function Ez(){if(Wj)return Zv;Wj=1;var e=Xc(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(s){var u=r.call(s,i),f=s[i];try{s[i]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(u?s[i]=f:delete s[i]),d}return Zv=a,Zv}var Jv,Hj;function Az(){if(Hj)return Jv;Hj=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jv=r,Jv}var eg,Vj;function yi(){if(Vj)return eg;Vj=1;var e=Xc(),t=Ez(),r=Az(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eg=s,eg}var tg,Gj;function xi(){if(Gj)return tg;Gj=1;function e(t){return t!=null&&typeof t=="object"}return tg=e,tg}var rg,Kj;function Ms(){if(Kj)return rg;Kj=1;var e=yi(),t=xi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return rg=n,rg}var ng,Xj;function ow(){if(Xj)return ng;Xj=1;var e=Sr(),t=Ms(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return ng=i,ng}var ig,Yj;function Qi(){if(Yj)return ig;Yj=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ig=e,ig}var ag,Qj;function sw(){if(Qj)return ag;Qj=1;var e=yi(),t=Qi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!t(u))return!1;var f=e(u);return f==n||f==i||f==r||f==a}return ag=s,ag}var og,Zj;function Pz(){if(Zj)return og;Zj=1;var e=Hn(),t=e["__core-js_shared__"];return og=t,og}var sg,Jj;function Nz(){if(Jj)return sg;Jj=1;var e=Pz(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return sg=r,sg}var lg,eE;function eM(){if(eE)return lg;eE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return lg=r,lg}var cg,tE;function Cz(){if(tE)return cg;tE=1;var e=sw(),t=Nz(),r=Qi(),n=eM(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,f=s.toString,c=u.hasOwnProperty,d=RegExp("^"+f.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||t(m))return!1;var g=e(m)?d:a;return g.test(n(m))}return cg=h,cg}var ug,rE;function Tz(){if(rE)return ug;rE=1;function e(t,r){return t?.[r]}return ug=e,ug}var fg,nE;function Ya(){if(nE)return fg;nE=1;var e=Cz(),t=Tz();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fg=r,fg}var dg,iE;function Qh(){if(iE)return dg;iE=1;var e=Ya(),t=e(Object,"create");return dg=t,dg}var hg,aE;function kz(){if(aE)return hg;aE=1;var e=Qh();function t(){this.__data__=e?e(null):{},this.size=0}return hg=t,hg}var pg,oE;function Rz(){if(oE)return pg;oE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pg=e,pg}var mg,sE;function Mz(){if(sE)return mg;sE=1;var e=Qh(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(e){var u=s[a];return u===t?void 0:u}return n.call(s,a)?s[a]:void 0}return mg=i,mg}var vg,lE;function Iz(){if(lE)return vg;lE=1;var e=Qh(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return vg=n,vg}var gg,cE;function Dz(){if(cE)return gg;cE=1;var e=Qh(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return gg=r,gg}var yg,uE;function Lz(){if(uE)return yg;uE=1;var e=kz(),t=Rz(),r=Mz(),n=Iz(),i=Dz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u-1}return Og=t,Og}var jg,gE;function qz(){if(gE)return jg;gE=1;var e=Zh();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return jg=t,jg}var Eg,yE;function Jh(){if(yE)return Eg;yE=1;var e=$z(),t=Bz(),r=zz(),n=Fz(),i=qz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u0?1:-1},Na=function(t){return Da(t)&&t.indexOf("%")===t.length-1},he=function(t){return fF(t)&&!Yc(t)},dF=function(t){return qe(t)},zt=function(t){return he(t)||Da(t)},hF=0,Ds=function(t){var r=++hF;return"".concat(t||"").concat(r)},ur=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&!Da(t))return n;var a;if(Na(t)){var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Yc(a)&&(a=n),i&&a>r&&(a=r),a},Wi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},pF=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mb(e){"@babel/helpers - typeof";return mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mb(e)}var VE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ci=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},GE=null,Zg=null,pw=function e(t){if(t===GE&&Array.isArray(Zg))return Zg;var r=[];return P.Children.forEach(t,function(n){qe(n)||(sF.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Zg=r,GE=t,r};function Fr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return ci(i)}):n=[ci(t)],pw(e).forEach(function(i){var a=zr(i,"type.displayName")||zr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Mr(e,t){var r=Fr(e,t);return r&&r[0]}var KE=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!he(n)||n<=0||!he(i)||i<=0)},_F=["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"],SF=function(t){return t&&t.type&&Da(t.type)&&_F.indexOf(t.type)>=0},OF=function(t){return t&&mb(t)==="object"&&"clipDot"in t},jF=function(t,r,n,i){var a,s=(a=Qg?.[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ze(t)&&(i&&s.includes(r)||gF.includes(r))||n&&hw.includes(r)},Me=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!Is(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;jF((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},vb=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return XE(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function yb(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,s=e.style,u=e.title,f=e.desc,c=NF(e,PF),d=i||{width:r,height:n,x:0,y:0},h=Ue("recharts-surface",a);return z.createElement("svg",gb({},Me(c,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),z.createElement("title",null,u),z.createElement("desc",null,f),t)}var TF=["children","className"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ze=z.forwardRef(function(e,t){var r=e.children,n=e.className,i=kF(e,TF),a=Ue("recharts-layer",n);return z.createElement("g",xb({className:a},Me(i,!0),{ref:t}),r)}),Sn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;aa?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i=a?r:e(r,n,i)}return ey=t,ey}var ty,JE;function oM(){if(JE)return ty;JE=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+e+i+a+"]");function f(c){return u.test(c)}return ty=f,ty}var ry,e2;function DF(){if(e2)return ry;e2=1;function e(t){return t.split("")}return ry=e,ry}var ny,t2;function LF(){if(t2)return ny;t2=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",s="["+e+"]",u="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+u+"|"+f+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=c+"?",y="["+a+"]?",w="(?:"+g+"(?:"+[d,h,m].join("|")+")"+y+b+")*",S=y+b+w,O="(?:"+[d+u+"?",u,h,m,s].join("|")+")",E=RegExp(f+"(?="+f+")|"+O+S,"g");function C(A){return A.match(E)||[]}return ny=C,ny}var iy,r2;function $F(){if(r2)return iy;r2=1;var e=DF(),t=oM(),r=LF();function n(i){return t(i)?r(i):e(i)}return iy=n,iy}var ay,n2;function BF(){if(n2)return ay;n2=1;var e=IF(),t=oM(),r=$F(),n=rM();function i(a){return function(s){s=n(s);var u=t(s)?r(s):void 0,f=u?u[0]:s.charAt(0),c=u?e(u,1).join(""):s.slice(1);return f[a]()+c}}return ay=i,ay}var oy,i2;function zF(){if(i2)return oy;i2=1;var e=BF(),t=e("toUpperCase");return oy=t,oy}var FF=zF();const rp=it(FF);function pt(e){return function(){return e}}const sM=Math.cos,$d=Math.sin,En=Math.sqrt,Bd=Math.PI,np=2*Bd,bb=Math.PI,wb=2*bb,Ea=1e-6,qF=wb-Ea;function lM(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lM;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iEa)if(!(Math.abs(h*f-c*d)>Ea)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-s,b=i-u,y=f*f+c*c,w=g*g+b*b,S=Math.sqrt(y),O=Math.sqrt(m),E=a*Math.tan((bb-Math.acos((y+m-w)/(2*S*O)))/2),C=E/O,A=E/S;Math.abs(C-1)>Ea&&this._append`L${t+C*d},${r+C*h}`,this._append`A${a},${a},0,0,${+(h*g>d*b)},${this._x1=t+A*f},${this._y1=r+A*c}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),c=t+u,d=r+f,h=1^s,m=s?i-a:a-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>Ea||Math.abs(this._y1-d)>Ea)&&this._append`L${c},${d}`,n&&(m<0&&(m=m%wb+wb),m>qF?this._append`A${n},${n},0,1,${h},${t-u},${r-f}A${n},${n},0,1,${h},${this._x1=c},${this._y1=d}`:m>Ea&&this._append`A${n},${n},0,${+(m>=bb)},${h},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function mw(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new WF(t)}function vw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cM(e){this._context=e}cM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ip(e){return new cM(e)}function uM(e){return e[0]}function fM(e){return e[1]}function dM(e,t){var r=pt(!0),n=null,i=ip,a=null,s=mw(u);e=typeof e=="function"?e:e===void 0?uM:pt(e),t=typeof t=="function"?t:t===void 0?fM:pt(t);function u(f){var c,d=(f=vw(f)).length,h,m=!1,g;for(n==null&&(a=i(g=s())),c=0;c<=d;++c)!(c=g;--b)u.point(E[b],C[b]);u.lineEnd(),u.areaEnd()}S&&(E[m]=+e(w,m,h),C[m]=+t(w,m,h),u.point(n?+n(w,m,h):E[m],r?+r(w,m,h):C[m]))}if(O)return u=null,O+""||null}function d(){return dM().defined(i).curve(s).context(a)}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:pt(+h),n=null,c):e},c.x0=function(h){return arguments.length?(e=typeof h=="function"?h:pt(+h),c):e},c.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:pt(+h),c):n},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:pt(+h),r=null,c):t},c.y0=function(h){return arguments.length?(t=typeof h=="function"?h:pt(+h),c):t},c.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:pt(+h),c):r},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(r)},c.lineX1=function(){return d().x(n).y(t)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:pt(!!h),c):i},c.curve=function(h){return arguments.length?(s=h,a!=null&&(u=s(a)),c):s},c.context=function(h){return arguments.length?(h==null?a=u=null:u=s(a=h),c):a},c}class hM{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function HF(e){return new hM(e,!0)}function VF(e){return new hM(e,!1)}const gw={draw(e,t){const r=En(t/Bd);e.moveTo(r,0),e.arc(0,0,r,0,np)}},GF={draw(e,t){const r=En(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},pM=En(1/3),KF=pM*2,XF={draw(e,t){const r=En(t/KF),n=r*pM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},YF={draw(e,t){const r=En(t),n=-r/2;e.rect(n,n,r,r)}},QF=.8908130915292852,mM=$d(Bd/10)/$d(7*Bd/10),ZF=$d(np/10)*mM,JF=-sM(np/10)*mM,eq={draw(e,t){const r=En(t*QF),n=ZF*r,i=JF*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=np*a/5,u=sM(s),f=$d(s);e.lineTo(f*r,-u*r),e.lineTo(u*n-f*i,f*n+u*i)}e.closePath()}},sy=En(3),tq={draw(e,t){const r=-En(t/(sy*3));e.moveTo(0,r*2),e.lineTo(-sy*r,-r),e.lineTo(sy*r,-r),e.closePath()}},Qr=-.5,Zr=En(3)/2,_b=1/En(12),rq=(_b/2+1)*3,nq={draw(e,t){const r=En(t/rq),n=r/2,i=r*_b,a=n,s=r*_b+r,u=-a,f=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(u,f),e.lineTo(Qr*n-Zr*i,Zr*n+Qr*i),e.lineTo(Qr*a-Zr*s,Zr*a+Qr*s),e.lineTo(Qr*u-Zr*f,Zr*u+Qr*f),e.lineTo(Qr*n+Zr*i,Qr*i-Zr*n),e.lineTo(Qr*a+Zr*s,Qr*s-Zr*a),e.lineTo(Qr*u+Zr*f,Qr*f-Zr*u),e.closePath()}};function iq(e,t){let r=null,n=mw(i);e=typeof e=="function"?e:pt(e||gw),t=typeof t=="function"?t:pt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:pt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:pt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function zd(){}function Fd(e,t,r){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+r)/6)}function vM(e){this._context=e}vM.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:Fd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aq(e){return new vM(e)}function gM(e){this._context=e}gM.prototype={areaStart:zd,areaEnd:zd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oq(e){return new gM(e)}function yM(e){this._context=e}yM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sq(e){return new yM(e)}function xM(e){this._context=e}xM.prototype={areaStart:zd,areaEnd:zd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lq(e){return new xM(e)}function a2(e){return e<0?-1:1}function o2(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),u=(a*i+s*n)/(n+i);return(a2(a)+a2(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function s2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ly(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,s-u*r,a,s)}function qd(e){this._context=e}qd.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:ly(this,this._t0,s2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ly(this,s2(this,r=o2(this,e,t)),r);break;default:ly(this,this._t0,r=o2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bM(e){this._context=new wM(e)}(bM.prototype=Object.create(qd.prototype)).point=function(e,t){qd.prototype.point.call(this,t,e)};function wM(e){this._context=e}wM.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function cq(e){return new qd(e)}function uq(e){return new bM(e)}function _M(e){this._context=e}_M.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=l2(e),i=l2(t),a=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function dq(e){return new ap(e,.5)}function hq(e){return new ap(e,0)}function pq(e){return new ap(e,1)}function as(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,u=a.length;r=0;)r[t]=t;return r}function mq(e,t){return e[t]}function vq(e){const t=[];return t.key=e,t}function gq(){var e=pt([]),t=Sb,r=as,n=mq;function i(a){var s=Array.from(e.apply(this,arguments),vq),u,f=s.length,c=-1,d;for(const h of a)for(u=0,++c;u0){for(var r,n,i=0,a=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Eq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var SM={symbolCircle:gw,symbolCross:GF,symbolDiamond:XF,symbolSquare:YF,symbolStar:eq,symbolTriangle:tq,symbolWye:nq},Aq=Math.PI/180,Pq=function(t){var r="symbol".concat(rp(t));return SM[r]||gw},Nq=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Aq;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Cq=function(t,r){SM["symbol".concat(rp(t))]=r},yw=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,s=t.sizeType,u=s===void 0?"area":s,f=jq(t,wq),c=u2(u2({},f),{},{type:n,size:a,sizeType:u}),d=function(){var w=Pq(n),S=iq().type(w).size(Nq(a,u,n));return S()},h=c.className,m=c.cx,g=c.cy,b=Me(c,!0);return m===+m&&g===+g&&a===+a?z.createElement("path",Ob({},b,{className:Ue("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:d()})):null};yw.registerSymbol=Cq;function os(e){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(e)}function jb(){return jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var O=g.inactive?c:g.color;return z.createElement("li",jb({className:w,style:h,key:"legend-item-".concat(b)},La(n.props,g,b)),z.createElement(yb,{width:s,height:s,viewBox:d,style:m},n.renderIcon(g)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},y?y(S,g,b):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(P.PureComponent);hc(xw,"displayName","Legend");hc(xw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var cy,d2;function zq(){if(d2)return cy;d2=1;var e=Jh();function t(){this.__data__=new e,this.size=0}return cy=t,cy}var uy,h2;function Fq(){if(h2)return uy;h2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return uy=e,uy}var fy,p2;function qq(){if(p2)return fy;p2=1;function e(t){return this.__data__.get(t)}return fy=e,fy}var dy,m2;function Uq(){if(m2)return dy;m2=1;function e(t){return this.__data__.has(t)}return dy=e,dy}var hy,v2;function Wq(){if(v2)return hy;v2=1;var e=Jh(),t=cw(),r=uw(),n=200;function i(a,s){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.lengthg))return!1;var y=h.get(s),w=h.get(u);if(y&&w)return y==u&&w==s;var S=-1,O=!0,E=f&i?new e:void 0;for(h.set(s,u),h.set(u,s);++S-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Iy=t,Iy}var Dy,z2;function n9(){if(z2)return Dy;z2=1;var e=yi(),t=Sw(),r=xi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",f="[object Function]",c="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",w="[object ArrayBuffer]",S="[object DataView]",O="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",N="[object Int32Array]",T="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",q="[object Uint32Array]",L={};L[O]=L[E]=L[C]=L[A]=L[N]=L[T]=L[R]=L[I]=L[q]=!0,L[n]=L[i]=L[w]=L[a]=L[S]=L[s]=L[u]=L[f]=L[c]=L[d]=L[h]=L[m]=L[g]=L[b]=L[y]=!1;function D(U){return r(U)&&t(U.length)&&!!L[e(U)]}return Dy=D,Dy}var Ly,F2;function RM(){if(F2)return Ly;F2=1;function e(t){return function(r){return t(r)}}return Ly=e,Ly}var Yl={exports:{}};Yl.exports;var q2;function i9(){return q2||(q2=1,(function(e,t){var r=JR(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,u=(function(){try{var f=i&&i.require&&i.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}})();e.exports=u})(Yl,Yl.exports)),Yl.exports}var $y,U2;function MM(){if(U2)return $y;U2=1;var e=n9(),t=RM(),r=i9(),n=r&&r.isTypedArray,i=n?t(n):e;return $y=i,$y}var By,W2;function a9(){if(W2)return By;W2=1;var e=e9(),t=ww(),r=Sr(),n=kM(),i=_w(),a=MM(),s=Object.prototype,u=s.hasOwnProperty;function f(c,d){var h=r(c),m=!h&&t(c),g=!h&&!m&&n(c),b=!h&&!m&&!g&&a(c),y=h||m||g||b,w=y?e(c.length,String):[],S=w.length;for(var O in c)(d||u.call(c,O))&&!(y&&(O=="length"||g&&(O=="offset"||O=="parent")||b&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,S)))&&w.push(O);return w}return By=f,By}var zy,H2;function o9(){if(H2)return zy;H2=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return zy=t,zy}var Fy,V2;function IM(){if(V2)return Fy;V2=1;function e(t,r){return function(n){return t(r(n))}}return Fy=e,Fy}var qy,G2;function s9(){if(G2)return qy;G2=1;var e=IM(),t=e(Object.keys,Object);return qy=t,qy}var Uy,K2;function l9(){if(K2)return Uy;K2=1;var e=o9(),t=s9(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&s.push(u);return s}return Uy=i,Uy}var Wy,X2;function Qc(){if(X2)return Wy;X2=1;var e=sw(),t=Sw();function r(n){return n!=null&&t(n.length)&&!e(n)}return Wy=r,Wy}var Hy,Y2;function op(){if(Y2)return Hy;Y2=1;var e=a9(),t=l9(),r=Qc();function n(i){return r(i)?e(i):t(i)}return Hy=n,Hy}var Vy,Q2;function c9(){if(Q2)return Vy;Q2=1;var e=Yq(),t=Jq(),r=op();function n(i){return e(i,r,t)}return Vy=n,Vy}var Gy,Z2;function u9(){if(Z2)return Gy;Z2=1;var e=c9(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,u,f,c,d){var h=u&t,m=e(a),g=m.length,b=e(s),y=b.length;if(g!=y&&!h)return!1;for(var w=g;w--;){var S=m[w];if(!(h?S in s:n.call(s,S)))return!1}var O=d.get(a),E=d.get(s);if(O&&E)return O==s&&E==a;var C=!0;d.set(a,s),d.set(s,a);for(var A=h;++w-1}return x0=t,x0}var b0,jA;function C9(){if(jA)return b0;jA=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i=s){var S=c?null:i(f);if(S)return a(S);b=!1,m=n,w=new e}else w=c?[]:y;e:for(;++h=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function H9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function V9(e){return e.value}function G9(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var r=W9(t,D9);return z.createElement(xw,r)}var RA=1,Qo=(function(e){function t(){var r;L9(this,t);for(var n=arguments.length,i=new Array(n),a=0;aRA||Math.abs(i.height-this.lastBoundingBox.height)>RA)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ni({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,u=i.verticalAlign,f=i.margin,c=i.chartWidth,d=i.chartHeight,h,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();h={left:((c||0)-g.width)/2}}else h=s==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var b=this.getBBoxSnapshot();m={top:((d||0)-b.height)/2}}else m=u==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return ni(ni({},h),m)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,u=i.height,f=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,h=ni(ni({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(f)),f);return z.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){n.wrapperNode=g}},G9(a,ni(ni({},this.props),{},{payload:zM(d,c,V9)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ni(ni({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&he(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})(P.PureComponent);sp(Qo,"displayName","Legend");sp(Qo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var j0,MA;function K9(){if(MA)return j0;MA=1;var e=Xc(),t=ww(),r=Sr(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return j0=i,j0}var E0,IA;function UM(){if(IA)return E0;IA=1;var e=TM(),t=K9();function r(n,i,a,s,u){var f=-1,c=n.length;for(a||(a=t),u||(u=[]);++f0&&a(d)?i>1?r(d,i-1,a,s,u):e(u,d):s||(u[u.length]=d)}return u}return E0=r,E0}var A0,DA;function X9(){if(DA)return A0;DA=1;function e(t){return function(r,n,i){for(var a=-1,s=Object(r),u=i(r),f=u.length;f--;){var c=u[t?f:++a];if(n(s[c],c,s)===!1)break}return r}}return A0=e,A0}var P0,LA;function Y9(){if(LA)return P0;LA=1;var e=X9(),t=e();return P0=t,P0}var N0,$A;function WM(){if($A)return N0;$A=1;var e=Y9(),t=op();function r(n,i){return n&&e(n,i,t)}return N0=r,N0}var C0,BA;function Q9(){if(BA)return C0;BA=1;var e=Qc();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var s=i.length,u=n?s:-1,f=Object(i);(n?u--:++un||u&&f&&d&&!c&&!h||a&&f&&d||!i&&d||!s)return 1;if(!a&&!u&&!h&&r=c)return d;var h=i[a];return d*(h=="desc"?-1:1)}}return r.index-n.index}return I0=t,I0}var D0,HA;function t7(){if(HA)return D0;HA=1;var e=fw(),t=dw(),r=Vn(),n=HM(),i=Z9(),a=RM(),s=e7(),u=Ls(),f=Sr();function c(d,h,m){h.length?h=e(h,function(y){return f(y)?function(w){return t(w,y.length===1?y[0]:y)}:y}):h=[u];var g=-1;h=e(h,a(r));var b=n(d,function(y,w,S){var O=e(h,function(E){return E(y)});return{criteria:O,index:++g,value:y}});return i(b,function(y,w){return s(y,w,m)})}return D0=c,D0}var L0,VA;function r7(){if(VA)return L0;VA=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return L0=e,L0}var $0,GA;function n7(){if(GA)return $0;GA=1;var e=r7(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,f=t(s.length-i,0),c=Array(f);++u0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return q0=n,q0}var U0,ZA;function s7(){if(ZA)return U0;ZA=1;var e=a7(),t=o7(),r=t(e);return U0=r,U0}var W0,JA;function l7(){if(JA)return W0;JA=1;var e=Ls(),t=n7(),r=s7();function n(i,a){return r(t(i,a,e),i+"")}return W0=n,W0}var H0,eP;function lp(){if(eP)return H0;eP=1;var e=lw(),t=Qc(),r=_w(),n=Qi();function i(a,s,u){if(!n(u))return!1;var f=typeof s;return(f=="number"?t(u)&&r(s,u.length):f=="string"&&s in u)?e(u[s],a):!1}return H0=i,H0}var V0,tP;function c7(){if(tP)return V0;tP=1;var e=UM(),t=t7(),r=l7(),n=lp(),i=r(function(a,s){if(a==null)return[];var u=s.length;return u>1&&n(a,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return V0=i,V0}var u7=c7();const Ew=it(u7);function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Ml,"-left"),he(r)&&t&&he(t.x)&&r=t.y),"".concat(Ml,"-top"),he(n)&&t&&he(t.y)&&ny?Math.max(d,f[n]):Math.max(h,f[n])}function j7(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function E7(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox,c,d,h;return s.height>0&&s.width>0&&r?(d=iP({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:f,viewBoxDimension:f.width}),h=iP({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:f,viewBoxDimension:f.height}),c=j7({translateX:d,translateY:h,useTranslate3d:u})):c=S7,{cssProperties:c,cssClasses:O7({translateX:d,translateY:h,coordinate:r})}}function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oP(e){for(var t=1;tsP||Math.abs(n.height-this.state.lastBoundingBox.height)>sP)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,c=i.children,d=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,b=i.position,y=i.reverseDirection,w=i.useTranslate3d,S=i.viewBox,O=i.wrapperStyle,E=E7({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:g,position:b,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:S}),C=E.cssClasses,A=E.cssProperties,N=oP(oP({transition:m&&a?"transform ".concat(u,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return z.createElement("div",{tabIndex:-1,className:C,style:N,ref:function(R){n.wrapperNode=R}},c)}}])})(P.PureComponent),D7=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Qa={isSsr:D7()};function cs(e){"@babel/helpers - typeof";return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(e)}function lP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cP(e){for(var t=1;t0;return z.createElement(I7,{allowEscapeViewBox:s,animationDuration:u,animationEasing:f,isAnimationActive:m,active:a,coordinate:d,hasPayload:N,offset:g,position:w,reverseDirection:S,useTranslate3d:O,viewBox:E,wrapperStyle:C},V7(c,cP(cP({},this.props),{},{payload:A})))}}])})(P.PureComponent);Aw(Dr,"displayName","Tooltip");Aw(Dr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Qa.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 K0,uP;function G7(){if(uP)return K0;uP=1;var e=Hn(),t=function(){return e.Date.now()};return K0=t,K0}var X0,fP;function K7(){if(fP)return X0;fP=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return X0=t,X0}var Y0,dP;function X7(){if(dP)return Y0;dP=1;var e=K7(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Y0=r,Y0}var Q0,hP;function QM(){if(hP)return Q0;hP=1;var e=X7(),t=Qi(),r=Ms(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function f(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var h=a.test(c);return h||s.test(c)?u(c.slice(2),h?2:8):i.test(c)?n:+c}return Q0=f,Q0}var Z0,pP;function Y7(){if(pP)return Z0;pP=1;var e=Qi(),t=G7(),r=QM(),n="Expected a function",i=Math.max,a=Math.min;function s(u,f,c){var d,h,m,g,b,y,w=0,S=!1,O=!1,E=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(c)&&(S=!!c.leading,O="maxWait"in c,m=O?i(r(c.maxWait)||0,f):m,E="trailing"in c?!!c.trailing:E);function C(U){var H=d,V=h;return d=h=void 0,w=U,g=u.apply(V,H),g}function A(U){return w=U,b=setTimeout(R,f),S?C(U):g}function N(U){var H=U-y,V=U-w,K=f-H;return O?a(K,m-V):K}function T(U){var H=U-y,V=U-w;return y===void 0||H>=f||H<0||O&&V>=m}function R(){var U=t();if(T(U))return I(U);b=setTimeout(R,N(U))}function I(U){return b=void 0,E&&d?C(U):(d=h=void 0,g)}function q(){b!==void 0&&clearTimeout(b),w=0,d=y=h=b=void 0}function L(){return b===void 0?g:I(t())}function D(){var U=t(),H=T(U);if(d=arguments,h=this,y=U,H){if(b===void 0)return A(y);if(O)return clearTimeout(b),b=setTimeout(R,f),C(y)}return b===void 0&&(b=setTimeout(R,f)),g}return D.cancel=q,D.flush=L,D}return Z0=s,Z0}var J0,mP;function Q7(){if(mP)return J0;mP=1;var e=Y7(),t=Qi(),r="Expected a function";function n(i,a,s){var u=!0,f=!0;if(typeof i!="function")throw new TypeError(r);return t(s)&&(u="leading"in s?!!s.leading:u,f="trailing"in s?!!s.trailing:f),e(i,a,{leading:u,maxWait:a,trailing:f})}return J0=n,J0}var Z7=Q7();const ZM=it(Z7);function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function vP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Af(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(U=ZM(U,y,{trailing:!0,leading:!1}));var H=new ResizeObserver(U),V=A.current.getBoundingClientRect(),K=V.width,X=V.height;return L(K,X),H.observe(A.current),function(){H.disconnect()}},[L,y]);var D=P.useMemo(function(){var U=I.containerWidth,H=I.containerHeight;if(U<0||H<0)return null;Sn(Na(s)||Na(f),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,s,f),Sn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Na(s)?U:s,K=Na(f)?H:f;r&&r>0&&(V?K=V/r:K&&(V=K*r),m&&K>m&&(K=m)),Sn(V>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,V,K,s,f,d,h,r);var X=!Array.isArray(g)&&ci(g.type).endsWith("Chart");return z.Children.map(g,function(B){return z.isValidElement(B)?P.cloneElement(B,Af({width:V,height:K},X?{style:Af({height:"100%",width:"100%",maxHeight:K,maxWidth:V},B.props.style)}:{})):B})},[r,g,f,m,h,d,I,s]);return z.createElement("div",{id:w?"".concat(w):void 0,className:Ue("recharts-responsive-container",S),style:Af(Af({},C),{},{width:s,height:f,minWidth:d,minHeight:h,maxHeight:m}),ref:A},D)}),cp=function(t){return null};cp.displayName="Cell";function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kb(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Qa.isSsr)return{width:0,height:0};var n=dU(r),i=JSON.stringify({text:t,copyStyle:n});if(To.widthCache[i])return To.widthCache[i];try{var a=document.getElementById(xP);a||(a=document.createElement("span"),a.setAttribute("id",xP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=kb(kb({},fU),n);Object.assign(a.style,s),a.textContent="".concat(t);var u=a.getBoundingClientRect(),f={width:u.width,height:u.height};return To.widthCache[i]=f,++To.cacheCount>uU&&(To.cacheCount=0,To.widthCache={}),f}catch{return{width:0,height:0}}},hU=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function Kd(e,t){return gU(e)||vU(e,t)||mU(e,t)||pU()}function pU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mU(e,t){if(e){if(typeof e=="string")return bP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bP(e,t)}}function bP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EP(e,t){return IU(e)||MU(e,t)||RU(e,t)||kU()}function kU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e,t){if(e){if(typeof e=="string")return AP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AP(e,t)}}function AP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,X){var B=X.word,Z=X.width,ee=K[K.length-1];if(ee&&(i==null||a||ee.width+Z+nX.width?K:X})};if(!d)return g;for(var y="…",w=function(V){var K=h.slice(0,V),X=rI({breakAll:c,style:f,children:K+y}).wordsWithComputedWidth,B=m(X),Z=B.length>s||b(B).width>Number(i);return[Z,B]},S=0,O=h.length-1,E=0,C;S<=O&&E<=h.length-1;){var A=Math.floor((S+O)/2),N=A-1,T=w(N),R=EP(T,2),I=R[0],q=R[1],L=w(A),D=EP(L,1),U=D[0];if(!I&&!U&&(S=A+1),I&&U&&(O=A-1),!I&&U){C=q;break}E++}return C||g},PP=function(t){var r=qe(t)?[]:t.toString().split(tI);return[{words:r}]},LU=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,u=t.maxLines;if((r||n)&&!Qa.isSsr){var f,c,d=rI({breakAll:s,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;f=h,c=m}else return PP(i);return DU({breakAll:s,children:i,maxLines:u,style:a},f,c,r,n)}return PP(i)},NP="#808080",$a=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,u=s===void 0?"1em":s,f=t.capHeight,c=f===void 0?"0.71em":f,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,y=b===void 0?"end":b,w=t.fill,S=w===void 0?NP:w,O=jP(t,NU),E=P.useMemo(function(){return LU({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),C=O.dx,A=O.dy,N=O.angle,T=O.className,R=O.breakAll,I=jP(O,CU);if(!zt(n)||!zt(a))return null;var q=n+(he(C)?C:0),L=a+(he(A)?A:0),D;switch(y){case"start":D=ex("calc(".concat(c,")"));break;case"middle":D=ex("calc(".concat((E.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:D=ex("calc(".concat(E.length-1," * -").concat(u,")"));break}var U=[];if(h){var H=E[0].width,V=O.width;U.push("scale(".concat((he(V)?V/H:1)/H,")"))}return N&&U.push("rotate(".concat(N,", ").concat(q,", ").concat(L,")")),U.length&&(I.transform=U.join(" ")),z.createElement("text",Rb({},Me(I,!0),{x:q,y:L,className:Ue("recharts-text",T),textAnchor:g,fill:S.includes("url")?NP:S}),E.map(function(K,X){var B=K.words.join(R?"":" ");return z.createElement("tspan",{x:q,dy:X===0?D:u,key:"".concat(B,"-").concat(X)},B)}))};function Vi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $U(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Pw(e){let t,r,n;e.length!==2?(t=Vi,r=(u,f)=>Vi(e(u),f),n=(u,f)=>e(u)-f):(t=e===Vi||e===$U?e:BU,r=e,n=e);function i(u,f,c=0,d=u.length){if(c>>1;r(u[h],f)<0?c=h+1:d=h}while(c>>1;r(u[h],f)<=0?c=h+1:d=h}while(cc&&n(u[h-1],f)>-n(u[h],f)?h-1:h}return{left:i,center:s,right:a}}function BU(){return 0}function nI(e){return e===null?NaN:+e}function*zU(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const FU=Pw(Vi),Zc=FU.right;Pw(nI).center;class CP extends Map{constructor(t,r=WU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(TP(this,t))}has(t){return super.has(TP(this,t))}set(t,r){return super.set(qU(this,t),r)}delete(t){return super.delete(UU(this,t))}}function TP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function qU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function UU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function WU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function HU(e=Vi){if(e===Vi)return iI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const VU=Math.sqrt(50),GU=Math.sqrt(10),KU=Math.sqrt(2);function Xd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=VU?10:a>=GU?5:a>=KU?2:1;let u,f,c;return i<0?(c=Math.pow(10,-i)/s,u=Math.round(e*c),f=Math.round(t*c),u/ct&&--f,c=-c):(c=Math.pow(10,i)*s,u=Math.round(e/c),f=Math.round(t/c),u*ct&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=a-i+1,f=new Array(u);if(n)if(s<0)for(let c=0;c=n)&&(r=n);return r}function RP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aI(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?iI:HU(i);n>r;){if(n-r>600){const f=n-r+1,c=t-r+1,d=Math.log(f),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(f-h)/f)*(c-f/2<0?-1:1),g=Math.max(r,Math.floor(t-c*h/f+m)),b=Math.min(n,Math.floor(t+(f-c)*h/f+m));aI(e,t,g,b,i)}const a=e[t];let s=r,u=n;for(Il(e,r,t),i(e[n],a)>0&&Il(e,r,n);s0;)--u}i(e[r],a)===0?Il(e,r,u):(++u,Il(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Il(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function XU(e,t,r){if(e=Float64Array.from(zU(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RP(e);if(t>=1)return kP(e);var n,i=(n-1)*t,a=Math.floor(i),s=kP(aI(e,a).subarray(0,a+1)),u=RP(e.subarray(a+1));return s+(u-s)*(i-a)}}function YU(e,t,r=nI){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return s+(u-s)*(i-a)}}function QU(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JU.exec(e))?new xr(t[1],t[2],t[3],1):(t=eW.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tW.exec(e))?Nf(t[1],t[2],t[3],t[4]):(t=rW.exec(e))?Nf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nW.exec(e))?zP(t[1],t[2]/100,t[3]/100,1):(t=iW.exec(e))?zP(t[1],t[2]/100,t[3]/100,t[4]):MP.hasOwnProperty(e)?LP(MP[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function LP(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Nf(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function sW(e){return e instanceof Jc||(e=_c(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function $b(e,t,r,n){return arguments.length===1?sW(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Cw(xr,$b,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(Ra(this.r),Ra(this.g),Ra(this.b),Qd(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:$P,formatHex:$P,formatHex8:lW,formatRgb:BP,toString:BP}));function $P(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}`}function lW(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}${Ca((isNaN(this.opacity)?1:this.opacity)*255)}`}function BP(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ra(this.r)}, ${Ra(this.g)}, ${Ra(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ra(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ca(e){return e=Ra(e),(e<16?"0":"")+e.toString(16)}function zP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,r,n)}function lI(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof Jc||(e=_c(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,u=a-i,f=(a+i)/2;return u?(t===a?s=(r-n)/u+(r0&&f<1?0:s,new _n(s,u,f,e.opacity)}function cW(e,t,r,n){return arguments.length===1?lI(e):new _n(e,t,r,n??1)}function _n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cw(_n,cW,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xr(tx(e>=240?e-240:e+120,i,n),tx(e,i,n),tx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _n(FP(this.h),Cf(this.s),Cf(this.l),Qd(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=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${FP(this.h)}, ${Cf(this.s)*100}%, ${Cf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FP(e){return e=(e||0)%360,e<0?e+360:e}function Cf(e){return Math.max(0,Math.min(1,e||0))}function tx(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Tw=e=>()=>e;function uW(e,t){return function(r){return e+r*t}}function fW(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function dW(e){return(e=+e)==1?cI:function(t,r){return r-t?fW(t,r,e):Tw(isNaN(t)?r:t)}}function cI(e,t){var r=t-e;return r?uW(e,r):Tw(isNaN(e)?t:e)}const qP=(function e(t){var r=dW(t);function n(i,a){var s=r((i=$b(i)).r,(a=$b(a)).r),u=r(i.g,a.g),f=r(i.b,a.b),c=cI(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=u(d),i.b=f(d),i.opacity=c(d),i+""}}return n.gamma=e,n})(1);function hW(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,f.push({i:s,x:Zd(n,i)})),r=rx.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function OW(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?jW:OW,f=c=null,h}function h(m){return m==null||isNaN(m=+m)?a:(f||(f=u(e.map(n),t,r)))(n(s(m)))}return h.invert=function(m){return s(i((c||(c=u(t,e.map(n),Zd)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Jd),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),r=kw,d()},h.clamp=function(m){return arguments.length?(s=m?!0:fr,d()):s!==fr},h.interpolate=function(m){return arguments.length?(r=m,d()):r},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return n=m,i=g,d()}}function Rw(){return up()(fr,fr)}function EW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function us(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function AW(e,t){return function(r,n){for(var i=r.length,a=[],s=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),a.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[s=(s+1)%e.length];return a.reverse().join(t)}}function PW(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var NW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sc(e){if(!(t=NW.exec(e)))throw new Error("invalid format: "+e);var t;return new Mw({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]})}Sc.prototype=Mw.prototype;function Mw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Mw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function CW(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var th;function TW(e,t){var r=eh(e,t);if(!r)return th=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(th=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function WP(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const HP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:EW,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)=>WP(e*100,t),r:WP,s:TW,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function VP(e){return e}var GP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kW(e){var t=e.grouping===void 0||e.thousands===void 0?VP:AW(GP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?VP:PW(GP.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(h,m){h=Sc(h);var g=h.fill,b=h.align,y=h.sign,w=h.symbol,S=h.zero,O=h.width,E=h.comma,C=h.precision,A=h.trim,N=h.type;N==="n"?(E=!0,N="g"):HP[N]||(C===void 0&&(C=12),A=!0,N="g"),(S||g==="0"&&b==="=")&&(S=!0,g="0",b="=");var T=(m&&m.prefix!==void 0?m.prefix:"")+(w==="$"?r:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?n:/[%p]/.test(N)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),I=HP[N],q=/[defgprs%]/.test(N);C=C===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function L(D){var U=T,H=R,V,K,X;if(N==="c")H=I(D)+H,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?f:I(Math.abs(D),C),A&&(D=CW(D)),B&&+D==0&&y!=="+"&&(B=!1),U=(B?y==="("?y:u:y==="-"||y==="("?"":y)+U,H=(N==="s"&&!isNaN(D)&&th!==void 0?KP[8+th/3]:"")+H+(B&&y==="("?")":""),q){for(V=-1,K=D.length;++VX||X>57){H=(X===46?i+D.slice(V+1):D.slice(V))+H,D=D.slice(0,V);break}}}E&&!S&&(D=t(D,1/0));var Z=U.length+D.length+H.length,ee=Z>1)+U+D+H+ee.slice(Z);break;default:D=ee+U+D+H;break}return a(D)}return L.toString=function(){return h+""},L}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(us(m)/3)))*3,b=Math.pow(10,-g),y=c((h=Sc(h),h.type="f",h),{suffix:KP[8+g/3]});return function(w){return y(b*w)}}return{format:c,formatPrefix:d}}var Tf,Iw,uI;RW({thousands:",",grouping:[3],currency:["$",""]});function RW(e){return Tf=kW(e),Iw=Tf.format,uI=Tf.formatPrefix,Tf}function MW(e){return Math.max(0,-us(Math.abs(e)))}function IW(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(us(t)/3)))*3-us(Math.abs(e)))}function DW(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,us(t)-us(e))+1}function fI(e,t,r,n){var i=Db(e,t,r),a;switch(n=Sc(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=IW(i,s))&&(n.precision=a),uI(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=DW(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=MW(i))&&(n.precision=a-(n.type==="%")*2);break}}return Iw(n)}function Zi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return fI(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],u=n[a],f,c,d=10;for(u0;){if(c=Ib(s,u,r),c===f)return n[i]=s,n[a]=u,t(n);if(c>0)s=Math.floor(s/c)*c,u=Math.ceil(u/c)*c;else if(c<0)s=Math.ceil(s*c)/c,u=Math.floor(u*c)/c;else break;f=c}return e},e}function rh(){var e=Rw();return e.copy=function(){return eu(e,rh())},sn.apply(e,arguments),Zi(e)}function dI(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return dI(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],Zi(r)}function hI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return aMath.pow(e,t)}function FW(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function QP(e){return(t,r)=>-e(-t,r)}function Dw(e){const t=e(XP,YP),r=t.domain;let n=10,i,a;function s(){return i=FW(n),a=zW(n),r()[0]<0?(i=QP(i),a=QP(a),e(LW,$W)):e(XP,YP),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const f=r();let c=f[0],d=f[f.length-1];const h=d0){for(;m<=g;++m)for(b=1;bd)break;S.push(y)}}else for(;m<=g;++m)for(b=n-1;b>=1;--b)if(y=m>0?b/a(-m):b*a(m),!(yd)break;S.push(y)}S.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Sc(f)).precision==null&&(f.trim=!0),f=Iw(f)),u===1/0)return f;const c=Math.max(1,n*u/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*nr(hI(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function pI(){const e=Dw(up()).domain([1,10]);return e.copy=()=>eu(e,pI()).base(e.base()),sn.apply(e,arguments),e}function ZP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lw(e){var t=1,r=e(ZP(t),JP(t));return r.constant=function(n){return arguments.length?e(ZP(t=+n),JP(t)):t},Zi(r)}function mI(){var e=Lw(up());return e.copy=function(){return eu(e,mI()).constant(e.constant())},sn.apply(e,arguments)}function eN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qW(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function UW(e){return e<0?-e*e:e*e}function $w(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(qW,UW):e(eN(r),eN(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Zi(t)}function Bw(){var e=$w(up());return e.copy=function(){return eu(e,Bw()).exponent(e.exponent())},sn.apply(e,arguments),e}function WW(){return Bw.apply(null,arguments).exponent(.5)}function tN(e){return Math.sign(e)*e*e}function HW(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vI(){var e=Rw(),t=[0,1],r=!1,n;function i(a){var s=HW(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(tN(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(tN)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return vI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sn.apply(i,arguments),Zi(i)}function gI(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[c-1],n[c]]},s.unknown=function(f){return arguments.length&&(a=f),s},s.thresholds=function(){return n.slice()},s.copy=function(){return yI().domain([e,t]).range(i).unknown(a)},sn.apply(Zi(s),arguments)}function xI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Zc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return xI().domain(e).range(t).unknown(r)},sn.apply(i,arguments)}const nx=new Date,ix=new Date;function Ft(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const f=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a0))return f;let c;do f.push(c=new Date(+a)),t(a,u),e(a);while(cFt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!a(s););else for(;--u>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(nx.setTime(+a),ix.setTime(+s),e(nx),e(ix),Math.floor(r(nx,ix))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const nh=Ft(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ft(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):nh);nh.range;const oi=1e3,nn=oi*60,si=nn*60,di=si*24,zw=di*7,rN=di*30,ax=di*365,Ta=Ft(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCSeconds());Ta.range;const Fw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getMinutes());Fw.range;const qw=Ft(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCMinutes());qw.range;const Uw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi-e.getMinutes()*nn)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getHours());Uw.range;const Ww=Ft(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getUTCHours());Ww.range;const tu=Ft(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nn)/di,e=>e.getDate()-1);tu.range;const fp=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>e.getUTCDate()-1);fp.range;const bI=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>Math.floor(e/di));bI.range;function Za(e){return Ft(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*nn)/zw)}const dp=Za(0),ih=Za(1),VW=Za(2),GW=Za(3),fs=Za(4),KW=Za(5),XW=Za(6);dp.range;ih.range;VW.range;GW.range;fs.range;KW.range;XW.range;function Ja(e){return Ft(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/zw)}const hp=Ja(0),ah=Ja(1),YW=Ja(2),QW=Ja(3),ds=Ja(4),ZW=Ja(5),JW=Ja(6);hp.range;ah.range;YW.range;QW.range;ds.range;ZW.range;JW.range;const Hw=Ft(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hw.range;const Vw=Ft(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vw.range;const hi=Ft(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());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});hi.range;const pi=Ft(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());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});pi.range;function wI(e,t,r,n,i,a){const s=[[Ta,1,oi],[Ta,5,5*oi],[Ta,15,15*oi],[Ta,30,30*oi],[a,1,nn],[a,5,5*nn],[a,15,15*nn],[a,30,30*nn],[i,1,si],[i,3,3*si],[i,6,6*si],[i,12,12*si],[n,1,di],[n,2,2*di],[r,1,zw],[t,1,rN],[t,3,3*rN],[e,1,ax]];function u(c,d,h){const m=dw).right(s,m);if(g===s.length)return e.every(Db(c/ax,d/ax,h));if(g===0)return nh.every(Math.max(Db(c,d,h),1));const[b,y]=s[m/s[g-1][2]53)return null;"w"in re||(re.w=1),"Z"in re?(Te=sx(Dl(re.y,0,1)),Ke=Te.getUTCDay(),Te=Ke>4||Ke===0?ah.ceil(Te):ah(Te),Te=fp.offset(Te,(re.V-1)*7),re.y=Te.getUTCFullYear(),re.m=Te.getUTCMonth(),re.d=Te.getUTCDate()+(re.w+6)%7):(Te=ox(Dl(re.y,0,1)),Ke=Te.getDay(),Te=Ke>4||Ke===0?ih.ceil(Te):ih(Te),Te=tu.offset(Te,(re.V-1)*7),re.y=Te.getFullYear(),re.m=Te.getMonth(),re.d=Te.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Ke="Z"in re?sx(Dl(re.y,0,1)).getUTCDay():ox(Dl(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Ke+5)%7:re.w+re.U*7-(Ke+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,sx(re)):ox(re)}}function R(ie,ue,ve,re){for(var De=0,Te=ue.length,Ke=ve.length,lt,vt;De=Ke)return-1;if(lt=ue.charCodeAt(De++),lt===37){if(lt=ue.charAt(De++),vt=A[lt in nN?ue.charAt(De++):lt],!vt||(re=vt(ie,ve,re))<0)return-1}else if(lt!=ve.charCodeAt(re++))return-1}return re}function I(ie,ue,ve){var re=c.exec(ue.slice(ve));return re?(ie.p=d.get(re[0].toLowerCase()),ve+re[0].length):-1}function q(ie,ue,ve){var re=g.exec(ue.slice(ve));return re?(ie.w=b.get(re[0].toLowerCase()),ve+re[0].length):-1}function L(ie,ue,ve){var re=h.exec(ue.slice(ve));return re?(ie.w=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function D(ie,ue,ve){var re=S.exec(ue.slice(ve));return re?(ie.m=O.get(re[0].toLowerCase()),ve+re[0].length):-1}function U(ie,ue,ve){var re=y.exec(ue.slice(ve));return re?(ie.m=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function H(ie,ue,ve){return R(ie,t,ue,ve)}function V(ie,ue,ve){return R(ie,r,ue,ve)}function K(ie,ue,ve){return R(ie,n,ue,ve)}function X(ie){return s[ie.getDay()]}function B(ie){return a[ie.getDay()]}function Z(ie){return f[ie.getMonth()]}function ee(ie){return u[ie.getMonth()]}function M(ie){return i[+(ie.getHours()>=12)]}function $(ie){return 1+~~(ie.getMonth()/3)}function Q(ie){return s[ie.getUTCDay()]}function ae(ie){return a[ie.getUTCDay()]}function pe(ie){return f[ie.getUTCMonth()]}function ye(ie){return u[ie.getUTCMonth()]}function oe(ie){return i[+(ie.getUTCHours()>=12)]}function me(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ue=N(ie+="",E);return ue.toString=function(){return ie},ue},parse:function(ie){var ue=T(ie+="",!1);return ue.toString=function(){return ie},ue},utcFormat:function(ie){var ue=N(ie+="",C);return ue.toString=function(){return ie},ue},utcParse:function(ie){var ue=T(ie+="",!0);return ue.toString=function(){return ie},ue}}}var nN={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,aH=/^%/,oH=/[\\^$*+?|[\]().{}]/g;function et(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function lH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function uH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=Gt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hH(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function pH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function oN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function gH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bH(e,t,r){var n=Gt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wH(e,t,r){var n=aH.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _H(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function SH(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function lN(e,t){return et(e.getDate(),t,2)}function OH(e,t){return et(e.getHours(),t,2)}function jH(e,t){return et(e.getHours()%12||12,t,2)}function EH(e,t){return et(1+tu.count(hi(e),e),t,3)}function _I(e,t){return et(e.getMilliseconds(),t,3)}function AH(e,t){return _I(e,t)+"000"}function PH(e,t){return et(e.getMonth()+1,t,2)}function NH(e,t){return et(e.getMinutes(),t,2)}function CH(e,t){return et(e.getSeconds(),t,2)}function TH(e){var t=e.getDay();return t===0?7:t}function kH(e,t){return et(dp.count(hi(e)-1,e),t,2)}function SI(e){var t=e.getDay();return t>=4||t===0?fs(e):fs.ceil(e)}function RH(e,t){return e=SI(e),et(fs.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function MH(e){return e.getDay()}function IH(e,t){return et(ih.count(hi(e)-1,e),t,2)}function DH(e,t){return et(e.getFullYear()%100,t,2)}function LH(e,t){return e=SI(e),et(e.getFullYear()%100,t,2)}function $H(e,t){return et(e.getFullYear()%1e4,t,4)}function BH(e,t){var r=e.getDay();return e=r>=4||r===0?fs(e):fs.ceil(e),et(e.getFullYear()%1e4,t,4)}function zH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+et(t/60|0,"0",2)+et(t%60,"0",2)}function cN(e,t){return et(e.getUTCDate(),t,2)}function FH(e,t){return et(e.getUTCHours(),t,2)}function qH(e,t){return et(e.getUTCHours()%12||12,t,2)}function UH(e,t){return et(1+fp.count(pi(e),e),t,3)}function OI(e,t){return et(e.getUTCMilliseconds(),t,3)}function WH(e,t){return OI(e,t)+"000"}function HH(e,t){return et(e.getUTCMonth()+1,t,2)}function VH(e,t){return et(e.getUTCMinutes(),t,2)}function GH(e,t){return et(e.getUTCSeconds(),t,2)}function KH(e){var t=e.getUTCDay();return t===0?7:t}function XH(e,t){return et(hp.count(pi(e)-1,e),t,2)}function jI(e){var t=e.getUTCDay();return t>=4||t===0?ds(e):ds.ceil(e)}function YH(e,t){return e=jI(e),et(ds.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function QH(e){return e.getUTCDay()}function ZH(e,t){return et(ah.count(pi(e)-1,e),t,2)}function JH(e,t){return et(e.getUTCFullYear()%100,t,2)}function eV(e,t){return e=jI(e),et(e.getUTCFullYear()%100,t,2)}function tV(e,t){return et(e.getUTCFullYear()%1e4,t,4)}function rV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ds(e):ds.ceil(e),et(e.getUTCFullYear()%1e4,t,4)}function nV(){return"+0000"}function uN(){return"%"}function fN(e){return+e}function dN(e){return Math.floor(+e/1e3)}var ko,EI,AI;iV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iV(e){return ko=iH(e),EI=ko.format,ko.parse,AI=ko.utcFormat,ko.utcParse,ko}function aV(e){return new Date(e)}function oV(e){return e instanceof Date?+e:+new Date(+e)}function Gw(e,t,r,n,i,a,s,u,f,c){var d=Rw(),h=d.invert,m=d.domain,g=c(".%L"),b=c(":%S"),y=c("%I:%M"),w=c("%I %p"),S=c("%a %d"),O=c("%b %d"),E=c("%B"),C=c("%Y");function A(N){return(f(N)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>XU(e,a/n))},r.copy=function(){return TI(t).domain(e)},bi.apply(r,arguments)}function mp(){var e=0,t=.5,r=1,n=1,i,a,s,u,f,c=fr,d,h=!1,m;function g(y){return isNaN(y=+y)?m:(y=.5+((y=+d(y))-a)*(n*yr}return cx=e,cx}var ux,vN;function fV(){if(vN)return ux;vN=1;var e=vp(),t=II(),r=Ls();function n(i){return i&&i.length?e(i,r,t):void 0}return ux=n,ux}var dV=fV();const gp=it(dV);var fx,gN;function DI(){if(gN)return fx;gN=1;function e(t,r){return te.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};we.decimalPlaces=we.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*xt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};we.dividedBy=we.div=function(e){return ui(this,new this.constructor(e))};we.dividedToIntegerBy=we.idiv=function(e){var t=this,r=t.constructor;return ft(ui(t,new r(e),0,1),r.precision)};we.equals=we.eq=function(e){return!this.cmp(e)};we.exponent=function(){return kt(this)};we.greaterThan=we.gt=function(e){return this.cmp(e)>0};we.greaterThanOrEqualTo=we.gte=function(e){return this.cmp(e)>=0};we.isInteger=we.isint=function(){return this.e>this.d.length-2};we.isNegative=we.isneg=function(){return this.s<0};we.isPositive=we.ispos=function(){return this.s>0};we.isZero=function(){return this.s===0};we.lessThan=we.lt=function(e){return this.cmp(e)<0};we.lessThanOrEqualTo=we.lte=function(e){return this.cmp(e)<1};we.logarithm=we.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Br))throw Error(an+"NaN");if(r.s<1)throw Error(an+(r.s?"NaN":"-Infinity"));return r.eq(Br)?new n(0):(wt=!1,t=ui(Oc(r,a),Oc(e,a),a),wt=!0,ft(t,i))};we.minus=we.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zI(t,e):$I(t,(e.s=-e.s,e))};we.modulo=we.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(an+"NaN");return r.s?(wt=!1,t=ui(r,e,0,1).times(e),wt=!0,r.minus(t)):ft(new n(r),i)};we.naturalExponential=we.exp=function(){return BI(this)};we.naturalLogarithm=we.ln=function(){return Oc(this)};we.negated=we.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};we.plus=we.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$I(t,e):zI(t,(e.s=-e.s,e))};we.precision=we.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ma+e);if(t=kt(i)+1,n=i.d.length-1,r=n*xt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};we.squareRoot=we.sqrt=function(){var e,t,r,n,i,a,s,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(an+"NaN")}for(e=kt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=In(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(a=n,n=a.plus(ui(u,a,s+2)).times(.5),In(a.d).slice(0,s)===(t=In(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(ft(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;s+=4}return wt=!0,ft(n,r)};we.times=we.mul=function(e){var t,r,n,i,a,s,u,f,c,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,r=d.e+e.e,f=m.length,c=g.length,f=0;){for(t=0,i=f+n;i>n;)u=a[i]+g[n]*m[i-n-1]+t,a[i--]=u%Ht|0,t=u/Ht|0;a[i]=(a[i]+t)%Ht|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,wt?ft(e,h.precision):e};we.toDecimalPlaces=we.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zn(e,0,Bs),t===void 0?t=n.rounding:zn(t,0,8),ft(r,e+kt(r)+1,t))};we.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ba(n,!0):(zn(e,0,Bs),t===void 0?t=i.rounding:zn(t,0,8),n=ft(new i(n),e+1,t),r=Ba(n,!0,e+1)),r};we.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ba(i):(zn(e,0,Bs),t===void 0?t=a.rounding:zn(t,0,8),n=ft(new a(i),e+kt(i)+1,t),r=Ba(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};we.toInteger=we.toint=function(){var e=this,t=e.constructor;return ft(new t(e),kt(e)+1,t.rounding)};we.toNumber=function(){return+this};we.toPower=we.pow=function(e){var t,r,n,i,a,s,u=this,f=u.constructor,c=12,d=+(e=new f(e));if(!e.s)return new f(Br);if(u=new f(u),!u.s){if(e.s<1)throw Error(an+"Infinity");return u}if(u.eq(Br))return u;if(n=f.precision,e.eq(Br))return ft(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=u.s,s){if((r=d<0?-d:d)<=LI){for(i=new f(Br),t=Math.ceil(n/xt+4),wt=!1;r%2&&(i=i.times(u),SN(i.d,t)),r=zs(r/2),r!==0;)u=u.times(u),SN(u.d,t);return wt=!0,e.s<0?new f(Br).div(i):ft(i,n)}}else if(a<0)throw Error(an+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,wt=!1,i=e.times(Oc(u,n+c)),wt=!0,i=BI(i),i.s=a,i};we.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=kt(i),n=Ba(i,r<=a.toExpNeg||r>=a.toExpPos)):(zn(e,1,Bs),t===void 0?t=a.rounding:zn(t,0,8),i=ft(new a(i),e,t),r=kt(i),n=Ba(i,e<=r||r<=a.toExpNeg,e)),n};we.toSignificantDigits=we.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zn(e,1,Bs),t===void 0?t=n.rounding:zn(t,0,8)),ft(new n(r),e,t)};we.toString=we.valueOf=we.val=we.toJSON=we[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return Ba(e,t<=r.toExpNeg||t>=r.toExpPos)};function $I(e,t){var r,n,i,a,s,u,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),wt?ft(t,h):t;if(f=e.d,c=t.d,s=e.e,i=t.e,f=f.slice(),a=s-i,a){for(a<0?(n=f,a=-a,u=c.length):(n=c,i=s,u=f.length),s=Math.ceil(h/xt),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=f.length,a=c.length,u-a<0&&(a=u,n=c,c=f,f=n),r=0;a;)r=(f[--a]=f[a]+c[a]+r)/Ht|0,f[a]%=Ht;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,wt?ft(t,h):t}function zn(e,t,r){if(e!==~~e||er)throw Error(Ma+e)}function In(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]1;)n.shift()}return function(n,i,a,s){var u,f,c,d,h,m,g,b,y,w,S,O,E,C,A,N,T,R,I=n.constructor,q=n.s==i.s?1:-1,L=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(an+"Division by zero");for(f=n.e-i.e,T=D.length,A=L.length,g=new I(q),b=g.d=[],c=0;D[c]==(L[c]||0);)++c;if(D[c]>(L[c]||0)&&--f,a==null?O=a=I.precision:s?O=a+(kt(n)-kt(i))+1:O=a,O<0)return new I(0);if(O=O/xt+2|0,c=0,T==1)for(d=0,D=D[0],O++;(c1&&(D=e(D,d),L=e(L,d),T=D.length,A=L.length),C=T,y=L.slice(0,T),w=y.length;w=Ht/2&&++N;do d=0,u=t(D,y,T,w),u<0?(S=y[0],T!=w&&(S=S*Ht+(y[1]||0)),d=S/N|0,d>1?(d>=Ht&&(d=Ht-1),h=e(D,d),m=h.length,w=y.length,u=t(h,y,m,w),u==1&&(d--,r(h,T16)throw Error(Yw+kt(e));if(!e.s)return new d(Br);for(wt=!1,u=h,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(n=Math.log(Aa(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new d(Br),d.precision=u;;){if(i=ft(i.times(e),u),r=r.times(++f),s=a.plus(ui(i,r,u)),In(s.d).slice(0,u)===In(a.d).slice(0,u)){for(;c--;)a=ft(a.times(a),u);return d.precision=h,t==null?(wt=!0,ft(a,h)):a}a=s}}function kt(e){for(var t=e.e*xt,r=e.d[0];r>=10;r/=10)t++;return t}function vx(e,t,r){if(t>e.LN10.sd())throw wt=!0,r&&(e.precision=r),Error(an+"LN10 precision limit exceeded");return ft(new e(e.LN10),t)}function Ui(e){for(var t="";e--;)t+="0";return t}function Oc(e,t){var r,n,i,a,s,u,f,c,d,h=1,m=10,g=e,b=g.d,y=g.constructor,w=y.precision;if(g.s<1)throw Error(an+(g.s?"NaN":"-Infinity"));if(g.eq(Br))return new y(0);if(t==null?(wt=!1,c=w):c=t,g.eq(10))return t==null&&(wt=!0),vx(y,c);if(c+=m,y.precision=c,r=In(b),n=r.charAt(0),a=kt(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=In(g.d),n=r.charAt(0),h++;a=kt(g),n>1?(g=new y("0."+r),a++):g=new y(n+"."+r.slice(1))}else return f=vx(y,c+2,w).times(a+""),g=Oc(new y(n+"."+r.slice(1)),c-m).plus(f),y.precision=w,t==null?(wt=!0,ft(g,w)):g;for(u=s=g=ui(g.minus(Br),g.plus(Br),c),d=ft(g.times(g),c),i=3;;){if(s=ft(s.times(d),c),f=u.plus(ui(s,new y(i),c)),In(f.d).slice(0,c)===In(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(vx(y,c+2,w).times(a+""))),u=ui(u,new y(h),c),y.precision=w,t==null?(wt=!0,ft(u,w)):u;u=f,i+=2}}function _N(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=zs(r/xt),e.d=[],n=(r+1)%xt,r<0&&(n+=xt),noh||e.e<-oh))throw Error(Yw+r)}else e.s=0,e.e=0,e.d=[0];return e}function ft(e,t,r){var n,i,a,s,u,f,c,d,h=e.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=xt,i=t,c=h[d=0];else{if(d=Math.ceil((n+1)/xt),a=h.length,d>=a)return e;for(c=a=h[d],s=1;a>=10;a/=10)s++;n%=xt,i=n-xt+s}if(r!==void 0&&(a=Aa(10,s-i-1),u=c/a%10|0,f=t<0||h[d+1]!==void 0||c%a,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?c/Aa(10,s-i):0:h[d-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return f?(a=kt(e),h.length=1,t=t-a-1,h[0]=Aa(10,(xt-t%xt)%xt),e.e=zs(-t/xt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=d,a=1,d--):(h.length=d+1,a=Aa(10,xt-n),h[d]=i>0?(c/Aa(10,s-i)%Aa(10,i)|0)*a:0),f)for(;;)if(d==0){(h[0]+=a)==Ht&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Ht)break;h[d--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(wt&&(e.e>oh||e.e<-oh))throw Error(Yw+kt(e));return e}function zI(e,t){var r,n,i,a,s,u,f,c,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),wt?ft(t,g):t;if(f=e.d,h=t.d,n=t.e,c=e.e,f=f.slice(),s=c-n,s){for(d=s<0,d?(r=f,s=-s,u=h.length):(r=h,n=c,u=f.length),i=Math.max(Math.ceil(g/xt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=h.length,d=i0;--i)f[u++]=0;for(i=h.length;i>s;){if(f[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ui(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ui(-i-1)+a,r&&(n=r-s)>0&&(a+=Ui(n))):i>=s?(a+=Ui(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ui(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=Ui(n))),e.s<0?"-"+a:a}function SN(e,t){if(e.length>t)return e.length=t,!0}function FI(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ma+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return _N(s,a.toString())}else if(typeof a!="string")throw Error(Ma+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,_V.test(a))_N(s,a);else throw Error(Ma+a)}if(i.prototype=we,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=FI,i.config=i.set=SV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ma+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ma+r+": "+n);return this}var Qw=FI(wV);Br=new Qw(1);const ut=Qw;function OV(e){return PV(e)||AV(e)||EV(e)||jV()}function jV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EV(e,t){if(e){if(typeof e=="string")return Fb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fb(e,t)}}function AV(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function PV(e){if(Array.isArray(e))return Fb(e)}function Fb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-s,ON(function(){for(var u=arguments.length,f=new Array(u),c=0;ce.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(f){i=!0,a=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function UV(e){if(Array.isArray(e))return e}function VI(e){var t=jc(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function GI(e,t,r){if(e.lte(0))return new ut(0);var n=bp.getDigitCount(e.toNumber()),i=new ut(10).pow(n),a=e.div(i),s=n!==1?.05:.1,u=new ut(Math.ceil(a.div(s).toNumber())).add(r).mul(s),f=u.mul(i);return t?f:new ut(Math.ceil(f))}function WV(e,t,r){var n=1,i=new ut(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ut(10).pow(bp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):r||(i=new ut(Math.floor(e)));var s=Math.floor((t-1)/2),u=kV(TV(function(f){return i.add(new ut(f-s).mul(n)).toNumber()}),qb);return u(0,t)}function KI(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var a=GI(new ut(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new ut(0):(s=new ut(e).add(t).div(2),s=s.sub(new ut(s).mod(a)));var u=Math.ceil(s.sub(e).div(a).toNumber()),f=Math.ceil(new ut(t).sub(s).div(a).toNumber()),c=u+f+1;return c>r?KI(e,t,r,n,i+1):(c0?f+(r-c):f,u=t>0?u:u+(r-c)),{step:a,tickMin:s.sub(new ut(u).mul(a)),tickMax:s.add(new ut(f).mul(a))})}function HV(e){var t=jc(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=VI([r,n]),f=jc(u,2),c=f[0],d=f[1];if(c===-1/0||d===1/0){var h=d===1/0?[c].concat(Wb(qb(0,i-1).map(function(){return 1/0}))):[].concat(Wb(qb(0,i-1).map(function(){return-1/0})),[d]);return r>n?Ub(h):h}if(c===d)return WV(c,i,a);var m=KI(c,d,s,a),g=m.step,b=m.tickMin,y=m.tickMax,w=bp.rangeStep(b,y.add(new ut(.1).mul(g)),g);return r>n?Ub(w):w}function VV(e,t){var r=jc(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=VI([n,i]),u=jc(s,2),f=u[0],c=u[1];if(f===-1/0||c===1/0)return[n,i];if(f===c)return[f];var d=Math.max(t,2),h=GI(new ut(c).sub(f).div(d-1),a,0),m=[].concat(Wb(bp.rangeStep(new ut(f),new ut(c).sub(new ut(.99).mul(h)),h)),[c]);return n>i?Ub(m):m}var GV=WI(HV),KV=WI(VV),XV="Invariant failed";function za(e,t){throw new Error(XV)}var YV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aG(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n?.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?i[c-1].coordinate:i[u-1].coordinate,h=i[c].coordinate,m=c>=u-1?i[0].coordinate:i[c+1].coordinate,g=void 0;if(cr(h-d)!==cr(m-h)){var b=[];if(cr(m-h)===cr(f[1]-f[0])){g=m;var y=h+f[1]-f[0];b[0]=Math.min(y,(y+d)/2),b[1]=Math.max(y,(y+d)/2)}else{g=d;var w=m+f[1]-f[0];b[0]=Math.min(h,(w+h)/2),b[1]=Math.max(h,(w+h)/2)}var S=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>S[0]&&t<=S[1]||t>=b[0]&&t<=b[1]){s=i[c].index;break}}else{var O=Math.min(d,m),E=Math.max(d,m);if(t>(O+h)/2&&t<=(E+h)/2){s=i[c].index;break}}}else for(var C=0;C0&&C(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===u-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){s=n[C].index;break}return s},Zw=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,s=a.stroke,u=a.fill,f;switch(i){case"Line":f=s;break;case"Area":case"Radar":f=s&&s!=="none"?s:u;break;default:f=u;break}return f},_G=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},u=Object.keys(a),f=0,c=u.length;f=0});if(S&&S.length){var O=S[0].type.defaultProps,E=O!==void 0?At(At({},O),S[0].props):S[0].props,C=E.barSize,A=E[w];s[A]||(s[A]=[]);var N=qe(C)?r:C;s[A].push({item:S[0],stackList:S.slice(1),barSize:qe(N)?void 0:ur(N,n,0)})}}return s},SG=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,u=t.maxBarSize,f=s.length;if(f<1)return null;var c=ur(r,i,0,!0),d,h=[];if(s[0].barSize===+s[0].barSize){var m=!1,g=i/f,b=s.reduce(function(C,A){return C+A.barSize||0},0);b+=(f-1)*c,b>=i&&(b-=(f-1)*c,c=0),b>=i&&g>0&&(m=!0,g*=.9,b=f*g);var y=(i-b)/2>>0,w={offset:y-c,size:0};d=s.reduce(function(C,A){var N={item:A.item,position:{offset:w.offset+w.size+c,size:m?g:A.barSize}},T=[].concat(AN(C),[N]);return w=T[T.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(R){T.push({item:R,position:w})}),T},h)}else{var S=ur(n,i,0,!0);i-2*S-(f-1)*c<=0&&(c=0);var O=(i-2*S-(f-1)*c)/f;O>1&&(O>>=0);var E=u===+u?Math.min(O,u):O;d=s.reduce(function(C,A,N){var T=[].concat(AN(C),[{item:A.item,position:{offset:S+(O+c)*N+(O-E)/2,size:E}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(R){T.push({item:R,position:T[T.length-1].position})}),T},h)}return d},OG=function(t,r,n,i){var a=n.children,s=n.width,u=n.margin,f=s-(u.left||0)-(u.right||0),c=ZI({children:a,legendWidth:f});if(c){var d=i||{},h=d.width,m=d.height,g=c.align,b=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&b==="middle")&&g!=="center"&&he(t[g]))return At(At({},t),{},Jo({},g,t[g]+(h||0)));if((y==="horizontal"||y==="vertical"&&g==="center")&&b!=="middle"&&he(t[b]))return At(At({},t),{},Jo({},b,t[b]+(m||0)))}return t},jG=function(t,r,n){return qe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},JI=function(t,r,n,i,a){var s=r.props.children,u=Fr(s,nu).filter(function(c){return jG(i,a,c.props.direction)});if(u&&u.length){var f=u.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var h=Bt(d,n);if(qe(h))return c;var m=Array.isArray(h)?[yp(h),gp(h)]:[h,h],g=f.reduce(function(b,y){var w=Bt(d,y,0),S=m[0]-Math.abs(Array.isArray(w)?w[0]:w),O=m[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(S,b[0]),Math.max(O,b[1])]},[1/0,-1/0]);return[Math.min(g[0],c[0]),Math.max(g[1],c[1])]},[1/0,-1/0])}return null},EG=function(t,r,n,i,a){var s=r.map(function(u){return JI(t,u,n,a,i)}).filter(function(u){return!qe(u)});return s&&s.length?s.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]):null},eD=function(t,r,n,i,a){var s=r.map(function(f){var c=f.props.dataKey;return n==="number"&&c&&JI(t,f,c,i)||nc(t,c,n,a)});if(n==="number")return s.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var u={};return s.reduce(function(f,c){for(var d=0,h=c.length;d=2?cr(u[0]-u[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(h){var m=a?a.indexOf(h):h;return{coordinate:i(m)+c,value:h,offset:c}});return d.filter(function(h){return!Yc(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,m){return{coordinate:i(h)+c,value:h,index:m,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+c,value:h,offset:c}}):i.domain().map(function(h,m){return{coordinate:i(h)+c,value:a?a[h]:h,index:m,offset:c}})},gx=new WeakMap,kf=function(t,r){if(typeof r!="function")return t;gx.has(t)||gx.set(t,new WeakMap);var n=gx.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},nD=function(t,r,n){var i=t.scale,a=t.type,s=t.layout,u=t.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:xc(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:rh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:rc(),realScaleType:"point"}:a==="category"?{scale:xc(),realScaleType:"band"}:{scale:rh(),realScaleType:"linear"};if(Da(i)){var f="scale".concat(rp(i));return{scale:(hN[f]||rc)(),realScaleType:hN[f]?f:"point"}}return ze(i)?{scale:i}:{scale:rc(),realScaleType:"point"}},NN=1e-4,iD=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-NN,s=Math.max(i[0],i[1])+NN,u=t(r[0]),f=t(r[n-1]);(us||fs)&&t.domain([r[0],r[n-1]])}},AG=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[u][n][0]=a,t[u][n][1]=a+f,a=t[u][n][1]):(t[u][n][0]=s,t[u][n][1]=s+f,s=t[u][n][1])}},CG=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[s][n][0]=a,t[s][n][1]=a+u,a=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},TG={sign:NG,expand:yq,none:as,silhouette:xq,wiggle:bq,positive:CG},kG=function(t,r,n){var i=r.map(function(u){return u.props.dataKey}),a=TG[n],s=gq().keys(i).value(function(u,f){return+Bt(u,f,0)}).order(Sb).offset(a);return s(t)},RG=function(t,r,n,i,a,s){if(!t)return null;var u=s?r.reverse():r,f={},c=u.reduce(function(h,m){var g,b=(g=m.type)!==null&&g!==void 0&&g.defaultProps?At(At({},m.type.defaultProps),m.props):m.props,y=b.stackId,w=b.hide;if(w)return h;var S=b[n],O=h[S]||{hasStack:!1,stackGroups:{}};if(zt(y)){var E=O.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};E.items.push(m),O.hasStack=!0,O.stackGroups[y]=E}else O.stackGroups[Ds("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return At(At({},h),{},Jo({},S,O))},f),d={};return Object.keys(c).reduce(function(h,m){var g=c[m];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(y,w){var S=g.stackGroups[w];return At(At({},y),{},Jo({},w,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:kG(t,S.items,a)}))},b)}return At(At({},h),{},Jo({},m,g))},d)},aD=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,u=r.allowDecimals,f=n||r.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=GV(c,a,u);return t.domain([yp(d),gp(d)]),{niceTicks:d}}if(a&&i==="number"){var h=t.domain(),m=KV(h,a,u);return{niceTicks:m}}return null};function CN(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!qe(i[t.dataKey])){var u=Dd(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var f=Bt(i,qe(s)?t.dataKey:s);return qe(f)?null:t.scale(f)}var TN=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,u=t.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var f=Bt(s,r.dataKey,r.domain[u]);return qe(f)?null:r.scale(f)-a/2+i},MG=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},IG=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(zt(a)){var s=r[a];if(s){var u=s.items.indexOf(t);return u>=0?s.stackedData[u]:null}}return null},DG=function(t){return t.reduce(function(r,n){return[yp(n.concat([r[0]]).filter(he)),gp(n.concat([r[1]]).filter(he))]},[1/0,-1/0])},oD=function(t,r,n){return Object.keys(t).reduce(function(i,a){var s=t[a],u=s.stackedData,f=u.reduce(function(c,d){var h=DG(d.slice(r,n+1));return[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},kN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,RN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Kb=function(t,r,n){if(ze(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(he(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(kN.test(t[0])){var a=+kN.exec(t[0])[1];i[0]=r[0]-a}else ze(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(he(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(RN.test(t[1])){var s=+RN.exec(t[1])[1];i[1]=r[1]+s}else ze(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},ch=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Ew(r,function(h){return h.coordinate}),s=1/0,u=1,f=a.length;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},HG=function(t,r,n,i,a){var s=t.width,u=t.height,f=t.startAngle,c=t.endAngle,d=ur(t.cx,s,s/2),h=ur(t.cy,u,u/2),m=cD(s,u,n),g=ur(t.innerRadius,m,0),b=ur(t.outerRadius,m,m*.8),y=Object.keys(r);return y.reduce(function(w,S){var O=r[S],E=O.domain,C=O.reversed,A;if(qe(O.range))i==="angleAxis"?A=[f,c]:i==="radiusAxis"&&(A=[g,b]),C&&(A=[A[1],A[0]]);else{A=O.range;var N=A,T=BG(N,2);f=T[0],c=T[1]}var R=nD(O,a),I=R.realScaleType,q=R.scale;q.domain(E).range(A),iD(q);var L=aD(q,ai(ai({},O),{},{realScaleType:I})),D=ai(ai(ai({},O),L),{},{range:A,radius:b,realScaleType:I,scale:q,cx:d,cy:h,innerRadius:g,outerRadius:b,startAngle:f,endAngle:c});return ai(ai({},w),{},lD({},S,D))},{})},VG=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},GG=function(t,r){var n=t.x,i=t.y,a=r.cx,s=r.cy,u=VG({x:n,y:i},{x:a,y:s});if(u<=0)return{radius:u};var f=(n-a)/u,c=Math.acos(f);return i>s&&(c=2*Math.PI-c),{radius:u,angle:WG(c),angleInRadian:c}},KG=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},XG=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(a,s);return t+u*360},LN=function(t,r){var n=t.x,i=t.y,a=GG({x:n,y:i},r),s=a.radius,u=a.angle,f=r.innerRadius,c=r.outerRadius;if(sc)return!1;if(s===0)return!0;var d=KG(r),h=d.startAngle,m=d.endAngle,g=u,b;if(h<=m){for(;g>m;)g-=360;for(;g=h&&g<=m}else{for(;g>h;)g-=360;for(;g=m&&g<=h}return b?ai(ai({},r),{},{radius:s,angle:XG(g,r)}):null},uD=function(t){return!P.isValidElement(t)&&!ze(t)&&typeof t!="boolean"?t.className:""};function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}var YG=["offset"];function QG(e){return tK(e)||eK(e)||JG(e)||ZG()}function ZG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JG(e,t){if(e){if(typeof e=="string")return Xb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xb(e,t)}}function eK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tK(e){if(Array.isArray(e))return Xb(e)}function Xb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t=0?1:-1,E,C;i==="insideStart"?(E=g+O*s,C=y):i==="insideEnd"?(E=b-O*s,C=!y):i==="end"&&(E=b+O*s,C=y),C=S<=0?C:!C;var A=mt(c,d,w,E),N=mt(c,d,w,E+(C?1:-1)*359),T="M".concat(A.x,",").concat(A.y,` - A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`, - `).concat(N.x,",").concat(N.y),R=qe(t.id)?Ds("recharts-radial-line-"):t.id;return z.createElement("text",Cc({},n,{dominantBaseline:"central",className:Ue("recharts-radial-bar-label",u)}),z.createElement("defs",null,z.createElement("path",{id:R,d:T})),z.createElement("textPath",{xlinkHref:"#".concat(R)},r))},uK=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,s=a.cx,u=a.cy,f=a.innerRadius,c=a.outerRadius,d=a.startAngle,h=a.endAngle,m=(d+h)/2;if(i==="outside"){var g=mt(s,u,c+n,m),b=g.x,y=g.y;return{x:b,y,textAnchor:b>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var w=(f+c)/2,S=mt(s,u,w,m),O=S.x,E=S.y;return{x:O,y:E,textAnchor:"middle",verticalAnchor:"middle"}},fK=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,s=r,u=s.x,f=s.y,c=s.width,d=s.height,h=d>=0?1:-1,m=h*i,g=h>0?"end":"start",b=h>0?"start":"end",y=c>=0?1:-1,w=y*i,S=y>0?"end":"start",O=y>0?"start":"end";if(a==="top"){var E={x:u+c/2,y:f-h*i,textAnchor:"middle",verticalAnchor:g};return $t($t({},E),n?{height:Math.max(f-n.y,0),width:c}:{})}if(a==="bottom"){var C={x:u+c/2,y:f+d+m,textAnchor:"middle",verticalAnchor:b};return $t($t({},C),n?{height:Math.max(n.y+n.height-(f+d),0),width:c}:{})}if(a==="left"){var A={x:u-w,y:f+d/2,textAnchor:S,verticalAnchor:"middle"};return $t($t({},A),n?{width:Math.max(A.x-n.x,0),height:d}:{})}if(a==="right"){var N={x:u+c+w,y:f+d/2,textAnchor:O,verticalAnchor:"middle"};return $t($t({},N),n?{width:Math.max(n.x+n.width-N.x,0),height:d}:{})}var T=n?{width:c,height:d}:{};return a==="insideLeft"?$t({x:u+w,y:f+d/2,textAnchor:O,verticalAnchor:"middle"},T):a==="insideRight"?$t({x:u+c-w,y:f+d/2,textAnchor:S,verticalAnchor:"middle"},T):a==="insideTop"?$t({x:u+c/2,y:f+m,textAnchor:"middle",verticalAnchor:b},T):a==="insideBottom"?$t({x:u+c/2,y:f+d-m,textAnchor:"middle",verticalAnchor:g},T):a==="insideTopLeft"?$t({x:u+w,y:f+m,textAnchor:O,verticalAnchor:b},T):a==="insideTopRight"?$t({x:u+c-w,y:f+m,textAnchor:S,verticalAnchor:b},T):a==="insideBottomLeft"?$t({x:u+w,y:f+d-m,textAnchor:O,verticalAnchor:g},T):a==="insideBottomRight"?$t({x:u+c-w,y:f+d-m,textAnchor:S,verticalAnchor:g},T):Is(a)&&(he(a.x)||Na(a.x))&&(he(a.y)||Na(a.y))?$t({x:u+ur(a.x,c),y:f+ur(a.y,d),textAnchor:"end",verticalAnchor:"end"},T):$t({x:u+c/2,y:f+d/2,textAnchor:"middle",verticalAnchor:"middle"},T)},dK=function(t){return"cx"in t&&he(t.cx)};function Vt(e){var t=e.offset,r=t===void 0?5:t,n=rK(e,YG),i=$t({offset:r},n),a=i.viewBox,s=i.position,u=i.value,f=i.children,c=i.content,d=i.className,h=d===void 0?"":d,m=i.textBreakAll;if(!a||qe(u)&&qe(f)&&!P.isValidElement(c)&&!ze(c))return null;if(P.isValidElement(c))return P.cloneElement(c,i);var g;if(ze(c)){if(g=P.createElement(c,i),P.isValidElement(g))return g}else g=sK(i);var b=dK(a),y=Me(i,!0);if(b&&(s==="insideStart"||s==="insideEnd"||s==="end"))return cK(i,g,y);var w=b?uK(i):fK(i);return z.createElement($a,Cc({className:Ue("recharts-label",h)},y,w,{breakAll:m}),g)}Vt.displayName="Label";var fD=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,u=t.r,f=t.radius,c=t.innerRadius,d=t.outerRadius,h=t.x,m=t.y,g=t.top,b=t.left,y=t.width,w=t.height,S=t.clockWise,O=t.labelViewBox;if(O)return O;if(he(y)&&he(w)){if(he(h)&&he(m))return{x:h,y:m,width:y,height:w};if(he(g)&&he(b))return{x:g,y:b,width:y,height:w}}return he(h)&&he(m)?{x:h,y:m,width:0,height:0}:he(r)&&he(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:c||0,outerRadius:d||f||u||0,clockWise:S}:t.viewBox?t.viewBox:{}},hK=function(t,r){return t?t===!0?z.createElement(Vt,{key:"label-implicit",viewBox:r}):zt(t)?z.createElement(Vt,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===Vt?P.cloneElement(t,{key:"label-implicit",viewBox:r}):z.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):ze(t)?z.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):Is(t)?z.createElement(Vt,Cc({viewBox:r},t,{key:"label-implicit"})):null:null},pK=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=fD(t),s=Fr(i,Vt).map(function(f,c){return P.cloneElement(f,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return s;var u=hK(t.label,r||a);return[u].concat(QG(s))};Vt.parseViewBox=fD;Vt.renderCallByParent=pK;var yx,BN;function mK(){if(BN)return yx;BN=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return yx=e,yx}var vK=mK();const gK=it(vK);function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}var yK=["valueAccessor"],xK=["data","dataKey","clockWise","id","textBreakAll"];function bK(e){return OK(e)||SK(e)||_K(e)||wK()}function wK(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(e,t){if(e){if(typeof e=="string")return Yb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yb(e,t)}}function SK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OK(e){if(Array.isArray(e))return Yb(e)}function Yb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var NK=function(t){return Array.isArray(t.value)?gK(t.value):t.value};function fi(e){var t=e.valueAccessor,r=t===void 0?NK:t,n=qN(e,yK),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,f=n.textBreakAll,c=qN(n,xK);return!i||!i.length?null:z.createElement(Ze,{className:"recharts-label-list"},i.map(function(d,h){var m=qe(a)?r(d,h):Bt(d&&d.payload,a),g=qe(u)?{}:{id:"".concat(u,"-").concat(h)};return z.createElement(Vt,fh({},Me(d,!0),c,g,{parentViewBox:d.parentViewBox,value:m,textBreakAll:f,viewBox:Vt.parseViewBox(qe(s)?d:FN(FN({},d),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}fi.displayName="LabelList";function CK(e,t){return e?e===!0?z.createElement(fi,{key:"labelList-implicit",data:t}):z.isValidElement(e)||ze(e)?z.createElement(fi,{key:"labelList-implicit",data:t,content:e}):Is(e)?z.createElement(fi,fh({data:t},e,{key:"labelList-implicit"})):null:null}function TK(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Fr(n,fi).map(function(s,u){return P.cloneElement(s,{data:t,key:"labelList-".concat(u)})});if(!r)return i;var a=CK(e.label,t);return[a].concat(bK(i))}fi.renderCallByParent=TK;function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>c),`, - `).concat(h.x,",").concat(h.y,` - `);if(i>0){var g=mt(r,n,i,s),b=mt(r,n,i,c);m+="L ".concat(b.x,",").concat(b.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(f)>180),",").concat(+(s<=c),`, - `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},DK=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,h=cr(d-c),m=Rf({cx:r,cy:n,radius:a,angle:c,sign:h,cornerRadius:s,cornerIsExternal:f}),g=m.circleTangency,b=m.lineTangency,y=m.theta,w=Rf({cx:r,cy:n,radius:a,angle:d,sign:-h,cornerRadius:s,cornerIsExternal:f}),S=w.circleTangency,O=w.lineTangency,E=w.theta,C=f?Math.abs(c-d):Math.abs(c-d)-y-E;if(C<0)return u?"M ".concat(b.x,",").concat(b.y,` - a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 - a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 - `):dD({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d});var A="M ".concat(b.x,",").concat(b.y,` - A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,` - A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,` - A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,` - `);if(i>0){var N=Rf({cx:r,cy:n,radius:i,angle:c,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),T=N.circleTangency,R=N.lineTangency,I=N.theta,q=Rf({cx:r,cy:n,radius:i,angle:d,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),L=q.circleTangency,D=q.lineTangency,U=q.theta,H=f?Math.abs(c-d):Math.abs(c-d)-I-U;if(H<0&&s===0)return"".concat(A,"L").concat(r,",").concat(n,"Z");A+="L".concat(D.x,",").concat(D.y,` - A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(L.x,",").concat(L.y,` - A`).concat(i,",").concat(i,",0,").concat(+(H>180),",").concat(+(h>0),",").concat(T.x,",").concat(T.y,` - A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else A+="L".concat(r,",").concat(n,"Z");return A},LK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hD=function(t){var r=WN(WN({},LK),t),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,f=r.forceCornerRadius,c=r.cornerIsExternal,d=r.startAngle,h=r.endAngle,m=r.className;if(s0&&Math.abs(d-h)<360?w=DK({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(y,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:d,endAngle:h}):w=dD({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:d,endAngle:h}),z.createElement("path",Qb({},Me(r,!0),{className:g,d:w,role:"img"}))};function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;tXK.call(e,t));function eo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ZK="__v",JK="__o",eX="_owner",{getOwnPropertyDescriptor:ZN,keys:JN}=Object;function tX(e,t){return e.byteLength===t.byteLength&&hh(new Uint8Array(e),new Uint8Array(t))}function rX(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function nX(e,t){return e.byteLength===t.byteLength&&hh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function iX(e,t){return eo(e.getTime(),t.getTime())}function aX(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function oX(e,t){return e===t}function eC(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let s,u,f=0;for(;(s=a.next())&&!s.done;){const c=t.entries();let d=!1,h=0;for(;(u=c.next())&&!u.done;){if(i[h]){h++;continue}const m=s.value,g=u.value;if(r.equals(m[0],g[0],f,h,e,t,r)&&r.equals(m[1],g[1],m[0],g[0],e,t,r)){d=i[h]=!0;break}h++}if(!d)return!1;f++}return!0}const sX=eo;function lX(e,t,r){const n=JN(e);let i=n.length;if(JN(t).length!==i)return!1;for(;i-- >0;)if(!pD(e,t,r,n[i]))return!1;return!0}function Fl(e,t,r){const n=QN(e);let i=n.length;if(QN(t).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!pD(e,t,r,a)||(s=ZN(e,a),u=ZN(t,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function cX(e,t){return eo(e.valueOf(),t.valueOf())}function uX(e,t){return e.source===t.source&&e.flags===t.flags}function tC(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let s,u;for(;(s=a.next())&&!s.done;){const f=t.values();let c=!1,d=0;for(;(u=f.next())&&!u.done;){if(!i[d]&&r.equals(s.value,u.value,s.value,u.value,e,t,r)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function hh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function fX(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function pD(e,t,r,n){return(n===eX||n===JK||n===ZK)&&(e.$$typeof||t.$$typeof)?!0:QK(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const dX="[object ArrayBuffer]",hX="[object Arguments]",pX="[object Boolean]",mX="[object DataView]",vX="[object Date]",gX="[object Error]",yX="[object Map]",xX="[object Number]",bX="[object Object]",wX="[object RegExp]",_X="[object Set]",SX="[object String]",OX={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},jX="[object URL]",EX=Object.prototype.toString;function AX({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:h,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:b}){return function(w,S,O){if(w===S)return!0;if(w==null||S==null)return!1;const E=typeof w;if(E!==typeof S)return!1;if(E!=="object")return E==="number"?u(w,S,O):E==="function"?a(w,S,O):!1;const C=w.constructor;if(C!==S.constructor)return!1;if(C===Object)return f(w,S,O);if(Array.isArray(w))return t(w,S,O);if(C===Date)return n(w,S,O);if(C===RegExp)return d(w,S,O);if(C===Map)return s(w,S,O);if(C===Set)return h(w,S,O);const A=EX.call(w);if(A===vX)return n(w,S,O);if(A===wX)return d(w,S,O);if(A===yX)return s(w,S,O);if(A===_X)return h(w,S,O);if(A===bX)return typeof w.then!="function"&&typeof S.then!="function"&&f(w,S,O);if(A===jX)return g(w,S,O);if(A===gX)return i(w,S,O);if(A===hX)return f(w,S,O);if(OX[A])return m(w,S,O);if(A===dX)return e(w,S,O);if(A===mX)return r(w,S,O);if(A===pX||A===xX||A===SX)return c(w,S,O);if(b){let N=b[A];if(!N){const T=YK(w);T&&(N=b[T])}if(N)return N(w,S,O)}return!1}}function PX({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:tX,areArraysEqual:r?Fl:rX,areDataViewsEqual:nX,areDatesEqual:iX,areErrorsEqual:aX,areFunctionsEqual:oX,areMapsEqual:r?_x(eC,Fl):eC,areNumbersEqual:sX,areObjectsEqual:r?Fl:lX,arePrimitiveWrappersEqual:cX,areRegExpsEqual:uX,areSetsEqual:r?_x(tC,Fl):tC,areTypedArraysEqual:r?_x(hh,Fl):hh,areUrlsEqual:fX,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=If(n.areArraysEqual),a=If(n.areMapsEqual),s=If(n.areObjectsEqual),u=If(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function NX(e){return function(t,r,n,i,a,s,u){return e(t,r,u)}}function CX({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(u,f){const{cache:c=e?new WeakMap:void 0,meta:d}=r();return t(u,f,{cache:c,equals:n,meta:d,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,f){return t(u,f,a)}}const TX=ea();ea({strict:!0});ea({circular:!0});ea({circular:!0,strict:!0});ea({createInternalComparator:()=>eo});ea({strict:!0,createInternalComparator:()=>eo});ea({circular:!0,createInternalComparator:()=>eo});ea({circular:!0,createInternalComparator:()=>eo,strict:!0});function ea(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=PX(e),s=AX(a),u=r?r(s):NX(s);return CX({circular:t,comparator:s,createState:n,equals:u,strict:i})}function kX(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function rC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):kX(i)};requestAnimationFrame(n)}function Jb(e){"@babel/helpers - typeof";return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jb(e)}function RX(e){return LX(e)||DX(e)||IX(e)||MX()}function MX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IX(e,t){if(e){if(typeof e=="string")return nC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nC(e,t)}}function nC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:S<0?0:S},y=function(S){for(var O=S>1?1:S,E=O,C=0;C<8;++C){var A=h(E)-O,N=g(E);if(Math.abs(A-O)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,s=t.dt,u=s===void 0?17:s,f=function(d,h,m){var g=-(d-h)*n,b=m*a,y=m+(g-b)*u/1e3,w=m*u/1e3+d;return Math.abs(w-h)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pY(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function Sx(e){return yY(e)||gY(e)||vY(e)||mY()}function mY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vY(e,t){if(e){if(typeof e=="string")return i1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i1(e,t)}}function gY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yY(e){if(Array.isArray(e))return i1(e)}function i1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vh(e){return vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vh(e)}var Fn=(function(e){SY(r,e);var t=OY(r);function r(n,i){var a;xY(this,r),a=t.call(this,n,i);var s=a.props,u=s.isActive,f=s.attributeName,c=s.from,d=s.to,h=s.steps,m=s.children,g=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(s1(a)),a.changeStyle=a.changeStyle.bind(s1(a)),!u||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:d}),o1(a);if(h&&h.length)a.state={style:h[0].style};else if(c){if(typeof m=="function")return a.state={style:c},o1(a);a.state={style:f?Ql({},f,c):c}}else a.state={style:{}};return a}return wY(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,u=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,d=a.to,h=a.from,m=this.state.style;if(u){if(!s){var g={style:f?Ql({},f,d):d};this.state&&m&&(f&&m[f]!==d||!f&&m!==d)&&this.setState(g);return}if(!(TX(i.to,d)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=b||c?h:i.to;if(this.state&&m){var w={style:f?Ql({},f,y):y};(f&&m[f]!==y||!f&&m!==y)&&this.setState(w)}this.runAnimation(mn(mn({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,u=i.to,f=i.duration,c=i.easing,d=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=fY(s,u,eY(c),f,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([m,d,b,f,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,u=i.begin,f=i.onAnimationStart,c=s[0],d=c.style,h=c.duration,m=h===void 0?0:h,g=function(y,w,S){if(S===0)return y;var O=w.duration,E=w.easing,C=E===void 0?"ease":E,A=w.style,N=w.properties,T=w.onAnimationEnd,R=S>0?s[S-1]:w,I=N||Object.keys(A);if(typeof C=="function"||C==="spring")return[].concat(Sx(y),[a.runJSAnimation.bind(a,{from:R.style,to:A,duration:O,easing:C}),O]);var q=oC(I,O,C),L=mn(mn(mn({},R.style),A),{},{transition:q});return[].concat(Sx(y),[L,O,T]).filter(qX)};return this.manager.start([f].concat(Sx(s.reduce(g,[d,Math.max(m,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=$X());var a=i.begin,s=i.duration,u=i.attributeName,f=i.to,c=i.easing,d=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof g=="function"||c==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var y=u?Ql({},u,f):f,w=oC(Object.keys(y),s,c);b.start([d,a,mn(mn({},y),{},{transition:w}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=hY(i,dY),c=P.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!u||c===0||s<=0)return a;var h=function(g){var b=g.props,y=b.style,w=y===void 0?{}:y,S=b.className,O=P.cloneElement(g,mn(mn({},f),{},{style:mn(mn({},w),d),className:S}));return O};return c===1?h(P.Children.only(a)):z.createElement("div",null,P.Children.map(a,function(m){return h(m)}))}}]),r})(P.PureComponent);Fn.displayName="Animate";Fn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Fn.propTypes={from:ot.oneOfType([ot.object,ot.string]),to:ot.oneOfType([ot.object,ot.string]),attributeName:ot.string,duration:ot.number,begin:ot.number,easing:ot.oneOfType([ot.string,ot.func]),steps:ot.arrayOf(ot.shape({duration:ot.number.isRequired,style:ot.object.isRequired,easing:ot.oneOfType([ot.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ot.func]),properties:ot.arrayOf("string"),onAnimationEnd:ot.func})),children:ot.oneOfType([ot.node,ot.func]),isActive:ot.bool,canBegin:ot.bool,onAnimationEnd:ot.func,shouldReAnimate:ot.bool,onAnimationStart:ot.func,onAnimationReStart:ot.func};function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,f=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,d;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],m=0,g=4;ms?s:a[m];d="M".concat(t,",").concat(r+u*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(t+f*h[0],",").concat(r)),d+="L ".concat(t+n-f*h[1],",").concat(r),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`, - `).concat(t+n,",").concat(r+u*h[1])),d+="L ".concat(t+n,",").concat(r+i-u*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`, - `).concat(t+n-f*h[2],",").concat(r+i)),d+="L ".concat(t+f*h[3],",").concat(r+i),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`, - `).concat(t,",").concat(r+i-u*h[3])),d+="Z"}else if(s>0&&a===+a&&a>0){var b=Math.min(s,a);d="M ".concat(t,",").concat(r+u*b,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+f*b,",").concat(r,` - L `).concat(t+n-f*b,",").concat(r,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+n,",").concat(r+u*b,` - L `).concat(t+n,",").concat(r+i-u*b,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+n-f*b,",").concat(r+i,` - L `).concat(t+f*b,",").concat(r+i,` - A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t,",").concat(r+i-u*b," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},MY=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,s=r.y,u=r.width,f=r.height;if(Math.abs(u)>0&&Math.abs(f)>0){var c=Math.min(a,a+u),d=Math.max(a,a+u),h=Math.min(s,s+f),m=Math.max(s,s+f);return n>=c&&n<=d&&i>=h&&i<=m}return!1},IY={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Jw=function(t){var r=pC(pC({},IY),t),n=P.useRef(),i=P.useState(-1),a=EY(i,2),s=a[0],u=a[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var C=n.current.getTotalLength();C&&u(C)}catch{}},[]);var f=r.x,c=r.y,d=r.width,h=r.height,m=r.radius,g=r.className,b=r.animationEasing,y=r.animationDuration,w=r.animationBegin,S=r.isAnimationActive,O=r.isUpdateAnimationActive;if(f!==+f||c!==+c||d!==+d||h!==+h||d===0||h===0)return null;var E=Ue("recharts-rectangle",g);return O?z.createElement(Fn,{canBegin:s>0,from:{width:d,height:h,x:f,y:c},to:{width:d,height:h,x:f,y:c},duration:y,animationEasing:b,isActive:O},function(C){var A=C.width,N=C.height,T=C.x,R=C.y;return z.createElement(Fn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,isActive:S,easing:b},z.createElement("path",gh({},Me(r,!0),{className:E,d:mC(T,R,A,N,m),ref:n})))}):z.createElement("path",gh({},Me(r,!0),{className:E,d:mC(f,c,d,h,m)}))},DY=["points","className","baseLinePoints","connectNulls"];function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $Y(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vC(e){return qY(e)||FY(e)||zY(e)||BY()}function BY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zY(e,t){if(e){if(typeof e=="string")return l1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l1(e,t)}}function FY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qY(e){if(Array.isArray(e))return l1(e)}function l1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){gC(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),gC(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ac=function(t,r){var n=UY(t);r&&(n=[n.reduce(function(a,s){return[].concat(vC(a),vC(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,u,f){return"".concat(s).concat(f===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},WY=function(t,r,n){var i=ac(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(ac(r.reverse(),n).slice(1))},HY=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,s=LY(t,DY);if(!r||!r.length)return null;var u=Ue("recharts-polygon",n);if(i&&i.length){var f=s.stroke&&s.stroke!=="none",c=WY(r,i,a);return z.createElement("g",{className:u},z.createElement("path",Ho({},Me(s,!0),{fill:c.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:c})),f?z.createElement("path",Ho({},Me(s,!0),{fill:"none",d:ac(r,a)})):null,f?z.createElement("path",Ho({},Me(s,!0),{fill:"none",d:ac(i,a)})):null)}var d=ac(r,a);return z.createElement("path",Ho({},Me(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:u,d}))};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var JY=function(t,r,n,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},eQ=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.top,u=s===void 0?0:s,f=t.left,c=f===void 0?0:f,d=t.width,h=d===void 0?0:d,m=t.height,g=m===void 0?0:m,b=t.className,y=QY(t,VY),w=GY({x:n,y:a,top:u,left:c,width:h,height:g},y);return!he(n)||!he(a)||!he(h)||!he(g)||!he(u)||!he(c)?null:z.createElement("path",u1({},Me(w,!0),{className:Ue("recharts-cross",b),d:JY(n,a,h,g,u,c)}))},Ox,xC;function tQ(){if(xC)return Ox;xC=1;var e=vp(),t=II(),r=Vn();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return Ox=n,Ox}var rQ=tQ();const nQ=it(rQ);var jx,bC;function iQ(){if(bC)return jx;bC=1;var e=vp(),t=Vn(),r=DI();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return jx=n,jx}var aQ=iQ();const oQ=it(aQ);var sQ=["cx","cy","angle","ticks","axisLine"],lQ=["ticks","tick","angle","tickFormatter","stroke"];function ms(e){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SC(e,t){for(var r=0;rEC?s=i==="outer"?"start":"end":a<-EC?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,u=n.axisLine,f=n.axisLineType,c=Sa(Sa({},Me(this.props,!1)),{},{fill:"none"},Me(u,!1));if(f==="circle")return z.createElement(wp,Pa({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:s}));var d=this.props.ticks,h=d.map(function(m){return mt(i,a,s,m.coordinate)});return z.createElement(HY,Pa({className:"recharts-polar-angle-axis-line"},c,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.tickLine,f=i.tickFormatter,c=i.stroke,d=Me(this.props,!1),h=Me(s,!1),m=Sa(Sa({},d),{},{fill:"none"},Me(u,!1)),g=a.map(function(b,y){var w=n.getTickLineCoord(b),S=n.getTickTextAnchor(b),O=Sa(Sa(Sa({textAnchor:S},d),{},{stroke:"none",fill:c},h),{},{index:y,payload:b,x:w.x2,y:w.y2});return z.createElement(Ze,Pa({className:Ue("recharts-polar-angle-axis-tick",uD(s)),key:"tick-".concat(b.coordinate)},La(n.props,b,y)),u&&z.createElement("line",Pa({className:"recharts-polar-angle-axis-tick-line"},m,w)),s&&t.renderTickItem(s,O,f?f(b.value,y):b.value))});return z.createElement(Ze,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:z.createElement(Ze,{className:Ue("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return z.isValidElement(n)?s=z.cloneElement(n,i):ze(n)?s=n(i):s=z.createElement($a,Pa({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(P.PureComponent);Op(jp,"displayName","PolarAngleAxis");Op(jp,"axisType","angleAxis");Op(jp,"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 Ex,AC;function jQ(){if(AC)return Ex;AC=1;var e=IM(),t=e(Object.getPrototypeOf,Object);return Ex=t,Ex}var Ax,PC;function EQ(){if(PC)return Ax;PC=1;var e=yi(),t=jQ(),r=xi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,f=s.call(Object);function c(d){if(!r(d)||e(d)!=n)return!1;var h=t(d);if(h===null)return!0;var m=u.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==f}return Ax=c,Ax}var AQ=EQ();const PQ=it(AQ);var Px,NC;function NQ(){if(NC)return Px;NC=1;var e=yi(),t=xi(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return Px=n,Px}var CQ=NQ();const TQ=it(CQ);function $c(e){"@babel/helpers - typeof";return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:m,x:f,y:c},to:{upperWidth:d,lowerWidth:h,height:m,x:f,y:c},duration:y,animationEasing:b,isActive:S},function(E){var C=E.upperWidth,A=E.lowerWidth,N=E.height,T=E.x,R=E.y;return z.createElement(Fn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,easing:b},z.createElement("path",bh({},Me(r,!0),{className:O,d:RC(T,R,C,A,N),ref:n})))}):z.createElement("g",null,z.createElement("path",bh({},Me(r,!0),{className:O,d:RC(f,c,d,h,m)})))},qQ=["option","shapeType","propTransformer","activeClassName","isActive"];function Bc(e){"@babel/helpers - typeof";return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function UQ(e,t){if(e==null)return{};var r=WQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function MC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wh(e){for(var t=1;t0?zr(E,"paddingAngle",0):0;if(A){var T=Lr(A.endAngle-A.startAngle,E.endAngle-E.startAngle),R=ht(ht({},E),{},{startAngle:O+N,endAngle:O+T(y)+N});w.push(R),O=R.endAngle}else{var I=E.endAngle,q=E.startAngle,L=Lr(0,I-q),D=L(y),U=ht(ht({},E),{},{startAngle:O+N,endAngle:O+D+N});w.push(U),O=U.endAngle}}),z.createElement(Ze,null,n.renderSectorsStatically(w))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!ru(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,u=i.className,f=i.label,c=i.cx,d=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!s||!s.length||!he(c)||!he(d)||!he(h)||!he(m))return null;var y=Ue("recharts-pie",u);return z.createElement(Ze,{tabIndex:this.props.rootTabIndex,className:y,ref:function(S){n.pieRef=S}},this.renderSectors(),f&&this.renderLabels(s),Vt.renderCallByParent(this.props,null,!1),(!g||b)&&fi.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?O:O-1)*f,C=w-O*g-E,A=i.reduce(function(R,I){var q=Bt(I,S,0);return R+(he(q)?q:0)},0),N;if(A>0){var T;N=i.map(function(R,I){var q=Bt(R,S,0),L=Bt(R,d,I),D=(he(q)?q:0)/A,U;I?U=T.endAngle+cr(y)*f*(q!==0?1:0):U=s;var H=U+cr(y)*((q!==0?g:0)+D*C),V=(U+H)/2,K=(b.innerRadius+b.outerRadius)/2,X=[{name:L,value:q,payload:R,dataKey:S,type:m}],B=mt(b.cx,b.cy,K,V);return T=ht(ht(ht({percent:D,cornerRadius:a,name:L,tooltipPayload:X,midAngle:V,middleRadius:K,tooltipPosition:B},R),b),{},{value:Bt(R,S),startAngle:U,endAngle:H,payload:R,paddingAngle:cr(y)*f}),T})}return ht(ht({},b),{},{sectors:N,data:i})});var Nx,$C;function fZ(){if($C)return Nx;$C=1;var e=Math.ceil,t=Math.max;function r(n,i,a,s){for(var u=-1,f=t(e((i-n)/(a||1)),0),c=Array(f);f--;)c[s?f:++u]=n,n+=a;return c}return Nx=r,Nx}var Cx,BC;function PD(){if(BC)return Cx;BC=1;var e=QM(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*r}return i===i?i:0}return Cx=n,Cx}var Tx,zC;function dZ(){if(zC)return Tx;zC=1;var e=fZ(),t=lp(),r=PD();function n(i){return function(a,s,u){return u&&typeof u!="number"&&t(a,s,u)&&(s=u=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),u=u===void 0?a0&&n.handleDrag(i.changedTouches[0])}),Rr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,u=i.startIndex;s?.({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Rr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Rr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Rr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Rr(n,"handleSlideDragStart",function(i){var a=VC(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return OZ(t,e),bZ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,u=this.props,f=u.gap,c=u.data,d=c.length-1,h=Math.min(i,a),m=Math.max(i,a),g=t.getIndexInRange(s,h),b=t.getIndexInRange(s,m);return{startIndex:g-g%f,endIndex:b===d?d:b-b%f}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,u=i.dataKey,f=Bt(a[n],u,n);return ze(s)?s(f,n):f}},{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(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,u=i.endX,f=this.props,c=f.x,d=f.width,h=f.travellerWidth,m=f.startIndex,g=f.endIndex,b=f.onChange,y=n.pageX-a;y>0?y=Math.min(y,c+d-h-u,c+d-h-s):y<0&&(y=Math.max(y,c-s,c-u));var w=this.getIndex({startX:s+y,endX:u+y});(w.startIndex!==m||w.endIndex!==g)&&b&&b(w),this.setState({startX:s+y,endX:u+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=VC(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,f=i.startX,c=this.state[s],d=this.props,h=d.x,m=d.width,g=d.travellerWidth,b=d.onChange,y=d.gap,w=d.data,S={startX:this.state.startX,endX:this.state.endX},O=n.pageX-a;O>0?O=Math.min(O,h+m-g-c):O<0&&(O=Math.max(O,h-c)),S[s]=c+O;var E=this.getIndex(S),C=E.startIndex,A=E.endIndex,N=function(){var R=w.length-1;return s==="startX"&&(u>f?C%y===0:A%y===0)||uf?A%y===0:C%y===0)||u>f&&A===R};this.setState(Rr(Rr({},s,c+O),"brushMoveStartX",n.pageX),function(){b&&N()&&b(E)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,u=s.scaleValues,f=s.startX,c=s.endX,d=this.state[i],h=u.indexOf(d);if(h!==-1){var m=h+n;if(!(m===-1||m>=u.length)){var g=u[m];i==="startX"&&g>=c||i==="endX"&&g<=f||this.setState(Rr({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,f=n.fill,c=n.stroke;return z.createElement("rect",{stroke:c,fill:f,x:i,y:a,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,f=n.data,c=n.children,d=n.padding,h=P.Children.only(c);return h?z.cloneElement(h,{x:i,y:a,width:s,height:u,margin:d,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,u=this,f=this.props,c=f.y,d=f.travellerWidth,h=f.height,m=f.traveller,g=f.ariaLabel,b=f.data,y=f.startIndex,w=f.endIndex,S=Math.max(n,this.props.x),O=Rx(Rx({},Me(this.props,!1)),{},{x:S,y:c,width:d,height:h}),E=g||"Min value: ".concat((a=b[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=b[w])===null||s===void 0?void 0:s.name);return z.createElement(Ze,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),u.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,O))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,u=a.height,f=a.stroke,c=a.travellerWidth,d=Math.min(n,i)+c,h=Math.max(Math.abs(i-n)-c,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:d,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,u=n.height,f=n.travellerWidth,c=n.stroke,d=this.state,h=d.startX,m=d.endX,g=5,b={pointerEvents:"none",fill:c};return z.createElement(Ze,{className:"recharts-brush-texts"},z.createElement($a,Oh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:s+u/2},b),this.getTextOfTick(i)),z.createElement($a,Oh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+f+g,y:s+u/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,u=n.x,f=n.y,c=n.width,d=n.height,h=n.alwaysShowText,m=this.state,g=m.startX,b=m.endX,y=m.isTextActive,w=m.isSlideMoving,S=m.isTravellerMoving,O=m.isTravellerFocused;if(!i||!i.length||!he(u)||!he(f)||!he(c)||!he(d)||c<=0||d<=0)return null;var E=Ue("recharts-brush",a),C=z.Children.count(s)===1,A=yZ("userSelect","none");return z.createElement(Ze,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(y||w||S||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,u=n.height,f=n.stroke,c=Math.floor(a+u/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:a,width:s,height:u,fill:f,stroke:"none"}),z.createElement("line",{x1:i+1,y1:c,x2:i+s-1,y2:c,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:c+2,x2:i+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return z.isValidElement(n)?a=z.cloneElement(n,i):ze(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,u=n.x,f=n.travellerWidth,c=n.updateId,d=n.startIndex,h=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return Rx({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:u,prevWidth:s},a&&a.length?EZ({data:a,width:s,x:u,travellerWidth:f,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([u,u+s-f]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,u=a-1;u-s>1;){var f=Math.floor((s+u)/2);n[f]>i?u=f:s=f}return i>=n[u]?u:s}}])})(P.PureComponent);Rr(xs,"displayName","Brush");Rr(xs,"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 Mx,GC;function AZ(){if(GC)return Mx;GC=1;var e=jw();function t(r,n){var i;return e(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return Mx=t,Mx}var Ix,KC;function PZ(){if(KC)return Ix;KC=1;var e=PM(),t=Vn(),r=AZ(),n=Sr(),i=lp();function a(s,u,f){var c=n(s)?e:r;return f&&i(s,u,f)&&(u=void 0),c(s,t(u,3))}return Ix=a,Ix}var NZ=PZ();const CZ=it(NZ);var $n=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Dx,XC;function TZ(){if(XC)return Dx;XC=1;var e=VM();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Dx=t,Dx}var Lx,YC;function kZ(){if(YC)return Lx;YC=1;var e=TZ(),t=WM(),r=Vn();function n(i,a){var s={};return a=r(a,3),t(i,function(u,f,c){e(s,f,a(u,f,c))}),s}return Lx=n,Lx}var RZ=kZ();const MZ=it(RZ);var $x,QC;function IZ(){if(QC)return $x;QC=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function HZ(e,t){var r=e.x,n=e.y,i=UZ(e,BZ),a="".concat(r),s=parseInt(a,10),u="".concat(n),f=parseInt(u,10),c="".concat(t.height||i.height),d=parseInt(c,10),h="".concat(t.width||i.width),m=parseInt(h,10);return ql(ql(ql(ql(ql({},t),i),s?{x:s}:{}),f?{y:f}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function tT(e){return z.createElement(jD,m1({shapeType:"rectangle",propTransformer:HZ,activeClassName:"recharts-active-bar"},e))}var VZ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=he(n)||dF(n);return a?t(n,i):(a||za(),r)}},GZ=["value","background"],RD;function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function KZ(e,t){if(e==null)return{};var r=XZ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(V)0&&Math.abs(H)0&&(U=Math.min((ae||0)-(H[pe-1]||0),U))}),Number.isFinite(U)){var V=U/D,K=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(T=V*K/2),y.padding==="no-gap"){var X=ur(t.barCategoryGap,V*K),B=V*K/2;T=B-X-(B-X)/K*X}}}i==="xAxis"?R=[n.left+(E.left||0)+(T||0),n.left+n.width-(E.right||0)-(T||0)]:i==="yAxis"?R=f==="horizontal"?[n.top+n.height-(E.bottom||0),n.top+(E.top||0)]:[n.top+(E.top||0)+(T||0),n.top+n.height-(E.bottom||0)-(T||0)]:R=y.range,A&&(R=[R[1],R[0]]);var Z=nD(y,a,m),ee=Z.scale,M=Z.realScaleType;ee.domain(S).range(R),iD(ee);var $=aD(ee,bn(bn({},y),{},{realScaleType:M}));i==="xAxis"?(L=w==="top"&&!C||w==="bottom"&&C,I=n.left,q=h[N]-L*y.height):i==="yAxis"&&(L=w==="left"&&!C||w==="right"&&C,I=h[N]-L*y.width,q=n.top);var Q=bn(bn(bn({},y),$),{},{realScaleType:M,x:I,y:q,scale:ee,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return Q.bandSize=ch(Q,$),!y.hide&&i==="xAxis"?h[N]+=(L?-1:1)*Q.height:y.hide||(h[N]+=(L?-1:1)*Q.width),bn(bn({},g),{},Pp({},b,Q))},{})},$D=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},oJ=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return $D({x:r,y:n},{x:i,y:a})},BD=(function(){function e(t){nJ(this,e),this.scale=t}return iJ(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+f}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();Pp(BD,"EPS",1e-4);var e_=function(t){var r=Object.keys(t).reduce(function(n,i){return bn(bn({},n),{},Pp({},i,BD.create(t[i])))},{});return bn(bn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return MZ(i,function(f,c){return r[c].apply(f,{bandAware:s,position:u})})},isInRange:function(i){return kD(i,function(a,s){return r[s].isInRange(a)})}})};function sJ(e){return(e%180+180)%180}var lJ=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=sJ(i),s=a*Math.PI/180,u=Math.atan(n/r),f=s>u&&s-1?f[c?a[d]:d]:void 0}}return Fx=n,Fx}var qx,sT;function uJ(){if(sT)return qx;sT=1;var e=PD();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return qx=t,qx}var Ux,lT;function fJ(){if(lT)return Ux;lT=1;var e=BM(),t=Vn(),r=uJ(),n=Math.max;function i(a,s,u){var f=a==null?0:a.length;if(!f)return-1;var c=u==null?0:r(u);return c<0&&(c=n(f+c,0)),e(a,t(s,3),c)}return Ux=i,Ux}var Wx,cT;function dJ(){if(cT)return Wx;cT=1;var e=cJ(),t=fJ(),r=e(t);return Wx=r,Wx}var hJ=dJ();const pJ=it(hJ);var mJ=tM();const vJ=it(mJ);var gJ=vJ(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("")}),t_=P.createContext(void 0),r_=P.createContext(void 0),zD=P.createContext(void 0),FD=P.createContext({}),qD=P.createContext(void 0),UD=P.createContext(0),WD=P.createContext(0),uT=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=t.clipPathId,u=t.children,f=t.width,c=t.height,d=gJ(a);return z.createElement(t_.Provider,{value:n},z.createElement(r_.Provider,{value:i},z.createElement(FD.Provider,{value:a},z.createElement(zD.Provider,{value:d},z.createElement(qD.Provider,{value:s},z.createElement(UD.Provider,{value:c},z.createElement(WD.Provider,{value:f},u)))))))},yJ=function(){return P.useContext(qD)},HD=function(t){var r=P.useContext(t_);r==null&&za();var n=r[t];return n==null&&za(),n},xJ=function(){var t=P.useContext(t_);return Wi(t)},bJ=function(){var t=P.useContext(r_),r=pJ(t,function(n){return kD(n.domain,Number.isFinite)});return r||Wi(t)},VD=function(t){var r=P.useContext(r_);r==null&&za();var n=r[t];return n==null&&za(),n},wJ=function(){var t=P.useContext(zD);return t},_J=function(){return P.useContext(FD)},n_=function(){return P.useContext(WD)},i_=function(){return P.useContext(UD)};function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function SJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OJ(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function aee(e,t){return JD(e,t+1)}function oee(e,t,r,n,i){for(var a=(n||[]).slice(),s=t.start,u=t.end,f=0,c=1,d=s,h=function(){var b=n?.[f];if(b===void 0)return{v:JD(n,c)};var y=f,w,S=function(){return w===void 0&&(w=r(b,y)),w},O=b.coordinate,E=f===0||Th(e,O,S,d,u);E||(f=0,d=s,c+=1),E&&(d=O+e*(S()/2+i),f+=c)},m;c<=a.length;)if(m=h(),m)return m.v;return[]}function Wc(e){"@babel/helpers - typeof";return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}function yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t0?g.coordinate-w*e:g.coordinate})}else a[m]=g=nr(nr({},g),{},{tickCoord:g.coordinate});var S=Th(e,g.tickCoord,y,u,f);S&&(f=g.tickCoord-e*(y()/2+i),a[m]=nr(nr({},g),{},{isShow:!0}))},d=s-1;d>=0;d--)c(d);return a}function fee(e,t,r,n,i,a){var s=(n||[]).slice(),u=s.length,f=t.start,c=t.end;if(a){var d=n[u-1],h=r(d,u-1),m=e*(d.coordinate+e*h/2-c);s[u-1]=d=nr(nr({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate});var g=Th(e,d.tickCoord,function(){return h},f,c);g&&(c=d.tickCoord-e*(h/2+i),s[u-1]=nr(nr({},d),{},{isShow:!0}))}for(var b=a?u-1:u,y=function(O){var E=s[O],C,A=function(){return C===void 0&&(C=r(E,O)),C};if(O===0){var N=e*(E.coordinate-e*A()/2-f);s[O]=E=nr(nr({},E),{},{tickCoord:N<0?E.coordinate-N*e:E.coordinate})}else s[O]=E=nr(nr({},E),{},{tickCoord:E.coordinate});var T=Th(e,E.tickCoord,A,f,c);T&&(f=E.tickCoord+e*(A()/2+i),s[O]=nr(nr({},E),{},{isShow:!0}))},w=0;w=2?cr(i[1].coordinate-i[0].coordinate):1,S=iee(a,w,g);return f==="equidistantPreserveStart"?oee(w,S,y,i,s):(f==="preserveStart"||f==="preserveStartEnd"?m=fee(w,S,y,i,s,f==="preserveStartEnd"):m=uee(w,S,y,i,s),m.filter(function(O){return O.isShow}))}var dee=["viewBox"],hee=["viewBox"],pee=["ticks"];function Os(e){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bT(e,t){for(var r=0;r0?f(this.props):f(g)),s<=0||u<=0||!b||!b.length?null:z.createElement(Ze,{className:Ue("recharts-cartesian-axis",c),ref:function(w){n.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Vt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=Ue(i.className,"recharts-cartesian-axis-tick-value");return z.isValidElement(n)?s=z.cloneElement(n,Lt(Lt({},i),{},{className:u})):ze(n)?s=n(Lt(Lt({},i),{},{className:u})):s=z.createElement($a,Go({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(P.Component);l_(Fs,"displayName","CartesianAxis");l_(Fs,"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 See=["x1","y1","x2","y2","key"],Oee=["offset"];function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function wT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Nee=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,s=t.width,u=t.height,f=t.ry;return z.createElement("rect",{x:i,y:a,ry:f,width:s,height:u,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function rL(e,t){var r;if(z.isValidElement(e))r=z.cloneElement(e,t);else if(ze(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,s=t.y2,u=t.key,f=_T(t,See),c=Me(f,!1);c.offset;var d=_T(c,Oee);r=z.createElement("line",ka({},d,{x1:n,y1:i,x2:a,y2:s,fill:"none",key:u}))}return r}function Cee(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(u,f){var c=ir(ir({},e),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(f),index:f});return rL(i,c)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Tee(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(u,f){var c=ir(ir({},e),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(f),index:f});return rL(i,c)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function kee(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,s=e.height,u=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!t||!t.length)return null;var d=u.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],y=b?i+s-m:d[g+1]-m;if(y<=0)return null;var w=g%t.length;return z.createElement("rect",{key:"react-".concat(g),y:m,x:n,height:y,width:a,stroke:"none",fill:t[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Ree(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,s=e.y,u=e.width,f=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var d=c.map(function(m){return Math.round(m+a-a)}).sort(function(m,g){return m-g});a!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],y=b?a+u-m:d[g+1]-m;if(y<=0)return null;var w=g%n.length;return z.createElement("rect",{key:"react-".concat(g),x:m,y:s,width:y,height:f,stroke:"none",fill:n[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var Mee=function(t,r){var n=t.xAxis,i=t.width,a=t.height,s=t.offset;return rD(s_(ir(ir(ir({},Fs.defaultProps),n),{},{ticks:li(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.left,s.left+s.width,r)},Iee=function(t,r){var n=t.yAxis,i=t.width,a=t.height,s=t.offset;return rD(s_(ir(ir(ir({},Fs.defaultProps),n),{},{ticks:li(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.top,s.top+s.height,r)},Ro={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Rh(e){var t,r,n,i,a,s,u=n_(),f=i_(),c=_J(),d=ir(ir({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ro.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ro.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ro.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ro.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ro.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:Ro.verticalFill,x:he(e.x)?e.x:c.left,y:he(e.y)?e.y:c.top,width:he(e.width)?e.width:c.width,height:he(e.height)?e.height:c.height}),h=d.x,m=d.y,g=d.width,b=d.height,y=d.syncWithTicks,w=d.horizontalValues,S=d.verticalValues,O=xJ(),E=bJ();if(!he(g)||g<=0||!he(b)||b<=0||!he(h)||h!==+h||!he(m)||m!==+m)return null;var C=d.verticalCoordinatesGenerator||Mee,A=d.horizontalCoordinatesGenerator||Iee,N=d.horizontalPoints,T=d.verticalPoints;if((!N||!N.length)&&ze(A)){var R=w&&w.length,I=A({yAxis:E?ir(ir({},E),{},{ticks:R?w:E.ticks}):void 0,width:u,height:f,offset:c},R?!0:y);Sn(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Fa(I),"]")),Array.isArray(I)&&(N=I)}if((!T||!T.length)&&ze(C)){var q=S&&S.length,L=C({xAxis:O?ir(ir({},O),{},{ticks:q?S:O.ticks}):void 0,width:u,height:f,offset:c},q?!0:y);Sn(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Fa(L),"]")),Array.isArray(L)&&(T=L)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(Nee,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),z.createElement(Cee,ka({},d,{offset:c,horizontalPoints:N,xAxis:O,yAxis:E})),z.createElement(Tee,ka({},d,{offset:c,verticalPoints:T,xAxis:O,yAxis:E})),z.createElement(kee,ka({},d,{horizontalPoints:N})),z.createElement(Ree,ka({},d,{verticalPoints:T})))}Rh.displayName="CartesianGrid";var Dee=["type","layout","connectNulls","ref"],Lee=["key"];function js(e){"@babel/helpers - typeof";return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},js(e)}function ST(e,t){if(e==null)return{};var r=$ee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rh){g=[].concat(Mo(f.slice(0,b)),[h-y]);break}var w=g.length%2===0?[0,m]:[m];return[].concat(Mo(t.repeat(f,d)),Mo(g),w).map(function(S){return"".concat(S,"px")}).join(", ")}),wn(r,"id",Ds("recharts-line-")),wn(r,"pathRef",function(s){r.mainCurve=s}),wn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),wn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Kee(t,e),Wee(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,u=a.xAxis,f=a.yAxis,c=a.layout,d=a.children,h=Fr(d,nu);if(!h)return null;var m=function(y,w){return{x:y.x,y:y.y,value:y.value,errorVal:Bt(y.payload,w)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return z.createElement(Ze,g,h.map(function(b){return z.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:s,xAxis:u,yAxis:f,layout:c,dataPointFormatter:m})}))}},{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.dot,c=u.points,d=u.dataKey,h=Me(this.props,!1),m=Me(f,!0),g=c.map(function(y,w){var S=kr(kr(kr({key:"dot-".concat(w),r:3},h),m),{},{index:w,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:c});return t.renderDotItem(f,S)}),b={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return z.createElement(Ze,sc({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(n,i,a,s){var u=this.props,f=u.type,c=u.layout,d=u.connectNulls;u.ref;var h=ST(u,Dee),m=kr(kr(kr({},Me(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},s),{},{type:f,layout:c,connectNulls:d});return z.createElement(dh,sc({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,f=s.strokeDasharray,c=s.isAnimationActive,d=s.animationBegin,h=s.animationDuration,m=s.animationEasing,g=s.animationId,b=s.animateNewValues,y=s.width,w=s.height,S=this.state,O=S.prevPoints,E=S.totalLength;return z.createElement(Fn,{begin:d,duration:h,isActive:c,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var A=C.t;if(O){var N=O.length/u.length,T=u.map(function(D,U){var H=Math.floor(U*N);if(O[H]){var V=O[H],K=Lr(V.x,D.x),X=Lr(V.y,D.y);return kr(kr({},D),{},{x:K(A),y:X(A)})}if(b){var B=Lr(y*2,D.x),Z=Lr(w/2,D.y);return kr(kr({},D),{},{x:B(A),y:Z(A)})}return kr(kr({},D),{},{x:D.x,y:D.y})});return a.renderCurveStatically(T,n,i)}var R=Lr(0,E),I=R(A),q;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});q=a.getStrokeDasharray(I,E,L)}else q=a.generateSimpleStrokeDasharray(E,I);return a.renderCurveStatically(u,n,i,{strokeDasharray:q})})}},{key:"renderCurve",value:function(n,i){var a=this.props,s=a.points,u=a.isAnimationActive,f=this.state,c=f.prevPoints,d=f.totalLength;return u&&s&&s.length&&(!c&&d>0||!ru(c,s))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,f=i.className,c=i.xAxis,d=i.yAxis,h=i.top,m=i.left,g=i.width,b=i.height,y=i.isAnimationActive,w=i.id;if(a||!u||!u.length)return null;var S=this.state.isAnimationFinished,O=u.length===1,E=Ue("recharts-line",f),C=c&&c.allowDataOverflow,A=d&&d.allowDataOverflow,N=C||A,T=qe(w)?this.id:w,R=(n=Me(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=R.r,q=I===void 0?3:I,L=R.strokeWidth,D=L===void 0?2:L,U=OF(s)?s:{},H=U.clipDot,V=H===void 0?!0:H,K=q*2+D;return z.createElement(Ze,{className:E},C||A?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(T)},z.createElement("rect",{x:C?m:m-g/2,y:A?h:h-b/2,width:C?g:g*2,height:A?b:b*2})),!V&&z.createElement("clipPath",{id:"clipPath-dots-".concat(T)},z.createElement("rect",{x:m-K/2,y:h-K/2,width:g+K,height:b+K}))):null,!O&&this.renderCurve(N,T),this.renderErrorBar(N,T),(O||s)&&this.renderDots(N,V,T),(!y||S)&&fi.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Mo(n),[0]):n,s=[],u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $te(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zte(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&he(i)&&he(a)?t.slice(i,a+1):[]};function gL(e){return e==="number"?[0,"auto"]:void 0}var M1=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,u=Rp(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(f,c){var d,h=(d=c.props.data)!==null&&d!==void 0?d:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=h===void 0?u:h;m=Dd(g,s.dataKey,i)}else m=h&&h[n]||u[n];return m?[].concat(Ns(f),[sD(c,m)]):f},[])},kT=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=Zte(a,n),u=t.orderedTooltipTicks,f=t.tooltipAxis,c=t.tooltipTicks,d=wG(s,u,c,f);if(d>=0&&c){var h=c[d]&&c[d].value,m=M1(t,r,d,h),g=Jte(n,u,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},ere=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=tD(d,a);return n.reduce(function(b,y){var w,S=y.type.defaultProps!==void 0?ne(ne({},y.type.defaultProps),y.props):y.props,O=S.type,E=S.dataKey,C=S.allowDataOverflow,A=S.allowDuplicatedCategory,N=S.scale,T=S.ticks,R=S.includeHidden,I=S[s];if(b[I])return b;var q=Rp(t.data,{graphicalItems:i.filter(function($){var Q,ae=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s];return ae===I}),dataStartIndex:f,dataEndIndex:c}),L=q.length,D,U,H;Ete(S.domain,C,O)&&(D=Kb(S.domain,null,C),g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category")));var V=gL(O);if(!D||D.length===0){var K,X=(K=S.domain)!==null&&K!==void 0?K:V;if(E){if(D=nc(q,E,O),O==="category"&&g){var B=pF(D);A&&B?(U=D,D=Sh(0,L)):A||(D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0?$:[].concat(Ns($),[Q])},[]))}else if(O==="category")A?D=D.filter(function($){return $!==""&&!qe($)}):D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0||Q===""||qe(Q)?$:[].concat(Ns($),[Q])},[]);else if(O==="number"){var Z=EG(q,i.filter(function($){var Q,ae,pe=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s],ye="hide"in $.props?$.props.hide:(ae=$.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return pe===I&&(R||!ye)}),E,a,d);Z&&(D=Z)}g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category"))}else g?D=Sh(0,L):u&&u[I]&&u[I].hasStack&&O==="number"?D=m==="expand"?[0,1]:oD(u[I].stackGroups,f,c):D=eD(q,i.filter(function($){var Q=s in $.props?$.props[s]:$.type.defaultProps[s],ae="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return Q===I&&(R||!ae)}),O,d,!0);if(O==="number")D=T1(h,D,I,a,T),X&&(D=Kb(X,D,C));else if(O==="category"&&X){var ee=X,M=D.every(function($){return ee.indexOf($)>=0});M&&(D=ee)}}return ne(ne({},b),{},Le({},I,ne(ne({},S),{},{axisType:a,domain:D,categoricalDomain:H,duplicateDomain:U,originalDomain:(w=S.domain)!==null&&w!==void 0?w:V,isCategorical:g,layout:d})))},{})},tre=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=Rp(t.data,{graphicalItems:n,dataStartIndex:f,dataEndIndex:c}),g=m.length,b=tD(d,a),y=-1;return n.reduce(function(w,S){var O=S.type.defaultProps!==void 0?ne(ne({},S.type.defaultProps),S.props):S.props,E=O[s],C=gL("number");if(!w[E]){y++;var A;return b?A=Sh(0,g):u&&u[E]&&u[E].hasStack?(A=oD(u[E].stackGroups,f,c),A=T1(h,A,E,a)):(A=Kb(C,eD(m,n.filter(function(N){var T,R,I=s in N.props?N.props[s]:(T=N.type.defaultProps)===null||T===void 0?void 0:T[s],q="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===E&&!q}),"number",d),i.defaultProps.allowDataOverflow),A=T1(h,A,E,a)),ne(ne({},w),{},Le({},E,ne(ne({axisType:a},i.defaultProps),{},{hide:!0,orientation:zr(Yte,"".concat(a,".").concat(y%2),null),domain:A,originalDomain:C,isCategorical:b,layout:d})))}return w},{})},rre=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Fr(d,a),g={};return m&&m.length?g=ere(t,{axes:m,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c}):s&&s.length&&(g=tre(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c})),g},nre=function(t){var r=Wi(t),n=li(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ew(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ch(r,n)}},RT=function(t){var r=t.children,n=t.defaultShowTooltip,i=Mr(r,xs),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},ire=function(t){return!t||!t.length?!1:t.some(function(r){var n=ci(r&&r.type);return n&&n.indexOf("Bar")>=0})},MT=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},are=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,u=t.yAxisMap,f=u===void 0?{}:u,c=n.width,d=n.height,h=n.children,m=n.margin||{},g=Mr(h,xs),b=Mr(h,Qo),y=Object.keys(f).reduce(function(A,N){var T=f[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,A[R]+T.width)):A},{left:m.left||0,right:m.right||0}),w=Object.keys(s).reduce(function(A,N){var T=s[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,zr(A,"".concat(R))+T.height)):A},{top:m.top||0,bottom:m.bottom||0}),S=ne(ne({},w),y),O=S.bottom;g&&(S.bottom+=g.props.height||xs.defaultProps.height),b&&r&&(S=OG(S,i,n,r));var E=c-S.left-S.right,C=d-S.top-S.bottom;return ne(ne({brushBottom:O},S),{},{width:Math.max(E,0),height:Math.max(C,0)})},ore=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},c_=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,u=s===void 0?["axis"]:s,f=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,O){var E=O.graphicalItems,C=O.stackGroups,A=O.offset,N=O.updateId,T=O.dataStartIndex,R=O.dataEndIndex,I=S.barSize,q=S.layout,L=S.barGap,D=S.barCategoryGap,U=S.maxBarSize,H=MT(q),V=H.numericAxisName,K=H.cateAxisName,X=ire(E),B=[];return E.forEach(function(Z,ee){var M=Rp(S.data,{graphicalItems:[Z],dataStartIndex:T,dataEndIndex:R}),$=Z.type.defaultProps!==void 0?ne(ne({},Z.type.defaultProps),Z.props):Z.props,Q=$.dataKey,ae=$.maxBarSize,pe=$["".concat(V,"Id")],ye=$["".concat(K,"Id")],oe={},me=f.reduce(function(Kt,Xt){var io=O["".concat(Xt.axisType,"Map")],Vs=$["".concat(Xt.axisType,"Id")];io&&io[Vs]||Xt.axisType==="zAxis"||za();var Gs=io[Vs];return ne(ne({},Kt),{},Le(Le({},Xt.axisType,Gs),"".concat(Xt.axisType,"Ticks"),li(Gs)))},oe),ie=me[K],ue=me["".concat(K,"Ticks")],ve=C&&C[pe]&&C[pe].hasStack&&IG(Z,C[pe].stackGroups),re=ci(Z.type).indexOf("Bar")>=0,De=ch(ie,ue),Te=[],Ke=X&&_G({barSize:I,stackGroups:C,totalSize:ore(me,K)});if(re){var lt,vt,dr=qe(ae)?U:ae,Or=(lt=(vt=ch(ie,ue,!0))!==null&&vt!==void 0?vt:dr)!==null&<!==void 0?lt:0;Te=SG({barGap:L,barCategoryGap:D,bandSize:Or!==De?Or:De,sizeList:Ke[ye],maxBarSize:dr}),Or!==De&&(Te=Te.map(function(Kt){return ne(ne({},Kt),{},{position:ne(ne({},Kt.position),{},{offset:Kt.position.offset-Or/2})})}))}var jr=Z&&Z.type&&Z.type.getComposedData;jr&&B.push({props:ne(ne({},jr(ne(ne({},me),{},{displayedData:M,props:S,dataKey:Q,item:Z,bandSize:De,barPosition:Te,offset:A,stackedData:ve,layout:q,dataStartIndex:T,dataEndIndex:R}))),{},Le(Le(Le({key:Z.key||"item-".concat(ee)},V,me[V]),K,me[K]),"animationId",N)),childIndex:AF(Z,S.children),item:Z})}),B},g=function(S,O){var E=S.props,C=S.dataStartIndex,A=S.dataEndIndex,N=S.updateId;if(!KE({props:E}))return null;var T=E.children,R=E.layout,I=E.stackOffset,q=E.data,L=E.reverseStackOrder,D=MT(R),U=D.numericAxisName,H=D.cateAxisName,V=Fr(T,n),K=RG(q,V,"".concat(U,"Id"),"".concat(H,"Id"),I,L),X=f.reduce(function($,Q){var ae="".concat(Q.axisType,"Map");return ne(ne({},$),{},Le({},ae,rre(E,ne(ne({},Q),{},{graphicalItems:V,stackGroups:Q.axisType===U&&K,dataStartIndex:C,dataEndIndex:A}))))},{}),B=are(ne(ne({},X),{},{props:E,graphicalItems:V}),O?.legendBBox);Object.keys(X).forEach(function($){X[$]=d(E,X[$],B,$.replace("Map",""),r)});var Z=X["".concat(H,"Map")],ee=nre(Z),M=m(E,ne(ne({},X),{},{dataStartIndex:C,dataEndIndex:A,updateId:N,graphicalItems:V,stackGroups:K,offset:B}));return ne(ne({formattedGraphicalItems:M,graphicalItems:V,offset:B,stackGroups:K},ee),X)},b=(function(w){function S(O){var E,C,A;return Bte(this,S),A=qte(this,S,[O]),Le(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(A,"accessibilityManager",new jte),Le(A,"handleLegendBBoxUpdate",function(N){if(N){var T=A.state,R=T.dataStartIndex,I=T.dataEndIndex,q=T.updateId;A.setState(ne({legendBBox:N},g({props:A.props,dataStartIndex:R,dataEndIndex:I,updateId:q},ne(ne({},A.state),{},{legendBBox:N}))))}}),Le(A,"handleReceiveSyncEvent",function(N,T,R){if(A.props.syncId===N){if(R===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(T)}}),Le(A,"handleBrushChange",function(N){var T=N.startIndex,R=N.endIndex;if(T!==A.state.dataStartIndex||R!==A.state.dataEndIndex){var I=A.state.updateId;A.setState(function(){return ne({dataStartIndex:T,dataEndIndex:R},g({props:A.props,dataStartIndex:T,dataEndIndex:R,updateId:I},A.state))}),A.triggerSyncEvent({dataStartIndex:T,dataEndIndex:R})}}),Le(A,"handleMouseEnter",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseEnter;ze(I)&&I(R,N)}}),Le(A,"triggeredAfterMouseMove",function(N){var T=A.getMouseInfo(N),R=T?ne(ne({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseMove;ze(I)&&I(R,N)}),Le(A,"handleItemMouseEnter",function(N){A.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),Le(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Le(A,"handleMouseMove",function(N){N.persist(),A.throttleTriggeredAfterMouseMove(N)}),Le(A,"handleMouseLeave",function(N){A.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var R=A.props.onMouseLeave;ze(R)&&R(T,N)}),Le(A,"handleOuterEvent",function(N){var T=EF(N),R=zr(A.props,"".concat(T));if(T&&ze(R)){var I,q;/.*touch.*/i.test(T)?q=A.getMouseInfo(N.changedTouches[0]):q=A.getMouseInfo(N),R((I=q)!==null&&I!==void 0?I:{},N)}}),Le(A,"handleClick",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onClick;ze(I)&&I(R,N)}}),Le(A,"handleMouseDown",function(N){var T=A.props.onMouseDown;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleMouseUp",function(N){var T=A.props.onMouseUp;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),Le(A,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseDown(N.changedTouches[0])}),Le(A,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseUp(N.changedTouches[0])}),Le(A,"handleDoubleClick",function(N){var T=A.props.onDoubleClick;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleContextMenu",function(N){var T=A.props.onContextMenu;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"triggerSyncEvent",function(N){A.props.syncId!==void 0&&Gx.emit(Kx,A.props.syncId,N,A.eventEmitterSymbol)}),Le(A,"applySyncEvent",function(N){var T=A.props,R=T.layout,I=T.syncMethod,q=A.state.updateId,L=N.dataStartIndex,D=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)A.setState(ne({dataStartIndex:L,dataEndIndex:D},g({props:A.props,dataStartIndex:L,dataEndIndex:D,updateId:q},A.state)));else if(N.activeTooltipIndex!==void 0){var U=N.chartX,H=N.chartY,V=N.activeTooltipIndex,K=A.state,X=K.offset,B=K.tooltipTicks;if(!X)return;if(typeof I=="function")V=I(B,N);else if(I==="value"){V=-1;for(var Z=0;Z=0){var ve,re;if(U.dataKey&&!U.allowDuplicatedCategory){var De=typeof U.dataKey=="function"?ue:"payload.".concat(U.dataKey.toString());ve=Dd(Z,De,V),re=ee&&M&&Dd(M,De,V)}else ve=Z?.[H],re=ee&&M&&M[H];if(ye||pe){var Te=N.props.activeIndex!==void 0?N.props.activeIndex:H;return[P.cloneElement(N,ne(ne(ne({},I.props),me),{},{activeIndex:Te})),null,null]}if(!qe(ve))return[ie].concat(Ns(A.renderActivePoints({item:I,activePoint:ve,basePoint:re,childIndex:H,isRange:ee})))}else{var Ke,lt=(Ke=A.getItemByXY(A.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:ie},vt=lt.graphicalItem,dr=vt.item,Or=dr===void 0?N:dr,jr=vt.childIndex,Kt=ne(ne(ne({},I.props),me),{},{activeIndex:jr});return[P.cloneElement(Or,Kt),null,null]}return ee?[ie,null,null]:[ie,null]}),Le(A,"renderCustomized",function(N,T,R){return P.cloneElement(N,ne(ne({key:"recharts-customized-".concat(R)},A.props),A.state))}),Le(A,"renderMap",{CartesianGrid:{handler:Lf,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Lf},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Lf},YAxis:{handler:Lf},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((E=O.id)!==null&&E!==void 0?E:Ds("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=ZM(A.triggeredAfterMouseMove,(C=O.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return Hte(S,w),Fte(S,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,A=E.data,N=E.height,T=E.layout,R=Mr(C,Dr);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var q=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,L=M1(this.state,A,I,q),D=this.state.tooltipTicks[I].coordinate,U=(this.state.offset.top+N)/2,H=T==="horizontal",V=H?{x:D,y:U}:{y:D,x:U},K=this.state.formattedGraphicalItems.find(function(B){var Z=B.item;return Z.type.name==="Scatter"});K&&(V=ne(ne({},V),K.props.points[I].tooltipPosition),L=K.props.points[I].tooltipPayload);var X={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:q,activePayload:L,activeCoordinate:V};this.setState(X),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.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){var A,N;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(E){vb([Mr(E.children,Dr)],[Mr(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Mr(this.props.children,Dr);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return u.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),N=hU(A),T={chartX:Math.round(E.pageX-N.left),chartY:Math.round(E.pageY-N.top)},R=A.width/C.offsetWidth||1,I=this.inRange(T.chartX,T.chartY,R);if(!I)return null;var q=this.state,L=q.xAxisMap,D=q.yAxisMap,U=this.getTooltipEventType(),H=kT(this.state,this.props.data,this.props.layout,I);if(U!=="axis"&&L&&D){var V=Wi(L).scale,K=Wi(D).scale,X=V&&V.invert?V.invert(T.chartX):null,B=K&&K.invert?K.invert(T.chartY):null;return ne(ne({},T),{},{xValue:X,yValue:B},H)}return H?ne(ne({},T),H):null}},{key:"inRange",value:function(E,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,T=E/A,R=C/A;if(N==="horizontal"||N==="vertical"){var I=this.state.offset,q=T>=I.left&&T<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return q?{x:T,y:R}:null}var L=this.state,D=L.angleAxisMap,U=L.radiusAxisMap;if(D&&U){var H=Wi(D);return LN({x:T,y:R},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),A=Mr(E,Dr),N={};A&&C==="axis"&&(A.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Ld(this.props,this.handleOuterEvent);return ne(ne({},T),N)}},{key:"addListener",value:function(){Gx.on(Kx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gx.removeListener(Kx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,A){for(var N=this.state.formattedGraphicalItems,T=0,R=N.length;Tp.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border border-gray-100 hover:bg-gray-100 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-bold text-xs",children:e.template.substring(0,2)}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-semibold text-gray-900",children:e.product}),p.jsxs("p",{className:"text-xs text-gray-500",children:[e.id," • ",e.user]})]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("span",{className:"text-xs text-gray-500 font-medium",children:e.time}),p.jsx(Rn,{variant:"secondary",className:e.status==="expired"?"bg-red-100 text-red-700":"bg-green-100 text-green-700",children:e.status})]})]},e.id))})})]})]}),p.jsx("div",{className:"space-y-6",children:p.jsxs(Ir,{className:"shadow-sm border-gray-200",children:[p.jsx(yn,{children:p.jsxs(xn,{className:"text-base font-bold text-gray-800 flex items-center gap-2",children:[p.jsx(ub,{className:"w-5 h-5 text-gray-500"}),"By Category"]})}),p.jsxs(tn,{children:[p.jsxs("div",{className:"h-[200px] relative",children:[p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(lre,{children:[p.jsx(wi,{data:Yx,cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",children:Yx.map((e,t)=>p.jsx(cp,{fill:e.color},`cell-${t}`))}),p.jsx(Dr,{})]})}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center flex-col pointer-events-none",children:[p.jsx("span",{className:"text-2xl font-bold text-gray-900",children:"1000"}),p.jsx("span",{className:"text-xs text-gray-500",children:"Total"})]})]}),p.jsx("div",{className:"mt-4 space-y-2",children:Yx.map(e=>p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),p.jsx("span",{className:"text-gray-600",children:e.name})]}),p.jsx("span",{className:"font-medium text-gray-900",children:e.value})]},e.name))})]})]})})]})]})}function Io({title:e,value:t,trend:r,trendUp:n,icon:i,color:a,bgColor:s}){return p.jsx(Ir,{className:"border-gray-200 shadow-sm hover:shadow-md transition-shadow",children:p.jsxs(tn,{className:"p-6",children:[p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-gray-500 mb-1",children:e}),p.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:t})]}),p.jsx("div",{className:`p-2 rounded-lg ${s}`,children:p.jsx(i,{className:`w-5 h-5 ${a}`})})]}),p.jsxs("div",{className:"mt-4 flex items-center text-sm",children:[n?p.jsx(fR,{className:"w-4 h-4 text-green-500 mr-1"}):p.jsx(aB,{className:"w-4 h-4 text-red-500 mr-1"}),p.jsx("span",{className:n?"text-green-600 font-medium":"text-red-600 font-medium",children:r}),p.jsx("span",{className:"text-gray-400 ml-1",children:"Vs. last period"})]})]})})}function dre({title:e}){return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[1,2,3,4].map(t=>p.jsxs(Ir,{children:[p.jsx(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:p.jsxs(xn,{className:"text-sm font-medium",children:["Metric ",t]})}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"000"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+0.0% from last month"})]})]},t))}),p.jsx(Ir,{className:"min-h-[400px] flex items-center justify-center border-dashed",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsxs("h3",{className:"text-lg font-medium",children:[e," Module"]}),p.jsx("p",{children:"This module is currently under development."})]})})]})}function br({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:Ie("w-full caption-bottom text-sm",e),...t})})}function wr({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:Ie("[&_tr]:border-b",e),...t})}function _r({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:Ie("[&_tr:last-child]:border-0",e),...t})}function Qe({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:Ie("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function ge({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:Ie("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function de({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:Ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function IT(e){const t=hre(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(mre);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function hre(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=gre(i),u=vre(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pre=Symbol("radix.slottable");function mre(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pre}function vre(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function gre(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xL(e){const t=e+"CollectionProvider",[r,n]=gi(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:w,children:S}=y,O=z.useRef(null),E=z.useRef(new Map).current;return p.jsx(i,{scope:w,itemMap:E,collectionRef:O,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=IT(u),c=z.forwardRef((y,w)=>{const{scope:S,children:O}=y,E=a(u,S),C=Je(w,E.collectionRef);return p.jsx(f,{ref:C,children:O})});c.displayName=u;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=IT(d),g=z.forwardRef((y,w)=>{const{scope:S,children:O,...E}=y,C=z.useRef(null),A=Je(w,C),N=a(d,S);return z.useEffect(()=>(N.itemMap.set(C,{ref:C,...E}),()=>void N.itemMap.delete(C))),p.jsx(m,{[h]:"",ref:A,children:O})});g.displayName=d;function b(y){const w=a(e+"CollectionConsumer",y);return z.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const E=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((N,T)=>E.indexOf(N.ref.current)-E.indexOf(T.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},b,n]}function yre(e,t=globalThis?.document){const r=ar(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xre="DismissableLayer",I1="dismissableLayer.update",bre="dismissableLayer.pointerDownOutside",wre="dismissableLayer.focusOutside",DT,bL=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u_=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...f}=e,c=P.useContext(bL),[d,h]=P.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=P.useState({}),b=Je(t,T=>h(T)),y=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(w),O=d?y.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,C=O>=S,A=Ore(T=>{const R=T.target,I=[...c.branches].some(q=>q.contains(R));!C||I||(i?.(T),s?.(T),T.defaultPrevented||u?.())},m),N=jre(T=>{const R=T.target;[...c.branches].some(q=>q.contains(R))||(a?.(T),s?.(T),T.defaultPrevented||u?.())},m);return yre(T=>{O===c.layers.size-1&&(n?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},m),P.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(DT=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),LT(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=DT)}},[d,m,r,c]),P.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),LT())},[d,c]),P.useEffect(()=>{const T=()=>g({});return document.addEventListener(I1,T),()=>document.removeEventListener(I1,T)},[]),p.jsx(We.div,{...f,ref:b,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,A.onPointerDownCapture)})});u_.displayName=xre;var _re="DismissableLayerBranch",Sre=P.forwardRef((e,t)=>{const r=P.useContext(bL),n=P.useRef(null),i=Je(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),p.jsx(We.div,{...e,ref:i})});Sre.displayName=_re;function Ore(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=u=>{if(u.target&&!n.current){let f=function(){wL(bre,r,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function jre(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&wL(wre,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function LT(){const e=new CustomEvent(I1);document.dispatchEvent(e)}function wL(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?P6(i,a):i.dispatchEvent(a)}var Qx=0;function _L(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$T()),document.body.insertAdjacentElement("beforeend",e[1]??$T()),Qx++,()=>{Qx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qx--}},[])}function $T(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",BT={bubbles:!1,cancelable:!0},Ere="FocusScope",f_=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,f]=P.useState(null),c=ar(i),d=ar(a),h=P.useRef(null),m=Je(t,y=>f(y)),g=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let y=function(E){if(g.paused||!u)return;const C=E.target;u.contains(C)?h.current=C:qi(h.current,{select:!0})},w=function(E){if(g.paused||!u)return;const C=E.relatedTarget;C!==null&&(u.contains(C)||qi(h.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&qi(u)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const O=new MutationObserver(S);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),O.disconnect()}}},[n,u,g.paused]),P.useEffect(()=>{if(u){FT.add(g);const y=document.activeElement;if(!u.contains(y)){const S=new CustomEvent(Zx,BT);u.addEventListener(Zx,c),u.dispatchEvent(S),S.defaultPrevented||(Are(kre(SL(u)),{select:!0}),document.activeElement===y&&qi(u))}return()=>{u.removeEventListener(Zx,c),setTimeout(()=>{const S=new CustomEvent(Jx,BT);u.addEventListener(Jx,d),u.dispatchEvent(S),S.defaultPrevented||qi(y??document.body,{select:!0}),u.removeEventListener(Jx,d),FT.remove(g)},0)}}},[u,c,d,g]);const b=P.useCallback(y=>{if(!r&&!n||g.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(w&&S){const O=y.currentTarget,[E,C]=Pre(O);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),r&&qi(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),r&&qi(C,{select:!0})):S===O&&y.preventDefault()}},[r,n,g.paused]);return p.jsx(We.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});f_.displayName=Ere;function Are(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qi(n,{select:t}),document.activeElement!==r)return}function Pre(e){const t=SL(e),r=zT(t,e),n=zT(t.reverse(),e);return[r,n]}function SL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zT(e,t){for(const r of e)if(!Nre(r,{upTo:t}))return r}function Nre(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cre(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cre(e)&&t&&e.select()}}var FT=Tre();function Tre(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=qT(e,t),e.unshift(t)},remove(t){e=qT(e,t),e[0]?.resume()}}}function qT(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kre(e){return e.filter(t=>t.tagName!=="A")}var Rre=X1[" useId ".trim().toString()]||(()=>{}),Mre=0;function Gi(e){const[t,r]=P.useState(Rre());return Rt(()=>{r(n=>n??String(Mre++))},[e]),e||(t?`radix-${t}`:"")}const Ire=["top","right","bottom","left"],Xi=Math.min,$r=Math.max,$h=Math.round,$f=Math.floor,Bn=e=>({x:e,y:e}),Dre={left:"right",right:"left",bottom:"top",top:"bottom"},Lre={start:"end",end:"start"};function D1(e,t,r){return $r(e,Xi(t,r))}function mi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function d_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const $re=new Set(["top","bottom"]);function Dn(e){return $re.has(vi(e))?"y":"x"}function p_(e){return d_(Dn(e))}function Bre(e,t,r){r===void 0&&(r=!1);const n=Us(e),i=p_(e),a=h_(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bh(s)),[s,Bh(s)]}function zre(e){const t=Bh(e);return[L1(e),t,L1(t)]}function L1(e){return e.replace(/start|end/g,t=>Lre[t])}const UT=["left","right"],WT=["right","left"],Fre=["top","bottom"],qre=["bottom","top"];function Ure(e,t,r){switch(e){case"top":case"bottom":return r?t?WT:UT:t?UT:WT;case"left":case"right":return t?Fre:qre;default:return[]}}function Wre(e,t,r,n){const i=Us(e);let a=Ure(vi(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(L1)))),a}function Bh(e){return e.replace(/left|right|bottom|top/g,t=>Dre[t])}function Hre(e){return{top:0,right:0,bottom:0,left:0,...e}}function OL(e){return typeof e!="number"?Hre(e):{top:e,right:e,bottom:e,left:e}}function zh(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function HT(e,t,r){let{reference:n,floating:i}=e;const a=Dn(t),s=p_(t),u=h_(s),f=vi(t),c=a==="y",d=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[u]/2-i[u]/2;let g;switch(f){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(Us(t)){case"start":g[s]-=m*(r&&c?-1:1);break;case"end":g[s]+=m*(r&&c?-1:1);break}return g}async function Vre(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=mi(t,e),b=OL(g),w=u[m?h==="floating"?"reference":"floating":h],S=zh(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(w)))==null||r?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:c,rootBoundary:d,strategy:f})),O=h==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),C=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},A=zh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:E,strategy:f}):O);return{top:(S.top-A.top+b.top)/C.y,bottom:(A.bottom-S.bottom+b.bottom)/C.y,left:(S.left-A.left+b.left)/C.x,right:(A.right-S.right+b.right)/C.x}}const Gre=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=HT(c,n,f),m=n,g={},b=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:c,padding:d=0}=mi(e,t)||{};if(c==null)return{};const h=OL(d),m={x:r,y:n},g=p_(i),b=h_(g),y=await s.getDimensions(c),w=g==="y",S=w?"top":"left",O=w?"bottom":"right",E=w?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-m[g]-a.floating[b],A=m[g]-a.reference[g],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=N?N[E]:0;(!T||!await(s.isElement==null?void 0:s.isElement(N)))&&(T=u.floating[E]||a.floating[b]);const R=C/2-A/2,I=T/2-y[b]/2-1,q=Xi(h[S],I),L=Xi(h[O],I),D=q,U=T-y[b]-L,H=T/2-y[b]/2+R,V=D1(D,H,U),K=!f.arrow&&Us(i)!=null&&H!==V&&a.reference[b]/2-(HH<=0)){var L,D;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,V=T[H];if(V&&(!(h==="alignment"?O!==Dn(V):!1)||q.every(B=>Dn(B.placement)===O?B.overflows[0]>0:!0)))return{data:{index:H,overflows:q},reset:{placement:V}};let K=(D=q.filter(X=>X.overflows[0]<=0).sort((X,B)=>X.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!K)switch(g){case"bestFit":{var U;const X=(U=q.filter(B=>{if(N){const Z=Dn(B.placement);return Z===O||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,ee)=>Z+ee,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:U[0];X&&(K=X);break}case"initialPlacement":K=u;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GT(e){return Ire.some(t=>e[t]>=0)}const Yre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=mi(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),u=VT(s,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:GT(u)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),u=VT(s,r.floating);return{data:{escapedOffsets:u,escaped:GT(u)}}}default:return{}}}}},jL=new Set(["left","top"]);async function Qre(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=vi(r),u=Us(r),f=Dn(r)==="y",c=jL.has(s)?-1:1,d=a&&f?-1:1,h=mi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof b=="number"&&(g=u==="end"?b*-1:b),f?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const Zre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await Qre(t,e);return s===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},Jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:u=!1,limiter:f={fn:S=>{let{x:O,y:E}=S;return{x:O,y:E}}},...c}=mi(e,t),d={x:r,y:n},h=await a.detectOverflow(t,c),m=Dn(vi(i)),g=d_(m);let b=d[g],y=d[m];if(s){const S=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=b+h[S],C=b-h[O];b=D1(E,b,C)}if(u){const S=m==="y"?"top":"left",O=m==="y"?"bottom":"right",E=y+h[S],C=y-h[O];y=D1(E,y,C)}const w=f.fn({...t,[g]:b,[m]:y});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[g]:s,[m]:u}}}}}},ene=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:c=!0}=mi(e,t),d={x:r,y:n},h=Dn(i),m=d_(h);let g=d[m],b=d[h];const y=mi(u,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const E=m==="y"?"height":"width",C=a.reference[m]-a.floating[E]+w.mainAxis,A=a.reference[m]+a.reference[E]-w.mainAxis;gA&&(g=A)}if(c){var S,O;const E=m==="y"?"width":"height",C=jL.has(vi(i)),A=a.reference[h]-a.floating[E]+(C&&((S=s.offset)==null?void 0:S[h])||0)+(C?0:w.crossAxis),N=a.reference[h]+a.reference[E]+(C?0:((O=s.offset)==null?void 0:O[h])||0)-(C?w.crossAxis:0);bN&&(b=N)}return{[m]:g,[h]:b}}}},tne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...c}=mi(e,t),d=await s.detectOverflow(t,c),h=vi(i),m=Us(i),g=Dn(i)==="y",{width:b,height:y}=a.floating;let w,S;h==="top"||h==="bottom"?(w=h,S=m===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,w=m==="end"?"top":"bottom");const O=y-d.top-d.bottom,E=b-d.left-d.right,C=Xi(y-d[w],O),A=Xi(b-d[S],E),N=!t.middlewareData.shift;let T=C,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=O),N&&!m){const q=$r(d.left,0),L=$r(d.right,0),D=$r(d.top,0),U=$r(d.bottom,0);g?R=b-2*(q!==0||L!==0?q+L:$r(d.left,d.right)):T=y-2*(D!==0||U!==0?D+U:$r(d.top,d.bottom))}await f({...t,availableWidth:R,availableHeight:T});const I=await s.getDimensions(u.floating);return b!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Mp(){return typeof window<"u"}function Ws(e){return EL(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(EL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EL(e){return Mp()?e instanceof Node||e instanceof qr(e).Node:!1}function On(e){return Mp()?e instanceof Element||e instanceof qr(e).Element:!1}function qn(e){return Mp()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function KT(e){return!Mp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}const rne=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!rne.has(i)}const nne=new Set(["table","td","th"]);function ine(e){return nne.has(Ws(e))}const ane=[":popover-open",":modal"];function Ip(e){return ane.some(t=>{try{return e.matches(t)}catch{return!1}})}const one=["transform","translate","scale","rotate","perspective"],sne=["transform","translate","scale","rotate","perspective","filter"],lne=["paint","layout","strict","content"];function m_(e){const t=v_(),r=On(e)?jn(e):e;return one.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||sne.some(n=>(r.willChange||"").includes(n))||lne.some(n=>(r.contain||"").includes(n))}function cne(e){let t=Yi(e);for(;qn(t)&&!Cs(t);){if(m_(t))return t;if(Ip(t))return null;t=Yi(t)}return null}function v_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const une=new Set(["html","body","#document"]);function Cs(e){return une.has(Ws(e))}function jn(e){return qr(e).getComputedStyle(e)}function Dp(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yi(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KT(e)&&e.host||Gn(e);return KT(t)?t.host:t}function AL(e){const t=Yi(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:qn(t)&&iu(t)?t:AL(t)}function Gc(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=AL(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=qr(i);if(a){const u=$1(s);return t.concat(s,s.visualViewport||[],iu(i)?i:[],u&&r?Gc(u):[])}return t.concat(i,Gc(i,[],r))}function $1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PL(e){const t=jn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=qn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,u=$h(r)!==a||$h(n)!==s;return u&&(r=a,n=s),{width:r,height:n,$:u}}function g_(e){return On(e)?e:e.contextElement}function es(e){const t=g_(e);if(!qn(t))return Bn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=PL(t);let s=(a?$h(r.width):r.width)/n,u=(a?$h(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fne=Bn(0);function NL(e){const t=qr(e);return!v_()||!t.visualViewport?fne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qr(e)?!1:t}function Wa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=g_(e);let s=Bn(1);t&&(n?On(n)&&(s=es(n)):s=es(e));const u=dne(a,r,n)?NL(a):Bn(0);let f=(i.left+u.x)/s.x,c=(i.top+u.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(a){const m=qr(a),g=n&&On(n)?qr(n):n;let b=m,y=$1(b);for(;y&&n&&g!==b;){const w=es(y),S=y.getBoundingClientRect(),O=jn(y),E=S.left+(y.clientLeft+parseFloat(O.paddingLeft))*w.x,C=S.top+(y.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,c*=w.y,d*=w.x,h*=w.y,f+=E,c+=C,b=qr(y),y=$1(b)}}return zh({width:d,height:h,x:f,y:c})}function Lp(e,t){const r=Dp(e).scrollLeft;return t?t.left+r:Wa(Gn(e)).left+r}function CL(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lp(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function hne(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Gn(n),u=t?Ip(t.floating):!1;if(n===s||u&&a)return r;let f={scrollLeft:0,scrollTop:0},c=Bn(1);const d=Bn(0),h=qn(n);if((h||!h&&!a)&&((Ws(n)!=="body"||iu(s))&&(f=Dp(n)),qn(n))){const g=Wa(n);c=es(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=s&&!h&&!a?CL(s,f):Bn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-f.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-f.scrollTop*c.y+d.y+m.y}}function pne(e){return Array.from(e.getClientRects())}function mne(e){const t=Gn(e),r=Dp(e),n=e.ownerDocument.body,i=$r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lp(e);const u=-r.scrollTop;return jn(n).direction==="rtl"&&(s+=$r(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:u}}const XT=25;function vne(e,t){const r=qr(e),n=Gn(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=v_();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const c=Lp(n);if(c<=0){const d=n.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(n.clientWidth-h.clientWidth-g);b<=XT&&(a-=b)}else c<=XT&&(a+=c);return{width:a,height:s,x:u,y:f}}const gne=new Set(["absolute","fixed"]);function yne(e,t){const r=Wa(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=qn(e)?es(e):Bn(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,c=n*a.y;return{width:s,height:u,x:f,y:c}}function YT(e,t,r){let n;if(t==="viewport")n=vne(e,r);else if(t==="document")n=mne(Gn(e));else if(On(t))n=yne(t,r);else{const i=NL(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zh(n)}function TL(e,t){const r=Yi(e);return r===t||!On(r)||Cs(r)?!1:jn(r).position==="fixed"||TL(r,t)}function xne(e,t){const r=t.get(e);if(r)return r;let n=Gc(e,[],!1).filter(u=>On(u)&&Ws(u)!=="body"),i=null;const a=jn(e).position==="fixed";let s=a?Yi(e):e;for(;On(s)&&!Cs(s);){const u=jn(s),f=m_(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&gne.has(i.position)||iu(s)&&!f&&TL(e,s))?n=n.filter(d=>d!==s):i=u,s=Yi(s)}return t.set(e,n),n}function bne(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ip(t)?[]:xne(t,this._c):[].concat(r),n],u=s[0],f=s.reduce((c,d)=>{const h=YT(t,d,i);return c.top=$r(h.top,c.top),c.right=Xi(h.right,c.right),c.bottom=Xi(h.bottom,c.bottom),c.left=$r(h.left,c.left),c},YT(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function wne(e){const{width:t,height:r}=PL(e);return{width:t,height:r}}function _ne(e,t,r){const n=qn(t),i=Gn(t),a=r==="fixed",s=Wa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Bn(0);function c(){f.x=Lp(i)}if(n||!n&&!a)if((Ws(t)!=="body"||iu(i))&&(u=Dp(t)),n){const g=Wa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&c();a&&!n&&i&&c();const d=i&&!n&&!a?CL(i,u):Bn(0),h=s.left+u.scrollLeft-f.x-d.x,m=s.top+u.scrollTop-f.y-d.y;return{x:h,y:m,width:s.width,height:s.height}}function eb(e){return jn(e).position==="static"}function QT(e,t){if(!qn(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gn(e)===r&&(r=r.ownerDocument.body),r}function kL(e,t){const r=qr(e);if(Ip(e))return r;if(!qn(e)){let i=Yi(e);for(;i&&!Cs(i);){if(On(i)&&!eb(i))return i;i=Yi(i)}return r}let n=QT(e,t);for(;n&&ine(n)&&eb(n);)n=QT(n,t);return n&&Cs(n)&&eb(n)&&!m_(n)?r:n||cne(e)||r}const Sne=async function(e){const t=this.getOffsetParent||kL,r=this.getDimensions,n=await r(e.floating);return{reference:_ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function One(e){return jn(e).direction==="rtl"}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:hne,getDocumentElement:Gn,getClippingRect:bne,getOffsetParent:kL,getElementRects:Sne,getClientRects:pne,getDimensions:wne,getScale:es,isElement:On,isRTL:One};function RL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ene(e,t){let r=null,n;const i=Gn(e);function a(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=c;if(u||t(),!m||!g)return;const b=$f(h),y=$f(i.clientWidth-(d+m)),w=$f(i.clientHeight-(h+g)),S=$f(d),E={rootMargin:-b+"px "+-y+"px "+-w+"px "+-S+"px",threshold:$r(0,Xi(1,f))||1};let C=!0;function A(N){const T=N[0].intersectionRatio;if(T!==f){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!RL(c,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(A,E)}r.observe(e)}return s(!0),a}function Ane(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=g_(e),d=i||a?[...c?Gc(c):[],...Gc(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const h=c&&u?Ene(c,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(S=>{let[O]=S;O&&O.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),r()}),c&&!f&&g.observe(c),g.observe(t));let b,y=f?Wa(e):null;f&&w();function w(){const S=Wa(e);y&&!RL(y,S)&&r(),y=S,b=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(O=>{i&&O.removeEventListener("scroll",r),a&&O.removeEventListener("resize",r)}),h?.(),(S=g)==null||S.disconnect(),g=null,f&&cancelAnimationFrame(b)}}const Pne=Zre,Nne=Jre,Cne=Xre,Tne=tne,kne=Yre,ZT=Kre,Rne=ene,Mne=(e,t,r)=>{const n=new Map,i={platform:jne,...r},a={...i.platform,_c:n};return Gre(e,t,{...i,platform:a})};var Ine=typeof document<"u",Dne=function(){},Ad=Ine?P.useLayoutEffect:Dne;function Fh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Fh(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Fh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ML(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JT(e,t){const r=ML(e);return Math.round(t*r)/r}function tb(e){const t=P.useRef(e);return Ad(()=>{t.current=e}),t}function Lne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:c}=e,[d,h]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=P.useState(n);Fh(m,n)||g(n);const[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),E=P.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),C=a||b,A=s||w,N=P.useRef(null),T=P.useRef(null),R=P.useRef(d),I=f!=null,q=tb(f),L=tb(i),D=tb(c),U=P.useCallback(()=>{if(!N.current||!T.current)return;const B={placement:t,strategy:r,middleware:m};L.current&&(B.platform=L.current),Mne(N.current,T.current,B).then(Z=>{const ee={...Z,isPositioned:D.current!==!1};H.current&&!Fh(R.current,ee)&&(R.current=ee,Kc.flushSync(()=>{h(ee)}))})},[m,t,r,L,D]);Ad(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[c]);const H=P.useRef(!1);Ad(()=>(H.current=!0,()=>{H.current=!1}),[]),Ad(()=>{if(C&&(N.current=C),A&&(T.current=A),C&&A){if(q.current)return q.current(C,A,U);U()}},[C,A,U,q,I]);const V=P.useMemo(()=>({reference:N,floating:T,setReference:O,setFloating:E}),[O,E]),K=P.useMemo(()=>({reference:C,floating:A}),[C,A]),X=P.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const Z=JT(K.floating,d.x),ee=JT(K.floating,d.y);return u?{...B,transform:"translate("+Z+"px, "+ee+"px)",...ML(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:ee}},[r,u,K.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:U,refs:V,elements:K,floatingStyles:X}),[d,U,V,K,X])}const $ne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ZT({element:n.current,padding:i}).fn(r):{}:n?ZT({element:n,padding:i}).fn(r):{}}}},Bne=(e,t)=>({...Pne(e),options:[e,t]}),zne=(e,t)=>({...Nne(e),options:[e,t]}),Fne=(e,t)=>({...Rne(e),options:[e,t]}),qne=(e,t)=>({...Cne(e),options:[e,t]}),Une=(e,t)=>({...Tne(e),options:[e,t]}),Wne=(e,t)=>({...kne(e),options:[e,t]}),Hne=(e,t)=>({...$ne(e),options:[e,t]});var Vne="Arrow",IL=P.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return p.jsx(We.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});IL.displayName=Vne;var Gne=IL;function y_(e){const[t,r]=P.useState(void 0);return Rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,c=Array.isArray(f)?f[0]:f;s=c.inlineSize,u=c.blockSize}else s=e.offsetWidth,u=e.offsetHeight;r({width:s,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var x_="Popper",[DL,LL]=gi(x_),[Kne,$L]=DL(x_),BL=e=>{const{__scopePopper:t,children:r}=e,[n,i]=P.useState(null);return p.jsx(Kne,{scope:t,anchor:n,onAnchorChange:i,children:r})};BL.displayName=x_;var zL="PopperAnchor",FL=P.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=$L(zL,r),s=P.useRef(null),u=Je(t,s),f=P.useRef(null);return P.useEffect(()=>{const c=f.current;f.current=n?.current||s.current,c!==f.current&&a.onAnchorChange(f.current)}),n?null:p.jsx(We.div,{...i,ref:u})});FL.displayName=zL;var b_="PopperContent",[Xne,Yne]=DL(b_),qL=P.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...y}=e,w=$L(b_,r),[S,O]=P.useState(null),E=Je(t,oe=>O(oe)),[C,A]=P.useState(null),N=y_(C),T=N?.width??0,R=N?.height??0,I=n+(a!=="center"?"-"+a:""),q=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(c)?c:[c],D=L.length>0,U={padding:q,boundary:L.filter(Zne),altBoundary:D},{refs:H,floatingStyles:V,placement:K,isPositioned:X,middlewareData:B}=Lne({strategy:"fixed",placement:I,whileElementsMounted:(...oe)=>Ane(...oe,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[Bne({mainAxis:i+R,alignmentAxis:s}),f&&zne({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fne():void 0,...U}),f&&qne({...U}),Une({...U,apply:({elements:oe,rects:me,availableWidth:ie,availableHeight:ue})=>{const{width:ve,height:re}=me.reference,De=oe.floating.style;De.setProperty("--radix-popper-available-width",`${ie}px`),De.setProperty("--radix-popper-available-height",`${ue}px`),De.setProperty("--radix-popper-anchor-width",`${ve}px`),De.setProperty("--radix-popper-anchor-height",`${re}px`)}}),C&&Hne({element:C,padding:u}),Jne({arrowWidth:T,arrowHeight:R}),m&&Wne({strategy:"referenceHidden",...U})]}),[Z,ee]=HL(K),M=ar(b);Rt(()=>{X&&M?.()},[X,M]);const $=B.arrow?.x,Q=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[pe,ye]=P.useState();return Rt(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),p.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:X?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Xne,{scope:r,placedSide:Z,onArrowChange:A,arrowX:$,arrowY:Q,shouldHideArrow:ae,children:p.jsx(We.div,{"data-side":Z,"data-align":ee,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});qL.displayName=b_;var UL="PopperArrow",Qne={top:"bottom",right:"left",bottom:"top",left:"right"},WL=P.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Yne(UL,n),s=Qne[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(Gne,{...i,ref:r,style:{...i.style,display:"block"}})})});WL.displayName=UL;function Zne(e){return e!==null}var Jne=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[c,d]=HL(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(i.arrow?.x??0)+u/2,g=(i.arrow?.y??0)+f/2;let b="",y="";return c==="bottom"?(b=s?h:`${m}px`,y=`${-f}px`):c==="top"?(b=s?h:`${m}px`,y=`${n.floating.height+f}px`):c==="right"?(b=`${-f}px`,y=s?h:`${g}px`):c==="left"&&(b=`${n.floating.width+f}px`,y=s?h:`${g}px`),{data:{x:b,y}}}});function HL(e){const[t,r="center"]=e.split("-");return[t,r]}var eie=BL,tie=FL,rie=qL,nie=WL,iie="Portal",w_=P.forwardRef((e,t)=>{const{container:r,...n}=e,[i,a]=P.useState(!1);Rt(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?b6.createPortal(p.jsx(We.div,{...n,ref:t}),s):null});w_.displayName=iie;function aie(e){const t=oie(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(lie);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function oie(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=uie(i),u=cie(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function lie(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function cie(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function uie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fie=X1[" useInsertionEffect ".trim().toString()]||Rt;function Ha({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=die({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const d=P.useRef(e!==void 0);P.useEffect(()=>{const h=d.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=u},[u,n])}const c=P.useCallback(d=>{if(u){const h=hie(d)?d(e):d;h!==e&&s.current?.(h)}else a(d)},[u,e,a,s]);return[f,c]}function die({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return fie(()=>{a.current=t},[t]),P.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}function hie(e){return typeof e=="function"}function __(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VL=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),pie="VisuallyHidden",mie=P.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...VL,...e.style}}));mie.displayName=pie;var vie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Do=new WeakMap,Bf=new WeakMap,zf={},rb=0,GL=function(e){return e&&(e.host||GL(e.parentNode))},gie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=GL(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yie=function(e,t,r,n){var i=gie(t,Array.isArray(e)?e:[e]);zf[r]||(zf[r]=new WeakMap);var a=zf[r],s=[],u=new Set,f=new Set(i),c=function(h){!h||u.has(h)||(u.add(h),c(h.parentNode))};i.forEach(c);var d=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(m){if(u.has(m))d(m);else try{var g=m.getAttribute(n),b=g!==null&&g!=="false",y=(Do.get(m)||0)+1,w=(a.get(m)||0)+1;Do.set(m,y),a.set(m,w),s.push(m),y===1&&b&&Bf.set(m,!0),w===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),u.clear(),rb++,function(){s.forEach(function(h){var m=Do.get(h)-1,g=a.get(h)-1;Do.set(h,m),a.set(h,g),m||(Bf.has(h)||h.removeAttribute(n),Bf.delete(h)),g||h.removeAttribute(r)}),rb--,rb||(Do=new WeakMap,Do=new WeakMap,Bf=new WeakMap,zf={})}},KL=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=vie(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),yie(n,i,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Iie;var t=Die(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$ie=ZL(),ts="data-scroll-locked",Bie=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` - .`.concat(bie,` { - overflow: hidden `).concat(n,`; - padding-right: `).concat(u,"px ").concat(n,`; - } - body[`).concat(ts,`] { - overflow: hidden `).concat(n,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(s,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(u,"px ").concat(n,`; - `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` - } - - .`).concat(Pd,` { - right: `).concat(u,"px ").concat(n,`; - } - - .`).concat(Nd,` { - margin-right: `).concat(u,"px ").concat(n,`; - } - - .`).concat(Pd," .").concat(Pd,` { - right: 0 `).concat(n,`; - } - - .`).concat(Nd," .").concat(Nd,` { - margin-right: 0 `).concat(n,`; - } - - body[`).concat(ts,`] { - `).concat(wie,": ").concat(u,`px; - } -`)},tk=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},zie=function(){P.useEffect(function(){return document.body.setAttribute(ts,(tk()+1).toString()),function(){var e=tk()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},Fie=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;zie();var a=P.useMemo(function(){return Lie(i)},[i]);return P.createElement($ie,{styles:Bie(a,!t,i,r?"":"!important")})},B1=!1;if(typeof window<"u")try{var Ff=Object.defineProperty({},"passive",{get:function(){return B1=!0,!0}});window.addEventListener("test",Ff,Ff),window.removeEventListener("test",Ff,Ff)}catch{B1=!1}var Lo=B1?{passive:!1}:!1,qie=function(e){return e.tagName==="TEXTAREA"},JL=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!qie(e)&&r[t]==="visible")},Uie=function(e){return JL(e,"overflowY")},Wie=function(e){return JL(e,"overflowX")},rk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=e$(e,n);if(i){var a=t$(e,n),s=a[1],u=a[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Hie=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Vie=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},e$=function(e,t){return e==="v"?Uie(t):Wie(t)},t$=function(e,t){return e==="v"?Hie(t):Vie(t)},Gie=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kie=function(e,t,r,n,i){var a=Gie(e,window.getComputedStyle(t).direction),s=a*n,u=r.target,f=t.contains(u),c=!1,d=s>0,h=0,m=0;do{if(!u)break;var g=t$(e,u),b=g[0],y=g[1],w=g[2],S=y-w-a*b;(b||S)&&e$(e,u)&&(h+=S,m+=b);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(c=!0),c},qf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nk=function(e){return[e.deltaX,e.deltaY]},ik=function(e){return e&&"current"in e?e.current:e},Xie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yie=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},Qie=0,$o=[];function Zie(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(Qie++)[0],a=P.useState(ZL)[0],s=P.useRef(e);P.useEffect(function(){s.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=xie([e.lockRef.current],(e.shards||[]).map(ik),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=P.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var S=qf(y),O=r.current,E="deltaX"in y?y.deltaX:O[0]-S[0],C="deltaY"in y?y.deltaY:O[1]-S[1],A,N=y.target,T=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&N.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,q=I?I===N||I.contains(N):!1;if(q)return!1;var L=rk(T,N);if(!L)return!0;if(L?A=T:(A=T==="v"?"h":"v",L=rk(T,N)),!L)return!1;if(!n.current&&"changedTouches"in y&&(E||C)&&(n.current=A),!A)return!0;var D=n.current||A;return Kie(D,w,y,D==="h"?E:C)},[]),f=P.useCallback(function(y){var w=y;if(!(!$o.length||$o[$o.length-1]!==a)){var S="deltaY"in w?nk(w):qf(w),O=t.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&Xie(A.delta,S)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var E=(s.current.shards||[]).map(ik).filter(Boolean).filter(function(A){return A.contains(w.target)}),C=E.length>0?u(w,E[0]):!s.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),c=P.useCallback(function(y,w,S,O){var E={name:y,delta:w,target:S,should:O,shadowParent:Jie(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=P.useCallback(function(y){r.current=qf(y),n.current=void 0},[]),h=P.useCallback(function(y){c(y.type,nk(y),y.target,u(y,e.lockRef.current))},[]),m=P.useCallback(function(y){c(y.type,qf(y),y.target,u(y,e.lockRef.current))},[]);P.useEffect(function(){return $o.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Lo),document.addEventListener("touchmove",f,Lo),document.addEventListener("touchstart",d,Lo),function(){$o=$o.filter(function(y){return y!==a}),document.removeEventListener("wheel",f,Lo),document.removeEventListener("touchmove",f,Lo),document.removeEventListener("touchstart",d,Lo)}},[]);var g=e.removeScrollBar,b=e.inert;return P.createElement(P.Fragment,null,b?P.createElement(a,{styles:Yie(i)}):null,g?P.createElement(Fie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Jie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eae=Pie(QL,Zie);var S_=P.forwardRef(function(e,t){return P.createElement($p,Mn({},e,{ref:t,sideCar:eae}))});S_.classNames=$p.classNames;var tae=[" ","Enter","ArrowUp","ArrowDown"],rae=[" ","Enter"],Va="Select",[Bp,zp,nae]=xL(Va),[Hs]=gi(Va,[nae,LL]),Fp=LL(),[iae,ta]=Hs(Va),[aae,oae]=Hs(Va),r$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:u,onValueChange:f,dir:c,name:d,autoComplete:h,disabled:m,required:g,form:b}=e,y=Fp(t),[w,S]=P.useState(null),[O,E]=P.useState(null),[C,A]=P.useState(!1),N=Kh(c),[T,R]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:Va}),[I,q]=Ha({prop:s,defaultProp:u,onChange:f,caller:Va}),L=P.useRef(null),D=w?b||!!w.closest("form"):!0,[U,H]=P.useState(new Set),V=Array.from(U).map(K=>K.props.value).join(";");return p.jsx(eie,{...y,children:p.jsxs(iae,{required:g,scope:t,trigger:w,onTriggerChange:S,valueNode:O,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:Gi(),value:I,onValueChange:q,open:T,onOpenChange:R,dir:N,triggerPointerDownPosRef:L,disabled:m,children:[p.jsx(Bp.Provider,{scope:t,children:p.jsx(aae,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(K=>{H(X=>new Set(X).add(K))},[]),onNativeOptionRemove:P.useCallback(K=>{H(X=>{const B=new Set(X);return B.delete(K),B})},[]),children:r})}),D?p.jsxs(O$,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:I,onChange:K=>q(K.target.value),disabled:m,form:b,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},V):null]})})};r$.displayName=Va;var n$="SelectTrigger",i$=P.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Fp(r),s=ta(n$,r),u=s.disabled||n,f=Je(t,s.onTriggerChange),c=zp(r),d=P.useRef("touch"),[h,m,g]=E$(y=>{const w=c().filter(E=>!E.disabled),S=w.find(E=>E.value===s.value),O=A$(w,y,S);O!==void 0&&s.onValueChange(O.value)}),b=y=>{u||(s.onOpenChange(!0),g()),y&&(s.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return p.jsx(tie,{asChild:!0,...a,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":j$(s.value)?"":void 0,...i,ref:f,onClick:Fe(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&b(y)}),onPointerDown:Fe(i.onPointerDown,y=>{d.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(b(y),y.preventDefault())}),onKeyDown:Fe(i.onKeyDown,y=>{const w=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(w&&y.key===" ")&&tae.includes(y.key)&&(b(),y.preventDefault())})})})});i$.displayName=n$;var a$="SelectValue",o$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...u}=e,f=ta(a$,r),{onValueNodeHasChildrenChange:c}=f,d=a!==void 0,h=Je(t,f.onValueNodeChange);return Rt(()=>{c(d)},[c,d]),p.jsx(We.span,{...u,ref:h,style:{pointerEvents:"none"},children:j$(f.value)?p.jsx(p.Fragment,{children:s}):a})});o$.displayName=a$;var sae="SelectIcon",s$=P.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});s$.displayName=sae;var lae="SelectPortal",l$=e=>p.jsx(w_,{asChild:!0,...e});l$.displayName=lae;var Ga="SelectContent",c$=P.forwardRef((e,t)=>{const r=ta(Ga,e.__scopeSelect),[n,i]=P.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Kc.createPortal(p.jsx(u$,{scope:e.__scopeSelect,children:p.jsx(Bp.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(f$,{...e,ref:t})});c$.displayName=Ga;var gn=10,[u$,ra]=Hs(Ga),cae="SelectContentImpl",uae=aie("SelectContent.RemoveScroll"),f$=P.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w,...S}=e,O=ta(Ga,r),[E,C]=P.useState(null),[A,N]=P.useState(null),T=Je(t,oe=>C(oe)),[R,I]=P.useState(null),[q,L]=P.useState(null),D=zp(r),[U,H]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{if(E)return KL(E)},[E]),_L();const K=P.useCallback(oe=>{const[me,...ie]=D().map(re=>re.ref.current),[ue]=ie.slice(-1),ve=document.activeElement;for(const re of oe)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===me&&A&&(A.scrollTop=0),re===ue&&A&&(A.scrollTop=A.scrollHeight),re?.focus(),document.activeElement!==ve))return},[D,A]),X=P.useCallback(()=>K([R,E]),[K,R,E]);P.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=O;P.useEffect(()=>{if(E){let oe={x:0,y:0};const me=ue=>{oe={x:Math.abs(Math.round(ue.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ue.pageY)-(Z.current?.y??0))}},ie=ue=>{oe.x<=10&&oe.y<=10?ue.preventDefault():E.contains(ue.target)||B(!1),document.removeEventListener("pointermove",me),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,B,Z]),P.useEffect(()=>{const oe=()=>B(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[B]);const[ee,M]=E$(oe=>{const me=D().filter(ve=>!ve.disabled),ie=me.find(ve=>ve.ref.current===document.activeElement),ue=A$(me,oe,ie);ue&&setTimeout(()=>ue.ref.current.focus())}),$=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&(I(oe),ue&&(V.current=!0))},[O.value]),Q=P.useCallback(()=>E?.focus(),[E]),ae=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&L(oe)},[O.value]),pe=n==="popper"?z1:d$,ye=pe===z1?{side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w}:{};return p.jsx(u$,{scope:r,content:E,viewport:A,onViewportChange:N,itemRefCallback:$,selectedItem:R,onItemLeave:Q,itemTextRefCallback:ae,focusSelectedItem:X,selectedItemText:q,position:n,isPositioned:U,searchRef:ee,children:p.jsx(S_,{as:uae,allowPinchZoom:!0,children:p.jsx(f_,{asChild:!0,trapped:O.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Fe(i,oe=>{O.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:p.jsx(u_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:p.jsx(pe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:oe=>oe.preventDefault(),...S,...ye,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Fe(S.onKeyDown,oe=>{const me=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!me&&oe.key.length===1&&M(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ue=D().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const ve=oe.target,re=ue.indexOf(ve);ue=ue.slice(re+1)}setTimeout(()=>K(ue)),oe.preventDefault()}})})})})})})});f$.displayName=cae;var fae="SelectItemAlignedPosition",d$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=ta(Ga,r),s=ra(Ga,r),[u,f]=P.useState(null),[c,d]=P.useState(null),h=Je(t,T=>d(T)),m=zp(r),g=P.useRef(!1),b=P.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:S,focusSelectedItem:O}=s,E=P.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&c&&y&&w&&S){const T=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),q=S.getBoundingClientRect();if(a.dir!=="rtl"){const ve=q.left-R.left,re=I.left-ve,De=T.left-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.left=vt+"px"}else{const ve=R.right-q.right,re=window.innerWidth-I.right-ve,De=window.innerWidth-T.right-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.right=vt+"px"}const L=m(),D=window.innerHeight-gn*2,U=y.scrollHeight,H=window.getComputedStyle(c),V=parseInt(H.borderTopWidth,10),K=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),B=parseInt(H.paddingBottom,10),Z=V+K+U+B+X,ee=Math.min(w.offsetHeight*5,Z),M=window.getComputedStyle(y),$=parseInt(M.paddingTop,10),Q=parseInt(M.paddingBottom,10),ae=T.top+T.height/2-gn,pe=D-ae,ye=w.offsetHeight/2,oe=w.offsetTop+ye,me=V+K+oe,ie=Z-me;if(me<=ae){const ve=L.length>0&&w===L[L.length-1].ref.current;u.style.bottom="0px";const re=c.clientHeight-y.offsetTop-y.offsetHeight,De=Math.max(pe,ye+(ve?Q:0)+re+X),Te=me+De;u.style.height=Te+"px"}else{const ve=L.length>0&&w===L[0].ref.current;u.style.top="0px";const De=Math.max(ae,V+y.offsetTop+(ve?$:0)+ye)+ie;u.style.height=De+"px",y.scrollTop=me-ae+y.offsetTop}u.style.margin=`${gn}px 0`,u.style.minHeight=ee+"px",u.style.maxHeight=D+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,u,c,y,w,S,a.dir,n]);Rt(()=>E(),[E]);const[C,A]=P.useState();Rt(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const N=P.useCallback(T=>{T&&b.current===!0&&(E(),O?.(),b.current=!1)},[E,O]);return p.jsx(hae,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(We.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});d$.displayName=fae;var dae="SelectPopperPosition",z1=P.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=gn,...a}=e,s=Fp(r);return p.jsx(rie,{...s,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});z1.displayName=dae;var[hae,O_]=Hs(Ga,{}),F1="SelectViewport",h$=P.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=ra(F1,r),s=O_(F1,r),u=Je(t,a.onViewportChange),f=P.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(Bp.Slot,{scope:r,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Fe(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const g=Math.abs(f.current-d.scrollTop);if(g>0){const b=window.innerHeight-gn*2,y=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),S=Math.max(y,w);if(S0?C:0,h.style.justifyContent="flex-end")}}}f.current=d.scrollTop})})})]})});h$.displayName=F1;var p$="SelectGroup",[pae,mae]=Hs(p$),vae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Gi();return p.jsx(pae,{scope:r,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...n,ref:t})})});vae.displayName=p$;var m$="SelectLabel",gae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=mae(m$,r);return p.jsx(We.div,{id:i.id,...n,ref:t})});gae.displayName=m$;var qh="SelectItem",[yae,v$]=Hs(qh),g$=P.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,u=ta(qh,r),f=ra(qh,r),c=u.value===n,[d,h]=P.useState(a??""),[m,g]=P.useState(!1),b=Je(t,O=>f.itemRefCallback?.(O,n,i)),y=Gi(),w=P.useRef("touch"),S=()=>{i||(u.onValueChange(n),u.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(yae,{scope:r,value:n,disabled:i,textId:y,isSelected:c,onItemTextChange:P.useCallback(O=>{h(E=>E||(O?.textContent??"").trim())},[]),children:p.jsx(Bp.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:p.jsx(We.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:Fe(s.onFocus,()=>g(!0)),onBlur:Fe(s.onBlur,()=>g(!1)),onClick:Fe(s.onClick,()=>{w.current!=="mouse"&&S()}),onPointerUp:Fe(s.onPointerUp,()=>{w.current==="mouse"&&S()}),onPointerDown:Fe(s.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:Fe(s.onPointerMove,O=>{w.current=O.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Fe(s.onPointerLeave,O=>{O.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Fe(s.onKeyDown,O=>{f.searchRef?.current!==""&&O.key===" "||(rae.includes(O.key)&&S(),O.key===" "&&O.preventDefault())})})})})});g$.displayName=qh;var Zl="SelectItemText",y$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=ta(Zl,r),u=ra(Zl,r),f=v$(Zl,r),c=oae(Zl,r),[d,h]=P.useState(null),m=Je(t,S=>h(S),f.onItemTextChange,S=>u.itemTextRefCallback?.(S,f.value,f.disabled)),g=d?.textContent,b=P.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value),[f.disabled,f.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=c;return Rt(()=>(y(b),()=>w(b)),[y,w,b]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:f.textId,...a,ref:m}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kc.createPortal(a.children,s.valueNode):null]})});y$.displayName=Zl;var x$="SelectItemIndicator",b$=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return v$(x$,r).isSelected?p.jsx(We.span,{"aria-hidden":!0,...n,ref:t}):null});b$.displayName=x$;var q1="SelectScrollUpButton",w$=P.forwardRef((e,t)=>{const r=ra(q1,e.__scopeSelect),n=O_(q1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollTop>0;a(c)};const f=r.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});w$.displayName=q1;var U1="SelectScrollDownButton",_$=P.forwardRef((e,t)=>{const r=ra(U1,e.__scopeSelect),n=O_(U1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollHeight-f.clientHeight,d=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});_$.displayName=U1;var S$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=ra("SelectScrollButton",r),s=P.useRef(null),u=zp(r),f=P.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return P.useEffect(()=>()=>f(),[f]),Rt(()=>{u().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Fe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:Fe(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:Fe(i.onPointerLeave,()=>{f()})})}),xae="SelectSeparator",bae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(We.div,{"aria-hidden":!0,...n,ref:t})});bae.displayName=xae;var W1="SelectArrow",wae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Fp(r),a=ta(W1,r),s=ra(W1,r);return a.open&&s.position==="popper"?p.jsx(nie,{...i,...n,ref:t}):null});wae.displayName=W1;var _ae="SelectBubbleInput",O$=P.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=P.useRef(null),a=Je(n,i),s=__(t);return P.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&d){const h=new Event("change",{bubbles:!0});d.call(u,t),u.dispatchEvent(h)}},[s,t]),p.jsx(We.select,{...r,style:{...VL,...r.style},ref:a,defaultValue:t})});O$.displayName=_ae;function j$(e){return e===""||e===void 0}function E$(e){const t=ar(e),r=P.useRef(""),n=P.useRef(0),i=P.useCallback(s=>{const u=r.current+s;t(u),(function f(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),a=P.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function A$(e,t,r){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Sae(e,Math.max(a,0));i.length===1&&(s=s.filter(c=>c!==r));const f=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==r?f:void 0}function Sae(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Oae=r$,jae=i$,Eae=o$,Aae=s$,Pae=l$,Nae=c$,Cae=h$,Tae=g$,kae=y$,Rae=b$,Mae=w$,Iae=_$;function tt({...e}){return p.jsx(Oae,{"data-slot":"select",...e})}function rt({...e}){return p.jsx(Eae,{"data-slot":"select-value",...e})}function nt({className:e,size:t="default",children:r,...n}){return p.jsxs(jae,{"data-slot":"select-trigger","data-size":t,className:Ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,p.jsx(Aae,{asChild:!0,children:p.jsx(cc,{className:"size-4 opacity-50"})})]})}function st({className:e,children:t,position:r="popper",...n}){return p.jsx(Pae,{children:p.jsxs(Nae,{"data-slot":"select-content",className:Ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[p.jsx(Dae,{}),p.jsx(Cae,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Lae,{})]})})}function Ae({className:e,children:t,...r}){return p.jsxs(Tae,{"data-slot":"select-item",className:Ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(Rae,{children:p.jsx(dR,{className:"size-4"})})}),p.jsx(kae,{children:t})]})}function Dae({className:e,...t}){return p.jsx(Mae,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(jB,{className:"size-4"})})}function Lae({className:e,...t}){return p.jsx(Iae,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(cc,{className:"size-4"})})}function $ae(){const e=[{id:1,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Defrost",lastEdited:"2025.12.03.11:45",hasError:!1},{id:2,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Opened/Preped",lastEdited:"2025.12.03.11:45",hasError:!1},{id:3,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Heated",lastEdited:"2025.12.03.11:45",hasError:!1},{id:4,location:"Location A",labelCategory:"Grab'n'Go",productCategory:"Sandwich",product:"Chicken Sandwich",template:`2"x6" G'n'G`,labelType:"",lastEdited:"2025.12.03.11:45",hasError:!0}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 text-gray-900 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0 text-gray-900",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs("div",{className:"flex rounded-md border border-gray-300 bg-white h-10 overflow-hidden shrink-0",children:[p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Import"}),p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Export"}),p.jsx("button",{type:"button",className:"px-4 h-full text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Edit"})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"text-red-600 font-bold italic text-lg",children:"One or more of your labels are missing fields from their templates (! ! ! 1 in total)."}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Product Category"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Product"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Template"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Label Type"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.location}),p.jsx(de,{children:t.labelCategory}),p.jsx(de,{children:t.productCategory}),p.jsx(de,{children:t.product}),p.jsxs(de,{className:"font-medium",children:[t.template,t.hasError&&p.jsx("span",{className:"text-red-600 font-bold ml-2",children:"! ! !"})]}),p.jsx(de,{children:t.labelType||"-"}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function Bae(){const e=[{id:1,category:"Prep",count:54,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:2,category:"Green",count:33,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:3,category:"Red",count:44,photo:"XXX",lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Category ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Category Photo"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.category}),p.jsx(de,{className:"font-numeric",children:t.count}),p.jsx(de,{className:"text-gray-500",children:t.photo}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function zae(){const e=[{id:1,type:"Defrost",count:54,lastEdited:"2025.12.03.11:45"},{id:2,type:"Thawed",count:33,lastEdited:"2025.12.03.11:45"},{id:3,type:"Opened",count:44,lastEdited:"2025.12.03.11:45"},{id:4,type:"Preped",count:17,lastEdited:"2025.12.03.11:45"},{id:5,type:"Heated",count:67,lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Type ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Types"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.type}),p.jsx(de,{className:"font-numeric",children:t.count}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}const Fae="label-template-",qae="label-template-ids";function P$(e){return`${Fae}${e}`}function N$(){return qae}function Uae(){return`template-${Date.now()}`}function Wae(){return`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Hae(e){return{id:e??Uae(),name:"未命名模板",labelType:"PRICE",unit:"cm",width:6,height:4,appliedLocation:"ALL",showRuler:!0,showGrid:!0,elements:[]}}const ob=[{name:'2"×1"',width:2,height:1,unit:"inch"},{name:'2"×2"',width:2,height:2,unit:"inch"},{name:'3"×1"',width:3,height:1,unit:"inch"},{name:'3"×2"',width:3,height:2,unit:"inch"},{name:'4"×2"',width:4,height:2,unit:"inch"},{name:'4"×6"',width:4,height:6,unit:"inch"},{name:"6cm×4cm",width:6,height:4,unit:"cm"},{name:"10cm×6cm",width:10,height:6,unit:"cm"},{name:"A4",width:21,height:29.7,unit:"cm"},{name:"A5",width:14.8,height:21,unit:"cm"}];function Vae(e,t=20,r=20){const n=Wae(),a={TEXT_STATIC:{width:120,height:24,config:{text:"文本",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRODUCT:{width:120,height:24,config:{text:"商品名",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRICE:{width:80,height:24,config:{text:"0.00",prefix:"¥",decimal:2,fontFamily:"Arial",fontSize:14,fontWeight:"bold",textAlign:"right"}},BARCODE:{width:160,height:48,config:{barcodeType:"CODE128",data:"123456789",showText:!0,orientation:"horizontal"}},QRCODE:{width:80,height:80,config:{data:"https://example.com",errorLevel:"M"}},IMAGE:{width:60,height:60,config:{src:"",scaleMode:"contain"}},DATE:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:0}},TIME:{width:100,height:24,config:{format:"HH:mm",offsetDays:0}},DURATION:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:3}},WEIGHT:{width:80,height:24,config:{unit:"g",value:500}},WEIGHT_PRICE:{width:100,height:24,config:{unitPrice:10,weight:.5,currency:"¥"}},BLANK:{width:40,height:24,config:{}},NUTRITION:{width:200,height:120,config:{calories:120,fat:"5g",protein:"3g",carbs:"10g",layout:"standard"}}}[e];return{id:n,type:e,x:t,y:r,width:a.width,height:a.height,rotation:"horizontal",border:"none",config:{...a.config}}}function C$(){try{const e=localStorage.getItem(N$());if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function T$(e){try{const t=localStorage.getItem(P$(e));return t?JSON.parse(t):null}catch{return null}}function ak(){const e=C$(),t=[];for(const r of e){const n=T$(r);n&&t.push(n)}return t.sort((r,n)=>n.id>r.id?1:-1)}function Gae(e){localStorage.setItem(N$(),JSON.stringify(e))}function Kae(e){const t=P$(e.id);localStorage.setItem(t,JSON.stringify(e));const r=C$();r.includes(e.id)||(r.push(e.id),Gae(r))}function Xae(e){const t=Yae(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(Zae);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Yae(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=eoe(i),u=Jae(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qae=Symbol("radix.slottable");function Zae(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qae}function Jae(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function eoe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qp="Dialog",[k$]=gi(qp),[toe,An]=k$(qp),R$=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=P.useRef(null),f=P.useRef(null),[c,d]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:qp});return p.jsx(toe,{scope:t,triggerRef:u,contentRef:f,contentId:Gi(),titleId:Gi(),descriptionId:Gi(),open:c,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(h=>!h),[d]),modal:s,children:r})};R$.displayName=qp;var M$="DialogTrigger",roe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(M$,r),a=Je(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A_(i.open),...n,ref:a,onClick:Fe(e.onClick,i.onOpenToggle)})});roe.displayName=M$;var j_="DialogPortal",[noe,I$]=k$(j_,{forceMount:void 0}),D$=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=An(j_,t);return p.jsx(noe,{scope:t,forceMount:r,children:P.Children.map(n,s=>p.jsx(Un,{present:r||a.open,children:p.jsx(w_,{asChild:!0,container:i,children:s})}))})};D$.displayName=j_;var Uh="DialogOverlay",L$=P.forwardRef((e,t)=>{const r=I$(Uh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Uh,e.__scopeDialog);return a.modal?p.jsx(Un,{present:n||a.open,children:p.jsx(aoe,{...i,ref:t})}):null});L$.displayName=Uh;var ioe=Xae("DialogOverlay.RemoveScroll"),aoe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(Uh,r);return p.jsx(S_,{as:ioe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":A_(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ka="DialogContent",$$=P.forwardRef((e,t)=>{const r=I$(Ka,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Ka,e.__scopeDialog);return p.jsx(Un,{present:n||a.open,children:a.modal?p.jsx(ooe,{...i,ref:t}):p.jsx(soe,{...i,ref:t})})});$$.displayName=Ka;var ooe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(null),i=Je(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return KL(a)},[]),p.jsx(B$,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fe(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault())})}),soe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return p.jsx(B$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),B$=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=An(Ka,r),f=P.useRef(null),c=Je(t,f);return _L(),p.jsxs(p.Fragment,{children:[p.jsx(f_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(u_,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":A_(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(loe,{titleId:u.titleId}),p.jsx(uoe,{contentRef:f,descriptionId:u.descriptionId})]})]})}),E_="DialogTitle",z$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(E_,r);return p.jsx(We.h2,{id:i.titleId,...n,ref:t})});z$.displayName=E_;var F$="DialogDescription",q$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(F$,r);return p.jsx(We.p,{id:i.descriptionId,...n,ref:t})});q$.displayName=F$;var U$="DialogClose",W$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(U$,r);return p.jsx(We.button,{type:"button",...n,ref:t,onClick:Fe(e.onClick,()=>i.onOpenChange(!1))})});W$.displayName=U$;function A_(e){return e?"open":"closed"}var H$="DialogTitleWarning",[Fle,V$]=k6(H$,{contentName:Ka,titleName:E_,docsSlug:"dialog"}),loe=({titleId:e})=>{const t=V$(H$),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},coe="DialogDescriptionWarning",uoe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V$(coe).contentName}}.`;return P.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},foe=R$,doe=D$,hoe=L$,poe=$$,moe=z$,voe=q$,goe=W$;function na({...e}){return p.jsx(foe,{"data-slot":"dialog",...e})}function yoe({...e}){return p.jsx(doe,{"data-slot":"dialog-portal",...e})}function xoe({className:e,...t}){return p.jsx(hoe,{"data-slot":"dialog-overlay",className:Ie("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function ia({className:e,children:t,...r}){return p.jsxs(yoe,{"data-slot":"dialog-portal",children:[p.jsx(xoe,{}),p.jsxs(poe,{"data-slot":"dialog-content",className:Ie("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,p.jsxs(goe,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[p.jsx(ec,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function aa({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:Ie("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ro({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-footer",className:Ie("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function oa({className:e,...t}){return p.jsx(moe,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",e),...t})}function au({className:e,...t}){return p.jsx(voe,{"data-slot":"dialog-description",className:Ie("text-muted-foreground text-sm",e),...t})}const boe=[{title:"模版信息",items:[{label:"Text",type:"TEXT_STATIC"},{label:"QR Code",type:"QRCODE"},{label:"Barcode",type:"BARCODE"},{label:"Blank Space",type:"BLANK"},{label:"Price",type:"TEXT_PRICE"},{label:"Image",type:"IMAGE"},{label:"Logo",type:"IMAGE"}]},{title:"标签信息",items:[{label:"Label Name",type:"TEXT_PRODUCT"},{label:"Text",type:"TEXT_STATIC"},{label:"QR Code",type:"QRCODE"},{label:"Barcode",type:"BARCODE"},{label:"Nutrition Facts",type:"NUTRITION"},{label:"Price",type:"TEXT_PRICE"},{label:"Duration Date",type:"DATE"},{label:"Duration Time",type:"TIME"},{label:"Duration",type:"DURATION"},{label:"Image",type:"IMAGE"},{label:"Label Type",type:"TEXT_STATIC"},{label:"How-to",type:"TEXT_STATIC"},{label:"Expiration Alert",type:"TEXT_STATIC"}]},{title:"自动生成",items:[{label:"Company",type:"TEXT_STATIC"},{label:"Employee",type:"TEXT_STATIC"},{label:"Current Date",type:"DATE"},{label:"Current Time",type:"TIME"},{label:"Label ID",type:"TEXT_STATIC"}]},{title:"打印时输入",subtitle:"点击添加到画布",items:[{label:"Text",type:"TEXT_STATIC",config:{inputType:"text"}},{label:"Weight",type:"WEIGHT"},{label:"Number",type:"TEXT_STATIC",config:{inputType:"number",text:"0"}},{label:"Date & Time",type:"DATE",config:{inputType:"datetime"}},{label:"Multiple Options",type:"TEXT_STATIC",config:{inputType:"options"}}]}];function woe({onAddElement:e}){return p.jsxs("div",{className:"w-44 shrink-0 border-r border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-2 py-2 border-b border-gray-200 font-semibold text-gray-800 text-sm",children:"Elements"}),p.jsx(fc,{className:"flex-1",children:p.jsx("div",{className:"p-1.5 space-y-3",children:boe.map(t=>p.jsxs("div",{children:[p.jsx("div",{className:"px-2 py-1 text-xs font-medium text-gray-500 uppercase tracking-wide",children:t.title}),t.subtitle&&p.jsx("div",{className:"px-2 py-0.5 text-[10px] text-gray-400",children:t.subtitle}),p.jsx("div",{className:"grid grid-cols-2 gap-1 mt-0.5",children:t.items.map((r,n)=>p.jsx("button",{type:"button",onClick:()=>e(r.type,r.config),className:"text-left px-2 py-1 text-xs rounded hover:bg-gray-100 border border-transparent hover:border-gray-200 truncate",children:r.label},`${t.title}-${r.label}-${n}`))})]},t.title))})})]})}var Uf={},Ul={},Wf={},ok;function Wr(){if(ok)return Wf;ok=1,Object.defineProperty(Wf,"__esModule",{value:!0});function e(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var t=function r(n,i){e(this,r),this.data=n,this.text=i.text||n,this.options=i};return Wf.default=t,Wf}var sk;function _oe(){if(sk)return Ul;sk=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.CODE39=void 0;var e=(function(){function y(w,S){for(var O=0;O=200){w=m.shift()-105;var S=n.SWAP[w];S!==void 0?y=d.next(m,g+1,S):((b===n.SET_A||b===n.SET_B)&&w===n.SHIFT&&(m[0]=b===n.SET_A?m[0]>95?m[0]-96:m[0]:m[0]<32?m[0]+96:m[0]),y=d.next(m,g+1,b))}else w=d.correctIndex(m,b),y=d.next(m,g+1,b);var O=d.getBar(w),E=w*g;return{result:O+y.result,checksum:E+y.checksum}}}]),d})(r.default);return Vf.default=f,Vf}var Gf={},uk;function Soe(){if(uk)return Gf;uk=1,Object.defineProperty(Gf,"__esModule",{value:!0});var e=ou(),t=function(u){return u.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},r=function(u){return u.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function i(s,u){var f=u?e.A_CHARS:e.B_CHARS,c=s.match(new RegExp("^("+f+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(c)return c[1]+"Ì"+a(s.substring(c[1].length));var d=s.match(new RegExp("^"+f+"+"))[0];return d.length===s.length?s:d+String.fromCharCode(u?205:206)+i(s.substring(d.length),!u)}function a(s){var u=n(s),f=u.length;if(f===s.length)return s;s=s.substring(f);var c=t(s)>=r(s);return u+String.fromCharCode(c?206:205)+i(s,c)}return Gf.default=function(s){var u=void 0,f=n(s).length;if(f>=2)u=e.C_START_CHAR+a(s);else{var c=t(s)>r(s);u=(c?e.A_START_CHAR:e.B_START_CHAR)+i(s,c)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(d,h){return"Ë"+h})},Gf}var fk;function Ooe(){if(fk)return Hf;fk=1,Object.defineProperty(Hf,"__esModule",{value:!0});var e=Up(),t=i(e),r=Soe(),n=i(r);function i(c){return c&&c.__esModule?c:{default:c}}function a(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}function s(c,d){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:c}function u(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}var f=(function(c){u(d,c);function d(h,m){if(a(this,d),/^[\x00-\x7F\xC8-\xD3]+$/.test(h))var g=s(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,(0,n.default)(h),m));else var g=s(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return s(g)}return d})(t.default);return Hf.default=f,Hf}var Kf={},dk;function joe(){if(dk)return Kf;dk=1,Object.defineProperty(Kf,"__esModule",{value:!0});var e=(function(){function c(d,h){for(var m=0;mb.width*10?b.width*10:b.fontSize,y.guardHeight=b.height+y.fontSize/2+b.textMargin,y}return e(m,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(b,y){return this.text.substr(b,y)}},{key:"leftEncode",value:function(b,y){return(0,n.default)(b,y)}},{key:"rightText",value:function(b,y){return this.text.substr(b,y)}},{key:"rightEncode",value:function(b,y){return(0,n.default)(b,y)}},{key:"encodeGuarded",value:function(){var b={fontSize:this.fontSize},y={height:this.guardHeight};return[{data:t.SIDE_BIN,options:y},{data:this.leftEncode(),text:this.leftText(),options:b},{data:t.MIDDLE_BIN,options:y},{data:this.rightEncode(),text:this.rightText(),options:b},{data:t.SIDE_BIN,options:y}]}},{key:"encodeFlat",value:function(){var b=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:b.join(""),text:this.text}}}]),m})(a.default);return Zf.default=d,Zf}var xk;function Noe(){if(xk)return Qf;xk=1,Object.defineProperty(Qf,"__esModule",{value:!0});var e=(function(){function h(m,g){for(var b=0;bb.width*10?y.fontSize=b.width*10:y.fontSize=b.fontSize,y.guardHeight=b.height+y.fontSize/2+b.textMargin,y}return e(m,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==d(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var b="";return b+="101",b+=(0,r.default)(this.data.substr(0,6),"LLLLLL"),b+="01010",b+=(0,r.default)(this.data.substr(6,6),"RRRRRR"),b+="101",{data:b,text:this.text}}},{key:"guardedEncoding",value:function(){var b=[];return this.displayValue&&b.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),b.push({data:"101"+(0,r.default)(this.data[0],"L"),options:{height:this.guardHeight}}),b.push({data:(0,r.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),b.push({data:"01010",options:{height:this.guardHeight}}),b.push({data:(0,r.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),b.push({data:(0,r.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&b.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),b}}]),m})(i.default);function d(h){var m=0,g;for(g=1;g<11;g+=2)m+=parseInt(h[g]);for(g=0;g<11;g+=2)m+=parseInt(h[g])*3;return(10-m%10)%10}return Wl.default=c,Wl}var nd={},Ok;function Roe(){if(Ok)return nd;Ok=1,Object.defineProperty(nd,"__esModule",{value:!0});var e=(function(){function b(y,w){for(var S=0;SS.width*10?O.fontSize=S.width*10:O.fontSize=S.fontSize,O.guardHeight=S.height+O.fontSize/2+S.textMargin,O}return e(y,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var S="";return S+="101",S+=this.encodeMiddleDigits(),S+="010101",{data:S,text:this.text}}},{key:"guardedEncoding",value:function(){var S=[];return this.displayValue&&S.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),S.push({data:"101",options:{height:this.guardHeight}}),S.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),S.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&S.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),S}},{key:"encodeMiddleDigits",value:function(){var S=this.upcA[0],O=this.upcA[this.upcA.length-1],E=h[parseInt(O)][parseInt(S)];return(0,r.default)(this.middleDigits,E)}}]),y})(i.default);function g(b,y){for(var w=parseInt(b[b.length-1]),S=d[w],O="",E=0,C=0;C=3&&this.number<=131070}}]),c})(r.default);return Vl.pharmacode=u,Vl}var Gl={},$k;function Woe(){if($k)return Gl;$k=1,Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.codabar=void 0;var e=(function(){function f(c,d){for(var h=0;h":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),zo}var zk;function Y$(){if(zk)return fd;zk=1,Object.defineProperty(fd,"__esModule",{value:!0});var e=(function(){function c(d,h){for(var m=0;m0?d.fontSize+d.textMargin:0)+d.marginTop+d.marginBottom}function i(c,d,h){if(h.displayValue&&dd&&(d=c[h].height);return d}function f(c,d,h){var m;if(h)m=h;else if(typeof document<"u")m=document.createElement("canvas").getContext("2d");else return 0;m.font=d.fontOptions+" "+d.fontSize+"px "+d.font;var g=m.measureText(c);if(!g)return 0;var b=g.width;return b}return Tr.getMaximumHeightOfEncodings=u,Tr.getEncodingHeight=n,Tr.getBarcodePadding=i,Tr.calculateEncodingAttributes=a,Tr.getTotalWidthOfEncodings=s,Tr}var Zk;function Joe(){if(Zk)return wd;Zk=1,Object.defineProperty(wd,"__esModule",{value:!0});var e=(function(){function u(f,c){for(var d=0;d0?(g=0,h.textAlign="left"):c.textAlign=="right"?(g=d.width-1,h.textAlign="right"):(g=d.width/2,h.textAlign="center"),h.fillText(d.text,g,b)}}},{key:"moveCanvasDrawing",value:function(c){var d=this.canvas.getContext("2d");d.translate(c.width,0)}},{key:"restoreCanvas",value:function(){var c=this.canvas.getContext("2d");c.restore()}}]),u})();return wd.default=s,wd}var _d={},Jk;function ese(){if(Jk)return _d;Jk=1,Object.defineProperty(_d,"__esModule",{value:!0});var e=(function(){function f(c,d){for(var h=0;h0&&(this.drawRect(w-h.width*y,b,h.width*y,h.height,d),y=0);y>0&&this.drawRect(w-h.width*(y-1),b,h.width*y,h.height,d)}},{key:"drawSVGText",value:function(d,h,m){var g=this.document.createElementNS(s,"text");if(h.displayValue){var b,y;g.setAttribute("font-family",h.font),g.setAttribute("font-size",h.fontSize),h.fontOptions.includes("bold")&&g.setAttribute("font-weight","bold"),h.fontOptions.includes("italic")&&g.setAttribute("font-style","italic"),h.textPosition=="top"?y=h.fontSize-h.textMargin:y=h.height+h.textMargin+h.fontSize,h.textAlign=="left"||m.barcodePadding>0?(b=0,g.setAttribute("text-anchor","start")):h.textAlign=="right"?(b=m.width-1,g.setAttribute("text-anchor","end")):(b=m.width/2,g.setAttribute("text-anchor","middle")),g.setAttribute("x",b),g.setAttribute("y",y),g.appendChild(this.document.createTextNode(m.text)),d.appendChild(g)}}},{key:"setSvgAttributes",value:function(d,h){var m=this.svg;m.setAttribute("width",d+"px"),m.setAttribute("height",h+"px"),m.setAttribute("x","0px"),m.setAttribute("y","0px"),m.setAttribute("viewBox","0 0 "+d+" "+h),m.setAttribute("xmlns",s),m.setAttribute("version","1.1")}},{key:"createGroup",value:function(d,h,m){var g=this.document.createElementNS(s,"g");return g.setAttribute("transform","translate("+d+", "+h+")"),m.appendChild(g),g}},{key:"setGroupOptions",value:function(d,h){d.setAttribute("fill",h.lineColor)}},{key:"drawRect",value:function(d,h,m,g,b){var y=this.document.createElementNS(s,"rect");return y.setAttribute("x",d),y.setAttribute("y",h),y.setAttribute("width",m),y.setAttribute("height",g),b.appendChild(y),y}}]),f})();return _d.default=u,_d}var Sd={},eR;function tse(){if(eR)return Sd;eR=1,Object.defineProperty(Sd,"__esModule",{value:!0});var e=(function(){function n(i,a){for(var s=0;s"u"?"undefined":e(d))==="object"&&!d.nodeName)return{element:d,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException}}function f(d){var h=document.querySelectorAll(d);if(h.length!==0){for(var m=[],g=0;g"u")throw Error("No element to render on was provided.");return U._renderProperties=(0,c.default)(q),U._encodings=[],U._options=w.default,U._errorHandler=new g.default(U),typeof L<"u"&&(D=D||{},D.format||(D.format=T()),U.options(D)[D.format](L,D).render()),U};E.getModule=function(I){return t.default[I]};for(var C in t.default)t.default.hasOwnProperty(C)&&A(t.default,C);function A(I,q){O.prototype[q]=O.prototype[q.toUpperCase()]=O.prototype[q.toLowerCase()]=function(L,D){var U=this;return U._errorHandler.wrapBarcodeCall(function(){D.text=typeof D.text>"u"?void 0:""+D.text;var H=(0,n.default)(U._options,D);H=(0,h.default)(H);var V=I[q],K=N(L,V,H);return U._encodings.push(K),U})}}function N(I,q,L){I=""+I;var D=new q(I,L);if(!D.valid())throw new b.InvalidInputException(D.constructor.name,I);var U=D.encode();U=(0,a.default)(U);for(var H=0;Ht in e?lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H1=(e,t)=>{for(var r in t||(t={}))t3.call(t,r)&&oR(e,r,t[r]);if(Wh)for(var r of Wh(t))r3.call(t,r)&&oR(e,r,t[r]);return e},V1=(e,t)=>{var r={};for(var n in e)t3.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wh)for(var n of Wh(e))t.indexOf(n)<0&&r3.call(e,n)&&(r[n]=e[n]);return r};/** - * @license QR Code generator library (TypeScript) - * Copyright (c) Project Nayuki. - * SPDX-License-Identifier: MIT - */var Xa;(e=>{const t=class Ge{constructor(f,c,d,h){if(this.version=f,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],fGe.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=f*4+17;let m=[];for(let b=0;b7)throw new RangeError("Invalid value");let b,y;for(b=d;;b++){const E=Ge.getNumDataCodewords(b,c)*8,C=s.getTotalBits(f,b);if(C<=E){y=C;break}if(b>=h)throw new RangeError("Data too long")}for(const E of[Ge.Ecc.MEDIUM,Ge.Ecc.QUARTILE,Ge.Ecc.HIGH])g&&y<=Ge.getNumDataCodewords(b,E)*8&&(c=E);let w=[];for(const E of f){r(E.mode.modeBits,4,w),r(E.numChars,E.mode.numCharCountBits(b),w);for(const C of E.getData())w.push(C)}i(w.length==y);const S=Ge.getNumDataCodewords(b,c)*8;i(w.length<=S),r(0,Math.min(4,S-w.length),w),r(0,(8-w.length%8)%8,w),i(w.length%8==0);for(let E=236;w.lengthO[C>>>3]|=E<<7-(C&7)),new Ge(b,c,O,m)}getModule(f,c){return 0<=f&&f>>9)*1335;const h=(c<<10|d)^21522;i(h>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,n(h,m));this.setFunctionModule(8,7,n(h,6)),this.setFunctionModule(8,8,n(h,7)),this.setFunctionModule(7,8,n(h,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,n(h,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,n(h,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,n(h,m));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let f=this.version;for(let d=0;d<12;d++)f=f<<1^(f>>>11)*7973;const c=this.version<<12|f;i(c>>>18==0);for(let d=0;d<18;d++){const h=n(c,d),m=this.size-11+d%3,g=Math.floor(d/3);this.setFunctionModule(m,g,h),this.setFunctionModule(g,m,h)}}drawFinderPattern(f,c){for(let d=-4;d<=4;d++)for(let h=-4;h<=4;h++){const m=Math.max(Math.abs(h),Math.abs(d)),g=f+h,b=c+d;0<=g&&g{(E!=y-m||A>=b)&&O.push(C[E])});return i(O.length==g),O}drawCodewords(f){if(f.length!=Math.floor(Ge.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let d=this.size-1;d>=1;d-=2){d==6&&(d=5);for(let h=0;h>>3],7-(c&7)),c++)}}i(c==f.length*8)}applyMask(f){if(f<0||f>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&f++):(this.finderPenaltyAddHistory(b,y),g||(f+=this.finderPenaltyCountPatterns(y)*Ge.PENALTY_N3),g=this.modules[m][w],b=1);f+=this.finderPenaltyTerminateAndCount(g,b,y)*Ge.PENALTY_N3}for(let m=0;m5&&f++):(this.finderPenaltyAddHistory(b,y),g||(f+=this.finderPenaltyCountPatterns(y)*Ge.PENALTY_N3),g=this.modules[w][m],b=1);f+=this.finderPenaltyTerminateAndCount(g,b,y)*Ge.PENALTY_N3}for(let m=0;mg+(b?1:0),c);const d=this.size*this.size,h=Math.ceil(Math.abs(c*20-d*10)/d)-1;return i(0<=h&&h<=9),f+=h*Ge.PENALTY_N4,i(0<=f&&f<=2568888),f}getAlignmentPatternPositions(){if(this.version==1)return[];{const f=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(f*2-2))*2;let d=[6];for(let h=this.size-7;d.lengthGe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*f+128)*f+64;if(f>=2){const d=Math.floor(f/7)+2;c-=(25*d-10)*d-55,f>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(f,c){return Math.floor(Ge.getNumRawDataModules(f)/8)-Ge.ECC_CODEWORDS_PER_BLOCK[c.ordinal][f]*Ge.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][f]}static reedSolomonComputeDivisor(f){if(f<1||f>255)throw new RangeError("Degree out of range");let c=[];for(let h=0;h0);for(const h of f){const m=h^d.shift();d.push(0),c.forEach((g,b)=>d[b]^=Ge.reedSolomonMultiply(g,m))}return d}static reedSolomonMultiply(f,c){if(f>>>8||c>>>8)throw new RangeError("Byte out of range");let d=0;for(let h=7;h>=0;h--)d=d<<1^(d>>>7)*285,d^=(c>>>h&1)*f;return i(d>>>8==0),d}finderPenaltyCountPatterns(f){const c=f[1];i(c<=this.size*3);const d=c>0&&f[2]==c&&f[3]==c*3&&f[4]==c&&f[5]==c;return(d&&f[0]>=c*4&&f[6]>=c?1:0)+(d&&f[6]>=c*4&&f[0]>=c?1:0)}finderPenaltyTerminateAndCount(f,c,d){return f&&(this.finderPenaltyAddHistory(c,d),c=0),c+=this.size,this.finderPenaltyAddHistory(c,d),this.finderPenaltyCountPatterns(d)}finderPenaltyAddHistory(f,c){c[0]==0&&(f+=this.size),c.pop(),c.unshift(f)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function r(u,f,c){if(f<0||f>31||u>>>f)throw new RangeError("Value out of range");for(let d=f-1;d>=0;d--)c.push(u>>>d&1)}function n(u,f){return(u>>>f&1)!=0}function i(u){if(!u)throw new Error("Assertion error")}const a=class Et{constructor(f,c,d){if(this.mode=f,this.numChars=c,this.bitData=d,c<0)throw new RangeError("Invalid argument");this.bitData=d.slice()}static makeBytes(f){let c=[];for(const d of f)r(d,8,c);return new Et(Et.Mode.BYTE,f.length,c)}static makeNumeric(f){if(!Et.isNumeric(f))throw new RangeError("String contains non-numeric characters");let c=[];for(let d=0;d=1<{(t=>{const r=class{constructor(i,a){this.ordinal=i,this.formatBits=a}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),t.Ecc=r})(e.QrCode||(e.QrCode={}))})(Xa||(Xa={}));(e=>{(t=>{const r=class{constructor(i,a){this.modeBits=i,this.numBitsCharCount=a}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),t.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Xa||(Xa={}));var Xo=Xa;/** - * @license qrcode.react - * Copyright (c) Paul O'Shannessy - * SPDX-License-Identifier: ISC - */var cse={L:Xo.QrCode.Ecc.LOW,M:Xo.QrCode.Ecc.MEDIUM,Q:Xo.QrCode.Ecc.QUARTILE,H:Xo.QrCode.Ecc.HIGH},n3=128,i3="L",a3="#FFFFFF",o3="#000000",s3=!1,l3=1,use=4,fse=0,dse=.1;function c3(e,t=0){const r=[];return e.forEach(function(n,i){let a=null;n.forEach(function(s,u){if(!s&&a!==null){r.push(`M${a+t} ${i+t}h${u-a}v1H${a+t}z`),a=null;return}if(u===n.length-1){if(!s)return;a===null?r.push(`M${u+t},${i+t} h1v1H${u+t}z`):r.push(`M${a+t},${i+t} h${u+1-a}v1H${a+t}z`);return}s&&a===null&&(a=u)})}),r.join("")}function u3(e,t){return e.slice().map((r,n)=>n=t.y+t.h?r:r.map((i,a)=>a=t.x+t.w?i:!1))}function hse(e,t,r,n){if(n==null)return null;const i=e.length+r*2,a=Math.floor(t*dse),s=i/t,u=(n.width||a)*s,f=(n.height||a)*s,c=n.x==null?e.length/2-u/2:n.x*s,d=n.y==null?e.length/2-f/2:n.y*s,h=n.opacity==null?1:n.opacity;let m=null;if(n.excavate){let b=Math.floor(c),y=Math.floor(d),w=Math.ceil(u+c-b),S=Math.ceil(f+d-y);m={x:b,y,w,h:S}}const g=n.crossOrigin;return{x:c,y:d,h:f,w:u,excavation:m,opacity:h,crossOrigin:g}}function pse(e,t){return t!=null?Math.max(Math.floor(t),0):e?use:fse}function f3({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:a,size:s,boostLevel:u}){let f=z.useMemo(()=>{const b=(Array.isArray(e)?e:[e]).reduce((y,w)=>(y.push(...Xo.QrSegment.makeSegments(w)),y),[]);return Xo.QrCode.encodeSegments(b,cse[t],r,void 0,void 0,u)},[e,t,r,u]);const{cells:c,margin:d,numCells:h,calculatedImageSettings:m}=z.useMemo(()=>{let g=f.getModules();const b=pse(n,i),y=g.length+b*2,w=hse(g,s,b,a);return{cells:g,margin:b,numCells:y,calculatedImageSettings:w}},[f,s,a,n,i]);return{qrcode:f,margin:d,cells:c,numCells:h,calculatedImageSettings:m}}var mse=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),vse=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,marginSize:m,imageSettings:g}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:w}=y,S=V1(y,["style"]),O=g?.src,E=z.useRef(null),C=z.useRef(null),A=z.useCallback(H=>{E.current=H,typeof r=="function"?r(H):r&&(r.current=H)},[r]),[N,T]=z.useState(!1),{margin:R,cells:I,numCells:q,calculatedImageSettings:L}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:m,imageSettings:g,size:a});z.useEffect(()=>{if(E.current!=null){const H=E.current,V=H.getContext("2d");if(!V)return;let K=I;const X=C.current,B=L!=null&&X!==null&&X.complete&&X.naturalHeight!==0&&X.naturalWidth!==0;B&&L.excavation!=null&&(K=u3(I,L.excavation));const Z=window.devicePixelRatio||1;H.height=H.width=a*Z;const ee=a/q*Z;V.scale(ee,ee),V.fillStyle=u,V.fillRect(0,0,q,q),V.fillStyle=f,mse?V.fill(new Path2D(c3(K,R))):I.forEach(function(M,$){M.forEach(function(Q,ae){Q&&V.fillRect(ae+R,$+R,1,1)})}),L&&(V.globalAlpha=L.opacity),B&&V.drawImage(X,L.x+R,L.y+R,L.w,L.h)}}),z.useEffect(()=>{T(!1)},[O]);const D=H1({height:a,width:a},w);let U=null;return O!=null&&(U=z.createElement("img",{src:O,key:O,style:{display:"none"},onLoad:()=>{T(!0)},ref:C,crossOrigin:L?.crossOrigin})),z.createElement(z.Fragment,null,z.createElement("canvas",H1({style:D,height:a,width:a,ref:A,role:"img"},S)),U)});vse.displayName="QRCodeCanvas";var d3=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,title:m,marginSize:g,imageSettings:b}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:w,cells:S,numCells:O,calculatedImageSettings:E}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:g,imageSettings:b,size:a});let C=S,A=null;b!=null&&E!=null&&(E.excavation!=null&&(C=u3(S,E.excavation)),A=z.createElement("image",{href:b.src,height:E.h,width:E.w,x:E.x+w,y:E.y+w,preserveAspectRatio:"none",opacity:E.opacity,crossOrigin:E.crossOrigin}));const N=c3(C,w);return z.createElement("svg",H1({height:a,width:a,viewBox:`0 0 ${O} ${O}`,ref:r,role:"img"},y),!!m&&z.createElement("title",null,m),z.createElement("path",{fill:u,d:`M0,0 h${O}v${O}H0z`,shapeRendering:"crispEdges"}),z.createElement("path",{fill:f,d:N,shapeRendering:"crispEdges"}),A)});d3.displayName="QRCodeSVG";function gse({data:e,width:t,height:r,showText:n,orientation:i="horizontal"}){const a=P.useRef(null),s=i==="vertical",u=Math.max(20,(s?t:r)-(n?14:4));P.useEffect(()=>{if(a.current&&e)try{sse(a.current,e,{format:"CODE128",width:1,height:u,displayValue:n!==!1,margin:2,fontOptions:"",fontSize:10})}catch{}},[e,u,n]);const f=p.jsx("svg",{ref:a,className:"w-full h-full min-h-0",style:{maxHeight:s?t:r}});return s?p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{style:{transform:"rotate(-90deg)",transformOrigin:"center center",width:r,height:t,display:"flex",alignItems:"center",justifyContent:"center"},children:f})}):f}const lc=8;function qo(e){return Math.round(e/lc)*lc}function Hh(e,t){return t==="cm"?e*37.8:e*96}function sR(e,t){return t==="cm"?e/37.8:e/96}function h3({el:e}){const t=e.config,r=e.type,n={fontSize:t?.fontSize??14,fontFamily:t?.fontFamily??"Arial",fontWeight:t?.fontWeight??"normal",textAlign:t?.textAlign??"left",color:t?.color??"#000"},i=t?.inputType;if(r==="TEXT_STATIC"){const a=t?.text??"文本";return i==="number"?p.jsx("input",{type:"number",readOnly:!0,value:t?.text??"0",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:{...n,textAlign:"right"}}):i==="options"?p.jsxs("div",{className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 flex items-center pointer-events-none text-gray-500",style:n,children:[p.jsx("span",{className:"truncate flex-1",children:a||"请选择..."}),p.jsx("span",{className:"ml-auto text-gray-400",children:"▼"})]}):i==="text"?p.jsx("input",{type:"text",readOnly:!0,value:a,className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRODUCT"){const a=t?.text??"商品名";return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRICE"){const a=t?.prefix??"¥",s=t?.text??"0.00";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden flex items-center",style:{...n,justifyContent:n.textAlign==="center"?"center":n.textAlign==="right"?"flex-end":"flex-start"},children:[p.jsx("span",{children:a}),p.jsx("span",{children:s})]})}if(r==="BARCODE"){const a=t?.data??"123456789",s=t?.showText!==!1,u=t?.orientation==="vertical"?"vertical":"horizontal";return p.jsx("div",{className:"flex flex-col items-center justify-center w-full h-full overflow-hidden p-0.5",children:p.jsx("div",{className:"flex-1 w-full min-h-0 flex items-center justify-center",children:p.jsx(gse,{data:a,width:e.width,height:e.height,showText:s,orientation:u})})})}if(r==="QRCODE"){const a=t?.data??"https://example.com",s=Math.min(e.width,e.height)-4;return p.jsx("div",{className:"w-full h-full flex items-center justify-center p-0.5",children:p.jsx(d3,{value:a,size:Math.max(20,s),level:"M",includeMargin:!1})})}if(r==="IMAGE"){const a=t?.src;return a?p.jsx("img",{src:a,alt:"",className:"w-full h-full object-contain"}):p.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gray-100 text-gray-500 text-[10px] border border-dashed border-gray-300",children:p.jsx("span",{className:"font-medium",children:"Logo"})})}if(r==="DATE"){const s=(t?.format??"YYYY-MM-DD").replace("YYYY","2025").replace("MM","02").replace("DD","01");return t?.inputType==="datetime"||t?.inputType==="date"?p.jsx("input",{type:"date",readOnly:!0,value:"2025-02-01",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none text-[10px]",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="TIME"){const s=(t?.format??"HH:mm").replace("HH","12").replace("mm","30");return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="DURATION")return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:"保质期 2025-02-04"});if(r==="WEIGHT"){const a=t?.value??500,s=t?.unit??"g";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[a,s]})}if(r==="WEIGHT_PRICE"){const a=t?.unitPrice??10,s=t?.weight??.5,u=t?.currency??"¥";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[u,(a*s).toFixed(2)]})}if(r==="NUTRITION"){const a=t?.calories??120;return p.jsxs("div",{className:"text-[8px] p-0.5 w-full h-full overflow-hidden flex flex-col",children:[p.jsx("div",{className:"font-semibold border-b border-black",children:"Nutrition Facts"}),p.jsxs("div",{children:["Calories ",a]})]})}return r==="BLANK"?p.jsx("div",{className:"w-full h-full border border-dashed border-gray-200"}):p.jsx("div",{className:"text-gray-500 text-[10px] px-1 truncate w-full flex items-center justify-center",children:e.type.replace(/_/g," ")})}function yse({template:e,selectedId:t,onSelect:r,onUpdateElement:n,onDeleteElement:i,onTemplateChange:a,scale:s=1,onZoomIn:u,onZoomOut:f,onPreview:c}){const d=P.useRef(null),h=P.useRef(null),m=P.useRef(null),g=P.useRef(null),b=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[S,O]=z.useState(!1),[E,C]=z.useState(!1),A=P.useRef(null),[N,T]=z.useState({x:0,y:0}),R=P.useRef(null),I=Hh(e.width,e.unit),q=Hh(e.height,e.unit),L=e.showGrid!==!1,D=P.useCallback((M,$)=>{if(S||M.button===1)return;M.stopPropagation(),r($),h.current?.focus();const Q=e.elements.find(pe=>pe.id===$);if(!Q)return;const ae=document.getElementById(`element-${$}`);ae&&(ae.classList.add("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),ae.style.cursor="grabbing"),m.current={id:$,startX:M.clientX,startY:M.clientY,elX:Q.x,elY:Q.y},y.current={id:$,x:Q.x,y:Q.y},M.currentTarget.setPointerCapture?.(M.pointerId)},[e.elements,r,S]),U=P.useCallback(M=>{w.current!==null&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{M(),w.current=null})},[]),H=P.useCallback(M=>{if(E&&R.current){const $=M.clientX-R.current.startX,Q=M.clientY-R.current.startY;T({x:R.current.x+$,y:R.current.y+Q});return}if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q;return}if(m.current){const{id:$,startX:Q,startY:ae,elX:pe,elY:ye}=m.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=Math.max(0,pe+ie),re=Math.max(0,ye+ue),De=qo(ve),Te=qo(re),Ke=document.getElementById(`element-${$}`);Ke&&(Ke.style.left=`${De}px`,Ke.style.top=`${Te}px`),y.current={id:$,x:De,y:Te}})}if(g.current){const{id:$,corner:Q,startX:ae,startY:pe,w:ye,h:oe,elX:me,elY:ie}=g.current,ue=M.clientX,ve=M.clientY;U(()=>{const re=(ue-ae)/s,De=(ve-pe)/s;let Te=ye,Ke=oe,lt=me,vt=ie;Q.includes("e")&&(Te=Math.max(20,ye+re)),Q.includes("w")&&(Te=Math.max(20,ye-re),lt=me+re),Q.includes("s")&&(Ke=Math.max(12,oe+De)),Q.includes("n")&&(Ke=Math.max(12,oe-De),vt=ie+De);const dr=qo(Te),Or=qo(Ke),jr=qo(lt),Kt=qo(vt),Xt=document.getElementById(`element-${$}`);Xt&&(Xt.style.width=`${dr}px`,Xt.style.height=`${Or}px`,Xt.style.left=`${jr}px`,Xt.style.top=`${Kt}px`),y.current={id:$,width:dr,height:Or,x:jr,y:Kt}})}if(b.current&&a){const{edge:$,startX:Q,startY:ae,startW:pe,startH:ye}=b.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=sR(ie,e.unit),re=sR(ue,e.unit);if($==="bottom"){const De=Math.max(1,ye+re);a({height:De})}else{const De=Math.max(1,pe+ve);a({width:De})}})}},[E,a,s,e.unit,U]),V=P.useCallback(()=>{E&&(C(!1),A.current=null,R.current=null),w.current!==null&&(cancelAnimationFrame(w.current),w.current=null);const M=m.current?.id||g.current?.id;if(M){const $=document.getElementById(`element-${M}`);$&&($.classList.remove("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),$.style.cursor="")}if(y.current){const{id:$,...Q}=y.current;n($,Q),y.current=null}m.current=null,g.current=null,b.current=null},[n]);P.useEffect(()=>{const M=Q=>{Q.code==="Space"&&!Q.repeat&&O(!0)},$=Q=>{Q.code==="Space"&&(O(!1),C(!1),A.current=null,R.current=null)};return window.addEventListener("keydown",M),window.addEventListener("keyup",$),()=>{window.removeEventListener("keydown",M),window.removeEventListener("keyup",$)}},[]),P.useEffect(()=>{const M=d.current;if(!M)return;const $=()=>{M.scrollLeft=Math.max(0,(M.scrollWidth-M.clientWidth)/2),M.scrollTop=Math.max(0,(M.scrollHeight-M.clientHeight)/2)},Q=requestAnimationFrame($),ae=setTimeout($,100);return()=>{cancelAnimationFrame(Q),clearTimeout(ae)}},[s,I,q]);const K=P.useCallback(M=>{if(!t)return;if(M.key==="Delete"||M.key==="Backspace"){M.preventDefault();const ye=e.elements.findIndex(oe=>oe.id===t);if(ye>=0){const oe=e.elements.filter(me=>me.id!==t);i(t),r(oe[ye]?.id??oe[ye-1]?.id??null)}return}const $=e.elements.find(ye=>ye.id===t);if(!$)return;const Q=M.shiftKey?1:lc;let ae=0,pe=0;switch(M.key){case"ArrowLeft":ae=-Q;break;case"ArrowRight":ae=Q;break;case"ArrowUp":pe=-Q;break;case"ArrowDown":pe=-Q;break;default:return}M.key==="ArrowDown"&&(pe=Q),M.preventDefault(),n($.id,{x:Math.max(0,$.x+ae),y:Math.max(0,$.y+pe)})},[t,e.elements,n,i,r]),X=()=>r(null),B=M=>{(S||M.button===1)&&(M.preventDefault(),C(!0),A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft||0,scrollTop:d.current?.scrollTop||0},M.currentTarget.setPointerCapture(M.pointerId))},Z=M=>{if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q}},ee=M=>{E&&(C(!1),A.current=null)};return p.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-gray-100",children:[p.jsxs("div",{className:"shrink-0 px-4 py-2 border-b border-gray-200 bg-white flex items-center justify-between gap-2 flex-wrap z-10",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Label Preview"}),p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c&&p.jsx("button",{type:"button",onClick:c,className:"h-8 px-3 rounded border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 text-xs font-medium shadow-sm transition-all active:scale-95",children:"预览"}),a&&p.jsxs(p.Fragment,{children:[p.jsxs(tt,{value:(()=>{const M=ob.findIndex($=>$.width===e.width&&$.height===e.height&&$.unit===e.unit);return M>=0?String(M):"custom"})(),onValueChange:M=>{if(M==="custom")return;const $=ob[Number(M)];$&&a({width:$.width,height:$.height,unit:$.unit})},children:[p.jsx(nt,{className:"h-8 w-[130px] text-xs",children:p.jsx(rt,{placeholder:"画布大小"})}),p.jsxs(st,{children:[ob.map((M,$)=>p.jsx(Ae,{value:String($),className:"text-xs",children:M.name},$)),p.jsx(Ae,{value:"custom",className:"text-xs text-gray-500",children:"自定义"})]})]}),p.jsx("button",{type:"button",onClick:()=>a({showGrid:!L}),className:Ie("h-8 px-3 rounded border text-xs font-medium shadow-sm transition-colors",L?"border-gray-300 bg-white text-gray-700 hover:bg-gray-50":"border-gray-300 bg-gray-100 text-gray-500"),children:L?"隐藏网格":"显示网格"})]}),p.jsxs("div",{className:"flex items-center gap-1 bg-white rounded border border-gray-300 p-0.5 shadow-sm h-8",children:[p.jsx("button",{type:"button",onClick:f,disabled:!f,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"缩小",children:"−"}),p.jsxs("span",{className:"min-w-[3rem] text-center text-xs text-gray-600 font-medium",children:[Math.round(s*100),"%"]}),p.jsx("button",{type:"button",onClick:u,disabled:!u,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"放大",children:"+"})]})]})]}),p.jsx("div",{ref:d,className:Ie("flex-1 overflow-auto bg-gray-100 relative",S?"cursor-grab active:cursor-grabbing":""),onClick:X,onPointerDown:B,onPointerMove:Z,onPointerUp:ee,onPointerLeave:ee,children:p.jsx("div",{style:{minWidth:"100%",minHeight:"100%",width:"fit-content",height:"fit-content",display:"flex",padding:50,boxSizing:"border-box",transform:`translate(${N.x}px, ${N.y}px)`},children:p.jsxs("div",{ref:h,tabIndex:0,className:Ie("relative bg-white shadow-lg border border-dashed border-gray-300 origin-top-left outline-none m-auto",E?"cursor-grabbing":"cursor-grab"),style:{width:I,height:q,transform:`scale(${s})`,backgroundImage:L?`linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px), - linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px)`:void 0,backgroundSize:L?`${lc}px ${lc}px`:void 0,pointerEvents:S?"none":"auto"},onPointerDown:M=>{const $=M.target,Q=$.closest('[id^="element-"]'),ae=$.closest('[title*="拖拽拉高"]')||$.closest('[title*="拖拽拉宽"]');h.current?.contains($)&&!Q&&!ae&&!m.current&&!g.current&&(M.preventDefault(),M.stopPropagation(),C(!0),R.current={x:N.x,y:N.y,startX:M.clientX,startY:M.clientY},A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft??0,scrollTop:d.current?.scrollTop??0},M.currentTarget.setPointerCapture?.(M.pointerId))},onPointerMove:H,onPointerUp:V,onKeyDown:K,children:[e.showRuler&&p.jsxs("div",{className:"absolute top-0 left-0 right-0 h-5 border-b border-gray-300 bg-gray-50 text-[10px] text-gray-500 flex items-center px-1 pointer-events-none select-none",children:[e.unit," ",e.width," × ",e.height]}),a&&p.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 cursor-ns-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-t border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉高纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"bottom",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),a&&p.jsx("div",{className:"absolute top-0 right-0 bottom-0 w-3 cursor-ew-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-l border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉宽纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"right",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),e.elements.map(M=>p.jsxs("div",{id:`element-${M.id}`,className:Ie("absolute box-border cursor-move overflow-hidden transition-shadow",M.border==="line"&&"border border-gray-400",M.border==="dotted"&&"border border-dotted border-gray-400",t===M.id&&"ring-2 ring-blue-500 ring-offset-1 z-10"),style:{left:M.x,top:M.y,width:M.width,height:M.height},onClick:$=>{$.stopPropagation(),r(M.id)},onPointerDown:$=>D($,M.id),children:[p.jsx(h3,{el:M}),t===M.id&&p.jsxs(p.Fragment,{children:[["nw","ne","sw","se"].map($=>p.jsx("div",{className:"absolute w-4 h-4 bg-white border-2 border-blue-500 rounded-full z-20 shadow-md hover:scale-110 transition-transform",style:{cursor:"nwse-resize",top:$.startsWith("n")?-6:void 0,bottom:$.startsWith("s")?-6:void 0,left:$.endsWith("w")?-6:void 0,right:$.endsWith("e")?-6:void 0},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(pe=>pe.id===M.id);g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$)),["n","s","w","e"].map($=>p.jsx("div",{className:"absolute bg-blue-500/50 border border-white/50 rounded-sm z-10 shadow-sm hover:bg-blue-600",style:{cursor:$==="n"||$==="s"?"ns-resize":"ew-resize",width:$==="n"||$==="s"?"20px":"6px",height:$==="n"||$==="s"?"6px":"20px",top:$==="n"?-3:$==="s"?void 0:"50%",bottom:$==="s"?-3:void 0,left:$==="w"?-3:$==="e"?void 0:"50%",right:$==="e"?-3:void 0,transform:$==="n"||$==="s"?"translateX(-50%)":"translateY(-50%)"},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(ye=>ye.id===M.id),pe=document.getElementById(`element-${M.id}`);pe&&pe.classList.add("z-50","opacity-90"),g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$))]})]},M.id))]})})})]})}function xse({template:e,maxWidth:t=480}){const r=Hh(e.width,e.unit),n=Hh(e.height,e.unit),i=t?Math.min(t/r,t/n,2):1,a=r*i,s=n*i;return p.jsx("div",{className:"flex items-center justify-center p-4 bg-gray-100 rounded",children:p.jsx("div",{style:{width:a,height:s},className:"relative bg-white shadow-lg overflow-hidden",children:p.jsx("div",{className:"origin-top-left",style:{position:"absolute",left:0,top:0,width:r,height:n,transform:`scale(${i})`,transformOrigin:"0 0"},children:e.elements.map(u=>p.jsx("div",{className:"absolute box-border overflow-hidden pointer-events-none flex items-center justify-center text-xs",style:{left:u.x,top:u.y,width:u.width,height:u.height,border:u.border==="line"?"1px solid #999":u.border==="dotted"?"1px dotted #999":void 0},children:p.jsx(h3,{el:u})},u.id))})})})}var bse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wse=bse.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_se="Label",p3=P.forwardRef((e,t)=>p.jsx(wse.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));p3.displayName=_se;var Sse=p3;function je({className:e,...t}){return p.jsx(Sse,{"data-slot":"label",className:Ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Vp="Switch",[Ose]=gi(Vp),[jse,Ese]=Ose(Vp),m3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f="on",onCheckedChange:c,form:d,...h}=e,[m,g]=P.useState(null),b=Je(t,E=>g(E)),y=P.useRef(!1),w=m?d||!!m.closest("form"):!0,[S,O]=Ha({prop:i,defaultProp:a??!1,onChange:c,caller:Vp});return p.jsxs(jse,{scope:r,checked:S,disabled:u,children:[p.jsx(We.button,{type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":x3(S),"data-disabled":u?"":void 0,disabled:u,value:f,...h,ref:b,onClick:Fe(e.onClick,E=>{O(C=>!C),w&&(y.current=E.isPropagationStopped(),y.current||E.stopPropagation())})}),w&&p.jsx(y3,{control:m,bubbles:!y.current,name:n,value:f,checked:S,required:s,disabled:u,form:d,style:{transform:"translateX(-100%)"}})]})});m3.displayName=Vp;var v3="SwitchThumb",g3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Ese(v3,r);return p.jsx(We.span,{"data-state":x3(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});g3.displayName=v3;var Ase="SwitchBubbleInput",y3=P.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const s=P.useRef(null),u=Je(s,a),f=__(r),c=y_(t);return P.useEffect(()=>{const d=s.current;if(!d)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==r&&g){const b=new Event("click",{bubbles:n});g.call(d,r),d.dispatchEvent(b)}},[f,r,n]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:u,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});y3.displayName=Ase;function x3(e){return e?"checked":"unchecked"}var Pse=m3,Nse=g3;function no({className:e,...t}){return p.jsx(Pse,{"data-slot":"switch",className:Ie("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Nse,{"data-slot":"switch-thumb",className:Ie("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Cse({template:e,selectedElement:t,onTemplateChange:r,onElementChange:n,onDeleteElement:i}){return t?p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Element)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"X"}),p.jsx(Be,{type:"number",value:t.x,onChange:a=>n(t.id,{x:Number(a.target.value)||0}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Y"}),p.jsx(Be,{type:"number",value:t.y,onChange:a=>n(t.id,{y:Number(a.target.value)||0}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Width"}),p.jsx(Be,{type:"number",value:t.width,onChange:a=>n(t.id,{width:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Height"}),p.jsx(Be,{type:"number",value:t.height,onChange:a=>n(t.id,{height:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Rotation"}),p.jsxs(tt,{value:t.rotation,onValueChange:a=>n(t.id,{rotation:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"horizontal"}),p.jsx(Ae,{value:"vertical",children:"vertical"})]})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Border"}),p.jsxs(tt,{value:t.border,onValueChange:a=>n(t.id,{border:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"none",children:"none"}),p.jsx(Ae,{value:"line",children:"line"}),p.jsx(Ae,{value:"dotted",children:"dotted"})]})]})]}),p.jsx(Tse,{element:t,onChange:a=>n(t.id,{config:{...t.config,...a}})}),i&&p.jsx("div",{className:"pt-4 border-t border-gray-100",children:p.jsx(Ne,{variant:"destructive",className:"w-full",onClick:()=>i(t.id),children:"Delete Element"})})]})})]}):p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Template)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Template Name"}),p.jsx(Be,{value:e.name,onChange:a=>r({name:a.target.value}),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Label Type"}),p.jsxs(tt,{value:e.labelType,onValueChange:a=>r({labelType:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"PRICE",children:"PRICE"}),p.jsx(Ae,{value:"NUTRITION",children:"NUTRITION"}),p.jsx(Ae,{value:"SHIPPING",children:"SHIPPING"})]})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Applied Location"}),p.jsxs(tt,{value:e.appliedLocation,onValueChange:a=>r({appliedLocation:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ALL",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Width"}),p.jsx(Be,{type:"number",value:e.width,onChange:a=>r({width:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Height"}),p.jsx(Be,{type:"number",value:e.height,onChange:a=>r({height:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Unit"}),p.jsxs(tt,{value:e.unit,onValueChange:a=>r({unit:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"cm",children:"cm"}),p.jsx(Ae,{value:"inch",children:"inch"})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{checked:e.showRuler,onCheckedChange:a=>r({showRuler:a})}),p.jsx(je,{className:"text-xs",children:"Show Ruler"})]})]})})]})}function Tse({element:e,onChange:t}){const r=e.config,n=(i,a)=>t({[i]:a});switch(e.type){case"TEXT_STATIC":case"TEXT_PRODUCT":case"TEXT_PRICE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Text"}),p.jsx(Be,{value:r.text??"",onChange:i=>n("text",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Font Size"}),p.jsx(Be,{type:"number",value:r.fontSize??14,onChange:i=>n("fontSize",Number(i.target.value)||14),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Text Align"}),p.jsxs(tt,{value:r.textAlign??"left",onValueChange:i=>n("textAlign",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"left",children:"Left"}),p.jsx(Ae,{value:"center",children:"Center"}),p.jsx(Ae,{value:"right",children:"Right"})]})]})]})]});case"BARCODE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Data"}),p.jsx(Be,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"方向"}),p.jsxs(tt,{value:r.orientation??"horizontal",onValueChange:i=>n("orientation",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"水平"}),p.jsx(Ae,{value:"vertical",children:"竖排"})]})]})]})]});case"QRCODE":return p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Data (URL)"}),p.jsx(Be,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]});case"WEIGHT":return p.jsxs("div",{children:[p.jsx(je,{className:"text-xs",children:"Value"}),p.jsx(Be,{type:"number",value:r.value??0,onChange:i=>n("value",Number(i.target.value)||0),className:"h-8 text-sm mt-1"})]});default:return p.jsxs("div",{className:"text-xs text-gray-500",children:["Config for ",e.type," (edit in code if needed)"]})}}const kse=.5,Rse=2,lR=.25,Mse=1;function Ise({templateId:e,initialTemplate:t,onClose:r,onSaved:n}){const[i,a]=P.useState(()=>t?{...t}:Hae(e??void 0)),[s,u]=P.useState(null),[f,c]=P.useState(Mse),[d,h]=P.useState(!1),m=i.elements.find(E=>E.id===s)??null,g=P.useCallback((E,C)=>{const A=Vae(E,30,30);C&&Object.keys(C).length>0&&(A.config={...A.config,...C}),a(N=>({...N,elements:[...N.elements,A]})),u(A.id)},[]),b=P.useCallback((E,C)=>{a(A=>({...A,elements:A.elements.map(N=>N.id===E?{...N,...C}:N)}))},[]),y=P.useCallback(E=>{a(C=>({...C,elements:C.elements.filter(A=>A.id!==E)})),u(null)},[]),w=P.useCallback(E=>{a(C=>({...C,...E}))},[]),S=P.useCallback(()=>{Kae(i),n(),r()},[i,n,r]),O=P.useCallback(()=>{const E=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),C=URL.createObjectURL(E),A=document.createElement("a");A.href=C,A.download=`label-template-${i.id}.json`,A.click(),URL.revokeObjectURL(C)},[i]);return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200 bg-white shrink-0",children:[p.jsxs(Ne,{variant:"outline",size:"sm",onClick:r,children:[p.jsx(sB,{className:"w-4 h-4 mr-1"}),"Back"]}),p.jsx("span",{className:"text-sm font-medium text-gray-700 truncate flex-1",children:i.name}),p.jsxs(Ne,{size:"sm",onClick:O,variant:"outline",children:[p.jsx(Y1,{className:"w-4 h-4 mr-1"}),"Export JSON"]}),p.jsxs(Ne,{size:"sm",className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:S,children:[p.jsx(o8,{className:"w-4 h-4 mr-1"}),"Save"]})]}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[p.jsx(woe,{onAddElement:g}),p.jsx(yse,{template:i,selectedId:s,onSelect:u,onUpdateElement:b,onDeleteElement:y,onTemplateChange:w,scale:f,onZoomIn:()=>c(E=>Math.min(Rse,E+lR)),onZoomOut:()=>c(E=>Math.max(kse,E-lR)),onPreview:()=>h(!0)}),p.jsx(na,{open:d,onOpenChange:h,children:p.jsxs(ia,{className:"max-w-[90vw] max-h-[90vh] overflow-auto",children:[p.jsx(aa,{children:p.jsx(oa,{children:"标签预览"})}),p.jsx(xse,{template:i,maxWidth:500})]})}),p.jsx(Cse,{template:i,selectedElement:m,onTemplateChange:w,onElementChange:b,onDeleteElement:y})]})]})}function Dse(){const[e,t]=P.useState(()=>ak()),[r,n]=P.useState("list"),[i,a]=P.useState(null),[s,u]=P.useState(""),[f,c]=P.useState("all"),d=P.useCallback(()=>{t(ak())},[]);P.useEffect(()=>{r==="list"&&d()},[r,d]);const h=e.filter(y=>{const w=!s||y.name.toLowerCase().includes(s.toLowerCase()),S=f==="all"||y.appliedLocation===f;return w&&S}),m=()=>{a(null),n("editor")},g=y=>{a(y),n("editor")},b=()=>{n("list"),a(null)};if(r==="editor"){const y=i?T$(i):null;return p.jsx("div",{className:"h-[calc(100vh-8rem)] min-h-[500px] flex flex-col",children:p.jsx(Ise,{templateId:i,initialTemplate:y,onClose:b,onSaved:d})})}return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500",value:s,onChange:y=>u(y.target.value)}),p.jsxs(tt,{value:f,onValueChange:c,children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"ALL",children:"ALL"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"hidden bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",onClick:m,children:["New Label Template ",p.jsx(Ur,{className:"ml-1 w-4 h-4"})]})]}),p.jsxs("div",{className:"text-red-600 font-bold italic text-sm md:text-base",children:["***One or more templates have incomplete labels attached to them.",p.jsx("br",{}),"Go to Labels view to see which labels are missing fields."]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Label Template"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[150px]",children:"Size"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[100px]",children:"Actions"})]})}),p.jsx(_r,{children:h.length===0?p.jsx(Qe,{children:p.jsx(de,{colSpan:5,className:"text-center text-gray-500 py-8",children:'No templates yet. Click "New Label Template" to create one.'})}):h.map(y=>p.jsxs(Qe,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>g(y.id),children:[p.jsx(de,{className:"font-medium",children:y.name}),p.jsx(de,{children:y.appliedLocation}),p.jsxs(de,{className:"text-sm text-gray-600",children:[y.elements.length," element(s)"]}),p.jsxs(de,{children:[y.width,"×",y.height," ",y.unit]}),p.jsx(de,{onClick:w=>w.stopPropagation(),children:p.jsxs(Ne,{variant:"outline",size:"sm",onClick:()=>g(y.id),children:[p.jsx(jd,{className:"w-3 h-3 mr-1"}),"Edit"]})})]},y.id))})]})})]})}function Lse(){const e=[{id:1,name:"Prepped By",contents:"A. Smith; B. Doe; C. Borne",lastEdited:"2025.12.03.11:45"},{id:2,name:"Checked By",contents:"D. Manager; E. Supervisor",lastEdited:"2025.12.04.09:30"},{id:3,name:"Allergens",contents:"Peanuts; Dairy; Gluten; Soy",lastEdited:"2025.12.05.14:15"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Multiple Options ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Multiple Option Name"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(de,{className:"font-medium",children:t.name}),p.jsx(de,{className:"text-gray-600",children:t.contents}),p.jsx(de,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function $se({currentView:e="Labels",onViewChange:t}){const r=["Labels","Label Categories","Label Types","Label Templates","Multiple Options"],n=i=>{t&&t(i)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto bg-white",children:r.map(i=>p.jsx("div",{onClick:()=>n(i),style:e===i?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px ${e===i?"text-blue-600":"border-b-2 border-b-transparent text-gray-600 hover:text-gray-800"}`,children:i},i))})}),p.jsxs("div",{className:"min-h-[400px]",children:[e==="Labels"&&p.jsx($ae,{}),e==="Label Categories"&&p.jsx(Bae,{}),e==="Label Types"&&p.jsx(zae,{}),e==="Label Templates"&&p.jsx(Dse,{}),e==="Multiple Options"&&p.jsx(Lse,{}),!["Labels","Label Categories","Label Types","Label Templates","Multiple Options"].includes(e)&&p.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-400",children:[e," content coming soon..."]})]})]})}function Bse(){const[e,t]=P.useState([{id:"1",name:"Pop",isOpen:!0,subcategories:[{id:"1-1",name:"2024",isOpen:!0,files:[{id:"f1",name:"uuuuu",date:"10/23/24, 12:21 AM",type:"image"},{id:"f2",name:"664EF167-DFCE-49C1-A417-DC09FEDF78D7.jpg",date:"11/24/25, 8:40 PM",type:"image"}]}]},{id:"2",name:"Training",isOpen:!0,subcategories:[{id:"2-1",name:"BOH",isOpen:!1,files:[]},{id:"2-2",name:"FOH",isOpen:!0,files:[]}]},{id:"3",name:"ww",isOpen:!1,subcategories:[]}]),r=i=>{t(a=>a.map(s=>s.id===i?{...s,isOpen:!s.isOpen}:s))},n=(i,a)=>{t(s=>s.map(u=>u.id!==i?u:{...u,subcategories:u.subcategories.map(f=>f.id===a?{...f,isOpen:!f.isOpen}:f)}))};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Be,{className:"bg-white border border-black rounded-md h-10 w-[150px]"}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Search"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-black rounded-md h-10 w-[100px]",children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"})]})]}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Location"})]})]}),p.jsxs("div",{className:"bg-gray-100 p-2 flex justify-between items-center border-b border-gray-200",children:[p.jsx("h1",{className:"text-xl font-medium text-gray-700",children:"Information"}),p.jsxs("div",{className:"flex items-center gap-4 text-gray-600",children:[p.jsx("div",{className:"flex items-center gap-1 bg-gray-700 text-white text-[10px] px-1 py-0.5 rounded-sm font-bold",children:"NEW"}),p.jsx(h8,{className:"h-5 w-5"}),p.jsx("span",{className:"font-medium",children:"55789"})]})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Category",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsx("div",{className:"space-y-4",children:e.map(i=>p.jsxs("div",{className:"border border-gray-300 rounded-sm overflow-hidden",children:[p.jsxs("div",{className:"bg-gradient-to-b from-gray-50 to-gray-100 border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>r(i.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[i.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),i.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),i.isOpen&&p.jsxs("div",{className:"p-2 space-y-3 bg-white",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Subcategory",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsxs("div",{className:"space-y-3",children:[i.subcategories.map(a=>p.jsxs("div",{className:"border border-gray-200 rounded-sm",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>n(i.id,a.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[a.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),a.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),a.isOpen&&p.jsxs("div",{className:"p-3 bg-gray-50/50",children:[p.jsx("div",{className:"mb-2 text-xs font-bold text-gray-500 uppercase tracking-wide",children:"Files"}),p.jsxs("div",{className:"flex flex-wrap gap-2 mb-3 justify-end",children:[p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Upload Your Own File(s)"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Create A Custom File"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm",children:"Edit File Permissions"}),p.jsxs(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm gap-1",children:["Sort (A-Z) ",p.jsx(cB,{className:"h-3 w-3"})]})]}),p.jsx("div",{className:"space-y-1",children:a.files.length>0?a.files.map(s=>p.jsxs("div",{className:"flex items-center bg-gray-200/50 p-2 border border-gray-200 rounded-sm text-sm hover:bg-gray-200 transition-colors",children:[p.jsx("div",{className:"flex-shrink-0 mr-3",children:s.type==="image"?p.jsx(Ia,{className:"h-5 w-5 text-[#2c7bb6]"}):p.jsx(uc,{className:"h-5 w-5 text-[#2c7bb6]"})}),p.jsx("div",{className:"flex-1 min-w-0",children:p.jsx("div",{className:"font-medium text-gray-700 truncate",children:s.name})}),p.jsx("div",{className:"text-xs text-gray-500 mr-4 whitespace-nowrap",children:s.date}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(uc,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(jd,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-red-400 hover:text-red-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(ec,{className:"h-3 w-3"})})]})]},s.id)):p.jsx("div",{className:"p-4 border-2 border-dashed border-gray-300 rounded-sm text-center text-gray-400 text-sm",children:"No files in this subcategory"})})]})]},a.id)),i.subcategories.length===0&&p.jsx("div",{className:"p-2 text-sm text-gray-400 italic",children:"No subcategories"})]})]})]},i.id))})]})]})}const zse=[{id:1,title:"Coffee - 2 hrs",subtitle:"1 min - Completes at 12:05 PM",totalTime:7200,remainingTime:0,status:"expired",icon:CB},{id:2,title:"Clean Tablet",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:237,status:"running",icon:v8},{id:3,title:"Replace Sanitizer Towels",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:238,status:"running",icon:Aj},{id:4,title:"Take Out Trash",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:Aj},{id:5,title:"Change Utensils",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:C8},{id:6,title:"Sanitize Surfaces",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2157,status:"running",icon:Uv},{id:7,title:"Check Temperatures",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2158,status:"running",icon:Uv},{id:8,title:"Ranch 4 hrs",subtitle:"4 hrs - Completes at 04:04 PM",totalTime:14400,remainingTime:2158,status:"running",icon:Uv}];function Fse({timer:e}){const t=(e.totalTime-e.remainingTime)/e.totalTime*100,r=e.remainingTime===0,n=i=>{if(i<=0)return"0s";const a=Math.floor(i/60),s=i%60;return`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`};return p.jsxs("div",{className:"bg-gray-200 rounded-xl p-4 flex flex-col items-center relative shadow-sm h-[280px]",children:[p.jsxs("div",{className:"text-center mb-2",children:[p.jsx("h3",{className:"text-lg font-medium text-gray-800 leading-tight",children:e.title}),p.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.subtitle})]}),p.jsxs("div",{className:"relative w-32 h-32 my-auto flex items-center justify-center",children:[p.jsxs("svg",{className:"w-full h-full transform -rotate-90",children:[p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:"white",strokeWidth:"12",fill:"transparent"}),p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:r?"#ef4444":"#3b82f6",strokeWidth:"12",fill:"transparent",strokeDasharray:351.86,strokeDashoffset:r?0:351.86*(t/100),className:"transition-all duration-1000 ease-linear"})]}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[p.jsx("span",{className:Ie("text-3xl font-bold",r?"text-red-500":"text-gray-800"),children:r?"0s":n(e.remainingTime)}),p.jsx("span",{className:Ie("text-[10px] font-medium uppercase mt-1",r?"text-red-400":"text-gray-400"),children:"Remaining"})]})]}),p.jsxs("div",{className:"w-full flex justify-between items-end mt-2",children:[p.jsx(e8,{className:"w-5 h-5 text-blue-700 fill-current"}),p.jsx("div",{className:"flex flex-col items-center",children:p.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-300 flex items-center justify-center text-gray-400 mb-1",children:p.jsx(e.icon,{className:"w-5 h-5"})})}),p.jsx("div",{className:"flex flex-col items-end",children:p.jsx("span",{className:"text-xs text-blue-600 font-bold mb-2 cursor-pointer",children:"EDIT"})})]}),p.jsx("button",{className:"absolute bottom-12 right-4 bg-blue-600 rounded-full p-1 text-white hover:bg-blue-700 shadow-md",children:p.jsx(ec,{className:"w-4 h-4"})})]})}function qse(){const[e,t]=P.useState(!0);return p.jsxs("div",{className:"h-full flex flex-col bg-gray-50 relative",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between shadow-sm z-10",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("button",{className:"flex items-center text-blue-500 text-lg font-medium",children:[p.jsx(_B,{className:"w-6 h-6"}),"Back"]}),p.jsx(XB,{className:"w-6 h-6 text-gray-500"})]}),p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"bg-blue-600 p-1.5 rounded-md",children:p.jsx(x8,{className:"w-5 h-5 text-white"})}),p.jsx("h1",{className:"text-xl font-bold text-blue-900",children:"Timers"})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 font-medium",children:[p.jsx("span",{children:"86016"}),p.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"})]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-blue-500 font-medium",children:[p.jsx(A8,{className:"w-6 h-6 text-gray-400"}),p.jsxs("button",{className:"flex items-center gap-1",children:[p.jsx(Ur,{className:"w-5 h-5"}),"Add Timer"]})]})]}),p.jsxs("div",{className:"bg-gray-700 text-white px-6 py-2 flex items-center justify-between",children:[p.jsx("div",{className:"flex-1"})," ",p.jsx("div",{className:"font-medium",children:"Today, December 15"}),p.jsxs("div",{className:"flex-1 flex justify-end items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(LB,{className:"w-5 h-5 text-gray-300"}),p.jsx(WB,{className:"w-5 h-5 text-gray-500"})]}),p.jsx(nB,{className:"w-5 h-5 text-blue-400"})]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:zse.map(r=>p.jsx(Fse,{timer:r},r.id))})}),e&&p.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-[1px]",children:p.jsx("div",{className:"bg-black text-white rounded-xl shadow-2xl w-[600px] max-w-full overflow-hidden border border-gray-800",children:p.jsxs("div",{className:"p-8 text-center space-y-6",children:[p.jsx("h2",{className:"text-3xl font-medium text-blue-500",children:"Coffee - 2 hrs"}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsx("p",{className:"text-2xl font-light",children:"Timer expired at 12:05 PM"}),p.jsx("p",{className:"text-2xl font-light",children:"Please discard the coffee"})]}),p.jsx("div",{className:"flex justify-end",children:p.jsx("span",{className:"bg-gray-200 text-black text-[10px] px-1 rounded-sm opacity-50",children:"TACT_Img_Timer-Notification@2x"})}),p.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-8",children:[p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-700 hover:bg-blue-600 text-white h-14 text-xl font-medium rounded-lg",children:"Mute"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-500 text-white h-14 text-xl font-medium rounded-lg",children:"Restart"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-800 hover:bg-blue-700 text-white h-14 text-xl font-medium rounded-lg",children:"Acknowledge"})]})]})})})]})}var lb="rovingFocusGroup.onEntryFocus",Use={bubbles:!1,cancelable:!0},uu="RovingFocusGroup",[G1,b3,Wse]=xL(uu),[Hse,w3]=gi(uu,[Wse]),[Vse,Gse]=Hse(uu),_3=P.forwardRef((e,t)=>p.jsx(G1.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(G1.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Kse,{...e,ref:t})})}));_3.displayName=uu;var Kse=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=e,m=P.useRef(null),g=Je(t,m),b=Kh(a),[y,w]=Ha({prop:s,defaultProp:u??null,onChange:f,caller:uu}),[S,O]=P.useState(!1),E=ar(c),C=b3(r),A=P.useRef(!1),[N,T]=P.useState(0);return P.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(lb,E),()=>R.removeEventListener(lb,E)},[E]),p.jsx(Vse,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:y,onItemFocus:P.useCallback(R=>w(R),[w]),onItemShiftTab:P.useCallback(()=>O(!0),[]),onFocusableItemAdd:P.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:P.useCallback(()=>T(R=>R-1),[]),children:p.jsx(We.div,{tabIndex:S||N===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{A.current=!0}),onFocus:Fe(e.onFocus,R=>{const I=!A.current;if(R.target===R.currentTarget&&I&&!S){const q=new CustomEvent(lb,Use);if(R.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=C().filter(K=>K.focusable),D=L.find(K=>K.active),U=L.find(K=>K.id===y),V=[D,U,...L].filter(Boolean).map(K=>K.ref.current);j3(V,d)}}A.current=!1}),onBlur:Fe(e.onBlur,()=>O(!1))})})}),S3="RovingFocusGroupItem",O3=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...u}=e,f=Gi(),c=a||f,d=Gse(S3,r),h=d.currentTabStopId===c,m=b3(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:y}=d;return P.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),p.jsx(G1.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:p.jsx(We.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:Fe(e.onMouseDown,w=>{n?d.onItemFocus(c):w.preventDefault()}),onFocus:Fe(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Fe(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const S=Qse(w,d.orientation,d.dir);if(S!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const C=E.indexOf(w.currentTarget);E=d.loop?Zse(E,C+1):E.slice(C+1)}setTimeout(()=>j3(E))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:y!=null}):s})})});O3.displayName=S3;var Xse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qse(e,t,r){const n=Yse(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Xse[n]}function j3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Zse(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jse=_3,ele=O3,Gp="Tabs",[tle]=gi(Gp,[w3]),E3=w3(),[rle,P_]=tle(Gp),A3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:u,activationMode:f="automatic",...c}=e,d=Kh(u),[h,m]=Ha({prop:n,onChange:i,defaultProp:a??"",caller:Gp});return p.jsx(rle,{scope:r,baseId:Gi(),value:h,onValueChange:m,orientation:s,dir:d,activationMode:f,children:p.jsx(We.div,{dir:d,"data-orientation":s,...c,ref:t})})});A3.displayName=Gp;var P3="TabsList",N3=P.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=P_(P3,r),s=E3(r);return p.jsx(Jse,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(We.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});N3.displayName=P3;var C3="TabsTrigger",T3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=P_(C3,r),u=E3(r),f=M3(s.baseId,n),c=I3(s.baseId,n),d=n===s.value;return p.jsx(ele,{asChild:!0,...u,focusable:!i,active:d,children:p.jsx(We.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...a,ref:t,onMouseDown:Fe(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(n):h.preventDefault()}),onKeyDown:Fe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(n)}),onFocus:Fe(e.onFocus,()=>{const h=s.activationMode!=="manual";!d&&!i&&h&&s.onValueChange(n)})})})});T3.displayName=C3;var k3="TabsContent",R3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,u=P_(k3,r),f=M3(u.baseId,n),c=I3(u.baseId,n),d=n===u.value,h=P.useRef(d);return P.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(Un,{present:i||d,children:({present:m})=>p.jsx(We.div,{"data-state":d?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});R3.displayName=k3;function M3(e,t){return`${e}-trigger-${t}`}function I3(e,t){return`${e}-content-${t}`}var nle=A3,ile=N3,ale=T3,ole=R3;function D3({className:e,...t}){return p.jsx(nle,{"data-slot":"tabs",className:Ie("flex flex-col gap-2",e),...t})}function L3({className:e,...t}){return p.jsx(ile,{"data-slot":"tabs-list",className:Ie("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function rs({className:e,...t}){return p.jsx(ale,{"data-slot":"tabs-trigger",className:Ie("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ns({className:e,...t}){return p.jsx(ole,{"data-slot":"tabs-content",className:Ie("flex-1 outline-none",e),...t})}const sle=[{id:"cat1",name:"Dairy",type:"color",value:"#bfdbfe",status:"active"},{id:"cat2",name:"Meat",type:"image",value:"meat.png",status:"active"},{id:"cat3",name:"Bakery",type:"text",value:"Bakery",status:"active"}],lle=[{id:"prod1",locationId:"12345",categoryId:"cat1",categoryName:"Dairy",name:"Whole Milk",productId:"2222222",barcode:"123456789",barcodeType:"EAN-13",status:"active",appearance:{type:"text",value:"Whole Milk"}},{id:"prod2",locationId:"12345",categoryId:"cat2",categoryName:"Meat",name:"Ground Beef",productId:"3333333",barcode:"113456789",barcodeType:"UPC-A",status:"active",appearance:{type:"color",value:"#ef4444"}},{id:"prod3",locationId:"67890",categoryId:"cat3",categoryName:"Bakery",name:"Croissant",productId:"4444444",barcode:"998877665",barcodeType:"EAN-8",status:"inactive",appearance:{type:"image",value:"croissant.jpg"}}];function cle(){const[e,t]=P.useState("products"),[r,n]=P.useState(lle),[i,a]=P.useState(sle),[s,u]=P.useState(!1),[f,c]=P.useState(!1);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3 flex-wrap",children:[p.jsxs("div",{className:"flex items-center w-40 shrink-0 rounded-md border border-gray-300 bg-white overflow-hidden",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-2.5 pointer-events-none"}),p.jsx(Be,{placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Location 12345"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs(tt,{children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Category"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Categories"}),i.map(d=>p.jsx(Ae,{value:d.id,children:d.name},d.id))]})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(j8,{className:"w-4 h-4"})," Bulk Import"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Bulk Export"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Uo,{className:"w-4 h-4"})," Bulk Edit"]}),e==="products"?p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>u(!0),children:["New Product ",p.jsx(Ur,{className:"w-4 h-4"})]}):p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>c(!0),children:["New Category ",p.jsx(Ur,{className:"w-4 h-4"})]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("products"),style:e==="products"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="products"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Products"}),p.jsx("button",{onClick:()=>t("categories"),style:e==="categories"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="categories"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Categories"})]})})]}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:e==="products"?p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Barcode"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(d=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric",children:d.locationId}),p.jsx(de,{className:"border-r text-gray-900 font-medium",children:d.categoryName}),p.jsx(de,{className:"border-r text-gray-900 font-medium",children:p.jsxs("div",{className:"flex items-center gap-2",children:[d.appearance.type==="color"&&p.jsx("div",{className:"w-4 h-4 rounded-full border border-gray-300 shadow-sm",style:{backgroundColor:d.appearance.value}}),d.appearance.type==="image"&&p.jsx(Ia,{className:"w-4 h-4 text-gray-500"}),d.name]})}),p.jsx(de,{className:"border-r font-numeric text-gray-600",children:d.productId}),p.jsx(de,{className:"border-r font-numeric",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-xs text-gray-400",children:d.barcodeType}),p.jsx("span",{children:d.barcode})]})}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4"})})})]},d.id))})]})}):p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Display Type"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Preview"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(d=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-medium",children:d.name}),p.jsx(de,{className:"border-r capitalize",children:d.type}),p.jsxs(de,{className:"border-r",children:[d.type==="color"&&p.jsx("div",{className:"w-8 h-8 rounded-md border border-gray-200 shadow-sm",style:{backgroundColor:d.value}}),d.type==="image"&&p.jsx("div",{className:"w-8 h-8 bg-gray-100 flex items-center justify-center rounded-md border border-gray-200",children:p.jsx(Ia,{className:"w-4 h-4 text-gray-500"})}),d.type==="text"&&p.jsx("div",{className:"w-auto px-2 py-1 bg-gray-100 rounded-md border border-gray-200 text-xs font-medium inline-block",children:d.value})]}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(Uo,{className:"h-4 w-4"})})})]},d.id))})]})})}),p.jsx(ule,{open:s,onOpenChange:u,categories:i}),p.jsx(fle,{open:f,onOpenChange:c})]})}function ule({open:e,onOpenChange:t,categories:r}){const[n,i]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Product"}),p.jsx(au,{children:"Create a new product. Fill in the details below."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product Category"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Category"})}),p.jsx(st,{children:r.map(a=>p.jsx(Ae,{value:a.id,children:a.name},a.id))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product Name"}),p.jsx(Be,{placeholder:"e.g. Whole Milk"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Product ID"}),p.jsx(Be,{placeholder:"Internal ID"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})]}),p.jsxs("div",{className:"space-y-3 p-4 bg-gray-50 rounded-md border border-gray-100",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(dB,{className:"w-4 h-4"})," Barcode Settings"]}),p.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[p.jsx("div",{className:"col-span-1",children:p.jsxs(tt,{defaultValue:"ean13",children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Format"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ean13",children:"EAN-13"}),p.jsx(Ae,{value:"upc-a",children:"UPC-A"}),p.jsx(Ae,{value:"code128",children:"Code 128"}),p.jsx(Ae,{value:"qr",children:"QR Code"})]})]})}),p.jsx("div",{className:"col-span-2",children:p.jsx(Be,{placeholder:"Barcode Value"})})]}),p.jsx(Ne,{variant:"link",className:"px-0 text-xs h-auto",children:"+ Add another barcode standard"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(je,{children:"App Appearance"}),p.jsxs(D3,{value:n,onValueChange:i,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Display Text"}),p.jsx(Be,{placeholder:"Text to display on button"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#06b6d4","#3b82f6","#6366f1","#a855f7","#ec4899"].map(a=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:a}},a)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Upload Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload or drag and drop"})]})]})]})]}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(je,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"all-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"specific-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]}),p.jsx("div",{className:"pl-6 pt-2",children:p.jsx(tt,{disabled:!0,children:p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{placeholder:"Select Locations..."})})})})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Product"})]})]})})}function fle({open:e,onOpenChange:t}){const[r,n]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Category"}),p.jsx(au,{children:"Create a product category to organize your items."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Category Name"}),p.jsx(Be,{placeholder:"e.g. Dairy, Meat, Bakery"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(je,{children:"Button Appearance"}),p.jsxs(D3,{value:r,onValueChange:n,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Display Text"}),p.jsx(Be,{placeholder:"Category Name"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#bfdbfe","#bbf7d0","#fecaca","#ddd6fe","#fde68a"].map(i=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:i}},i)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(je,{children:"Upload Icon/Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload"})]})]})]})]}),p.jsx("div",{className:"grid grid-cols-2 gap-4",children:p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(je,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-all-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"cat-all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-specific-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"cat-specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Category"})]})]})})}var Kp="Checkbox",[dle]=gi(Kp),[hle,N_]=dle(Kp);function ple(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:u,onCheckedChange:f,required:c,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Ha({prop:r,defaultProp:i??!1,onChange:f,caller:Kp}),[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useRef(!1),E=b?!!s||!!b.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:b,setControl:y,name:u,form:s,value:d,hasConsumerStoppedPropagationRef:O,required:c,defaultChecked:Ki(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:S};return p.jsx(hle,{scope:t,...C,children:mle(h)?h(C):n})}var $3="CheckboxTrigger",B3=P.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:s,disabled:u,checked:f,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=N_($3,e),y=Je(i,d),w=P.useRef(f);return P.useEffect(()=>{const S=a?.form;if(S){const O=()=>h(w.current);return S.addEventListener("reset",O),()=>S.removeEventListener("reset",O)}},[a,h]),p.jsx(We.button,{type:"button",role:"checkbox","aria-checked":Ki(f)?"mixed":f,"aria-required":c,"data-state":H3(f),"data-disabled":u?"":void 0,disabled:u,value:s,...n,ref:y,onKeyDown:Fe(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Fe(r,S=>{h(O=>Ki(O)?!0:!O),b&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});B3.displayName=$3;var z3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f,onCheckedChange:c,form:d,...h}=e;return p.jsx(ple,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:u,required:s,onCheckedChange:c,name:n,form:d,value:f,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(B3,{...h,ref:t,__scopeCheckbox:r}),m&&p.jsx(W3,{__scopeCheckbox:r})]})})});z3.displayName=Kp;var F3="CheckboxIndicator",q3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=N_(F3,r);return p.jsx(Un,{present:n||Ki(a.checked)||a.checked===!0,children:p.jsx(We.span,{"data-state":H3(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});q3.displayName=F3;var U3="CheckboxBubbleInput",W3=P.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:u,disabled:f,name:c,value:d,form:h,bubbleInput:m,setBubbleInput:g}=N_(U3,e),b=Je(r,g),y=__(a),w=y_(n);P.useEffect(()=>{const O=m;if(!O)return;const E=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(E,"checked").set,N=!i.current;if(y!==a&&A){const T=new Event("click",{bubbles:N});O.indeterminate=Ki(a),A.call(O,Ki(a)?!1:a),O.dispatchEvent(T)}},[m,y,a,i]);const S=P.useRef(Ki(a)?!1:a);return p.jsx(We.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??S.current,required:u,disabled:f,name:c,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=U3;function mle(e){return typeof e=="function"}function Ki(e){return e==="indeterminate"}function H3(e){return Ki(e)?"indeterminate":e?"checked":"unchecked"}function Jl({className:e,...t}){return p.jsx(z3,{"data-slot":"checkbox",className:Ie("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(q3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(dR,{className:"size-3.5"})})})}const vle=[{id:"1",name:"Downtown Store (101)"},{id:"2",name:"Uptown Store (102)"},{id:"3",name:"Airport Kiosk (201)"},{id:"4",name:"Mall Outlet (305)"}],gle=[{id:"r1",name:"Partner Admin",permissions:["all"],notifications:["system_updates","billing"]},{id:"r2",name:"Group Admin",permissions:["manage_users","manage_products","view_reports"],notifications:["new_users"]},{id:"r3",name:"Manager",permissions:["manage_store","view_reports","manage_inventory"],notifications:["label_expiry","low_stock"]},{id:"r4",name:"Team Member",permissions:["view_tasks","print_labels"],notifications:["task_assignment"]}],V3=[{id:"p1",name:"Global Foods Inc.",status:"active",contact:"admin@globalfoods.com"},{id:"p2",name:"Local Eateries Co.",status:"active",contact:"support@localeateries.com"}],yle=[{id:"g1",name:"West Coast Region",partner:"Global Foods Inc.",status:"active"},{id:"g2",name:"East Coast Region",partner:"Global Foods Inc.",status:"inactive"}],xle=[{id:"m1",name:"Alice Johnson",role:"Manager",locations:["Downtown Store (101)","Uptown Store (102)"],email:"alice@example.com",status:"active"},{id:"m2",name:"Bob Smith",role:"Team Member",locations:["Airport Kiosk (201)"],email:"bob@example.com",status:"active"},{id:"m3",name:"Charlie Brown",role:"Team Member",locations:["Downtown Store (101)"],email:"charlie@example.com",status:"inactive"}];function ble(){const[e,t]=P.useState("Roles"),[r,n]=P.useState(gle),[i,a]=P.useState(V3),[s,u]=P.useState(yle),[f,c]=P.useState(xle),[d,h]=P.useState(!1),[m,g]=P.useState(!1),[b,y]=P.useState(!1),[w,S]=P.useState(!1),O=()=>{alert(`Exporting ${e} list to PDF...`)},E=()=>{switch(e){case"Roles":h(!0);break;case"Partner":g(!0);break;case"Group":y(!0);break;case"Team Member":S(!0);break}},C=()=>{const N=e==="Team Member";return p.jsxs("div",{className:"flex flex-col gap-4 pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsx("div",{className:"flex-1"}),N&&p.jsxs(p.Fragment,{children:[p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"})]}),p.jsx(Ne,{variant:"outline",onClick:O,className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export (PDF)"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:E,children:"New+"})]}),p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto w-fit",children:["Roles","Partner","Group","Team Member"].map(T=>p.jsx("button",{onClick:()=>t(T),style:e===T?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e===T?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:T},T))})})]})},A=()=>{switch(e){case"Roles":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Role Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Access Permissions"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Notifications"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.permissions.map(T=>p.jsx(Rn,{variant:"secondary",className:"text-xs bg-blue-100 text-blue-800 hover:bg-blue-100",children:T},T))})}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.notifications.map(T=>p.jsx(Rn,{variant:"outline",className:"text-xs border-orange-200 text-orange-700 bg-orange-50",children:T},T))})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Partner":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Partner Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Contact"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:N.contact}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Group":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Group Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Parent Partner"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:s.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r",children:N.partner}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Team Member":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Email"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Role"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Assigned Locations"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:f.map(N=>p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium border-r",children:N.name}),p.jsx(de,{className:"border-r text-gray-600",children:N.email}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:"outline",className:"font-normal",children:N.role})}),p.jsx(de,{className:"border-r",children:p.jsx("div",{className:"flex flex-col gap-1",children:N.locations.map(T=>p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-600",children:[p.jsx(Gh,{className:"w-3 h-3"})," ",T]},T))})}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]})}};return p.jsxs("div",{className:"h-full flex flex-col",children:[C(),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md",children:A()})}),p.jsx(wle,{open:d,onOpenChange:h}),p.jsx(_le,{open:m,onOpenChange:g}),p.jsx(Sle,{open:b,onOpenChange:y}),p.jsx(Ole,{open:w,onOpenChange:S,roles:r})]})}function wle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Create New Role"}),p.jsx(au,{children:"Define permissions and notification settings for this role."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Role Name"}),p.jsx(Be,{placeholder:"e.g. Inventory Specialist"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(u8,{className:"w-4 h-4"})," Access Permissions"]}),p.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:["Manage Labels","Manage Products","Manage People","View Reports","Edit Settings","Approve Batches"].map(r=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`perm-${r}`}),p.jsx("label",{htmlFor:`perm-${r}`,className:"text-sm font-medium leading-none cursor-pointer",children:r})]},r))})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(pB,{className:"w-4 h-4"})," Notifications (Alerts)"]}),p.jsxs("div",{className:"grid grid-cols-1 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-expiry",defaultChecked:!0}),p.jsx("label",{htmlFor:"notif-expiry",className:"text-sm font-medium leading-none cursor-pointer",children:"Label Expiry Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-stock"}),p.jsx("label",{htmlFor:"notif-stock",className:"text-sm font-medium leading-none cursor-pointer",children:"Low Stock Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-tasks"}),p.jsx("label",{htmlFor:"notif-tasks",className:"text-sm font-medium leading-none cursor-pointer",children:"New Task Assignments"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Role"})]})]})})}function _le({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Partner"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Partner Name"}),p.jsx(Be,{placeholder:"Company Name"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Contact Email"}),p.jsx(Be,{placeholder:"admin@partner.com"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"partner-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"partner-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Partner"})]})]})})}function Sle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Group"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Group Name"}),p.jsx(Be,{placeholder:"e.g. West Coast Region"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Assign to Partner"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Partner"})}),p.jsx(st,{children:V3.map(r=>p.jsx(Ae,{value:r.id,children:r.name},r.id))})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"group-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"group-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Group"})]})]})})}function Ole({open:e,onOpenChange:t,roles:r}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add Team Member / Manager"}),p.jsx(au,{children:"Create a user account and assign them to locations."})]}),p.jsxs("div",{className:"space-y-4 py-4 max-h-[60vh] overflow-y-auto pr-1",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Full Name"}),p.jsx(Be,{placeholder:"John Doe"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Role"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Role"})}),p.jsx(st,{children:r.map(n=>p.jsx(Ae,{value:n.name,children:n.name},n.id))})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Password"}),p.jsx(Be,{type:"password",placeholder:"Enter password",autoComplete:"new-password",className:"w-full"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Email Address"}),p.jsx(Be,{type:"email",placeholder:"john@example.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(fc,{className:"h-[120px] w-full border rounded-md p-2",children:p.jsx("div",{className:"space-y-2",children:vle.map(n=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`loc-${n.id}`}),p.jsx("label",{htmlFor:`loc-${n.id}`,className:"text-sm cursor-pointer w-full hover:bg-gray-50 p-1 rounded",children:n.name})]},n.id))})}),p.jsx("p",{className:"text-xs text-gray-500",children:"* Users must be assigned to at least one location."})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"member-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"member-status",children:"Active Account"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create User"})]})]})})}function jle(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let K1=1;class Ele{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...i}=t,a=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:K1++,s=this.toasts.find(f=>f.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:n}),{...f,...t,id:a,dismissible:u,title:n}):f):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const u=i.then(async c=>{if(s=["resolve",c],z.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(Ple(c)&&!c.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(c instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(c):r.error,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(c):r.success,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:m,...b})}}).catch(async c=>{if(s=["reject",c],r.error!==void 0){a=!1;const d=typeof r.error=="function"?await r.error(c):r.error,h=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!z.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((c,d)=>u.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,r)=>{const n=r?.id||K1++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const en=new Ele,Ale=(e,t)=>{const r=t?.id||K1++;return en.addToast({title:e,...t,id:r}),r},Ple=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Nle=Ale,Cle=()=>en.toasts,Tle=()=>en.getActiveToasts(),kle=Object.assign(Nle,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:Cle,getToasts:Tle});jle("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Rle=[{id:"1-251201",productName:"Whole Milk",category:"Dairy",template:'2"x2" Basic',printedAt:"2024-03-20 09:30 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-27",status:"Valid"},{id:"2-251201",productName:"Ground Beef",category:"Meat",template:'2"x2" Basic',printedAt:"2024-03-20 10:15 AM",printedBy:"Bob Smith",location:"Uptown Store (102)",expiryDate:"2024-03-23",status:"Valid"},{id:"3-251201",productName:"Croissant",category:"Bakery",template:'2"x2" Basic',printedAt:"2024-03-19 14:00 PM",printedBy:"Charlie Brown",location:"Downtown Store (101)",expiryDate:"2024-03-20",status:"Expired"},{id:"4-251201",productName:"Caesar Salad",category:"Deli",template:`2"x6" G'n'G !!!`,printedAt:"2024-03-18 11:45 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-21",status:"Expiring Soon"},{id:"5-251201",productName:"Orange Juice",category:"Beverage",template:'2"x2" Basic',printedAt:"2024-03-18 08:20 AM",printedBy:"Bob Smith",location:"Airport Kiosk (201)",expiryDate:"2024-03-25",status:"Valid"}],Mle=[{name:"Dairy",count:450},{name:"Meat",count:320},{name:"Bakery",count:280},{name:"Deli",count:190},{name:"Produce",count:150},{name:"Beverage",count:120}],Ile=[{date:"Mon",count:120},{date:"Tue",count:132},{date:"Wed",count:101},{date:"Thu",count:134},{date:"Fri",count:190},{date:"Sat",count:230},{date:"Sun",count:210}];function Dle(){const[e,t]=P.useState("print-log"),r=n=>{kle.success(`Reprinting label ${n}`,{description:"Watermark 'RePrint' applied."})};return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Downtown Store"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Period Search:"}),p.jsxs("div",{className:"flex items-center bg-white border border-gray-300 rounded-md h-10 px-2",style:{minHeight:40},children:[p.jsx(vB,{className:"w-4 h-4 text-gray-500 mr-2 shrink-0"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"}),p.jsx("span",{className:"mx-2 text-gray-400",children:"-"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"})]})]}),p.jsxs("div",{className:"flex items-center w-64 rounded-md border border-gray-300 bg-white overflow-hidden shrink-0",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx(Be,{placeholder:"Search Product or Category...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Export Report"]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("print-log"),style:e==="print-log"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="print-log"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Print Log"}),p.jsx("button",{onClick:()=>t("label-report"),style:e==="label-report"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="label-report"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Label Report"})]})})]}),p.jsxs("div",{className:"flex-1 overflow-auto pt-6",children:[e==="print-log"&&p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Label ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Template"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed At"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed By"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Expiry Date"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Action"})]})}),p.jsx(_r,{children:Rle.map(n=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric text-gray-600",children:n.id}),p.jsx(de,{className:"border-r font-medium",children:n.productName}),p.jsx(de,{className:"border-r",children:p.jsx(Rn,{variant:"secondary",className:"bg-blue-50 text-blue-700 hover:bg-blue-50 border-blue-200",children:n.category})}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:(()=>{const i=n.template.endsWith(" !!!"),a=i?n.template.slice(0,-4):n.template,s=a.lastIndexOf(" "),u=a.slice(0,s+1),f=a.slice(s+1);return p.jsxs(p.Fragment,{children:[u,p.jsx("span",{className:"font-bold text-gray-900",children:f}),i&&p.jsx("span",{className:"text-red-600",children:" !!!"})]})})()}),p.jsx(de,{className:"border-r text-gray-600 text-sm font-numeric",children:n.printedAt}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:n.printedBy}),p.jsx(de,{className:"border-r text-gray-600 text-sm font-numeric",children:n.location}),p.jsx(de,{className:"border-r",children:p.jsx("span",{className:Ie("text-sm font-medium font-numeric",n.status==="Expired"?"text-red-600":n.status==="Expiring Soon"?"text-orange-500":"text-green-600"),children:n.expiryDate})}),p.jsx(de,{className:"text-center",children:p.jsxs(Ne,{size:"sm",variant:"outline",className:"h-8 gap-1 hover:bg-gray-100 border-gray-300",onClick:()=>r(n.id),children:[p.jsx(mR,{className:"w-3 h-3"})," Reprint"]})})]},n.id))})]})}),e==="label-report"&&p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Total Labels Printed"}),p.jsx(uc,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"2,543"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+20.1% from last month"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Most Printed Category"}),p.jsx(yB,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Dairy"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"450 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Top Product"}),p.jsx(fR,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Whole Milk"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"182 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Avg. Daily Prints"}),p.jsx(i8,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"85"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+12% from last week"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Labels by Category"}),p.jsx(Id,{children:"Distribution of printed labels across product categories."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(sre,{data:Mle,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"name",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:n=>`${n}`}),p.jsx(Dr,{}),p.jsx(to,{dataKey:"count",fill:"#facc15",radius:[4,4,0,0]})]})})})]}),p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Print Volume Trends"}),p.jsx(Id,{children:"Daily label printing volume for the last 7 days."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(yL,{data:Ile,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"date",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Dr,{}),p.jsx(qs,{type:"monotone",dataKey:"count",stroke:"#dc2626",strokeWidth:2,dot:{r:4},activeDot:{r:6}})]})})})]})]}),p.jsxs(Ir,{children:[p.jsx(yn,{children:p.jsx(xn,{children:"Most Used Products"})}),p.jsx(tn,{children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{children:[p.jsx(ge,{children:"Product Name"}),p.jsx(ge,{children:"Category"}),p.jsx(ge,{className:"text-right",children:"Total Printed"}),p.jsx(ge,{className:"text-right",children:"Usage %"})]})}),p.jsxs(_r,{children:[p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Whole Milk"}),p.jsx(de,{children:"Dairy"}),p.jsx(de,{className:"text-right",children:"182"}),p.jsx(de,{className:"text-right",children:"7.2%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Ground Beef 80/20"}),p.jsx(de,{children:"Meat"}),p.jsx(de,{className:"text-right",children:"145"}),p.jsx(de,{className:"text-right",children:"5.7%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Chicken Breast"}),p.jsx(de,{children:"Meat"}),p.jsx(de,{className:"text-right",children:"132"}),p.jsx(de,{className:"text-right",children:"5.2%"})]}),p.jsxs(Qe,{children:[p.jsx(de,{className:"font-medium",children:"Sliced Ham"}),p.jsx(de,{children:"Deli"}),p.jsx(de,{className:"text-right",children:"98"}),p.jsx(de,{className:"text-right",children:"3.8%"})]})]})]})})]})]})]})]})}const Lle=[{id:"12345",name:"Downtown Store",street:"123 Main St",city:"New York",state:"NY",country:"USA",zipCode:"10001",phone:"+1 (555) 123-4567",email:"downtown@example.com",gps:"40.7128° N, 74.0060° W",status:"active"},{id:"12335",name:"Uptown Market",street:"456 High St",city:"New York",state:"NY",country:"USA",zipCode:"10002",phone:"+1 (555) 987-6543",email:"uptown@example.com",gps:"40.7580° N, 73.9855° W",status:"active"},{id:"12445",name:"Airport Kiosk",street:"Terminal 4, JFK Airport",city:"Jamaica",state:"NY",country:"USA",zipCode:"11430",phone:"+1 (555) 555-5555",email:"jfk@example.com",gps:"40.6413° N, 73.7781° W",status:"active"},{id:"12555",name:"Suburban Outlet",street:"789 Country Rd",city:"Long Island",state:"NY",country:"USA",zipCode:"11901",phone:"+1 (555) 111-2222",email:"suburb@example.com",gps:"40.8500° N, 73.2000° W",status:"inactive"}];function $le(){const[e,t]=P.useState(!1),[r,n]=P.useState(Lle);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx("div",{className:"pb-4",children:p.jsx("div",{className:"flex flex-col gap-4",children:p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx(Be,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-1",children:"Location 1"})]})]}),p.jsx("div",{className:"flex-1"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:()=>t(!0),children:"New+"})]})})}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Street"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"City"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"State"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Country"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Zip Code"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Phone"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Email"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"GPS"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(i=>p.jsxs(Qe,{children:[p.jsx(de,{className:"border-r font-numeric text-gray-600",children:i.id}),p.jsx(de,{className:"border-r font-medium text-black",children:i.name}),p.jsx(de,{className:"border-r text-gray-600 max-w-[140px] truncate",children:i.street}),p.jsx(de,{className:"border-r text-gray-600",children:i.city}),p.jsx(de,{className:"border-r text-gray-600",children:i.state}),p.jsx(de,{className:"border-r text-gray-600",children:i.country}),p.jsx(de,{className:"border-r text-gray-600 font-numeric",children:i.zipCode}),p.jsx(de,{className:"border-r text-gray-600 whitespace-nowrap",children:i.phone}),p.jsx(de,{className:"border-r text-gray-600 text-sm",children:i.email}),p.jsx(de,{className:"border-r text-gray-500 font-numeric text-xs",children:i.gps}),p.jsx(de,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4 text-gray-500"})})})]},i.id))})]})})}),p.jsx(Ble,{open:e,onOpenChange:t})]})}function Ble({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Location"}),p.jsx(au,{children:"Enter the details for the new store location."})]}),p.jsxs("div",{className:"grid gap-4 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Partner"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Group"}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]})]})]}),p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-1",children:[p.jsx(je,{children:"Location ID"}),p.jsx(Be,{placeholder:"e.g. 12345"})]}),p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx(je,{children:"Location Name"}),p.jsx(Be,{placeholder:"e.g. Downtown Store"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Street"}),p.jsx(Be,{placeholder:"e.g. 123 Main St"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"City"}),p.jsx(Be,{placeholder:"e.g. New York"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"State"}),p.jsx(Be,{placeholder:"e.g. NY"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Country"}),p.jsx(Be,{placeholder:"e.g. USA"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Zip Code"}),p.jsx(Be,{placeholder:"e.g. 10001"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Phone Number"}),p.jsx(Be,{placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(je,{children:"Email"}),p.jsx(Be,{placeholder:"store@example.com"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(je,{className:"flex items-center gap-2",children:[p.jsx(Gh,{className:"w-4 h-4"})," GPS Coordinates"]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx(Be,{placeholder:"Latitude (e.g. 40.7128)"}),p.jsx(Be,{placeholder:"Longitude (e.g. -74.0060)"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[p.jsx(no,{id:"loc-status",defaultChecked:!0}),p.jsx(je,{htmlFor:"loc-status",children:"Active Location"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create Location"})]})]})})}function zle(){const[e,t]=P.useState("Dashboard"),r=()=>{switch(e){case"Dashboard":return p.jsx(fre,{});case"Training":return p.jsx(Bse,{});case"Alerts":return p.jsx(qse,{});case"Menu Manager":return p.jsx(cle,{});case"Account Management":return p.jsx(ble,{});case"Reports":return p.jsx(Dle,{});case"Location Manager":return p.jsx($le,{});case"Labels":case"Label Categories":case"Label Types":case"Label Templates":case"Multiple Options":return p.jsx($se,{currentView:e,onViewChange:t});default:return p.jsx(dre,{title:e})}};return p.jsx(Oz,{currentView:e,setCurrentView:t,children:r()})}Q5.createRoot(document.getElementById("root")).render(p.jsx(zle,{})); diff --git a/美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js b/美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js new file mode 100644 index 0000000..ad7e990 --- /dev/null +++ b/美国版/Food Labeling Management Platform/build/assets/index-ChMXTsCq.js @@ -0,0 +1,463 @@ +function U5(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var bf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function it(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $v={exports:{}},kl={},Bv={exports:{}},Ve={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var gj;function W5(){if(gj)return Ve;gj=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function m(M){return M===null||typeof M!="object"?null:(M=h&&M[h]||M["@@iterator"],typeof M=="function"?M:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function w(M,$,Q){this.props=M,this.context=$,this.refs=y,this.updater=Q||g}w.prototype.isReactComponent={},w.prototype.setState=function(M,$){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,$,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function S(){}S.prototype=w.prototype;function O(M,$,Q){this.props=M,this.context=$,this.refs=y,this.updater=Q||g}var E=O.prototype=new S;E.constructor=O,b(E,w.prototype),E.isPureReactComponent=!0;var C=Array.isArray,A=Object.prototype.hasOwnProperty,N={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function R(M,$,Q){var ae,pe={},ye=null,oe=null;if($!=null)for(ae in $.ref!==void 0&&(oe=$.ref),$.key!==void 0&&(ye=""+$.key),$)A.call($,ae)&&!T.hasOwnProperty(ae)&&(pe[ae]=$[ae]);var me=arguments.length-2;if(me===1)pe.children=Q;else if(1>>1,$=B[M];if(0>>1;Mi(pe,ee))ye<$&&0>i(oe,pe)?(B[M]=oe,B[ye]=ee,M=ye):(B[M]=pe,B[ae]=ee,M=ae);else if(ye<$&&0>i(oe,ee))B[M]=oe,B[ye]=ee,M=ye;else break e}}return Z}function i(B,Z){var ee=B.sortIndex-Z.sortIndex;return ee!==0?ee:B.id-Z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var f=[],c=[],d=1,h=null,m=3,g=!1,b=!1,y=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(B){for(var Z=r(c);Z!==null;){if(Z.callback===null)n(c);else if(Z.startTime<=B)n(c),Z.sortIndex=Z.expirationTime,t(f,Z);else break;Z=r(c)}}function C(B){if(y=!1,E(B),!b)if(r(f)!==null)b=!0,K(A);else{var Z=r(c);Z!==null&&X(C,Z.startTime-B)}}function A(B,Z){b=!1,y&&(y=!1,S(R),R=-1),g=!0;var ee=m;try{for(E(Z),h=r(f);h!==null&&(!(h.expirationTime>Z)||B&&!L());){var M=h.callback;if(typeof M=="function"){h.callback=null,m=h.priorityLevel;var $=M(h.expirationTime<=Z);Z=e.unstable_now(),typeof $=="function"?h.callback=$:h===r(f)&&n(f),E(Z)}else n(f);h=r(f)}if(h!==null)var Q=!0;else{var ae=r(c);ae!==null&&X(C,ae.startTime-Z),Q=!1}return Q}finally{h=null,m=ee,g=!1}}var N=!1,T=null,R=-1,I=5,q=-1;function L(){return!(e.unstable_now()-qB||125M?(B.sortIndex=ee,t(c,B),r(f)===null&&B===r(c)&&(y?(S(R),R=-1):y=!0,X(C,ee-M))):(B.sortIndex=$,t(f,B),b||g||(b=!0,K(A))),B},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(B){var Z=m;return function(){var ee=m;m=Z;try{return B.apply(this,arguments)}finally{m=ee}}}})(qv)),qv}var _j;function K5(){return _j||(_j=1,Fv.exports=G5()),Fv.exports}/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sj;function X5(){if(Sj)return yr;Sj=1;var e=Vh(),t=K5();function r(o){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+o,v=1;v"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},h={};function m(o){return f.call(h,o)?!0:f.call(d,o)?!1:c.test(o)?h[o]=!0:(d[o]=!0,!1)}function g(o,l,v,x){if(v!==null&&v.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return x?!1:v!==null?!v.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function b(o,l,v,x){if(l===null||typeof l>"u"||g(o,l,v,x))return!0;if(x)return!1;if(v!==null)switch(v.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function y(o,l,v,x,_,j,k){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=x,this.attributeNamespace=_,this.mustUseProperty=v,this.propertyName=o,this.type=l,this.sanitizeURL=j,this.removeEmptyString=k}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){w[o]=new y(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var l=o[0];w[l]=new y(l,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){w[o]=new y(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){w[o]=new y(o,2,!1,o,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(o){w[o]=new y(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){w[o]=new y(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){w[o]=new y(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){w[o]=new y(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){w[o]=new y(o,5,!1,o.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function O(o){return o[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var l=o.replace(S,O);w[l]=new y(l,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!1,!1)}),w.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){w[o]=new y(o,1,!1,o.toLowerCase(),null,!0,!0)});function E(o,l,v,x){var _=w.hasOwnProperty(l)?w[l]:null;(_!==null?_.type!==0:x||!(2F||_[k]!==j[F]){var W=` +`+_[k].replace(" at new "," at ");return o.displayName&&W.includes("")&&(W=W.replace("",o.displayName)),W}while(1<=k&&0<=F);break}}}finally{Q=!1,Error.prepareStackTrace=v}return(o=o?o.displayName||o.name:"")?$(o):""}function pe(o){switch(o.tag){case 5:return $(o.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return o=ae(o.type,!1),o;case 11:return o=ae(o.type.render,!1),o;case 1:return o=ae(o.type,!0),o;default:return""}}function ye(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case T:return"Fragment";case N:return"Portal";case I:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case H:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case L:return(o.displayName||"Context")+".Consumer";case q:return(o._context.displayName||"Context")+".Provider";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case V:return l=o.displayName||null,l!==null?l:ye(o.type)||"Memo";case K:l=o._payload,o=o._init;try{return ye(o(l))}catch{}}return null}function oe(o){var l=o.type;switch(o.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=l.render,o=o.displayName||o.name||"",l.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(l);case 8:return l===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ie(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function ue(o){var l=ie(o)?"checked":"value",v=Object.getOwnPropertyDescriptor(o.constructor.prototype,l),x=""+o[l];if(!o.hasOwnProperty(l)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,j=v.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(k){x=""+k,j.call(this,k)}}),Object.defineProperty(o,l,{enumerable:v.enumerable}),{getValue:function(){return x},setValue:function(k){x=""+k},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ve(o){o._valueTracker||(o._valueTracker=ue(o))}function re(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var v=l.getValue(),x="";return o&&(x=ie(o)?o.checked?"true":"false":o.value),o=x,o!==v?(l.setValue(o),!0):!1}function De(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function Te(o,l){var v=l.checked;return ee({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:v??o._wrapperState.initialChecked})}function Ke(o,l){var v=l.defaultValue==null?"":l.defaultValue,x=l.checked!=null?l.checked:l.defaultChecked;v=me(l.value!=null?l.value:v),o._wrapperState={initialChecked:x,initialValue:v,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function lt(o,l){l=l.checked,l!=null&&E(o,"checked",l,!1)}function vt(o,l){lt(o,l);var v=me(l.value),x=l.type;if(v!=null)x==="number"?(v===0&&o.value===""||o.value!=v)&&(o.value=""+v):o.value!==""+v&&(o.value=""+v);else if(x==="submit"||x==="reset"){o.removeAttribute("value");return}l.hasOwnProperty("value")?Or(o,l.type,v):l.hasOwnProperty("defaultValue")&&Or(o,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(o.defaultChecked=!!l.defaultChecked)}function dr(o,l,v){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var x=l.type;if(!(x!=="submit"&&x!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+o._wrapperState.initialValue,v||l===o.value||(o.value=l),o.defaultValue=l}v=o.name,v!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,v!==""&&(o.name=v)}function Or(o,l,v){(l!=="number"||De(o.ownerDocument)!==o)&&(v==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+v&&(o.defaultValue=""+v))}var jr=Array.isArray;function Kt(o,l,v,x){if(o=o.options,l){l={};for(var _=0;_"+l.valueOf().toString()+"",l=fu.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}});function Ks(o,l){if(l){var v=o.firstChild;if(v&&v===o.lastChild&&v.nodeType===3){v.nodeValue=l;return}}o.textContent=l}var Xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},G3=["Webkit","ms","Moz","O"];Object.keys(Xs).forEach(function(o){G3.forEach(function(l){l=l+o.charAt(0).toUpperCase()+o.substring(1),Xs[l]=Xs[o]})});function k_(o,l,v){return l==null||typeof l=="boolean"||l===""?"":v||typeof l!="number"||l===0||Xs.hasOwnProperty(o)&&Xs[o]?(""+l).trim():l+"px"}function R_(o,l){o=o.style;for(var v in l)if(l.hasOwnProperty(v)){var x=v.indexOf("--")===0,_=k_(v,l[v],x);v==="float"&&(v="cssFloat"),x?o.setProperty(v,_):o[v]=_}}var K3=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Yp(o,l){if(l){if(K3[o]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,o));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function Qp(o,l){if(o.indexOf("-")===-1)return typeof l.is=="string";switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zp=null;function Jp(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var em=null,ao=null,oo=null;function M_(o){if(o=gl(o)){if(typeof em!="function")throw Error(r(280));var l=o.stateNode;l&&(l=Mu(l),em(o.stateNode,o.type,l))}}function I_(o){ao?oo?oo.push(o):oo=[o]:ao=o}function D_(){if(ao){var o=ao,l=oo;if(oo=ao=null,M_(o),l)for(o=0;o>>=0,o===0?32:31-(a4(o)/o4|0)|0}var vu=64,gu=4194304;function Js(o){switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function yu(o,l){var v=o.pendingLanes;if(v===0)return 0;var x=0,_=o.suspendedLanes,j=o.pingedLanes,k=v&268435455;if(k!==0){var F=k&~_;F!==0?x=Js(F):(j&=k,j!==0&&(x=Js(j)))}else k=v&~_,k!==0?x=Js(k):j!==0&&(x=Js(j));if(x===0)return 0;if(l!==0&&l!==x&&(l&_)===0&&(_=x&-x,j=l&-l,_>=j||_===16&&(j&4194240)!==0))return l;if((x&4)!==0&&(x|=v&16),l=o.entangledLanes,l!==0)for(o=o.entanglements,l&=x;0v;v++)l.push(o);return l}function el(o,l,v){o.pendingLanes|=l,l!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,l=31-ln(l),o[l]=v}function u4(o,l){var v=o.pendingLanes&~l;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=l,o.mutableReadLanes&=l,o.entangledLanes&=l,l=o.entanglements;var x=o.eventTimes;for(o=o.expirationTimes;0=ll),uS=" ",fS=!1;function dS(o,l){switch(o){case"keyup":return $4.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var co=!1;function z4(o,l){switch(o){case"compositionend":return hS(l);case"keypress":return l.which!==32?null:(fS=!0,uS);case"textInput":return o=l.data,o===uS&&fS?null:o;default:return null}}function F4(o,l){if(co)return o==="compositionend"||!ym&&dS(o,l)?(o=iS(),Su=dm=Ei=null,co=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:v,offset:l-o};o=x}e:{for(;v;){if(v.nextSibling){v=v.nextSibling;break e}v=v.parentNode}v=void 0}v=bS(v)}}function _S(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?_S(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function SS(){for(var o=window,l=De();l instanceof o.HTMLIFrameElement;){try{var v=typeof l.contentWindow.location.href=="string"}catch{v=!1}if(v)o=l.contentWindow;else break;l=De(o.document)}return l}function wm(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}function Y4(o){var l=SS(),v=o.focusedElem,x=o.selectionRange;if(l!==v&&v&&v.ownerDocument&&_S(v.ownerDocument.documentElement,v)){if(x!==null&&wm(v)){if(l=x.start,o=x.end,o===void 0&&(o=l),"selectionStart"in v)v.selectionStart=l,v.selectionEnd=Math.min(o,v.value.length);else if(o=(l=v.ownerDocument||document)&&l.defaultView||window,o.getSelection){o=o.getSelection();var _=v.textContent.length,j=Math.min(x.start,_);x=x.end===void 0?j:Math.min(x.end,_),!o.extend&&j>x&&(_=x,x=j,j=_),_=wS(v,j);var k=wS(v,x);_&&k&&(o.rangeCount!==1||o.anchorNode!==_.node||o.anchorOffset!==_.offset||o.focusNode!==k.node||o.focusOffset!==k.offset)&&(l=l.createRange(),l.setStart(_.node,_.offset),o.removeAllRanges(),j>x?(o.addRange(l),o.extend(k.node,k.offset)):(l.setEnd(k.node,k.offset),o.addRange(l)))}}for(l=[],o=v;o=o.parentNode;)o.nodeType===1&&l.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v=document.documentMode,uo=null,_m=null,dl=null,Sm=!1;function OS(o,l,v){var x=v.window===v?v.document:v.nodeType===9?v:v.ownerDocument;Sm||uo==null||uo!==De(x)||(x=uo,"selectionStart"in x&&wm(x)?x={start:x.selectionStart,end:x.selectionEnd}:(x=(x.ownerDocument&&x.ownerDocument.defaultView||window).getSelection(),x={anchorNode:x.anchorNode,anchorOffset:x.anchorOffset,focusNode:x.focusNode,focusOffset:x.focusOffset}),dl&&fl(dl,x)||(dl=x,x=Tu(_m,"onSelect"),0vo||(o.current=Im[vo],Im[vo]=null,vo--)}function dt(o,l){vo++,Im[vo]=o.current,o.current=l}var Ci={},Jt=Ni(Ci),hr=Ni(!1),ca=Ci;function go(o,l){var v=o.type.contextTypes;if(!v)return Ci;var x=o.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===l)return x.__reactInternalMemoizedMaskedChildContext;var _={},j;for(j in v)_[j]=l[j];return x&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=l,o.__reactInternalMemoizedMaskedChildContext=_),_}function pr(o){return o=o.childContextTypes,o!=null}function Iu(){yt(hr),yt(Jt)}function BS(o,l,v){if(Jt.current!==Ci)throw Error(r(168));dt(Jt,l),dt(hr,v)}function zS(o,l,v){var x=o.stateNode;if(l=l.childContextTypes,typeof x.getChildContext!="function")return v;x=x.getChildContext();for(var _ in x)if(!(_ in l))throw Error(r(108,oe(o)||"Unknown",_));return ee({},v,x)}function Du(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||Ci,ca=Jt.current,dt(Jt,o),dt(hr,hr.current),!0}function FS(o,l,v){var x=o.stateNode;if(!x)throw Error(r(169));v?(o=zS(o,l,ca),x.__reactInternalMemoizedMergedChildContext=o,yt(hr),yt(Jt),dt(Jt,o)):yt(hr),dt(hr,v)}var Xn=null,Lu=!1,Dm=!1;function qS(o){Xn===null?Xn=[o]:Xn.push(o)}function l5(o){Lu=!0,qS(o)}function Ti(){if(!Dm&&Xn!==null){Dm=!0;var o=0,l=ct;try{var v=Xn;for(ct=1;o>=k,_-=k,Yn=1<<32-ln(l)+_|v<<_|x,Qn=j+o}else Yn=1<Be?(Wt=Re,Re=null):Wt=Re.sibling;var Ye=se(Y,Re,J[Be],de);if(Ye===null){Re===null&&(Re=Wt);break}o&&Re&&Ye.alternate===null&&l(Y,Re),G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye,Re=Wt}if(Be===J.length)return v(Y,Re),bt&&fa(Y,Be),Pe;if(Re===null){for(;BeBe?(Wt=Re,Re=null):Wt=Re.sibling;var zi=se(Y,Re,Ye.value,de);if(zi===null){Re===null&&(Re=Wt);break}o&&Re&&zi.alternate===null&&l(Y,Re),G=j(zi,G,Be),ke===null?Pe=zi:ke.sibling=zi,ke=zi,Re=Wt}if(Ye.done)return v(Y,Re),bt&&fa(Y,Be),Pe;if(Re===null){for(;!Ye.done;Be++,Ye=J.next())Ye=ce(Y,Ye.value,de),Ye!==null&&(G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return bt&&fa(Y,Be),Pe}for(Re=x(Y,Re);!Ye.done;Be++,Ye=J.next())Ye=xe(Re,Y,Be,Ye.value,de),Ye!==null&&(o&&Ye.alternate!==null&&Re.delete(Ye.key===null?Be:Ye.key),G=j(Ye,G,Be),ke===null?Pe=Ye:ke.sibling=Ye,ke=Ye);return o&&Re.forEach(function(q5){return l(Y,q5)}),bt&&fa(Y,Be),Pe}function Nt(Y,G,J,de){if(typeof J=="object"&&J!==null&&J.type===T&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case A:e:{for(var Pe=J.key,ke=G;ke!==null;){if(ke.key===Pe){if(Pe=J.type,Pe===T){if(ke.tag===7){v(Y,ke.sibling),G=_(ke,J.props.children),G.return=Y,Y=G;break e}}else if(ke.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===K&&KS(Pe)===ke.type){v(Y,ke.sibling),G=_(ke,J.props),G.ref=yl(Y,ke,J),G.return=Y,Y=G;break e}v(Y,ke);break}else l(Y,ke);ke=ke.sibling}J.type===T?(G=xa(J.props.children,Y.mode,de,J.key),G.return=Y,Y=G):(de=df(J.type,J.key,J.props,null,Y.mode,de),de.ref=yl(Y,G,J),de.return=Y,Y=de)}return k(Y);case N:e:{for(ke=J.key;G!==null;){if(G.key===ke)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){v(Y,G.sibling),G=_(G,J.children||[]),G.return=Y,Y=G;break e}else{v(Y,G);break}else l(Y,G);G=G.sibling}G=Rv(J,Y.mode,de),G.return=Y,Y=G}return k(Y);case K:return ke=J._init,Nt(Y,G,ke(J._payload),de)}if(jr(J))return Se(Y,G,J,de);if(Z(J))return Ee(Y,G,J,de);Fu(Y,J)}return typeof J=="string"&&J!==""||typeof J=="number"?(J=""+J,G!==null&&G.tag===6?(v(Y,G.sibling),G=_(G,J),G.return=Y,Y=G):(v(Y,G),G=kv(J,Y.mode,de),G.return=Y,Y=G),k(Y)):v(Y,G)}return Nt}var wo=XS(!0),YS=XS(!1),qu=Ni(null),Uu=null,_o=null,qm=null;function Um(){qm=_o=Uu=null}function Wm(o){var l=qu.current;yt(qu),o._currentValue=l}function Hm(o,l,v){for(;o!==null;){var x=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,x!==null&&(x.childLanes|=l)):x!==null&&(x.childLanes&l)!==l&&(x.childLanes|=l),o===v)break;o=o.return}}function So(o,l){Uu=o,qm=_o=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&l)!==0&&(mr=!0),o.firstContext=null)}function Gr(o){var l=o._currentValue;if(qm!==o)if(o={context:o,memoizedValue:l,next:null},_o===null){if(Uu===null)throw Error(r(308));_o=o,Uu.dependencies={lanes:0,firstContext:o}}else _o=_o.next=o;return l}var da=null;function Vm(o){da===null?da=[o]:da.push(o)}function QS(o,l,v,x){var _=l.interleaved;return _===null?(v.next=v,Vm(l)):(v.next=_.next,_.next=v),l.interleaved=v,Zn(o,x)}function Zn(o,l){o.lanes|=l;var v=o.alternate;for(v!==null&&(v.lanes|=l),v=o,o=o.return;o!==null;)o.childLanes|=l,v=o.alternate,v!==null&&(v.childLanes|=l),v=o,o=o.return;return v.tag===3?v.stateNode:null}var ki=!1;function Gm(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZS(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Jn(o,l){return{eventTime:o,lane:l,tag:0,payload:null,callback:null,next:null}}function Ri(o,l,v){var x=o.updateQueue;if(x===null)return null;if(x=x.shared,(Xe&2)!==0){var _=x.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),x.pending=l,Zn(o,v)}return _=x.interleaved,_===null?(l.next=l,Vm(x)):(l.next=_.next,_.next=l),x.interleaved=l,Zn(o,v)}function Wu(o,l,v){if(l=l.updateQueue,l!==null&&(l=l.shared,(v&4194240)!==0)){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}function JS(o,l){var v=o.updateQueue,x=o.alternate;if(x!==null&&(x=x.updateQueue,v===x)){var _=null,j=null;if(v=v.firstBaseUpdate,v!==null){do{var k={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};j===null?_=j=k:j=j.next=k,v=v.next}while(v!==null);j===null?_=j=l:j=j.next=l}else _=j=l;v={baseState:x.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:x.shared,effects:x.effects},o.updateQueue=v;return}o=v.lastBaseUpdate,o===null?v.firstBaseUpdate=l:o.next=l,v.lastBaseUpdate=l}function Hu(o,l,v,x){var _=o.updateQueue;ki=!1;var j=_.firstBaseUpdate,k=_.lastBaseUpdate,F=_.shared.pending;if(F!==null){_.shared.pending=null;var W=F,te=W.next;W.next=null,k===null?j=te:k.next=te,k=W;var le=o.alternate;le!==null&&(le=le.updateQueue,F=le.lastBaseUpdate,F!==k&&(F===null?le.firstBaseUpdate=te:F.next=te,le.lastBaseUpdate=W))}if(j!==null){var ce=_.baseState;k=0,le=te=W=null,F=j;do{var se=F.lane,xe=F.eventTime;if((x&se)===se){le!==null&&(le=le.next={eventTime:xe,lane:0,tag:F.tag,payload:F.payload,callback:F.callback,next:null});e:{var Se=o,Ee=F;switch(se=l,xe=v,Ee.tag){case 1:if(Se=Ee.payload,typeof Se=="function"){ce=Se.call(xe,ce,se);break e}ce=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ee.payload,se=typeof Se=="function"?Se.call(xe,ce,se):Se,se==null)break e;ce=ee({},ce,se);break e;case 2:ki=!0}}F.callback!==null&&F.lane!==0&&(o.flags|=64,se=_.effects,se===null?_.effects=[F]:se.push(F))}else xe={eventTime:xe,lane:se,tag:F.tag,payload:F.payload,callback:F.callback,next:null},le===null?(te=le=xe,W=ce):le=le.next=xe,k|=se;if(F=F.next,F===null){if(F=_.shared.pending,F===null)break;se=F,F=se.next,se.next=null,_.lastBaseUpdate=se,_.shared.pending=null}}while(!0);if(le===null&&(W=ce),_.baseState=W,_.firstBaseUpdate=te,_.lastBaseUpdate=le,l=_.shared.interleaved,l!==null){_=l;do k|=_.lane,_=_.next;while(_!==l)}else j===null&&(_.shared.lanes=0);ma|=k,o.lanes=k,o.memoizedState=ce}}function eO(o,l,v){if(o=l.effects,l.effects=null,o!==null)for(l=0;lv?v:4,o(!0);var x=Zm.transition;Zm.transition={};try{o(!1),l()}finally{ct=v,Zm.transition=x}}function xO(){return Kr().memoizedState}function d5(o,l,v){var x=Li(o);if(v={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null},bO(o))wO(l,v);else if(v=QS(o,l,v,x),v!==null){var _=sr();pn(v,o,x,_),_O(v,l,x)}}function h5(o,l,v){var x=Li(o),_={lane:x,action:v,hasEagerState:!1,eagerState:null,next:null};if(bO(o))wO(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var k=l.lastRenderedState,F=j(k,v);if(_.hasEagerState=!0,_.eagerState=F,cn(F,k)){var W=l.interleaved;W===null?(_.next=_,Vm(l)):(_.next=W.next,W.next=_),l.interleaved=_;return}}catch{}finally{}v=QS(o,l,_,x),v!==null&&(_=sr(),pn(v,o,x,_),_O(v,l,x))}}function bO(o){var l=o.alternate;return o===St||l!==null&&l===St}function wO(o,l){_l=Ku=!0;var v=o.pending;v===null?l.next=l:(l.next=v.next,v.next=l),o.pending=l}function _O(o,l,v){if((v&4194240)!==0){var x=l.lanes;x&=o.pendingLanes,v|=x,l.lanes=v,sm(o,v)}}var Qu={readContext:Gr,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},p5={readContext:Gr,useCallback:function(o,l){return Tn().memoizedState=[o,l===void 0?null:l],o},useContext:Gr,useEffect:fO,useImperativeHandle:function(o,l,v){return v=v!=null?v.concat([o]):null,Xu(4194308,4,pO.bind(null,l,o),v)},useLayoutEffect:function(o,l){return Xu(4194308,4,o,l)},useInsertionEffect:function(o,l){return Xu(4,2,o,l)},useMemo:function(o,l){var v=Tn();return l=l===void 0?null:l,o=o(),v.memoizedState=[o,l],o},useReducer:function(o,l,v){var x=Tn();return l=v!==void 0?v(l):l,x.memoizedState=x.baseState=l,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:l},x.queue=o,o=o.dispatch=d5.bind(null,St,o),[x.memoizedState,o]},useRef:function(o){var l=Tn();return o={current:o},l.memoizedState=o},useState:cO,useDebugValue:av,useDeferredValue:function(o){return Tn().memoizedState=o},useTransition:function(){var o=cO(!1),l=o[0];return o=f5.bind(null,o[1]),Tn().memoizedState=o,[l,o]},useMutableSource:function(){},useSyncExternalStore:function(o,l,v){var x=St,_=Tn();if(bt){if(v===void 0)throw Error(r(407));v=v()}else{if(v=l(),Ut===null)throw Error(r(349));(pa&30)!==0||iO(x,l,v)}_.memoizedState=v;var j={value:v,getSnapshot:l};return _.queue=j,fO(oO.bind(null,x,j,o),[o]),x.flags|=2048,jl(9,aO.bind(null,x,j,v,l),void 0,null),v},useId:function(){var o=Tn(),l=Ut.identifierPrefix;if(bt){var v=Qn,x=Yn;v=(x&~(1<<32-ln(x)-1)).toString(32)+v,l=":"+l+"R"+v,v=Sl++,0<\/script>",o=o.removeChild(o.firstChild)):typeof x.is=="string"?o=k.createElement(v,{is:x.is}):(o=k.createElement(v),v==="select"&&(k=o,x.multiple?k.multiple=!0:x.size&&(k.size=x.size))):o=k.createElementNS(o,v),o[Nn]=l,o[vl]=x,qO(o,l,!1,!1),l.stateNode=o;e:{switch(k=Qp(v,x),v){case"dialog":gt("cancel",o),gt("close",o),_=x;break;case"iframe":case"object":case"embed":gt("load",o),_=x;break;case"video":case"audio":for(_=0;_Po&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304)}else{if(!x)if(o=Vu(k),o!==null){if(l.flags|=128,x=!0,v=o.updateQueue,v!==null&&(l.updateQueue=v,l.flags|=4),El(j,!0),j.tail===null&&j.tailMode==="hidden"&&!k.alternate&&!bt)return tr(l),null}else 2*Pt()-j.renderingStartTime>Po&&v!==1073741824&&(l.flags|=128,x=!0,El(j,!1),l.lanes=4194304);j.isBackwards?(k.sibling=l.child,l.child=k):(v=j.last,v!==null?v.sibling=k:l.child=k,j.last=k)}return j.tail!==null?(l=j.tail,j.rendering=l,j.tail=l.sibling,j.renderingStartTime=Pt(),l.sibling=null,v=_t.current,dt(_t,x?v&1|2:v&1),l):(tr(l),null);case 22:case 23:return Nv(),x=l.memoizedState!==null,o!==null&&o.memoizedState!==null!==x&&(l.flags|=8192),x&&(l.mode&1)!==0?(Nr&1073741824)!==0&&(tr(l),l.subtreeFlags&6&&(l.flags|=8192)):tr(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function _5(o,l){switch($m(l),l.tag){case 1:return pr(l.type)&&Iu(),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Oo(),yt(hr),yt(Jt),Qm(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 5:return Xm(l),null;case 13:if(yt(_t),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));bo()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return yt(_t),null;case 4:return Oo(),null;case 10:return Wm(l.type._context),null;case 22:case 23:return Nv(),null;case 24:return null;default:return null}}var tf=!1,rr=!1,S5=typeof WeakSet=="function"?WeakSet:Set,be=null;function Eo(o,l){var v=o.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(x){Ot(o,l,x)}else v.current=null}function gv(o,l,v){try{v()}catch(x){Ot(o,l,x)}}var HO=!1;function O5(o,l){if(Nm=wu,o=SS(),wm(o)){if("selectionStart"in o)var v={start:o.selectionStart,end:o.selectionEnd};else e:{v=(v=o.ownerDocument)&&v.defaultView||window;var x=v.getSelection&&v.getSelection();if(x&&x.rangeCount!==0){v=x.anchorNode;var _=x.anchorOffset,j=x.focusNode;x=x.focusOffset;try{v.nodeType,j.nodeType}catch{v=null;break e}var k=0,F=-1,W=-1,te=0,le=0,ce=o,se=null;t:for(;;){for(var xe;ce!==v||_!==0&&ce.nodeType!==3||(F=k+_),ce!==j||x!==0&&ce.nodeType!==3||(W=k+x),ce.nodeType===3&&(k+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)se=ce,ce=xe;for(;;){if(ce===o)break t;if(se===v&&++te===_&&(F=k),se===j&&++le===x&&(W=k),(xe=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=xe}v=F===-1||W===-1?null:{start:F,end:W}}else v=null}v=v||{start:0,end:0}}else v=null;for(Cm={focusedElem:o,selectionRange:v},wu=!1,be=l;be!==null;)if(l=be,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,be=o;else for(;be!==null;){l=be;try{var Se=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ee=Se.memoizedProps,Nt=Se.memoizedState,Y=l.stateNode,G=Y.getSnapshotBeforeUpdate(l.elementType===l.type?Ee:fn(l.type,Ee),Nt);Y.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var J=l.stateNode.containerInfo;J.nodeType===1?J.textContent="":J.nodeType===9&&J.documentElement&&J.removeChild(J.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(de){Ot(l,l.return,de)}if(o=l.sibling,o!==null){o.return=l.return,be=o;break}be=l.return}return Se=HO,HO=!1,Se}function Al(o,l,v){var x=l.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var _=x=x.next;do{if((_.tag&o)===o){var j=_.destroy;_.destroy=void 0,j!==void 0&&gv(l,v,j)}_=_.next}while(_!==x)}}function rf(o,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var v=l=l.next;do{if((v.tag&o)===o){var x=v.create;v.destroy=x()}v=v.next}while(v!==l)}}function yv(o){var l=o.ref;if(l!==null){var v=o.stateNode;switch(o.tag){case 5:o=v;break;default:o=v}typeof l=="function"?l(o):l.current=o}}function VO(o){var l=o.alternate;l!==null&&(o.alternate=null,VO(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&(delete l[Nn],delete l[vl],delete l[Mm],delete l[o5],delete l[s5])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function GO(o){return o.tag===5||o.tag===3||o.tag===4}function KO(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||GO(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function xv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.nodeType===8?v.parentNode.insertBefore(o,l):v.insertBefore(o,l):(v.nodeType===8?(l=v.parentNode,l.insertBefore(o,v)):(l=v,l.appendChild(o)),v=v._reactRootContainer,v!=null||l.onclick!==null||(l.onclick=Ru));else if(x!==4&&(o=o.child,o!==null))for(xv(o,l,v),o=o.sibling;o!==null;)xv(o,l,v),o=o.sibling}function bv(o,l,v){var x=o.tag;if(x===5||x===6)o=o.stateNode,l?v.insertBefore(o,l):v.appendChild(o);else if(x!==4&&(o=o.child,o!==null))for(bv(o,l,v),o=o.sibling;o!==null;)bv(o,l,v),o=o.sibling}var Yt=null,dn=!1;function Mi(o,l,v){for(v=v.child;v!==null;)XO(o,l,v),v=v.sibling}function XO(o,l,v){if(Pn&&typeof Pn.onCommitFiberUnmount=="function")try{Pn.onCommitFiberUnmount(mu,v)}catch{}switch(v.tag){case 5:rr||Eo(v,l);case 6:var x=Yt,_=dn;Yt=null,Mi(o,l,v),Yt=x,dn=_,Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?o.parentNode.removeChild(v):o.removeChild(v)):Yt.removeChild(v.stateNode));break;case 18:Yt!==null&&(dn?(o=Yt,v=v.stateNode,o.nodeType===8?Rm(o.parentNode,v):o.nodeType===1&&Rm(o,v),al(o)):Rm(Yt,v.stateNode));break;case 4:x=Yt,_=dn,Yt=v.stateNode.containerInfo,dn=!0,Mi(o,l,v),Yt=x,dn=_;break;case 0:case 11:case 14:case 15:if(!rr&&(x=v.updateQueue,x!==null&&(x=x.lastEffect,x!==null))){_=x=x.next;do{var j=_,k=j.destroy;j=j.tag,k!==void 0&&((j&2)!==0||(j&4)!==0)&&gv(v,l,k),_=_.next}while(_!==x)}Mi(o,l,v);break;case 1:if(!rr&&(Eo(v,l),x=v.stateNode,typeof x.componentWillUnmount=="function"))try{x.props=v.memoizedProps,x.state=v.memoizedState,x.componentWillUnmount()}catch(F){Ot(v,l,F)}Mi(o,l,v);break;case 21:Mi(o,l,v);break;case 22:v.mode&1?(rr=(x=rr)||v.memoizedState!==null,Mi(o,l,v),rr=x):Mi(o,l,v);break;default:Mi(o,l,v)}}function YO(o){var l=o.updateQueue;if(l!==null){o.updateQueue=null;var v=o.stateNode;v===null&&(v=o.stateNode=new S5),l.forEach(function(x){var _=R5.bind(null,o,x);v.has(x)||(v.add(x),x.then(_,_))})}}function hn(o,l){var v=l.deletions;if(v!==null)for(var x=0;x_&&(_=k),x&=~j}if(x=_,x=Pt()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*E5(x/1960))-x,10o?16:o,Di===null)var x=!1;else{if(o=Di,Di=null,lf=0,(Xe&6)!==0)throw Error(r(331));var _=Xe;for(Xe|=4,be=o.current;be!==null;){var j=be,k=j.child;if((be.flags&16)!==0){var F=j.deletions;if(F!==null){for(var W=0;WPt()-Sv?ga(o,0):_v|=v),gr(o,l)}function cj(o,l){l===0&&((o.mode&1)===0?l=1:(l=gu,gu<<=1,(gu&130023424)===0&&(gu=4194304)));var v=sr();o=Zn(o,l),o!==null&&(el(o,l,v),gr(o,v))}function k5(o){var l=o.memoizedState,v=0;l!==null&&(v=l.retryLane),cj(o,v)}function R5(o,l){var v=0;switch(o.tag){case 13:var x=o.stateNode,_=o.memoizedState;_!==null&&(v=_.retryLane);break;case 19:x=o.stateNode;break;default:throw Error(r(314))}x!==null&&x.delete(l),cj(o,v)}var uj;uj=function(o,l,v){if(o!==null)if(o.memoizedProps!==l.pendingProps||hr.current)mr=!0;else{if((o.lanes&v)===0&&(l.flags&128)===0)return mr=!1,b5(o,l,v);mr=(o.flags&131072)!==0}else mr=!1,bt&&(l.flags&1048576)!==0&&US(l,Bu,l.index);switch(l.lanes=0,l.tag){case 2:var x=l.type;ef(o,l),o=l.pendingProps;var _=go(l,Jt.current);So(l,v),_=ev(null,l,x,o,_,v);var j=tv();return l.flags|=1,typeof _=="object"&&_!==null&&typeof _.render=="function"&&_.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,pr(x)?(j=!0,Du(l)):j=!1,l.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,Gm(l),_.updater=Zu,l.stateNode=_,_._reactInternals=l,sv(l,x,o,v),l=fv(null,l,x,!0,j,v)):(l.tag=0,bt&&j&&Lm(l),or(null,l,_,v),l=l.child),l;case 16:x=l.elementType;e:{switch(ef(o,l),o=l.pendingProps,_=x._init,x=_(x._payload),l.type=x,_=l.tag=I5(x),o=fn(x,o),_){case 0:l=uv(null,l,x,o,v);break e;case 1:l=DO(null,l,x,o,v);break e;case 11:l=TO(null,l,x,o,v);break e;case 14:l=kO(null,l,x,fn(x.type,o),v);break e}throw Error(r(306,x,""))}return l;case 0:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),uv(o,l,x,_,v);case 1:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),DO(o,l,x,_,v);case 3:e:{if(LO(l),o===null)throw Error(r(387));x=l.pendingProps,j=l.memoizedState,_=j.element,ZS(o,l),Hu(l,x,null,v);var k=l.memoizedState;if(x=k.element,j.isDehydrated)if(j={element:x,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){_=jo(Error(r(423)),l),l=$O(o,l,x,v,_);break e}else if(x!==_){_=jo(Error(r(424)),l),l=$O(o,l,x,v,_);break e}else for(Pr=Pi(l.stateNode.containerInfo.firstChild),Ar=l,bt=!0,un=null,v=YS(l,null,x,v),l.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(bo(),x===_){l=ei(o,l,v);break e}or(o,l,x,v)}l=l.child}return l;case 5:return tO(l),o===null&&zm(l),x=l.type,_=l.pendingProps,j=o!==null?o.memoizedProps:null,k=_.children,Tm(x,_)?k=null:j!==null&&Tm(x,j)&&(l.flags|=32),IO(o,l),or(o,l,k,v),l.child;case 6:return o===null&&zm(l),null;case 13:return BO(o,l,v);case 4:return Km(l,l.stateNode.containerInfo),x=l.pendingProps,o===null?l.child=wo(l,null,x,v):or(o,l,x,v),l.child;case 11:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),TO(o,l,x,_,v);case 7:return or(o,l,l.pendingProps,v),l.child;case 8:return or(o,l,l.pendingProps.children,v),l.child;case 12:return or(o,l,l.pendingProps.children,v),l.child;case 10:e:{if(x=l.type._context,_=l.pendingProps,j=l.memoizedProps,k=_.value,dt(qu,x._currentValue),x._currentValue=k,j!==null)if(cn(j.value,k)){if(j.children===_.children&&!hr.current){l=ei(o,l,v);break e}}else for(j=l.child,j!==null&&(j.return=l);j!==null;){var F=j.dependencies;if(F!==null){k=j.child;for(var W=F.firstContext;W!==null;){if(W.context===x){if(j.tag===1){W=Jn(-1,v&-v),W.tag=2;var te=j.updateQueue;if(te!==null){te=te.shared;var le=te.pending;le===null?W.next=W:(W.next=le.next,le.next=W),te.pending=W}}j.lanes|=v,W=j.alternate,W!==null&&(W.lanes|=v),Hm(j.return,v,l),F.lanes|=v;break}W=W.next}}else if(j.tag===10)k=j.type===l.type?null:j.child;else if(j.tag===18){if(k=j.return,k===null)throw Error(r(341));k.lanes|=v,F=k.alternate,F!==null&&(F.lanes|=v),Hm(k,v,l),k=j.sibling}else k=j.child;if(k!==null)k.return=j;else for(k=j;k!==null;){if(k===l){k=null;break}if(j=k.sibling,j!==null){j.return=k.return,k=j;break}k=k.return}j=k}or(o,l,_.children,v),l=l.child}return l;case 9:return _=l.type,x=l.pendingProps.children,So(l,v),_=Gr(_),x=x(_),l.flags|=1,or(o,l,x,v),l.child;case 14:return x=l.type,_=fn(x,l.pendingProps),_=fn(x.type,_),kO(o,l,x,_,v);case 15:return RO(o,l,l.type,l.pendingProps,v);case 17:return x=l.type,_=l.pendingProps,_=l.elementType===x?_:fn(x,_),ef(o,l),l.tag=1,pr(x)?(o=!0,Du(l)):o=!1,So(l,v),OO(l,x,_),sv(l,x,_,v),fv(null,l,x,!0,o,v);case 19:return FO(o,l,v);case 22:return MO(o,l,v)}throw Error(r(156,l.tag))};function fj(o,l){return W_(o,l)}function M5(o,l,v,x){this.tag=o,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(o,l,v,x){return new M5(o,l,v,x)}function Tv(o){return o=o.prototype,!(!o||!o.isReactComponent)}function I5(o){if(typeof o=="function")return Tv(o)?1:0;if(o!=null){if(o=o.$$typeof,o===D)return 11;if(o===V)return 14}return 2}function Bi(o,l){var v=o.alternate;return v===null?(v=Yr(o.tag,l,o.key,o.mode),v.elementType=o.elementType,v.type=o.type,v.stateNode=o.stateNode,v.alternate=o,o.alternate=v):(v.pendingProps=l,v.type=o.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=o.flags&14680064,v.childLanes=o.childLanes,v.lanes=o.lanes,v.child=o.child,v.memoizedProps=o.memoizedProps,v.memoizedState=o.memoizedState,v.updateQueue=o.updateQueue,l=o.dependencies,v.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},v.sibling=o.sibling,v.index=o.index,v.ref=o.ref,v}function df(o,l,v,x,_,j){var k=2;if(x=o,typeof o=="function")Tv(o)&&(k=1);else if(typeof o=="string")k=5;else e:switch(o){case T:return xa(v.children,_,j,l);case R:k=8,_|=8;break;case I:return o=Yr(12,v,l,_|2),o.elementType=I,o.lanes=j,o;case U:return o=Yr(13,v,l,_),o.elementType=U,o.lanes=j,o;case H:return o=Yr(19,v,l,_),o.elementType=H,o.lanes=j,o;case X:return hf(v,_,j,l);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case q:k=10;break e;case L:k=9;break e;case D:k=11;break e;case V:k=14;break e;case K:k=16,x=null;break e}throw Error(r(130,o==null?o:typeof o,""))}return l=Yr(k,v,l,_),l.elementType=o,l.type=x,l.lanes=j,l}function xa(o,l,v,x){return o=Yr(7,o,x,l),o.lanes=v,o}function hf(o,l,v,x){return o=Yr(22,o,x,l),o.elementType=X,o.lanes=v,o.stateNode={isHidden:!1},o}function kv(o,l,v){return o=Yr(6,o,null,l),o.lanes=v,o}function Rv(o,l,v){return l=Yr(4,o.children!==null?o.children:[],o.key,l),l.lanes=v,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}function D5(o,l,v,x,_){this.tag=l,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=om(0),this.expirationTimes=om(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=om(0),this.identifierPrefix=x,this.onRecoverableError=_,this.mutableSourceEagerHydrationData=null}function Mv(o,l,v,x,_,j,k,F,W){return o=new D5(o,l,v,F,W),l===1?(l=1,j===!0&&(l|=8)):l=0,j=Yr(3,null,null,l),o.current=j,j.stateNode=o,j.memoizedState={element:x,isDehydrated:v,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gm(j),o}function L5(o,l,v){var x=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zv.exports=X5(),zv.exports}var jj;function Y5(){if(jj)return wf;jj=1;var e=cR();return wf.createRoot=e.createRoot,wf.hydrateRoot=e.hydrateRoot,wf}var Q5=Y5(),P=Vh();const z=it(P),X1=U5({__proto__:null,default:z},[P]);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Z5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),J5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Ej=e=>{const t=J5(e);return t.charAt(0).toUpperCase()+t.slice(1)},uR=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var eB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tB=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:a,iconNode:s,...u},f)=>P.createElement("svg",{ref:f,...eB,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:uR("lucide",i),...u},[...s.map(([c,d])=>P.createElement(c,d)),...Array.isArray(a)?a:[a]]));/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ce=(e,t)=>{const r=P.forwardRef(({className:n,...i},a)=>P.createElement(tB,{ref:a,iconNode:t,className:uR(`lucide-${Z5(Ej(e))}`,`lucide-${e}`,n),...i}));return r.displayName=Ej(e),r};/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rB=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]],nB=Ce("arrow-down-a-z",rB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iB=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],aB=Ce("arrow-down-right",iB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oB=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],sB=Ce("arrow-left",oB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lB=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],cB=Ce("arrow-up-down",lB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uB=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],fR=Ce("arrow-up-right",uB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fB=[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]],dB=Ce("barcode",fB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hB=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],pB=Ce("bell",hB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const mB=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],vB=Ce("calendar",mB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const gB=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],yB=Ce("chart-column",gB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xB=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],dR=Ce("check",xB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bB=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cc=Ce("chevron-down",bB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wB=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],_B=Ce("chevron-left",wB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SB=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Cd=Ce("chevron-right",SB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const OB=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],jB=Ce("chevron-up",OB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const EB=[["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"}]],cb=Ce("circle-help",EB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const AB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],PB=Ce("circle-user",AB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const NB=[["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M14 2v2",key:"6buw04"}],["path",{d:"M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 1 1 0 8h-1",key:"pwadti"}],["path",{d:"M6 2v2",key:"colzsn"}]],CB=Ce("coffee",NB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const TB=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Y1=Ce("download",TB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kB=[["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"}]],hR=Ce("ellipsis",kB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const RB=[["path",{d:"M14.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"16lz6z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 13.1a2 2 0 0 0-1 1.76v3.24a2 2 0 0 0 .97 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01Z",key:"99pj1s"}],["path",{d:"M7 17v5",key:"1yj1jh"}],["path",{d:"M11.7 14.2 7 17l-4.7-2.8",key:"1yk8tc"}]],MB=Ce("file-box",RB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const IB=[["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"}]],uc=Ce("file-text",IB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const DB=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],LB=Ce("grid-3x3",DB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $B=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ia=Ce("image",$B);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const BB=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],zB=Ce("layers",BB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const FB=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],qB=Ce("layout-dashboard",FB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const UB=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],WB=Ce("list",UB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const HB=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],VB=Ce("log-out",HB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const GB=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Gh=Ce("map-pin",GB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const KB=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],XB=Ce("menu",KB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const YB=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],ub=Ce("package",YB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const QB=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],pR=Ce("palette",QB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ZB=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],jd=Ce("pencil",ZB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const JB=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],e8=Ce("pin",JB);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const t8=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ur=Ce("plus",t8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const r8=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],mR=Ce("printer",r8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const n8=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],i8=Ce("refresh-cw",n8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const a8=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],o8=Ce("save",a8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const s8=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Q1=Ce("search",s8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const l8=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],vR=Ce("settings",l8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const c8=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],u8=Ce("shield",c8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const f8=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Uo=Ce("square-pen",f8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const d8=[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7",key:"6c3vgh"}]],h8=Ce("store",d8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const p8=[["path",{d:"m18 2 4 4",key:"22kx64"}],["path",{d:"m17 7 3-3",key:"1w1zoj"}],["path",{d:"M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5",key:"1exhtz"}],["path",{d:"m9 11 4 4",key:"rovt3i"}],["path",{d:"m5 19-3 3",key:"59f2uf"}],["path",{d:"m14 4 6 6",key:"yqp9t2"}]],Uv=Ce("syringe",p8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const m8=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["line",{x1:"12",x2:"12.01",y1:"18",y2:"18",key:"1dp563"}]],v8=Ce("tablet",m8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const g8=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],fb=Ce("tag",g8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const y8=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],x8=Ce("timer",y8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const b8=[["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"}]],Aj=Ce("trash-2",b8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const w8=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],_8=Ce("trending-up",w8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S8=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],Z1=Ce("type",S8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const O8=[["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"}]],j8=Ce("upload",O8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const E8=[["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"}]],A8=Ce("user",E8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const P8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],gR=Ce("users",P8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const N8=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],C8=Ce("utensils",N8);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const T8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ec=Ce("x",T8);function yR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{const r=new Array(e.length+t.length);for(let n=0;n({classGroupId:e,validator:t}),xR=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Td="-",Pj=[],M8="arbitrary..",I8=e=>{const t=L8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return D8(s);const u=s.split(Td),f=u[0]===""&&u.length>1?1:0;return bR(u,f,t)},getConflictingClassGroupIds:(s,u)=>{if(u){const f=n[s],c=r[s];return f?c?k8(c,f):f:c||Pj}return r[s]||Pj}}},bR=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const c=bR(e,t+1,a);if(c)return c}const s=r.validators;if(s===null)return;const u=t===0?e.join(Td):e.slice(t).join(Td),f=s.length;for(let c=0;ce.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?M8+n:void 0})(),L8=e=>{const{theme:t,classGroups:r}=e;return $8(r,t)},$8=(e,t)=>{const r=xR();for(const n in e){const i=e[n];J1(i,r,n,t)}return r},J1=(e,t,r,n)=>{const i=e.length;for(let a=0;a{if(typeof e=="string"){z8(e,t,r);return}if(typeof e=="function"){F8(e,t,r,n);return}q8(e,t,r,n)},z8=(e,t,r)=>{const n=e===""?t:wR(t,e);n.classGroupId=r},F8=(e,t,r,n)=>{if(U8(e)){J1(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(R8(r,e))},q8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s{let r=e;const n=t.split(Td),i=n.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,W8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},db="!",Nj=":",H8=[],Cj=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),V8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,u=0,f=0,c;const d=i.length;for(let y=0;yf?c-f:void 0;return Cj(a,g,m,b)};if(t){const i=t+Nj,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Cj(H8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},G8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},K8=e=>({cache:W8(e.cacheSize),parseClassName:V8(e),sortModifiers:G8(e),...I8(e)}),X8=/\s+/,Y8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],u=e.trim().split(X8);let f="";for(let c=u.length-1;c>=0;c-=1){const d=u[c],{isExternal:h,modifiers:m,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:y}=r(d);if(h){f=d+(f.length>0?" "+f:f);continue}let w=!!y,S=n(w?b.substring(0,y):b);if(!S){if(!w){f=d+(f.length>0?" "+f:f);continue}if(S=n(b),!S){f=d+(f.length>0?" "+f:f);continue}w=!1}const O=m.length===0?"":m.length===1?m[0]:a(m).join(":"),E=g?O+db:O,C=E+S;if(s.indexOf(C)>-1)continue;s.push(C);const A=i(S,w);for(let N=0;N0?" "+f:f)}return f},Q8=(...e)=>{let t=0,r,n,i="";for(;t{if(typeof e=="string")return e;let t,r="";for(let n=0;n{let r,n,i,a;const s=f=>{const c=t.reduce((d,h)=>h(d),e());return r=K8(c),n=r.cache.get,i=r.cache.set,a=u,u(f)},u=f=>{const c=n(f);if(c)return c;const d=Y8(f,r);return i(f,d),d};return a=s,(...f)=>a(Q8(...f))},J8=[],Dt=e=>{const t=r=>r[e]||J8;return t.isThemeGetter=!0,t},SR=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OR=/^\((?:(\w[\w-]*):)?(.+)\)$/i,e6=/^\d+\/\d+$/,t6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r6=/\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$/,n6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,i6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,a6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Co=e=>e6.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),Fi=e=>!!e&&Number.isInteger(Number(e)),Wv=e=>e.endsWith("%")&&He(e.slice(0,-1)),ri=e=>t6.test(e),o6=()=>!0,s6=e=>r6.test(e)&&!n6.test(e),jR=()=>!1,l6=e=>i6.test(e),c6=e=>a6.test(e),u6=e=>!Oe(e)&&!je(e),f6=e=>Ts(e,PR,jR),Oe=e=>SR.test(e),ba=e=>Ts(e,NR,s6),Hv=e=>Ts(e,v6,He),Tj=e=>Ts(e,ER,jR),d6=e=>Ts(e,AR,c6),_f=e=>Ts(e,CR,l6),je=e=>OR.test(e),Rl=e=>ks(e,NR),h6=e=>ks(e,g6),kj=e=>ks(e,ER),p6=e=>ks(e,PR),m6=e=>ks(e,AR),Sf=e=>ks(e,CR,!0),Ts=(e,t,r)=>{const n=SR.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ks=(e,t,r=!1)=>{const n=OR.exec(e);return n?n[1]?t(n[1]):r:!1},ER=e=>e==="position"||e==="percentage",AR=e=>e==="image"||e==="url",PR=e=>e==="length"||e==="size"||e==="bg-size",NR=e=>e==="length",v6=e=>e==="number",g6=e=>e==="family-name",CR=e=>e==="shadow",y6=()=>{const e=Dt("color"),t=Dt("font"),r=Dt("text"),n=Dt("font-weight"),i=Dt("tracking"),a=Dt("leading"),s=Dt("breakpoint"),u=Dt("container"),f=Dt("spacing"),c=Dt("radius"),d=Dt("shadow"),h=Dt("inset-shadow"),m=Dt("text-shadow"),g=Dt("drop-shadow"),b=Dt("blur"),y=Dt("perspective"),w=Dt("aspect"),S=Dt("ease"),O=Dt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...C(),je,Oe],N=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],R=()=>[je,Oe,f],I=()=>[Co,"full","auto",...R()],q=()=>[Fi,"none","subgrid",je,Oe],L=()=>["auto",{span:["full",Fi,je,Oe]},Fi,je,Oe],D=()=>[Fi,"auto",je,Oe],U=()=>["auto","min","max","fr",je,Oe],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],X=()=>[Co,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[e,je,Oe],Z=()=>[...C(),kj,Tj,{position:[je,Oe]}],ee=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",p6,f6,{size:[je,Oe]}],$=()=>[Wv,Rl,ba],Q=()=>["","none","full",c,je,Oe],ae=()=>["",He,Rl,ba],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[He,Wv,kj,Tj],me=()=>["","none",b,je,Oe],ie=()=>["none",He,je,Oe],ue=()=>["none",He,je,Oe],ve=()=>[He,je,Oe],re=()=>[Co,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ri],breakpoint:[ri],color:[o6],container:[ri],"drop-shadow":[ri],ease:["in","out","in-out"],font:[u6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ri],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ri],shadow:[ri],spacing:["px",He],text:[ri],"text-shadow":[ri],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Co,Oe,je,w]}],container:["container"],columns:[{columns:[He,Oe,je,u]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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"],sr:["sr-only","not-sr-only"],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:A()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Fi,"auto",je,Oe]}],basis:[{basis:[Co,"full","auto",u,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,Co,"auto","initial","none",Oe]}],grow:[{grow:["",He,je,Oe]}],shrink:[{shrink:["",He,je,Oe]}],order:[{order:[Fi,"first","last","none",je,Oe]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[u,"screen",...X()]}],"min-w":[{"min-w":[u,"screen","none",...X()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,Rl,ba]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,je,Hv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Wv,Oe]}],"font-family":[{font:[h6,Oe,t]}],"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-fractions"],tracking:[{tracking:[i,je,Oe]}],"line-clamp":[{"line-clamp":[He,"none",je,Hv]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",je,Oe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Oe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",je,ba]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[He,"auto",je,Oe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Oe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ee()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fi,je,Oe],radial:["",je,Oe],conic:[Fi,je,Oe]},m6,d6]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,je,Oe]}],"outline-w":[{outline:["",He,Rl,ba]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",d,Sf,_f]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Sf,_f]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[He,ba]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",m,Sf,_f]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[He,je,Oe]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[je,Oe]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ee()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Oe]}],filter:[{filter:["","none",je,Oe]}],blur:[{blur:me()}],brightness:[{brightness:[He,je,Oe]}],contrast:[{contrast:[He,je,Oe]}],"drop-shadow":[{"drop-shadow":["","none",g,Sf,_f]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",He,je,Oe]}],"hue-rotate":[{"hue-rotate":[He,je,Oe]}],invert:[{invert:["",He,je,Oe]}],saturate:[{saturate:[He,je,Oe]}],sepia:[{sepia:["",He,je,Oe]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Oe]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[He,je,Oe]}],"backdrop-contrast":[{"backdrop-contrast":[He,je,Oe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,je,Oe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,je,Oe]}],"backdrop-invert":[{"backdrop-invert":["",He,je,Oe]}],"backdrop-opacity":[{"backdrop-opacity":[He,je,Oe]}],"backdrop-saturate":[{"backdrop-saturate":[He,je,Oe]}],"backdrop-sepia":[{"backdrop-sepia":["",He,je,Oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Oe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",je,Oe]}],ease:[{ease:["linear","initial",S,je,Oe]}],delay:[{delay:[He,je,Oe]}],animate:[{animate:["none",O,je,Oe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,je,Oe]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ie()}],"rotate-x":[{"rotate-x":ie()}],"rotate-y":[{"rotate-y":ie()}],"rotate-z":[{"rotate-z":ie()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[je,Oe,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Oe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",je,Oe]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[He,Rl,ba,Hv]}],stroke:[{stroke:["none",...B()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},x6=Z8(y6);function Ie(...e){return x6(Ue(e))}var Kc=cR();const b6=it(Kc);function Rj(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rs(...e){return t=>{let r=!1;const n=e.map(i=>{const a=Rj(i,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let i=0;i{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(O6);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function _6(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=E6(i),u=j6(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S6=Symbol("radix.slottable");function O6(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S6}function j6(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function E6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var A6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=A6.reduce((e,t)=>{const r=w6(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function P6(e,t){e&&Kc.flushSync(()=>e.dispatchEvent(t))}var Rt=globalThis?.document?P.useLayoutEffect:()=>{};function N6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var Un=e=>{const{present:t,children:r}=e,n=C6(t),i=typeof r=="function"?r({present:n.isPresent}):P.Children.only(r),a=Je(n.ref,T6(i));return typeof r=="function"||n.isPresent?P.cloneElement(i,{ref:a}):null};Un.displayName="Presence";function C6(e){const[t,r]=P.useState(),n=P.useRef(null),i=P.useRef(e),a=P.useRef("none"),s=e?"mounted":"unmounted",[u,f]=N6(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const c=Of(n.current);a.current=u==="mounted"?c:"none"},[u]),Rt(()=>{const c=n.current,d=i.current;if(d!==e){const m=a.current,g=Of(c);e?f("MOUNT"):g==="none"||c?.display==="none"?f("UNMOUNT"):f(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),Rt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,h=g=>{const y=Of(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&y&&(f("ANIMATION_END"),!i.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},m=g=>{g.target===t&&(a.current=Of(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:P.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Of(e){return e?.animationName||"none"}function T6(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function k6(e,t){const r=P.createContext(t),n=a=>{const{children:s,...u}=a,f=P.useMemo(()=>u,Object.values(u));return p.jsx(r.Provider,{value:f,children:s})};n.displayName=e+"Provider";function i(a){const s=P.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,i]}function gi(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s),f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,R6(i,...t)]}function R6(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ar(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...r)=>t.current?.(...r),[])}var M6=P.createContext(void 0);function Kh(e){const t=P.useContext(M6);return e||t||"ltr"}function hb(e,[t,r]){return Math.min(r,Math.max(t,e))}function Fe(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e?.(i),r===!1||!i.defaultPrevented)return t?.(i)}}function I6(e,t){return P.useReducer((r,n)=>t[r][n]??r,e)}var ew="ScrollArea",[TR]=gi(ew),[D6,on]=TR(ew),kR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:a=600,...s}=e,[u,f]=P.useState(null),[c,d]=P.useState(null),[h,m]=P.useState(null),[g,b]=P.useState(null),[y,w]=P.useState(null),[S,O]=P.useState(0),[E,C]=P.useState(0),[A,N]=P.useState(!1),[T,R]=P.useState(!1),I=Je(t,L=>f(L)),q=Kh(i);return p.jsx(D6,{scope:r,type:n,dir:q,scrollHideDelay:a,scrollArea:u,viewport:c,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:A,onScrollbarXEnabledChange:N,scrollbarY:y,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:R,onCornerWidthChange:O,onCornerHeightChange:C,children:p.jsx(We.div,{dir:q,...s,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});kR.displayName=ew;var RR="ScrollAreaViewport",MR=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:i,...a}=e,s=on(RR,r),u=P.useRef(null),f=Je(t,u,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(We.div,{"data-radix-scroll-area-viewport":"",...a,ref:f,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});MR.displayName=RR;var Wn="ScrollAreaScrollbar",IR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:s}=i,u=e.orientation==="horizontal";return P.useEffect(()=>(u?a(!0):s(!0),()=>{u?a(!1):s(!1)}),[u,a,s]),i.type==="hover"?p.jsx(L6,{...n,ref:t,forceMount:r}):i.type==="scroll"?p.jsx($6,{...n,ref:t,forceMount:r}):i.type==="auto"?p.jsx(DR,{...n,ref:t,forceMount:r}):i.type==="always"?p.jsx(tw,{...n,ref:t}):null});IR.displayName=Wn;var L6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),[a,s]=P.useState(!1);return P.useEffect(()=>{const u=i.scrollArea;let f=0;if(u){const c=()=>{window.clearTimeout(f),s(!0)},d=()=>{f=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return u.addEventListener("pointerenter",c),u.addEventListener("pointerleave",d),()=>{window.clearTimeout(f),u.removeEventListener("pointerenter",c),u.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),p.jsx(Un,{present:r||a,children:p.jsx(DR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),$6=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=on(Wn,e.__scopeScrollArea),a=e.orientation==="horizontal",s=Yh(()=>f("SCROLL_END"),100),[u,f]=I6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return P.useEffect(()=>{if(u==="idle"){const c=window.setTimeout(()=>f("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[u,i.scrollHideDelay,f]),P.useEffect(()=>{const c=i.viewport,d=a?"scrollLeft":"scrollTop";if(c){let h=c[d];const m=()=>{const g=c[d];h!==g&&(f("SCROLL"),s()),h=g};return c.addEventListener("scroll",m),()=>c.removeEventListener("scroll",m)}},[i.viewport,a,f,s]),p.jsx(Un,{present:r||u!=="hidden",children:p.jsx(tw,{"data-state":u==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Fe(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:Fe(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),DR=P.forwardRef((e,t)=>{const r=on(Wn,e.__scopeScrollArea),{forceMount:n,...i}=e,[a,s]=P.useState(!1),u=e.orientation==="horizontal",f=Yh(()=>{if(r.viewport){const c=r.viewport.offsetWidth{const{orientation:r="vertical",...n}=e,i=on(Wn,e.__scopeScrollArea),a=P.useRef(null),s=P.useRef(0),[u,f]=P.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=FR(u.viewport,u.content),d={...n,sizes:u,onSizesChange:f,hasThumb:c>0&&c<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:m=>s.current=m};function h(m,g){return W6(m,s.current,u,g)}return r==="horizontal"?p.jsx(B6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=Mj(m,u,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):r==="vertical"?p.jsx(z6,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=Mj(m,u);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),B6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarXChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"horizontal",...i,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:Rd(s.paddingLeft),paddingEnd:Rd(s.paddingRight)}})}})}),z6=P.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,a=on(Wn,e.__scopeScrollArea),[s,u]=P.useState(),f=P.useRef(null),c=Je(t,f,a.onScrollbarYChange);return P.useEffect(()=>{f.current&&u(getComputedStyle(f.current))},[f]),p.jsx($R,{"data-orientation":"vertical",...i,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Xh(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),UR(m,h)&&d.preventDefault()}},onResize:()=>{f.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:Rd(s.paddingTop),paddingEnd:Rd(s.paddingBottom)}})}})}),[F6,LR]=TR(Wn),$R=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:a,onThumbPointerUp:s,onThumbPointerDown:u,onThumbPositionChange:f,onDragScroll:c,onWheelScroll:d,onResize:h,...m}=e,g=on(Wn,r),[b,y]=P.useState(null),w=Je(t,I=>y(I)),S=P.useRef(null),O=P.useRef(""),E=g.viewport,C=n.content-n.viewport,A=ar(d),N=ar(f),T=Yh(h,10);function R(I){if(S.current){const q=I.clientX-S.current.left,L=I.clientY-S.current.top;c({x:q,y:L})}}return P.useEffect(()=>{const I=q=>{const L=q.target;b?.contains(L)&&A(q,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[E,b,C,A]),P.useEffect(N,[n,N]),is(b,T),is(g.content,T),p.jsx(F6,{scope:r,scrollbar:b,hasThumb:i,onThumbChange:ar(a),onThumbPointerUp:ar(s),onThumbPositionChange:N,onThumbPointerDown:ar(u),children:p.jsx(We.div,{...m,ref:w,style:{position:"absolute",...m.style},onPointerDown:Fe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),S.current=b.getBoundingClientRect(),O.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),R(I))}),onPointerMove:Fe(e.onPointerMove,R),onPointerUp:Fe(e.onPointerUp,I=>{const q=I.target;q.hasPointerCapture(I.pointerId)&&q.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=O.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),kd="ScrollAreaThumb",BR=P.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=LR(kd,e.__scopeScrollArea);return p.jsx(Un,{present:r||i.hasThumb,children:p.jsx(q6,{ref:t,...n})})}),q6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,a=on(kd,r),s=LR(kd,r),{onThumbPositionChange:u}=s,f=Je(t,h=>s.onThumbChange(h)),c=P.useRef(void 0),d=Yh(()=>{c.current&&(c.current(),c.current=void 0)},100);return P.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!c.current){const g=H6(h,u);c.current=g,u()}};return u(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,u]),p.jsx(We.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Fe(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,y=h.clientY-g.top;s.onThumbPointerDown({x:b,y})}),onPointerUp:Fe(e.onPointerUp,s.onThumbPointerUp)})});BR.displayName=kd;var rw="ScrollAreaCorner",zR=P.forwardRef((e,t)=>{const r=on(rw,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?p.jsx(U6,{...e,ref:t}):null});zR.displayName=rw;var U6=P.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=on(rw,r),[a,s]=P.useState(0),[u,f]=P.useState(0),c=!!(a&&u);return is(i.scrollbarX,()=>{const d=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(d),f(d)}),is(i.scrollbarY,()=>{const d=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(d),s(d)}),c?p.jsx(We.div,{...n,ref:t,style:{width:a,height:u,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rd(e){return e?parseInt(e,10):0}function FR(e,t){const r=e/t;return isNaN(r)?0:r}function Xh(e){const t=FR(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function W6(e,t,r,n="ltr"){const i=Xh(r),a=i/2,s=t||a,u=i-s,f=r.scrollbar.paddingStart+s,c=r.scrollbar.size-r.scrollbar.paddingEnd-u,d=r.content-r.viewport,h=n==="ltr"?[0,d]:[d*-1,0];return qR([f,c],h)(e)}function Mj(e,t,r="ltr"){const n=Xh(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,s=t.content-t.viewport,u=a-n,f=r==="ltr"?[0,s]:[s*-1,0],c=hb(e,f);return qR([0,s],[0,u])(c)}function qR(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function UR(e,t){return e>0&&e{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},s=r.left!==a.left,u=r.top!==a.top;(s||u)&&t(),r=a,n=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(n)};function Yh(e,t){const r=ar(e),n=P.useRef(0);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),P.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function is(e,t){const r=ar(t);Rt(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}var V6=kR,G6=MR,K6=zR;function fc({className:e,children:t,...r}){return p.jsxs(V6,{"data-slot":"scroll-area",className:Ie("relative",e),...r,children:[p.jsx(G6,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),p.jsx(X6,{}),p.jsx(K6,{})]})}function X6({className:e,orientation:t="vertical",...r}){return p.jsx(IR,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ie("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...r,children:p.jsx(BR,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const Y6="/assets/773f0c39e1986271e9144596caac519f934a6ae6-Cou8J2R8.png";function Q6({currentView:e,setCurrentView:t}){const[r,n]=P.useState(!0),i=[{name:"Dashboard",icon:qB,type:"item"},{type:"header",name:"MODULES"},{name:"Labeling",icon:fb,type:"sub",isOpen:r,toggle:()=>n(!r),children:[{name:"Labels",icon:fb},{name:"Label Categories",icon:zB},{name:"Label Types",icon:Z1},{name:"Label Templates",icon:MB},{name:"Multiple Options",icon:vR}]},{type:"header",name:"MANAGEMENT"},{name:"Location Manager",icon:Gh,type:"item"},{name:"Account Management",icon:gR,type:"item"},{name:"Menu Manager",icon:ub,type:"item"},{name:"Reports",icon:uc,type:"item"},{name:"Support",icon:cb,type:"item"},{name:"Log Out",icon:VB,type:"item"}];return p.jsxs("div",{className:"w-64 bg-[#1e3a8a] text-white flex flex-col h-screen border-r border-blue-800 shadow-xl z-20 shrink-0",children:[p.jsx("div",{className:"flex items-center justify-center border-b border-blue-800/50 bg-white px-4 shrink-0",style:{height:90},children:p.jsx("img",{src:Y6,alt:"MedVantage",className:"h-16 w-auto object-contain"})}),p.jsx(fc,{className:"flex-1 py-4",children:p.jsx("div",{className:"px-3 space-y-1",children:i.map((a,s)=>a.type==="header"?p.jsx("div",{className:"px-4 py-2 mt-4 text-xs font-semibold text-blue-300 uppercase tracking-wider",children:a.name},s):a.type==="sub"?p.jsxs("div",{className:"space-y-1",children:[p.jsxs("button",{onClick:a.toggle,className:Ie("w-full flex items-center justify-between px-4 py-2.5 text-sm font-medium rounded-lg transition-colors","hover:bg-blue-800/50 text-blue-100"),children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]}),a.isOpen?p.jsx(cc,{className:"w-4 h-4"}):p.jsx(Cd,{className:"w-4 h-4"})]}),a.isOpen&&p.jsx("div",{className:"pl-4 space-y-1",children:a.children?.map((u,f)=>p.jsxs("button",{onClick:()=>t(u.name),className:Ie("w-full flex items-center gap-3 px-4 py-2 text-sm font-medium rounded-lg transition-colors border-l-2",e===u.name?"bg-blue-800 border-blue-400 text-white":"border-transparent hover:bg-blue-800/30 text-blue-200 hover:text-white"),children:[p.jsx("div",{className:"w-1 h-1 rounded-full bg-current"}),u.name]},f))})]},s):p.jsxs("button",{onClick:()=>t(a.name),className:Ie("w-full flex items-center gap-3 px-4 py-2.5 text-sm font-medium rounded-lg transition-colors",e===a.name?"bg-blue-700 text-white shadow-md shadow-blue-900/20":a.name==="Log Out"?"text-red-300 hover:bg-red-900/20 hover:text-red-200":"text-blue-100 hover:bg-blue-800 hover:text-white"),children:[p.jsx(a.icon,{className:"w-4 h-4"}),a.name]},s))})})]})}function $e({className:e,type:t,...r}){return p.jsx("input",{type:t,"data-slot":"input",className:Ie("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}var Z6=Symbol.for("react.lazy"),Md=X1[" use ".trim().toString()];function J6(e){return typeof e=="object"&&e!==null&&"then"in e}function WR(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Z6&&"_payload"in e&&J6(e._payload)}function nw(e){const t=ez(e),r=P.forwardRef((n,i)=>{let{children:a,...s}=n;WR(a)&&typeof Md=="function"&&(a=Md(a._payload));const u=P.Children.toArray(a),f=u.find(rz);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}var HR=nw("Slot");function ez(e){const t=P.forwardRef((r,n)=>{let{children:i,...a}=r;if(WR(i)&&typeof Md=="function"&&(i=Md(i._payload)),P.isValidElement(i)){const s=iz(i),u=nz(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var tz=Symbol("radix.slottable");function rz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===tz}function nz(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function iz(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const Ij=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Dj=Ue,VR=(e,t)=>r=>{var n;if(t?.variants==null)return Dj(e,r?.class,r?.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(c=>{const d=r?.[c],h=a?.[c];if(d===null)return null;const m=Ij(d)||Ij(h);return i[c][m]}),u=r&&Object.entries(r).reduce((c,d)=>{let[h,m]=d;return m===void 0||(c[h]=m),c},{}),f=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(b=>{let[y,w]=b;return Array.isArray(w)?w.includes({...a,...u}[y]):{...a,...u}[y]===w})?[...c,h,m]:c},[]);return Dj(e,s,f,r?.class,r?.className)},az=VR("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function Ne({className:e,variant:t,size:r,asChild:n=!1,...i}){const a=n?HR:"button";return p.jsx(a,{"data-slot":"button",className:Ie(az({variant:t,size:r,className:e})),...i})}function oz(e,t=[]){let r=[];function n(a,s){const u=P.createContext(s);u.displayName=a+"Context";const f=r.length;r=[...r,s];const c=h=>{const{scope:m,children:g,...b}=h,y=m?.[e]?.[f]||u,w=P.useMemo(()=>b,Object.values(b));return p.jsx(y.Provider,{value:w,children:g})};c.displayName=a+"Provider";function d(h,m){const g=m?.[e]?.[f]||u,b=P.useContext(g);if(b)return b;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=r.map(s=>P.createContext(s));return function(u){const f=u?.[e]||a;return P.useMemo(()=>({[`__scope${e}`]:{...u,[e]:f}}),[u,f])}};return i.scopeName=e,[n,sz(i,...t)]}function sz(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=n.reduce((u,{useScope:f,scopeName:c})=>{const h=f(a)[`__scope${c}`];return{...u,...h}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var lz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],iw=lz.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Vv={exports:{}},Gv={};/** + * @license React + * use-sync-external-store-shim.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Lj;function cz(){if(Lj)return Gv;Lj=1;var e=Vh();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(h,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),y=b[0].inst,w=b[1];return a(function(){y.value=g,y.getSnapshot=m,f(y)&&w({inst:y})},[h,g,m]),i(function(){return f(y)&&w({inst:y}),h(function(){f(y)&&w({inst:y})})},[h]),s(g),g}function f(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!r(h,g)}catch{return!0}}function c(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:u;return Gv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Gv}var $j;function uz(){return $j||($j=1,Vv.exports=cz()),Vv.exports}var fz=uz();function dz(){return fz.useSyncExternalStore(hz,()=>!0,()=>!1)}function hz(){return()=>{}}var aw="Avatar",[pz]=oz(aw),[mz,GR]=pz(aw),KR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,a]=P.useState("idle");return p.jsx(mz,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:p.jsx(iw.span,{...n,ref:t})})});KR.displayName=aw;var XR="AvatarImage",YR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:i=()=>{},...a}=e,s=GR(XR,r),u=vz(n,a),f=ar(c=>{i(c),s.onImageLoadingStatusChange(c)});return Rt(()=>{u!=="idle"&&f(u)},[u,f]),u==="loaded"?p.jsx(iw.img,{...a,ref:t,src:n}):null});YR.displayName=XR;var QR="AvatarFallback",ZR=P.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,a=GR(QR,r),[s,u]=P.useState(n===void 0);return P.useEffect(()=>{if(n!==void 0){const f=window.setTimeout(()=>u(!0),n);return()=>window.clearTimeout(f)}},[n]),s&&a.imageLoadingStatus!=="loaded"?p.jsx(iw.span,{...i,ref:t}):null});ZR.displayName=QR;function Bj(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vz(e,{referrerPolicy:t,crossOrigin:r}){const n=dz(),i=P.useRef(null),a=n?(i.current||(i.current=new window.Image),i.current):null,[s,u]=P.useState(()=>Bj(a,e));return Rt(()=>{u(Bj(a,e))},[a,e]),Rt(()=>{const f=h=>()=>{u(h)};if(!a)return;const c=f("loaded"),d=f("error");return a.addEventListener("load",c),a.addEventListener("error",d),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",d)}},[a,r,t]),s}var gz=KR,yz=YR,xz=ZR;function bz({className:e,...t}){return p.jsx(gz,{"data-slot":"avatar",className:Ie("relative flex size-10 shrink-0 overflow-hidden rounded-full",e),...t})}function wz({className:e,...t}){return p.jsx(yz,{"data-slot":"avatar-image",className:Ie("aspect-square size-full",e),...t})}function _z({className:e,...t}){return p.jsx(xz,{"data-slot":"avatar-fallback",className:Ie("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Sz({title:e}){const t=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return p.jsxs("header",{className:"bg-white border-b border-gray-200 px-8 flex items-center justify-between shadow-sm sticky top-0 z-10 shrink-0",style:{height:90},children:[p.jsxs("div",{children:[p.jsxs("h1",{className:"text-2xl font-bold",style:{color:"rgb(43, 50, 143)"},children:[e," Overview"]}),p.jsxs("p",{className:"text-sm text-gray-500 mt-1 flex items-center gap-2",children:[t," | Last updated: Just now"]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("div",{className:"flex items-center w-64 h-9 rounded-md border border-gray-200 bg-gray-50 focus-within:bg-white focus-within:ring-2 focus-within:ring-ring/50 focus-within:border-ring transition-colors overflow-hidden",children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx($e,{type:"search",placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full"})]}),p.jsx(Ne,{variant:"ghost",size:"icon",className:"text-gray-500 hover:text-gray-700",children:p.jsx(vR,{className:"w-5 h-5"})}),p.jsx("div",{className:"h-8 w-px bg-gray-200 mx-2"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"text-right hidden md:block",children:[p.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Admin User"}),p.jsx("div",{className:"text-xs text-gray-500",children:"Administrator"})]}),p.jsxs(bz,{className:"h-10 w-10 border border-gray-200",children:[p.jsx(wz,{src:"https://github.com/shadcn.png"}),p.jsx(_z,{children:"AD"})]})]})]})]})}function Oz({children:e,currentView:t,setCurrentView:r}){return p.jsxs("div",{className:"flex h-screen bg-gray-50 overflow-hidden font-sans",children:[p.jsx(Q6,{currentView:t,setCurrentView:r}),p.jsxs("div",{className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[p.jsx(Sz,{title:t}),p.jsx("div",{className:"px-8 mt-8 shrink-0",children:p.jsxs("nav",{className:"flex items-center gap-2 text-sm font-normal","aria-label":"Breadcrumb",children:[p.jsx("button",{type:"button",onClick:()=>r("Dashboard"),className:"text-gray-500 hover:text-gray-700 transition-colors",children:"Home"}),p.jsx(Cd,{className:"w-4 h-4 text-gray-500 shrink-0"}),p.jsx("span",{style:{color:"rgb(43, 50, 143)"},children:t})]})}),p.jsx("main",{className:"flex-1 overflow-y-auto p-8",children:p.jsx("div",{className:"w-full h-full",children:e})})]})]})}function Ir({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Ie("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",e),...t})}function yn({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Ie("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function xn({className:e,...t}){return p.jsx("h4",{"data-slot":"card-title",className:Ie("leading-none",e),...t})}function Id({className:e,...t}){return p.jsx("p",{"data-slot":"card-description",className:Ie("text-muted-foreground",e),...t})}function tn({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Ie("px-6 [&:last-child]:pb-6",e),...t})}const jz=VR("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Rn({className:e,variant:t,asChild:r=!1,...n}){const i=r?HR:"span";return p.jsx(i,{"data-slot":"badge",className:Ie(jz({variant:t}),e),...n})}var Kv,zj;function Sr(){if(zj)return Kv;zj=1;var e=Array.isArray;return Kv=e,Kv}var Xv,Fj;function JR(){if(Fj)return Xv;Fj=1;var e=typeof bf=="object"&&bf&&bf.Object===Object&&bf;return Xv=e,Xv}var Yv,qj;function Hn(){if(qj)return Yv;qj=1;var e=JR(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Yv=r,Yv}var Qv,Uj;function Xc(){if(Uj)return Qv;Uj=1;var e=Hn(),t=e.Symbol;return Qv=t,Qv}var Zv,Wj;function Ez(){if(Wj)return Zv;Wj=1;var e=Xc(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(s){var u=r.call(s,i),f=s[i];try{s[i]=void 0;var c=!0}catch{}var d=n.call(s);return c&&(u?s[i]=f:delete s[i]),d}return Zv=a,Zv}var Jv,Hj;function Az(){if(Hj)return Jv;Hj=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return Jv=r,Jv}var eg,Vj;function yi(){if(Vj)return eg;Vj=1;var e=Xc(),t=Ez(),r=Az(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function s(u){return u==null?u===void 0?i:n:a&&a in Object(u)?t(u):r(u)}return eg=s,eg}var tg,Gj;function xi(){if(Gj)return tg;Gj=1;function e(t){return t!=null&&typeof t=="object"}return tg=e,tg}var rg,Kj;function Ms(){if(Kj)return rg;Kj=1;var e=yi(),t=xi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return rg=n,rg}var ng,Xj;function ow(){if(Xj)return ng;Xj=1;var e=Sr(),t=Ms(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(e(a))return!1;var u=typeof a;return u=="number"||u=="symbol"||u=="boolean"||a==null||t(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return ng=i,ng}var ig,Yj;function Qi(){if(Yj)return ig;Yj=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return ig=e,ig}var ag,Qj;function sw(){if(Qj)return ag;Qj=1;var e=yi(),t=Qi(),r="[object AsyncFunction]",n="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function s(u){if(!t(u))return!1;var f=e(u);return f==n||f==i||f==r||f==a}return ag=s,ag}var og,Zj;function Pz(){if(Zj)return og;Zj=1;var e=Hn(),t=e["__core-js_shared__"];return og=t,og}var sg,Jj;function Nz(){if(Jj)return sg;Jj=1;var e=Pz(),t=(function(){var n=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function r(n){return!!t&&t in n}return sg=r,sg}var lg,eE;function eM(){if(eE)return lg;eE=1;var e=Function.prototype,t=e.toString;function r(n){if(n!=null){try{return t.call(n)}catch{}try{return n+""}catch{}}return""}return lg=r,lg}var cg,tE;function Cz(){if(tE)return cg;tE=1;var e=sw(),t=Nz(),r=Qi(),n=eM(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,f=s.toString,c=u.hasOwnProperty,d=RegExp("^"+f.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!r(m)||t(m))return!1;var g=e(m)?d:a;return g.test(n(m))}return cg=h,cg}var ug,rE;function Tz(){if(rE)return ug;rE=1;function e(t,r){return t?.[r]}return ug=e,ug}var fg,nE;function Ya(){if(nE)return fg;nE=1;var e=Cz(),t=Tz();function r(n,i){var a=t(n,i);return e(a)?a:void 0}return fg=r,fg}var dg,iE;function Qh(){if(iE)return dg;iE=1;var e=Ya(),t=e(Object,"create");return dg=t,dg}var hg,aE;function kz(){if(aE)return hg;aE=1;var e=Qh();function t(){this.__data__=e?e(null):{},this.size=0}return hg=t,hg}var pg,oE;function Rz(){if(oE)return pg;oE=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return pg=e,pg}var mg,sE;function Mz(){if(sE)return mg;sE=1;var e=Qh(),t="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function i(a){var s=this.__data__;if(e){var u=s[a];return u===t?void 0:u}return n.call(s,a)?s[a]:void 0}return mg=i,mg}var vg,lE;function Iz(){if(lE)return vg;lE=1;var e=Qh(),t=Object.prototype,r=t.hasOwnProperty;function n(i){var a=this.__data__;return e?a[i]!==void 0:r.call(a,i)}return vg=n,vg}var gg,cE;function Dz(){if(cE)return gg;cE=1;var e=Qh(),t="__lodash_hash_undefined__";function r(n,i){var a=this.__data__;return this.size+=this.has(n)?0:1,a[n]=e&&i===void 0?t:i,this}return gg=r,gg}var yg,uE;function Lz(){if(uE)return yg;uE=1;var e=kz(),t=Rz(),r=Mz(),n=Iz(),i=Dz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u-1}return Og=t,Og}var jg,gE;function qz(){if(gE)return jg;gE=1;var e=Zh();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return jg=t,jg}var Eg,yE;function Jh(){if(yE)return Eg;yE=1;var e=$z(),t=Bz(),r=zz(),n=Fz(),i=qz();function a(s){var u=-1,f=s==null?0:s.length;for(this.clear();++u0?1:-1},Na=function(t){return Da(t)&&t.indexOf("%")===t.length-1},he=function(t){return fF(t)&&!Yc(t)},dF=function(t){return qe(t)},zt=function(t){return he(t)||Da(t)},hF=0,Ds=function(t){var r=++hF;return"".concat(t||"").concat(r)},ur=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!he(t)&&!Da(t))return n;var a;if(Na(t)){var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return Yc(a)&&(a=n),i&&a>r&&(a=r),a},Wi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},pF=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function mb(e){"@babel/helpers - typeof";return mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mb(e)}var VE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ci=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},GE=null,Zg=null,pw=function e(t){if(t===GE&&Array.isArray(Zg))return Zg;var r=[];return P.Children.forEach(t,function(n){qe(n)||(sF.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),Zg=r,GE=t,r};function Fr(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(i){return ci(i)}):n=[ci(t)],pw(e).forEach(function(i){var a=zr(i,"type.displayName")||zr(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}function Mr(e,t){var r=Fr(e,t);return r&&r[0]}var KE=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,i=r.height;return!(!he(n)||n<=0||!he(i)||i<=0)},_F=["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"],SF=function(t){return t&&t.type&&Da(t.type)&&_F.indexOf(t.type)>=0},OF=function(t){return t&&mb(t)==="object"&&"clipDot"in t},jF=function(t,r,n,i){var a,s=(a=Qg?.[i])!==null&&a!==void 0?a:[];return r.startsWith("data-")||!ze(t)&&(i&&s.includes(r)||gF.includes(r))||n&&hw.includes(r)},Me=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(P.isValidElement(t)&&(i=t.props),!Is(i))return null;var a={};return Object.keys(i).forEach(function(s){var u;jF((u=i)===null||u===void 0?void 0:u[s],s,r,n)&&(a[s]=i[s])}),a},vb=function e(t,r){if(t===r)return!0;var n=P.Children.count(t);if(n!==P.Children.count(r))return!1;if(n===0)return!0;if(n===1)return XE(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function yb(e){var t=e.children,r=e.width,n=e.height,i=e.viewBox,a=e.className,s=e.style,u=e.title,f=e.desc,c=NF(e,PF),d=i||{width:r,height:n,x:0,y:0},h=Ue("recharts-surface",a);return z.createElement("svg",gb({},Me(c,!0,"svg"),{className:h,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),z.createElement("title",null,u),z.createElement("desc",null,f),t)}var TF=["children","className"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RF(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Ze=z.forwardRef(function(e,t){var r=e.children,n=e.className,i=kF(e,TF),a=Ue("recharts-layer",n);return z.createElement("g",xb({className:a},Me(i,!0),{ref:t}),r)}),Sn=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;aa?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var s=Array(a);++i=a?r:e(r,n,i)}return ey=t,ey}var ty,JE;function oM(){if(JE)return ty;JE=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",u=RegExp("["+s+e+i+a+"]");function f(c){return u.test(c)}return ty=f,ty}var ry,e2;function DF(){if(e2)return ry;e2=1;function e(t){return t.split("")}return ry=e,ry}var ny,t2;function LF(){if(t2)return ny;t2=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=t+r+n,a="\\ufe0e\\ufe0f",s="["+e+"]",u="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",c="(?:"+u+"|"+f+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=c+"?",y="["+a+"]?",w="(?:"+g+"(?:"+[d,h,m].join("|")+")"+y+b+")*",S=y+b+w,O="(?:"+[d+u+"?",u,h,m,s].join("|")+")",E=RegExp(f+"(?="+f+")|"+O+S,"g");function C(A){return A.match(E)||[]}return ny=C,ny}var iy,r2;function $F(){if(r2)return iy;r2=1;var e=DF(),t=oM(),r=LF();function n(i){return t(i)?r(i):e(i)}return iy=n,iy}var ay,n2;function BF(){if(n2)return ay;n2=1;var e=IF(),t=oM(),r=$F(),n=rM();function i(a){return function(s){s=n(s);var u=t(s)?r(s):void 0,f=u?u[0]:s.charAt(0),c=u?e(u,1).join(""):s.slice(1);return f[a]()+c}}return ay=i,ay}var oy,i2;function zF(){if(i2)return oy;i2=1;var e=BF(),t=e("toUpperCase");return oy=t,oy}var FF=zF();const rp=it(FF);function pt(e){return function(){return e}}const sM=Math.cos,$d=Math.sin,En=Math.sqrt,Bd=Math.PI,np=2*Bd,bb=Math.PI,wb=2*bb,Ea=1e-6,qF=wb-Ea;function lM(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lM;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;iEa)if(!(Math.abs(h*f-c*d)>Ea)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let g=n-s,b=i-u,y=f*f+c*c,w=g*g+b*b,S=Math.sqrt(y),O=Math.sqrt(m),E=a*Math.tan((bb-Math.acos((y+m-w)/(2*S*O)))/2),C=E/O,A=E/S;Math.abs(C-1)>Ea&&this._append`L${t+C*d},${r+C*h}`,this._append`A${a},${a},0,0,${+(h*g>d*b)},${this._x1=t+A*f},${this._y1=r+A*c}`}}arc(t,r,n,i,a,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let u=n*Math.cos(i),f=n*Math.sin(i),c=t+u,d=r+f,h=1^s,m=s?i-a:a-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>Ea||Math.abs(this._y1-d)>Ea)&&this._append`L${c},${d}`,n&&(m<0&&(m=m%wb+wb),m>qF?this._append`A${n},${n},0,1,${h},${t-u},${r-f}A${n},${n},0,1,${h},${this._x1=c},${this._y1=d}`:m>Ea&&this._append`A${n},${n},0,${+(m>=bb)},${h},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function mw(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new WF(t)}function vw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cM(e){this._context=e}cM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ip(e){return new cM(e)}function uM(e){return e[0]}function fM(e){return e[1]}function dM(e,t){var r=pt(!0),n=null,i=ip,a=null,s=mw(u);e=typeof e=="function"?e:e===void 0?uM:pt(e),t=typeof t=="function"?t:t===void 0?fM:pt(t);function u(f){var c,d=(f=vw(f)).length,h,m=!1,g;for(n==null&&(a=i(g=s())),c=0;c<=d;++c)!(c=g;--b)u.point(E[b],C[b]);u.lineEnd(),u.areaEnd()}S&&(E[m]=+e(w,m,h),C[m]=+t(w,m,h),u.point(n?+n(w,m,h):E[m],r?+r(w,m,h):C[m]))}if(O)return u=null,O+""||null}function d(){return dM().defined(i).curve(s).context(a)}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:pt(+h),n=null,c):e},c.x0=function(h){return arguments.length?(e=typeof h=="function"?h:pt(+h),c):e},c.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:pt(+h),c):n},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:pt(+h),r=null,c):t},c.y0=function(h){return arguments.length?(t=typeof h=="function"?h:pt(+h),c):t},c.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:pt(+h),c):r},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(r)},c.lineX1=function(){return d().x(n).y(t)},c.defined=function(h){return arguments.length?(i=typeof h=="function"?h:pt(!!h),c):i},c.curve=function(h){return arguments.length?(s=h,a!=null&&(u=s(a)),c):s},c.context=function(h){return arguments.length?(h==null?a=u=null:u=s(a=h),c):a},c}class hM{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function HF(e){return new hM(e,!0)}function VF(e){return new hM(e,!1)}const gw={draw(e,t){const r=En(t/Bd);e.moveTo(r,0),e.arc(0,0,r,0,np)}},GF={draw(e,t){const r=En(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},pM=En(1/3),KF=pM*2,XF={draw(e,t){const r=En(t/KF),n=r*pM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},YF={draw(e,t){const r=En(t),n=-r/2;e.rect(n,n,r,r)}},QF=.8908130915292852,mM=$d(Bd/10)/$d(7*Bd/10),ZF=$d(np/10)*mM,JF=-sM(np/10)*mM,eq={draw(e,t){const r=En(t*QF),n=ZF*r,i=JF*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=np*a/5,u=sM(s),f=$d(s);e.lineTo(f*r,-u*r),e.lineTo(u*n-f*i,f*n+u*i)}e.closePath()}},sy=En(3),tq={draw(e,t){const r=-En(t/(sy*3));e.moveTo(0,r*2),e.lineTo(-sy*r,-r),e.lineTo(sy*r,-r),e.closePath()}},Qr=-.5,Zr=En(3)/2,_b=1/En(12),rq=(_b/2+1)*3,nq={draw(e,t){const r=En(t/rq),n=r/2,i=r*_b,a=n,s=r*_b+r,u=-a,f=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(u,f),e.lineTo(Qr*n-Zr*i,Zr*n+Qr*i),e.lineTo(Qr*a-Zr*s,Zr*a+Qr*s),e.lineTo(Qr*u-Zr*f,Zr*u+Qr*f),e.lineTo(Qr*n+Zr*i,Qr*i-Zr*n),e.lineTo(Qr*a+Zr*s,Qr*s-Zr*a),e.lineTo(Qr*u+Zr*f,Qr*f-Zr*u),e.closePath()}};function iq(e,t){let r=null,n=mw(i);e=typeof e=="function"?e:pt(e||gw),t=typeof t=="function"?t:pt(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:pt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:pt(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function zd(){}function Fd(e,t,r){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+r)/6)}function vM(e){this._context=e}vM.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:Fd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aq(e){return new vM(e)}function gM(e){this._context=e}gM.prototype={areaStart:zd,areaEnd:zd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oq(e){return new gM(e)}function yM(e){this._context=e}yM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Fd(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sq(e){return new yM(e)}function xM(e){this._context=e}xM.prototype={areaStart:zd,areaEnd:zd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lq(e){return new xM(e)}function a2(e){return e<0?-1:1}function o2(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),u=(a*i+s*n)/(n+i);return(a2(a)+a2(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(u))||0}function s2(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ly(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,u=(a-n)/3;e._context.bezierCurveTo(n+u,i+u*t,a-u,s-u*r,a,s)}function qd(e){this._context=e}qd.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:ly(this,this._t0,s2(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ly(this,s2(this,r=o2(this,e,t)),r);break;default:ly(this,this._t0,r=o2(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function bM(e){this._context=new wM(e)}(bM.prototype=Object.create(qd.prototype)).point=function(e,t){qd.prototype.point.call(this,t,e)};function wM(e){this._context=e}wM.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function cq(e){return new qd(e)}function uq(e){return new bM(e)}function _M(e){this._context=e}_M.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=l2(e),i=l2(t),a=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function dq(e){return new ap(e,.5)}function hq(e){return new ap(e,0)}function pq(e){return new ap(e,1)}function as(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,u=a.length;r=0;)r[t]=t;return r}function mq(e,t){return e[t]}function vq(e){const t=[];return t.key=e,t}function gq(){var e=pt([]),t=Sb,r=as,n=mq;function i(a){var s=Array.from(e.apply(this,arguments),vq),u,f=s.length,c=-1,d;for(const h of a)for(u=0,++c;u0){for(var r,n,i=0,a=e[0].length,s;i0){for(var r=0,n=e[t[0]],i,a=n.length;r0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Eq(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var SM={symbolCircle:gw,symbolCross:GF,symbolDiamond:XF,symbolSquare:YF,symbolStar:eq,symbolTriangle:tq,symbolWye:nq},Aq=Math.PI/180,Pq=function(t){var r="symbol".concat(rp(t));return SM[r]||gw},Nq=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Aq;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},Cq=function(t,r){SM["symbol".concat(rp(t))]=r},yw=function(t){var r=t.type,n=r===void 0?"circle":r,i=t.size,a=i===void 0?64:i,s=t.sizeType,u=s===void 0?"area":s,f=jq(t,wq),c=u2(u2({},f),{},{type:n,size:a,sizeType:u}),d=function(){var w=Pq(n),S=iq().type(w).size(Nq(a,u,n));return S()},h=c.className,m=c.cx,g=c.cy,b=Me(c,!0);return m===+m&&g===+g&&a===+a?z.createElement("path",Ob({},b,{className:Ue("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:d()})):null};yw.registerSymbol=Cq;function os(e){"@babel/helpers - typeof";return os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},os(e)}function jb(){return jb=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var O=g.inactive?c:g.color;return z.createElement("li",jb({className:w,style:h,key:"legend-item-".concat(b)},La(n.props,g,b)),z.createElement(yb,{width:s,height:s,viewBox:d,style:m},n.renderIcon(g)),z.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},y?y(S,g,b):S))})}},{key:"render",value:function(){var n=this.props,i=n.payload,a=n.layout,s=n.align;if(!i||!i.length)return null;var u={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return z.createElement("ul",{className:"recharts-default-legend",style:u},this.renderItems())}}])})(P.PureComponent);hc(xw,"displayName","Legend");hc(xw,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var cy,d2;function zq(){if(d2)return cy;d2=1;var e=Jh();function t(){this.__data__=new e,this.size=0}return cy=t,cy}var uy,h2;function Fq(){if(h2)return uy;h2=1;function e(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}return uy=e,uy}var fy,p2;function qq(){if(p2)return fy;p2=1;function e(t){return this.__data__.get(t)}return fy=e,fy}var dy,m2;function Uq(){if(m2)return dy;m2=1;function e(t){return this.__data__.has(t)}return dy=e,dy}var hy,v2;function Wq(){if(v2)return hy;v2=1;var e=Jh(),t=cw(),r=uw(),n=200;function i(a,s){var u=this.__data__;if(u instanceof e){var f=u.__data__;if(!t||f.lengthg))return!1;var y=h.get(s),w=h.get(u);if(y&&w)return y==u&&w==s;var S=-1,O=!0,E=f&i?new e:void 0;for(h.set(s,u),h.set(u,s);++S-1&&n%1==0&&n-1&&r%1==0&&r<=e}return Iy=t,Iy}var Dy,z2;function n9(){if(z2)return Dy;z2=1;var e=yi(),t=Sw(),r=xi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",u="[object Error]",f="[object Function]",c="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",y="[object WeakMap]",w="[object ArrayBuffer]",S="[object DataView]",O="[object Float32Array]",E="[object Float64Array]",C="[object Int8Array]",A="[object Int16Array]",N="[object Int32Array]",T="[object Uint8Array]",R="[object Uint8ClampedArray]",I="[object Uint16Array]",q="[object Uint32Array]",L={};L[O]=L[E]=L[C]=L[A]=L[N]=L[T]=L[R]=L[I]=L[q]=!0,L[n]=L[i]=L[w]=L[a]=L[S]=L[s]=L[u]=L[f]=L[c]=L[d]=L[h]=L[m]=L[g]=L[b]=L[y]=!1;function D(U){return r(U)&&t(U.length)&&!!L[e(U)]}return Dy=D,Dy}var Ly,F2;function RM(){if(F2)return Ly;F2=1;function e(t){return function(r){return t(r)}}return Ly=e,Ly}var Yl={exports:{}};Yl.exports;var q2;function i9(){return q2||(q2=1,(function(e,t){var r=JR(),n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,s=a&&r.process,u=(function(){try{var f=i&&i.require&&i.require("util").types;return f||s&&s.binding&&s.binding("util")}catch{}})();e.exports=u})(Yl,Yl.exports)),Yl.exports}var $y,U2;function MM(){if(U2)return $y;U2=1;var e=n9(),t=RM(),r=i9(),n=r&&r.isTypedArray,i=n?t(n):e;return $y=i,$y}var By,W2;function a9(){if(W2)return By;W2=1;var e=e9(),t=ww(),r=Sr(),n=kM(),i=_w(),a=MM(),s=Object.prototype,u=s.hasOwnProperty;function f(c,d){var h=r(c),m=!h&&t(c),g=!h&&!m&&n(c),b=!h&&!m&&!g&&a(c),y=h||m||g||b,w=y?e(c.length,String):[],S=w.length;for(var O in c)(d||u.call(c,O))&&!(y&&(O=="length"||g&&(O=="offset"||O=="parent")||b&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||i(O,S)))&&w.push(O);return w}return By=f,By}var zy,H2;function o9(){if(H2)return zy;H2=1;var e=Object.prototype;function t(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||e;return r===i}return zy=t,zy}var Fy,V2;function IM(){if(V2)return Fy;V2=1;function e(t,r){return function(n){return t(r(n))}}return Fy=e,Fy}var qy,G2;function s9(){if(G2)return qy;G2=1;var e=IM(),t=e(Object.keys,Object);return qy=t,qy}var Uy,K2;function l9(){if(K2)return Uy;K2=1;var e=o9(),t=s9(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!e(a))return t(a);var s=[];for(var u in Object(a))n.call(a,u)&&u!="constructor"&&s.push(u);return s}return Uy=i,Uy}var Wy,X2;function Qc(){if(X2)return Wy;X2=1;var e=sw(),t=Sw();function r(n){return n!=null&&t(n.length)&&!e(n)}return Wy=r,Wy}var Hy,Y2;function op(){if(Y2)return Hy;Y2=1;var e=a9(),t=l9(),r=Qc();function n(i){return r(i)?e(i):t(i)}return Hy=n,Hy}var Vy,Q2;function c9(){if(Q2)return Vy;Q2=1;var e=Yq(),t=Jq(),r=op();function n(i){return e(i,r,t)}return Vy=n,Vy}var Gy,Z2;function u9(){if(Z2)return Gy;Z2=1;var e=c9(),t=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,u,f,c,d){var h=u&t,m=e(a),g=m.length,b=e(s),y=b.length;if(g!=y&&!h)return!1;for(var w=g;w--;){var S=m[w];if(!(h?S in s:n.call(s,S)))return!1}var O=d.get(a),E=d.get(s);if(O&&E)return O==s&&E==a;var C=!0;d.set(a,s),d.set(s,a);for(var A=h;++w-1}return x0=t,x0}var b0,jA;function C9(){if(jA)return b0;jA=1;function e(t,r,n){for(var i=-1,a=t==null?0:t.length;++i=s){var S=c?null:i(f);if(S)return a(S);b=!1,m=n,w=new e}else w=c?[]:y;e:for(;++h=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function H9(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function V9(e){return e.value}function G9(e,t){if(z.isValidElement(e))return z.cloneElement(e,t);if(typeof e=="function")return z.createElement(e,t);t.ref;var r=W9(t,D9);return z.createElement(xw,r)}var RA=1,Qo=(function(e){function t(){var r;L9(this,t);for(var n=arguments.length,i=new Array(n),a=0;aRA||Math.abs(i.height-this.lastBoundingBox.height)>RA)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,n&&n(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ni({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var i=this.props,a=i.layout,s=i.align,u=i.verticalAlign,f=i.margin,c=i.chartWidth,d=i.chartHeight,h,m;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();h={left:((c||0)-g.width)/2}}else h=s==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(u==="middle"){var b=this.getBBoxSnapshot();m={top:((d||0)-b.height)/2}}else m=u==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return ni(ni({},h),m)}},{key:"render",value:function(){var n=this,i=this.props,a=i.content,s=i.width,u=i.height,f=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,h=ni(ni({position:"absolute",width:s||"auto",height:u||"auto"},this.getDefaultPosition(f)),f);return z.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){n.wrapperNode=g}},G9(a,ni(ni({},this.props),{},{payload:zM(d,c,V9)})))}}],[{key:"getWithHeight",value:function(n,i){var a=ni(ni({},this.defaultProps),n.props),s=a.layout;return s==="vertical"&&he(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||i}:null}}])})(P.PureComponent);sp(Qo,"displayName","Legend");sp(Qo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var j0,MA;function K9(){if(MA)return j0;MA=1;var e=Xc(),t=ww(),r=Sr(),n=e?e.isConcatSpreadable:void 0;function i(a){return r(a)||t(a)||!!(n&&a&&a[n])}return j0=i,j0}var E0,IA;function UM(){if(IA)return E0;IA=1;var e=TM(),t=K9();function r(n,i,a,s,u){var f=-1,c=n.length;for(a||(a=t),u||(u=[]);++f0&&a(d)?i>1?r(d,i-1,a,s,u):e(u,d):s||(u[u.length]=d)}return u}return E0=r,E0}var A0,DA;function X9(){if(DA)return A0;DA=1;function e(t){return function(r,n,i){for(var a=-1,s=Object(r),u=i(r),f=u.length;f--;){var c=u[t?f:++a];if(n(s[c],c,s)===!1)break}return r}}return A0=e,A0}var P0,LA;function Y9(){if(LA)return P0;LA=1;var e=X9(),t=e();return P0=t,P0}var N0,$A;function WM(){if($A)return N0;$A=1;var e=Y9(),t=op();function r(n,i){return n&&e(n,i,t)}return N0=r,N0}var C0,BA;function Q9(){if(BA)return C0;BA=1;var e=Qc();function t(r,n){return function(i,a){if(i==null)return i;if(!e(i))return r(i,a);for(var s=i.length,u=n?s:-1,f=Object(i);(n?u--:++un||u&&f&&d&&!c&&!h||a&&f&&d||!i&&d||!s)return 1;if(!a&&!u&&!h&&r=c)return d;var h=i[a];return d*(h=="desc"?-1:1)}}return r.index-n.index}return I0=t,I0}var D0,HA;function t7(){if(HA)return D0;HA=1;var e=fw(),t=dw(),r=Vn(),n=HM(),i=Z9(),a=RM(),s=e7(),u=Ls(),f=Sr();function c(d,h,m){h.length?h=e(h,function(y){return f(y)?function(w){return t(w,y.length===1?y[0]:y)}:y}):h=[u];var g=-1;h=e(h,a(r));var b=n(d,function(y,w,S){var O=e(h,function(E){return E(y)});return{criteria:O,index:++g,value:y}});return i(b,function(y,w){return s(y,w,m)})}return D0=c,D0}var L0,VA;function r7(){if(VA)return L0;VA=1;function e(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}return L0=e,L0}var $0,GA;function n7(){if(GA)return $0;GA=1;var e=r7(),t=Math.max;function r(n,i,a){return i=t(i===void 0?n.length-1:i,0),function(){for(var s=arguments,u=-1,f=t(s.length-i,0),c=Array(f);++u0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return q0=n,q0}var U0,ZA;function s7(){if(ZA)return U0;ZA=1;var e=a7(),t=o7(),r=t(e);return U0=r,U0}var W0,JA;function l7(){if(JA)return W0;JA=1;var e=Ls(),t=n7(),r=s7();function n(i,a){return r(t(i,a,e),i+"")}return W0=n,W0}var H0,eP;function lp(){if(eP)return H0;eP=1;var e=lw(),t=Qc(),r=_w(),n=Qi();function i(a,s,u){if(!n(u))return!1;var f=typeof s;return(f=="number"?t(u)&&r(s,u.length):f=="string"&&s in u)?e(u[s],a):!1}return H0=i,H0}var V0,tP;function c7(){if(tP)return V0;tP=1;var e=UM(),t=t7(),r=l7(),n=lp(),i=r(function(a,s){if(a==null)return[];var u=s.length;return u>1&&n(a,s[0],s[1])?s=[]:u>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),t(a,e(s,1),[])});return V0=i,V0}var u7=c7();const Ew=it(u7);function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function Pb(){return Pb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t.x),"".concat(Ml,"-left"),he(r)&&t&&he(t.x)&&r=t.y),"".concat(Ml,"-top"),he(n)&&t&&he(t.y)&&ny?Math.max(d,f[n]):Math.max(h,f[n])}function j7(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function E7(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox,c,d,h;return s.height>0&&s.width>0&&r?(d=iP({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:f,viewBoxDimension:f.width}),h=iP({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:f,viewBoxDimension:f.height}),c=j7({translateX:d,translateY:h,useTranslate3d:u})):c=S7,{cssProperties:c,cssClasses:O7({translateX:d,translateY:h,coordinate:r})}}function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function aP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oP(e){for(var t=1;tsP||Math.abs(n.height-this.state.lastBoundingBox.height)>sP)&&this.setState({lastBoundingBox:{width:n.width,height:n.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var n,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,u=i.animationDuration,f=i.animationEasing,c=i.children,d=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,b=i.position,y=i.reverseDirection,w=i.useTranslate3d,S=i.viewBox,O=i.wrapperStyle,E=E7({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:g,position:b,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:w,viewBox:S}),C=E.cssClasses,A=E.cssProperties,N=oP(oP({transition:m&&a?"transform ".concat(u,"ms ").concat(f):void 0},A),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},O);return z.createElement("div",{tabIndex:-1,className:C,style:N,ref:function(R){n.wrapperNode=R}},c)}}])})(P.PureComponent),D7=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Qa={isSsr:D7()};function cs(e){"@babel/helpers - typeof";return cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cs(e)}function lP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cP(e){for(var t=1;t0;return z.createElement(I7,{allowEscapeViewBox:s,animationDuration:u,animationEasing:f,isAnimationActive:m,active:a,coordinate:d,hasPayload:N,offset:g,position:w,reverseDirection:S,useTranslate3d:O,viewBox:E,wrapperStyle:C},V7(c,cP(cP({},this.props),{},{payload:A})))}}])})(P.PureComponent);Aw(Dr,"displayName","Tooltip");Aw(Dr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Qa.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 K0,uP;function G7(){if(uP)return K0;uP=1;var e=Hn(),t=function(){return e.Date.now()};return K0=t,K0}var X0,fP;function K7(){if(fP)return X0;fP=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return X0=t,X0}var Y0,dP;function X7(){if(dP)return Y0;dP=1;var e=K7(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return Y0=r,Y0}var Q0,hP;function QM(){if(hP)return Q0;hP=1;var e=X7(),t=Qi(),r=Ms(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,u=parseInt;function f(c){if(typeof c=="number")return c;if(r(c))return n;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var h=a.test(c);return h||s.test(c)?u(c.slice(2),h?2:8):i.test(c)?n:+c}return Q0=f,Q0}var Z0,pP;function Y7(){if(pP)return Z0;pP=1;var e=Qi(),t=G7(),r=QM(),n="Expected a function",i=Math.max,a=Math.min;function s(u,f,c){var d,h,m,g,b,y,w=0,S=!1,O=!1,E=!0;if(typeof u!="function")throw new TypeError(n);f=r(f)||0,e(c)&&(S=!!c.leading,O="maxWait"in c,m=O?i(r(c.maxWait)||0,f):m,E="trailing"in c?!!c.trailing:E);function C(U){var H=d,V=h;return d=h=void 0,w=U,g=u.apply(V,H),g}function A(U){return w=U,b=setTimeout(R,f),S?C(U):g}function N(U){var H=U-y,V=U-w,K=f-H;return O?a(K,m-V):K}function T(U){var H=U-y,V=U-w;return y===void 0||H>=f||H<0||O&&V>=m}function R(){var U=t();if(T(U))return I(U);b=setTimeout(R,N(U))}function I(U){return b=void 0,E&&d?C(U):(d=h=void 0,g)}function q(){b!==void 0&&clearTimeout(b),w=0,d=y=h=b=void 0}function L(){return b===void 0?g:I(t())}function D(){var U=t(),H=T(U);if(d=arguments,h=this,y=U,H){if(b===void 0)return A(y);if(O)return clearTimeout(b),b=setTimeout(R,f),C(y)}return b===void 0&&(b=setTimeout(R,f)),g}return D.cancel=q,D.flush=L,D}return Z0=s,Z0}var J0,mP;function Q7(){if(mP)return J0;mP=1;var e=Y7(),t=Qi(),r="Expected a function";function n(i,a,s){var u=!0,f=!0;if(typeof i!="function")throw new TypeError(r);return t(s)&&(u="leading"in s?!!s.leading:u,f="trailing"in s?!!s.trailing:f),e(i,a,{leading:u,maxWait:a,trailing:f})}return J0=n,J0}var Z7=Q7();const ZM=it(Z7);function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function vP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Af(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(U=ZM(U,y,{trailing:!0,leading:!1}));var H=new ResizeObserver(U),V=A.current.getBoundingClientRect(),K=V.width,X=V.height;return L(K,X),H.observe(A.current),function(){H.disconnect()}},[L,y]);var D=P.useMemo(function(){var U=I.containerWidth,H=I.containerHeight;if(U<0||H<0)return null;Sn(Na(s)||Na(f),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,s,f),Sn(!r||r>0,"The aspect(%s) must be greater than zero.",r);var V=Na(s)?U:s,K=Na(f)?H:f;r&&r>0&&(V?K=V/r:K&&(V=K*r),m&&K>m&&(K=m)),Sn(V>0||K>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,V,K,s,f,d,h,r);var X=!Array.isArray(g)&&ci(g.type).endsWith("Chart");return z.Children.map(g,function(B){return z.isValidElement(B)?P.cloneElement(B,Af({width:V,height:K},X?{style:Af({height:"100%",width:"100%",maxHeight:K,maxWidth:V},B.props.style)}:{})):B})},[r,g,f,m,h,d,I,s]);return z.createElement("div",{id:w?"".concat(w):void 0,className:Ue("recharts-responsive-container",S),style:Af(Af({},C),{},{width:s,height:f,minWidth:d,minHeight:h,maxHeight:m}),ref:A},D)}),cp=function(t){return null};cp.displayName="Cell";function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function yP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kb(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Qa.isSsr)return{width:0,height:0};var n=dU(r),i=JSON.stringify({text:t,copyStyle:n});if(To.widthCache[i])return To.widthCache[i];try{var a=document.getElementById(xP);a||(a=document.createElement("span"),a.setAttribute("id",xP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=kb(kb({},fU),n);Object.assign(a.style,s),a.textContent="".concat(t);var u=a.getBoundingClientRect(),f={width:u.width,height:u.height};return To.widthCache[i]=f,++To.cacheCount>uU&&(To.cacheCount=0,To.widthCache={}),f}catch{return{width:0,height:0}}},hU=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function Kd(e,t){return gU(e)||vU(e,t)||mU(e,t)||pU()}function pU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mU(e,t){if(e){if(typeof e=="string")return bP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bP(e,t)}}function bP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function TU(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function EP(e,t){return IU(e)||MU(e,t)||RU(e,t)||kU()}function kU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RU(e,t){if(e){if(typeof e=="string")return AP(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AP(e,t)}}function AP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[];return V.reduce(function(K,X){var B=X.word,Z=X.width,ee=K[K.length-1];if(ee&&(i==null||a||ee.width+Z+nX.width?K:X})};if(!d)return g;for(var y="…",w=function(V){var K=h.slice(0,V),X=rI({breakAll:c,style:f,children:K+y}).wordsWithComputedWidth,B=m(X),Z=B.length>s||b(B).width>Number(i);return[Z,B]},S=0,O=h.length-1,E=0,C;S<=O&&E<=h.length-1;){var A=Math.floor((S+O)/2),N=A-1,T=w(N),R=EP(T,2),I=R[0],q=R[1],L=w(A),D=EP(L,1),U=D[0];if(!I&&!U&&(S=A+1),I&&U&&(O=A-1),!I&&U){C=q;break}E++}return C||g},PP=function(t){var r=qe(t)?[]:t.toString().split(tI);return[{words:r}]},LU=function(t){var r=t.width,n=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,u=t.maxLines;if((r||n)&&!Qa.isSsr){var f,c,d=rI({breakAll:s,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;f=h,c=m}else return PP(i);return DU({breakAll:s,children:i,maxLines:u,style:a},f,c,r,n)}return PP(i)},NP="#808080",$a=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.lineHeight,u=s===void 0?"1em":s,f=t.capHeight,c=f===void 0?"0.71em":f,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,y=b===void 0?"end":b,w=t.fill,S=w===void 0?NP:w,O=jP(t,NU),E=P.useMemo(function(){return LU({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:h,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,h,O.style,O.width]),C=O.dx,A=O.dy,N=O.angle,T=O.className,R=O.breakAll,I=jP(O,CU);if(!zt(n)||!zt(a))return null;var q=n+(he(C)?C:0),L=a+(he(A)?A:0),D;switch(y){case"start":D=ex("calc(".concat(c,")"));break;case"middle":D=ex("calc(".concat((E.length-1)/2," * -").concat(u," + (").concat(c," / 2))"));break;default:D=ex("calc(".concat(E.length-1," * -").concat(u,")"));break}var U=[];if(h){var H=E[0].width,V=O.width;U.push("scale(".concat((he(V)?V/H:1)/H,")"))}return N&&U.push("rotate(".concat(N,", ").concat(q,", ").concat(L,")")),U.length&&(I.transform=U.join(" ")),z.createElement("text",Rb({},Me(I,!0),{x:q,y:L,className:Ue("recharts-text",T),textAnchor:g,fill:S.includes("url")?NP:S}),E.map(function(K,X){var B=K.words.join(R?"":" ");return z.createElement("tspan",{x:q,dy:X===0?D:u,key:"".concat(B,"-").concat(X)},B)}))};function Vi(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function $U(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Pw(e){let t,r,n;e.length!==2?(t=Vi,r=(u,f)=>Vi(e(u),f),n=(u,f)=>e(u)-f):(t=e===Vi||e===$U?e:BU,r=e,n=e);function i(u,f,c=0,d=u.length){if(c>>1;r(u[h],f)<0?c=h+1:d=h}while(c>>1;r(u[h],f)<=0?c=h+1:d=h}while(cc&&n(u[h-1],f)>-n(u[h],f)?h-1:h}return{left:i,center:s,right:a}}function BU(){return 0}function nI(e){return e===null?NaN:+e}function*zU(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const FU=Pw(Vi),Zc=FU.right;Pw(nI).center;class CP extends Map{constructor(t,r=WU){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(TP(this,t))}has(t){return super.has(TP(this,t))}set(t,r){return super.set(qU(this,t),r)}delete(t){return super.delete(UU(this,t))}}function TP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function qU({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function UU({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function WU(e){return e!==null&&typeof e=="object"?e.valueOf():e}function HU(e=Vi){if(e===Vi)return iI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function iI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const VU=Math.sqrt(50),GU=Math.sqrt(10),KU=Math.sqrt(2);function Xd(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=VU?10:a>=GU?5:a>=KU?2:1;let u,f,c;return i<0?(c=Math.pow(10,-i)/s,u=Math.round(e*c),f=Math.round(t*c),u/ct&&--f,c=-c):(c=Math.pow(10,i)*s,u=Math.round(e/c),f=Math.round(t/c),u*ct&&--f),f0))return[];if(e===t)return[e];const n=t=i))return[];const u=a-i+1,f=new Array(u);if(n)if(s<0)for(let c=0;c=n)&&(r=n);return r}function RP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function aI(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?iI:HU(i);n>r;){if(n-r>600){const f=n-r+1,c=t-r+1,d=Math.log(f),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(f-h)/f)*(c-f/2<0?-1:1),g=Math.max(r,Math.floor(t-c*h/f+m)),b=Math.min(n,Math.floor(t+(f-c)*h/f+m));aI(e,t,g,b,i)}const a=e[t];let s=r,u=n;for(Il(e,r,t),i(e[n],a)>0&&Il(e,r,n);s0;)--u}i(e[r],a)===0?Il(e,r,u):(++u,Il(e,u,n)),u<=t&&(r=u+1),t<=u&&(n=u-1)}return e}function Il(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function XU(e,t,r){if(e=Float64Array.from(zU(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RP(e);if(t>=1)return kP(e);var n,i=(n-1)*t,a=Math.floor(i),s=kP(aI(e,a).subarray(0,a+1)),u=RP(e.subarray(a+1));return s+(u-s)*(i-a)}}function YU(e,t,r=nI){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),s=+r(e[a],a,e),u=+r(e[a+1],a+1,e);return s+(u-s)*(i-a)}}function QU(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Nf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Nf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=JU.exec(e))?new xr(t[1],t[2],t[3],1):(t=eW.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tW.exec(e))?Nf(t[1],t[2],t[3],t[4]):(t=rW.exec(e))?Nf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nW.exec(e))?zP(t[1],t[2]/100,t[3]/100,1):(t=iW.exec(e))?zP(t[1],t[2]/100,t[3]/100,t[4]):MP.hasOwnProperty(e)?LP(MP[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function LP(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Nf(e,t,r,n){return n<=0&&(e=t=r=NaN),new xr(e,t,r,n)}function sW(e){return e instanceof Jc||(e=_c(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function $b(e,t,r,n){return arguments.length===1?sW(e):new xr(e,t,r,n??1)}function xr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Cw(xr,$b,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(Ra(this.r),Ra(this.g),Ra(this.b),Qd(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:$P,formatHex:$P,formatHex8:lW,formatRgb:BP,toString:BP}));function $P(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}`}function lW(){return`#${Ca(this.r)}${Ca(this.g)}${Ca(this.b)}${Ca((isNaN(this.opacity)?1:this.opacity)*255)}`}function BP(){const e=Qd(this.opacity);return`${e===1?"rgb(":"rgba("}${Ra(this.r)}, ${Ra(this.g)}, ${Ra(this.b)}${e===1?")":`, ${e})`}`}function Qd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ra(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ca(e){return e=Ra(e),(e<16?"0":"")+e.toString(16)}function zP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,r,n)}function lI(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof Jc||(e=_c(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),s=NaN,u=a-i,f=(a+i)/2;return u?(t===a?s=(r-n)/u+(r0&&f<1?0:s,new _n(s,u,f,e.opacity)}function cW(e,t,r,n){return arguments.length===1?lI(e):new _n(e,t,r,n??1)}function _n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cw(_n,cW,sI(Jc,{brighter(e){return e=e==null?Yd:Math.pow(Yd,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bc:Math.pow(bc,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new xr(tx(e>=240?e-240:e+120,i,n),tx(e,i,n),tx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new _n(FP(this.h),Cf(this.s),Cf(this.l),Qd(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=Qd(this.opacity);return`${e===1?"hsl(":"hsla("}${FP(this.h)}, ${Cf(this.s)*100}%, ${Cf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FP(e){return e=(e||0)%360,e<0?e+360:e}function Cf(e){return Math.max(0,Math.min(1,e||0))}function tx(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Tw=e=>()=>e;function uW(e,t){return function(r){return e+r*t}}function fW(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function dW(e){return(e=+e)==1?cI:function(t,r){return r-t?fW(t,r,e):Tw(isNaN(t)?r:t)}}function cI(e,t){var r=t-e;return r?uW(e,r):Tw(isNaN(e)?t:e)}const qP=(function e(t){var r=dW(t);function n(i,a){var s=r((i=$b(i)).r,(a=$b(a)).r),u=r(i.g,a.g),f=r(i.b,a.b),c=cI(i.opacity,a.opacity);return function(d){return i.r=s(d),i.g=u(d),i.b=f(d),i.opacity=c(d),i+""}}return n.gamma=e,n})(1);function hW(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;ir&&(a=t.slice(r,a),u[s]?u[s]+=a:u[++s]=a),(n=n[0])===(i=i[0])?u[s]?u[s]+=i:u[++s]=i:(u[++s]=null,f.push({i:s,x:Zd(n,i)})),r=rx.lastIndex;return rt&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function OW(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i2?jW:OW,f=c=null,h}function h(m){return m==null||isNaN(m=+m)?a:(f||(f=u(e.map(n),t,r)))(n(s(m)))}return h.invert=function(m){return s(i((c||(c=u(t,e.map(n),Zd)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Jd),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),r=kw,d()},h.clamp=function(m){return arguments.length?(s=m?!0:fr,d()):s!==fr},h.interpolate=function(m){return arguments.length?(r=m,d()):r},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return n=m,i=g,d()}}function Rw(){return up()(fr,fr)}function EW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function eh(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function us(e){return e=eh(Math.abs(e)),e?e[1]:NaN}function AW(e,t){return function(r,n){for(var i=r.length,a=[],s=0,u=e[0],f=0;i>0&&u>0&&(f+u+1>n&&(u=Math.max(1,n-f)),a.push(r.substring(i-=u,i+u)),!((f+=u+1)>n));)u=e[s=(s+1)%e.length];return a.reverse().join(t)}}function PW(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var NW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Sc(e){if(!(t=NW.exec(e)))throw new Error("invalid format: "+e);var t;return new Mw({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]})}Sc.prototype=Mw.prototype;function Mw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Mw.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function CW(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var th;function TW(e,t){var r=eh(e,t);if(!r)return th=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(th=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+eh(e,Math.max(0,t+a-1))[0]}function WP(e,t){var r=eh(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const HP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:EW,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)=>WP(e*100,t),r:WP,s:TW,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function VP(e){return e}var GP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kW(e){var t=e.grouping===void 0||e.thousands===void 0?VP:AW(GP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?VP:PW(GP.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function c(h,m){h=Sc(h);var g=h.fill,b=h.align,y=h.sign,w=h.symbol,S=h.zero,O=h.width,E=h.comma,C=h.precision,A=h.trim,N=h.type;N==="n"?(E=!0,N="g"):HP[N]||(C===void 0&&(C=12),A=!0,N="g"),(S||g==="0"&&b==="=")&&(S=!0,g="0",b="=");var T=(m&&m.prefix!==void 0?m.prefix:"")+(w==="$"?r:w==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(w==="$"?n:/[%p]/.test(N)?s:"")+(m&&m.suffix!==void 0?m.suffix:""),I=HP[N],q=/[defgprs%]/.test(N);C=C===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C));function L(D){var U=T,H=R,V,K,X;if(N==="c")H=I(D)+H,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?f:I(Math.abs(D),C),A&&(D=CW(D)),B&&+D==0&&y!=="+"&&(B=!1),U=(B?y==="("?y:u:y==="-"||y==="("?"":y)+U,H=(N==="s"&&!isNaN(D)&&th!==void 0?KP[8+th/3]:"")+H+(B&&y==="("?")":""),q){for(V=-1,K=D.length;++VX||X>57){H=(X===46?i+D.slice(V+1):D.slice(V))+H,D=D.slice(0,V);break}}}E&&!S&&(D=t(D,1/0));var Z=U.length+D.length+H.length,ee=Z>1)+U+D+H+ee.slice(Z);break;default:D=ee+U+D+H;break}return a(D)}return L.toString=function(){return h+""},L}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(us(m)/3)))*3,b=Math.pow(10,-g),y=c((h=Sc(h),h.type="f",h),{suffix:KP[8+g/3]});return function(w){return y(b*w)}}return{format:c,formatPrefix:d}}var Tf,Iw,uI;RW({thousands:",",grouping:[3],currency:["$",""]});function RW(e){return Tf=kW(e),Iw=Tf.format,uI=Tf.formatPrefix,Tf}function MW(e){return Math.max(0,-us(Math.abs(e)))}function IW(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(us(t)/3)))*3-us(Math.abs(e)))}function DW(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,us(t)-us(e))+1}function fI(e,t,r,n){var i=Db(e,t,r),a;switch(n=Sc(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=IW(i,s))&&(n.precision=a),uI(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=DW(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=MW(i))&&(n.precision=a-(n.type==="%")*2);break}}return Iw(n)}function Zi(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return fI(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,s=n[i],u=n[a],f,c,d=10;for(u0;){if(c=Ib(s,u,r),c===f)return n[i]=s,n[a]=u,t(n);if(c>0)s=Math.floor(s/c)*c,u=Math.ceil(u/c)*c;else if(c<0)s=Math.ceil(s*c)/c,u=Math.floor(u*c)/c;else break;f=c}return e},e}function rh(){var e=Rw();return e.copy=function(){return eu(e,rh())},sn.apply(e,arguments),Zi(e)}function dI(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Jd),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return dI(e).unknown(t)},e=arguments.length?Array.from(e,Jd):[0,1],Zi(r)}function hI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return aMath.pow(e,t)}function FW(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function QP(e){return(t,r)=>-e(-t,r)}function Dw(e){const t=e(XP,YP),r=t.domain;let n=10,i,a;function s(){return i=FW(n),a=zW(n),r()[0]<0?(i=QP(i),a=QP(a),e(LW,$W)):e(XP,YP),t}return t.base=function(u){return arguments.length?(n=+u,s()):n},t.domain=function(u){return arguments.length?(r(u),s()):r()},t.ticks=u=>{const f=r();let c=f[0],d=f[f.length-1];const h=d0){for(;m<=g;++m)for(b=1;bd)break;S.push(y)}}else for(;m<=g;++m)for(b=n-1;b>=1;--b)if(y=m>0?b/a(-m):b*a(m),!(yd)break;S.push(y)}S.length*2{if(u==null&&(u=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Sc(f)).precision==null&&(f.trim=!0),f=Iw(f)),u===1/0)return f;const c=Math.max(1,n*u/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*nr(hI(r(),{floor:u=>a(Math.floor(i(u))),ceil:u=>a(Math.ceil(i(u)))})),t}function pI(){const e=Dw(up()).domain([1,10]);return e.copy=()=>eu(e,pI()).base(e.base()),sn.apply(e,arguments),e}function ZP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function JP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lw(e){var t=1,r=e(ZP(t),JP(t));return r.constant=function(n){return arguments.length?e(ZP(t=+n),JP(t)):t},Zi(r)}function mI(){var e=Lw(up());return e.copy=function(){return eu(e,mI()).constant(e.constant())},sn.apply(e,arguments)}function eN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qW(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function UW(e){return e<0?-e*e:e*e}function $w(e){var t=e(fr,fr),r=1;function n(){return r===1?e(fr,fr):r===.5?e(qW,UW):e(eN(r),eN(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},Zi(t)}function Bw(){var e=$w(up());return e.copy=function(){return eu(e,Bw()).exponent(e.exponent())},sn.apply(e,arguments),e}function WW(){return Bw.apply(null,arguments).exponent(.5)}function tN(e){return Math.sign(e)*e*e}function HW(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function vI(){var e=Rw(),t=[0,1],r=!1,n;function i(a){var s=HW(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(tN(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Jd)).map(tN)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return vI(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sn.apply(i,arguments),Zi(i)}function gI(){var e=[],t=[],r=[],n;function i(){var s=0,u=Math.max(1,t.length);for(r=new Array(u-1);++s0?r[u-1]:e[0],u=r?[n[r-1],t]:[n[c-1],n[c]]},s.unknown=function(f){return arguments.length&&(a=f),s},s.thresholds=function(){return n.slice()},s.copy=function(){return yI().domain([e,t]).range(i).unknown(a)},sn.apply(Zi(s),arguments)}function xI(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Zc(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return xI().domain(e).range(t).unknown(r)},sn.apply(i,arguments)}const nx=new Date,ix=new Date;function Ft(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),u=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,u)=>{const f=[];if(a=i.ceil(a),u=u==null?1:Math.floor(u),!(a0))return f;let c;do f.push(c=new Date(+a)),t(a,u),e(a);while(cFt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,u)=>{if(s>=s)if(u<0)for(;++u<=0;)for(;t(s,-1),!a(s););else for(;--u>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(nx.setTime(+a),ix.setTime(+s),e(nx),e(ix),Math.floor(r(nx,ix))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const nh=Ft(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ft(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):nh);nh.range;const oi=1e3,nn=oi*60,si=nn*60,di=si*24,zw=di*7,rN=di*30,ax=di*365,Ta=Ft(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*oi)},(e,t)=>(t-e)/oi,e=>e.getUTCSeconds());Ta.range;const Fw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getMinutes());Fw.range;const qw=Ft(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nn)},(e,t)=>(t-e)/nn,e=>e.getUTCMinutes());qw.range;const Uw=Ft(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oi-e.getMinutes()*nn)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getHours());Uw.range;const Ww=Ft(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*si)},(e,t)=>(t-e)/si,e=>e.getUTCHours());Ww.range;const tu=Ft(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nn)/di,e=>e.getDate()-1);tu.range;const fp=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>e.getUTCDate()-1);fp.range;const bI=Ft(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/di,e=>Math.floor(e/di));bI.range;function Za(e){return Ft(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*nn)/zw)}const dp=Za(0),ih=Za(1),VW=Za(2),GW=Za(3),fs=Za(4),KW=Za(5),XW=Za(6);dp.range;ih.range;VW.range;GW.range;fs.range;KW.range;XW.range;function Ja(e){return Ft(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/zw)}const hp=Ja(0),ah=Ja(1),YW=Ja(2),QW=Ja(3),ds=Ja(4),ZW=Ja(5),JW=Ja(6);hp.range;ah.range;YW.range;QW.range;ds.range;ZW.range;JW.range;const Hw=Ft(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Hw.range;const Vw=Ft(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Vw.range;const hi=Ft(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());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});hi.range;const pi=Ft(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());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ft(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});pi.range;function wI(e,t,r,n,i,a){const s=[[Ta,1,oi],[Ta,5,5*oi],[Ta,15,15*oi],[Ta,30,30*oi],[a,1,nn],[a,5,5*nn],[a,15,15*nn],[a,30,30*nn],[i,1,si],[i,3,3*si],[i,6,6*si],[i,12,12*si],[n,1,di],[n,2,2*di],[r,1,zw],[t,1,rN],[t,3,3*rN],[e,1,ax]];function u(c,d,h){const m=dw).right(s,m);if(g===s.length)return e.every(Db(c/ax,d/ax,h));if(g===0)return nh.every(Math.max(Db(c,d,h),1));const[b,y]=s[m/s[g-1][2]53)return null;"w"in re||(re.w=1),"Z"in re?(Te=sx(Dl(re.y,0,1)),Ke=Te.getUTCDay(),Te=Ke>4||Ke===0?ah.ceil(Te):ah(Te),Te=fp.offset(Te,(re.V-1)*7),re.y=Te.getUTCFullYear(),re.m=Te.getUTCMonth(),re.d=Te.getUTCDate()+(re.w+6)%7):(Te=ox(Dl(re.y,0,1)),Ke=Te.getDay(),Te=Ke>4||Ke===0?ih.ceil(Te):ih(Te),Te=tu.offset(Te,(re.V-1)*7),re.y=Te.getFullYear(),re.m=Te.getMonth(),re.d=Te.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Ke="Z"in re?sx(Dl(re.y,0,1)).getUTCDay():ox(Dl(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Ke+5)%7:re.w+re.U*7-(Ke+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,sx(re)):ox(re)}}function R(ie,ue,ve,re){for(var De=0,Te=ue.length,Ke=ve.length,lt,vt;De=Ke)return-1;if(lt=ue.charCodeAt(De++),lt===37){if(lt=ue.charAt(De++),vt=A[lt in nN?ue.charAt(De++):lt],!vt||(re=vt(ie,ve,re))<0)return-1}else if(lt!=ve.charCodeAt(re++))return-1}return re}function I(ie,ue,ve){var re=c.exec(ue.slice(ve));return re?(ie.p=d.get(re[0].toLowerCase()),ve+re[0].length):-1}function q(ie,ue,ve){var re=g.exec(ue.slice(ve));return re?(ie.w=b.get(re[0].toLowerCase()),ve+re[0].length):-1}function L(ie,ue,ve){var re=h.exec(ue.slice(ve));return re?(ie.w=m.get(re[0].toLowerCase()),ve+re[0].length):-1}function D(ie,ue,ve){var re=S.exec(ue.slice(ve));return re?(ie.m=O.get(re[0].toLowerCase()),ve+re[0].length):-1}function U(ie,ue,ve){var re=y.exec(ue.slice(ve));return re?(ie.m=w.get(re[0].toLowerCase()),ve+re[0].length):-1}function H(ie,ue,ve){return R(ie,t,ue,ve)}function V(ie,ue,ve){return R(ie,r,ue,ve)}function K(ie,ue,ve){return R(ie,n,ue,ve)}function X(ie){return s[ie.getDay()]}function B(ie){return a[ie.getDay()]}function Z(ie){return f[ie.getMonth()]}function ee(ie){return u[ie.getMonth()]}function M(ie){return i[+(ie.getHours()>=12)]}function $(ie){return 1+~~(ie.getMonth()/3)}function Q(ie){return s[ie.getUTCDay()]}function ae(ie){return a[ie.getUTCDay()]}function pe(ie){return f[ie.getUTCMonth()]}function ye(ie){return u[ie.getUTCMonth()]}function oe(ie){return i[+(ie.getUTCHours()>=12)]}function me(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var ue=N(ie+="",E);return ue.toString=function(){return ie},ue},parse:function(ie){var ue=T(ie+="",!1);return ue.toString=function(){return ie},ue},utcFormat:function(ie){var ue=N(ie+="",C);return ue.toString=function(){return ie},ue},utcParse:function(ie){var ue=T(ie+="",!0);return ue.toString=function(){return ie},ue}}}var nN={"-":"",_:" ",0:"0"},Gt=/^\s*\d+/,aH=/^%/,oH=/[\\^$*+?|[\]().{}]/g;function et(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function lH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function cH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function uH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function fH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function dH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function iN(e,t,r){var n=Gt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function aN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hH(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function pH(e,t,r){var n=Gt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function mH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function oN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function vH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function sN(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function gH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function yH(e,t,r){var n=Gt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xH(e,t,r){var n=Gt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bH(e,t,r){var n=Gt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function wH(e,t,r){var n=aH.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function _H(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function SH(e,t,r){var n=Gt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function lN(e,t){return et(e.getDate(),t,2)}function OH(e,t){return et(e.getHours(),t,2)}function jH(e,t){return et(e.getHours()%12||12,t,2)}function EH(e,t){return et(1+tu.count(hi(e),e),t,3)}function _I(e,t){return et(e.getMilliseconds(),t,3)}function AH(e,t){return _I(e,t)+"000"}function PH(e,t){return et(e.getMonth()+1,t,2)}function NH(e,t){return et(e.getMinutes(),t,2)}function CH(e,t){return et(e.getSeconds(),t,2)}function TH(e){var t=e.getDay();return t===0?7:t}function kH(e,t){return et(dp.count(hi(e)-1,e),t,2)}function SI(e){var t=e.getDay();return t>=4||t===0?fs(e):fs.ceil(e)}function RH(e,t){return e=SI(e),et(fs.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function MH(e){return e.getDay()}function IH(e,t){return et(ih.count(hi(e)-1,e),t,2)}function DH(e,t){return et(e.getFullYear()%100,t,2)}function LH(e,t){return e=SI(e),et(e.getFullYear()%100,t,2)}function $H(e,t){return et(e.getFullYear()%1e4,t,4)}function BH(e,t){var r=e.getDay();return e=r>=4||r===0?fs(e):fs.ceil(e),et(e.getFullYear()%1e4,t,4)}function zH(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+et(t/60|0,"0",2)+et(t%60,"0",2)}function cN(e,t){return et(e.getUTCDate(),t,2)}function FH(e,t){return et(e.getUTCHours(),t,2)}function qH(e,t){return et(e.getUTCHours()%12||12,t,2)}function UH(e,t){return et(1+fp.count(pi(e),e),t,3)}function OI(e,t){return et(e.getUTCMilliseconds(),t,3)}function WH(e,t){return OI(e,t)+"000"}function HH(e,t){return et(e.getUTCMonth()+1,t,2)}function VH(e,t){return et(e.getUTCMinutes(),t,2)}function GH(e,t){return et(e.getUTCSeconds(),t,2)}function KH(e){var t=e.getUTCDay();return t===0?7:t}function XH(e,t){return et(hp.count(pi(e)-1,e),t,2)}function jI(e){var t=e.getUTCDay();return t>=4||t===0?ds(e):ds.ceil(e)}function YH(e,t){return e=jI(e),et(ds.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function QH(e){return e.getUTCDay()}function ZH(e,t){return et(ah.count(pi(e)-1,e),t,2)}function JH(e,t){return et(e.getUTCFullYear()%100,t,2)}function eV(e,t){return e=jI(e),et(e.getUTCFullYear()%100,t,2)}function tV(e,t){return et(e.getUTCFullYear()%1e4,t,4)}function rV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?ds(e):ds.ceil(e),et(e.getUTCFullYear()%1e4,t,4)}function nV(){return"+0000"}function uN(){return"%"}function fN(e){return+e}function dN(e){return Math.floor(+e/1e3)}var ko,EI,AI;iV({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function iV(e){return ko=iH(e),EI=ko.format,ko.parse,AI=ko.utcFormat,ko.utcParse,ko}function aV(e){return new Date(e)}function oV(e){return e instanceof Date?+e:+new Date(+e)}function Gw(e,t,r,n,i,a,s,u,f,c){var d=Rw(),h=d.invert,m=d.domain,g=c(".%L"),b=c(":%S"),y=c("%I:%M"),w=c("%I %p"),S=c("%a %d"),O=c("%b %d"),E=c("%B"),C=c("%Y");function A(N){return(f(N)t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>XU(e,a/n))},r.copy=function(){return TI(t).domain(e)},bi.apply(r,arguments)}function mp(){var e=0,t=.5,r=1,n=1,i,a,s,u,f,c=fr,d,h=!1,m;function g(y){return isNaN(y=+y)?m:(y=.5+((y=+d(y))-a)*(n*yr}return cx=e,cx}var ux,vN;function fV(){if(vN)return ux;vN=1;var e=vp(),t=II(),r=Ls();function n(i){return i&&i.length?e(i,r,t):void 0}return ux=n,ux}var dV=fV();const gp=it(dV);var fx,gN;function DI(){if(gN)return fx;gN=1;function e(t,r){return te.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=ne.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*xt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};_e.dividedBy=_e.div=function(e){return ui(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,r=t.constructor;return ft(ui(t,new r(e),0,1),r.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return kt(this)};_e.greaterThan=_e.gt=function(e){return this.cmp(e)>0};_e.greaterThanOrEqualTo=_e.gte=function(e){return this.cmp(e)>=0};_e.isInteger=_e.isint=function(){return this.e>this.d.length-2};_e.isNegative=_e.isneg=function(){return this.s<0};_e.isPositive=_e.ispos=function(){return this.s>0};_e.isZero=function(){return this.s===0};_e.lessThan=_e.lt=function(e){return this.cmp(e)<0};_e.lessThanOrEqualTo=_e.lte=function(e){return this.cmp(e)<1};_e.logarithm=_e.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Br))throw Error(an+"NaN");if(r.s<1)throw Error(an+(r.s?"NaN":"-Infinity"));return r.eq(Br)?new n(0):(wt=!1,t=ui(Oc(r,a),Oc(e,a),a),wt=!0,ft(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?zI(t,e):$I(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(an+"NaN");return r.s?(wt=!1,t=ui(r,e,0,1).times(e),wt=!0,r.minus(t)):ft(new n(r),i)};_e.naturalExponential=_e.exp=function(){return BI(this)};_e.naturalLogarithm=_e.ln=function(){return Oc(this)};_e.negated=_e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};_e.plus=_e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$I(t,e):zI(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ma+e);if(t=kt(i)+1,n=i.d.length-1,r=n*xt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};_e.squareRoot=_e.sqrt=function(){var e,t,r,n,i,a,s,u=this,f=u.constructor;if(u.s<1){if(!u.s)return new f(0);throw Error(an+"NaN")}for(e=kt(u),wt=!1,i=Math.sqrt(+u),i==0||i==1/0?(t=In(u.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=zs((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(a=n,n=a.plus(ui(u,a,s+2)).times(.5),In(a.d).slice(0,s)===(t=In(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(ft(a,r+1,0),a.times(a).eq(u)){n=a;break}}else if(t!="9999")break;s+=4}return wt=!0,ft(n,r)};_e.times=_e.mul=function(e){var t,r,n,i,a,s,u,f,c,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,r=d.e+e.e,f=m.length,c=g.length,f=0;){for(t=0,i=f+n;i>n;)u=a[i]+g[n]*m[i-n-1]+t,a[i--]=u%Ht|0,t=u/Ht|0;a[i]=(a[i]+t)%Ht|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,wt?ft(e,h.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(zn(e,0,Bs),t===void 0?t=n.rounding:zn(t,0,8),ft(r,e+kt(r)+1,t))};_e.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ba(n,!0):(zn(e,0,Bs),t===void 0?t=i.rounding:zn(t,0,8),n=ft(new i(n),e+1,t),r=Ba(n,!0,e+1)),r};_e.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ba(i):(zn(e,0,Bs),t===void 0?t=a.rounding:zn(t,0,8),n=ft(new a(i),e+kt(i)+1,t),r=Ba(n.abs(),!1,e+kt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return ft(new t(e),kt(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.pow=function(e){var t,r,n,i,a,s,u=this,f=u.constructor,c=12,d=+(e=new f(e));if(!e.s)return new f(Br);if(u=new f(u),!u.s){if(e.s<1)throw Error(an+"Infinity");return u}if(u.eq(Br))return u;if(n=f.precision,e.eq(Br))return ft(u,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=u.s,s){if((r=d<0?-d:d)<=LI){for(i=new f(Br),t=Math.ceil(n/xt+4),wt=!1;r%2&&(i=i.times(u),SN(i.d,t)),r=zs(r/2),r!==0;)u=u.times(u),SN(u.d,t);return wt=!0,e.s<0?new f(Br).div(i):ft(i,n)}}else if(a<0)throw Error(an+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,u.s=1,wt=!1,i=e.times(Oc(u,n+c)),wt=!0,i=BI(i),i.s=a,i};_e.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=kt(i),n=Ba(i,r<=a.toExpNeg||r>=a.toExpPos)):(zn(e,1,Bs),t===void 0?t=a.rounding:zn(t,0,8),i=ft(new a(i),e,t),r=kt(i),n=Ba(i,e<=r||r<=a.toExpNeg,e)),n};_e.toSignificantDigits=_e.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(zn(e,1,Bs),t===void 0?t=n.rounding:zn(t,0,8)),ft(new n(r),e,t)};_e.toString=_e.valueOf=_e.val=_e.toJSON=_e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=kt(e),r=e.constructor;return Ba(e,t<=r.toExpNeg||t>=r.toExpPos)};function $I(e,t){var r,n,i,a,s,u,f,c,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),wt?ft(t,h):t;if(f=e.d,c=t.d,s=e.e,i=t.e,f=f.slice(),a=s-i,a){for(a<0?(n=f,a=-a,u=c.length):(n=c,i=s,u=f.length),s=Math.ceil(h/xt),u=s>u?s+1:u+1,a>u&&(a=u,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(u=f.length,a=c.length,u-a<0&&(a=u,n=c,c=f,f=n),r=0;a;)r=(f[--a]=f[a]+c[a]+r)/Ht|0,f[a]%=Ht;for(r&&(f.unshift(r),++i),u=f.length;f[--u]==0;)f.pop();return t.d=f,t.e=i,wt?ft(t,h):t}function zn(e,t,r){if(e!==~~e||er)throw Error(Ma+e)}function In(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(u=f=0;ui[u]?1:-1;break}return f}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]1;)n.shift()}return function(n,i,a,s){var u,f,c,d,h,m,g,b,y,w,S,O,E,C,A,N,T,R,I=n.constructor,q=n.s==i.s?1:-1,L=n.d,D=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(an+"Division by zero");for(f=n.e-i.e,T=D.length,A=L.length,g=new I(q),b=g.d=[],c=0;D[c]==(L[c]||0);)++c;if(D[c]>(L[c]||0)&&--f,a==null?O=a=I.precision:s?O=a+(kt(n)-kt(i))+1:O=a,O<0)return new I(0);if(O=O/xt+2|0,c=0,T==1)for(d=0,D=D[0],O++;(c1&&(D=e(D,d),L=e(L,d),T=D.length,A=L.length),C=T,y=L.slice(0,T),w=y.length;w=Ht/2&&++N;do d=0,u=t(D,y,T,w),u<0?(S=y[0],T!=w&&(S=S*Ht+(y[1]||0)),d=S/N|0,d>1?(d>=Ht&&(d=Ht-1),h=e(D,d),m=h.length,w=y.length,u=t(h,y,m,w),u==1&&(d--,r(h,T16)throw Error(Yw+kt(e));if(!e.s)return new d(Br);for(wt=!1,u=h,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(n=Math.log(Aa(2,c))/Math.LN10*2+5|0,u+=n,r=i=a=new d(Br),d.precision=u;;){if(i=ft(i.times(e),u),r=r.times(++f),s=a.plus(ui(i,r,u)),In(s.d).slice(0,u)===In(a.d).slice(0,u)){for(;c--;)a=ft(a.times(a),u);return d.precision=h,t==null?(wt=!0,ft(a,h)):a}a=s}}function kt(e){for(var t=e.e*xt,r=e.d[0];r>=10;r/=10)t++;return t}function vx(e,t,r){if(t>e.LN10.sd())throw wt=!0,r&&(e.precision=r),Error(an+"LN10 precision limit exceeded");return ft(new e(e.LN10),t)}function Ui(e){for(var t="";e--;)t+="0";return t}function Oc(e,t){var r,n,i,a,s,u,f,c,d,h=1,m=10,g=e,b=g.d,y=g.constructor,w=y.precision;if(g.s<1)throw Error(an+(g.s?"NaN":"-Infinity"));if(g.eq(Br))return new y(0);if(t==null?(wt=!1,c=w):c=t,g.eq(10))return t==null&&(wt=!0),vx(y,c);if(c+=m,y.precision=c,r=In(b),n=r.charAt(0),a=kt(g),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)g=g.times(e),r=In(g.d),n=r.charAt(0),h++;a=kt(g),n>1?(g=new y("0."+r),a++):g=new y(n+"."+r.slice(1))}else return f=vx(y,c+2,w).times(a+""),g=Oc(new y(n+"."+r.slice(1)),c-m).plus(f),y.precision=w,t==null?(wt=!0,ft(g,w)):g;for(u=s=g=ui(g.minus(Br),g.plus(Br),c),d=ft(g.times(g),c),i=3;;){if(s=ft(s.times(d),c),f=u.plus(ui(s,new y(i),c)),In(f.d).slice(0,c)===In(u.d).slice(0,c))return u=u.times(2),a!==0&&(u=u.plus(vx(y,c+2,w).times(a+""))),u=ui(u,new y(h),c),y.precision=w,t==null?(wt=!0,ft(u,w)):u;u=f,i+=2}}function _N(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=zs(r/xt),e.d=[],n=(r+1)%xt,r<0&&(n+=xt),noh||e.e<-oh))throw Error(Yw+r)}else e.s=0,e.e=0,e.d=[0];return e}function ft(e,t,r){var n,i,a,s,u,f,c,d,h=e.d;for(s=1,a=h[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=xt,i=t,c=h[d=0];else{if(d=Math.ceil((n+1)/xt),a=h.length,d>=a)return e;for(c=a=h[d],s=1;a>=10;a/=10)s++;n%=xt,i=n-xt+s}if(r!==void 0&&(a=Aa(10,s-i-1),u=c/a%10|0,f=t<0||h[d+1]!==void 0||c%a,f=r<4?(u||f)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||f||r==6&&(n>0?i>0?c/Aa(10,s-i):0:h[d-1])%10&1||r==(e.s<0?8:7))),t<1||!h[0])return f?(a=kt(e),h.length=1,t=t-a-1,h[0]=Aa(10,(xt-t%xt)%xt),e.e=zs(-t/xt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(n==0?(h.length=d,a=1,d--):(h.length=d+1,a=Aa(10,xt-n),h[d]=i>0?(c/Aa(10,s-i)%Aa(10,i)|0)*a:0),f)for(;;)if(d==0){(h[0]+=a)==Ht&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Ht)break;h[d--]=0,a=1}for(n=h.length;h[--n]===0;)h.pop();if(wt&&(e.e>oh||e.e<-oh))throw Error(Yw+kt(e));return e}function zI(e,t){var r,n,i,a,s,u,f,c,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),wt?ft(t,g):t;if(f=e.d,h=t.d,n=t.e,c=e.e,f=f.slice(),s=c-n,s){for(d=s<0,d?(r=f,s=-s,u=h.length):(r=h,n=c,u=f.length),i=Math.max(Math.ceil(g/xt),u)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,u=h.length,d=i0;--i)f[u++]=0;for(i=h.length;i>s;){if(f[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ui(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ui(-i-1)+a,r&&(n=r-s)>0&&(a+=Ui(n))):i>=s?(a+=Ui(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Ui(n))):((n=i+1)0&&(i+1===s&&(a+="."),a+=Ui(n))),e.s<0?"-"+a:a}function SN(e,t){if(e.length>t)return e.length=t,!0}function FI(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ma+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return _N(s,a.toString())}else if(typeof a!="string")throw Error(Ma+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,_V.test(a))_N(s,a);else throw Error(Ma+a)}if(i.prototype=_e,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=FI,i.config=i.set=SV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ma+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ma+r+": "+n);return this}var Qw=FI(wV);Br=new Qw(1);const ut=Qw;function OV(e){return PV(e)||AV(e)||EV(e)||jV()}function jV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EV(e,t){if(e){if(typeof e=="string")return Fb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fb(e,t)}}function AV(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function PV(e){if(Array.isArray(e))return Fb(e)}function Fb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t?r.apply(void 0,i):e(t-s,ON(function(){for(var u=arguments.length,f=new Array(u),c=0;ce.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),u;!(n=(u=s.next()).done)&&(r.push(u.value),!(t&&r.length===t));n=!0);}catch(f){i=!0,a=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(i)throw a}}return r}}function UV(e){if(Array.isArray(e))return e}function VI(e){var t=jc(e,2),r=t[0],n=t[1],i=r,a=n;return r>n&&(i=n,a=r),[i,a]}function GI(e,t,r){if(e.lte(0))return new ut(0);var n=bp.getDigitCount(e.toNumber()),i=new ut(10).pow(n),a=e.div(i),s=n!==1?.05:.1,u=new ut(Math.ceil(a.div(s).toNumber())).add(r).mul(s),f=u.mul(i);return t?f:new ut(Math.ceil(f))}function WV(e,t,r){var n=1,i=new ut(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new ut(10).pow(bp.getDigitCount(e)-1),i=new ut(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):r||(i=new ut(Math.floor(e)));var s=Math.floor((t-1)/2),u=kV(TV(function(f){return i.add(new ut(f-s).mul(n)).toNumber()}),qb);return u(0,t)}function KI(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var a=GI(new ut(t).sub(e).div(r-1),n,i),s;e<=0&&t>=0?s=new ut(0):(s=new ut(e).add(t).div(2),s=s.sub(new ut(s).mod(a)));var u=Math.ceil(s.sub(e).div(a).toNumber()),f=Math.ceil(new ut(t).sub(s).div(a).toNumber()),c=u+f+1;return c>r?KI(e,t,r,n,i+1):(c0?f+(r-c):f,u=t>0?u:u+(r-c)),{step:a,tickMin:s.sub(new ut(u).mul(a)),tickMax:s.add(new ut(f).mul(a))})}function HV(e){var t=jc(e,2),r=t[0],n=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),u=VI([r,n]),f=jc(u,2),c=f[0],d=f[1];if(c===-1/0||d===1/0){var h=d===1/0?[c].concat(Wb(qb(0,i-1).map(function(){return 1/0}))):[].concat(Wb(qb(0,i-1).map(function(){return-1/0})),[d]);return r>n?Ub(h):h}if(c===d)return WV(c,i,a);var m=KI(c,d,s,a),g=m.step,b=m.tickMin,y=m.tickMax,w=bp.rangeStep(b,y.add(new ut(.1).mul(g)),g);return r>n?Ub(w):w}function VV(e,t){var r=jc(e,2),n=r[0],i=r[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=VI([n,i]),u=jc(s,2),f=u[0],c=u[1];if(f===-1/0||c===1/0)return[n,i];if(f===c)return[f];var d=Math.max(t,2),h=GI(new ut(c).sub(f).div(d-1),a,0),m=[].concat(Wb(bp.rangeStep(new ut(f),new ut(c).sub(new ut(.99).mul(h)),h)),[c]);return n>i?Ub(m):m}var GV=WI(HV),KV=WI(VV),XV="Invariant failed";function za(e,t){throw new Error(XV)}var YV=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function hs(e){"@babel/helpers - typeof";return hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hs(e)}function sh(){return sh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nG(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function iG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aG(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,u=(r=n?.length)!==null&&r!==void 0?r:0;if(u<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var f=a.range,c=0;c0?i[c-1].coordinate:i[u-1].coordinate,h=i[c].coordinate,m=c>=u-1?i[0].coordinate:i[c+1].coordinate,g=void 0;if(cr(h-d)!==cr(m-h)){var b=[];if(cr(m-h)===cr(f[1]-f[0])){g=m;var y=h+f[1]-f[0];b[0]=Math.min(y,(y+d)/2),b[1]=Math.max(y,(y+d)/2)}else{g=d;var w=m+f[1]-f[0];b[0]=Math.min(h,(w+h)/2),b[1]=Math.max(h,(w+h)/2)}var S=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>S[0]&&t<=S[1]||t>=b[0]&&t<=b[1]){s=i[c].index;break}}else{var O=Math.min(d,m),E=Math.max(d,m);if(t>(O+h)/2&&t<=(E+h)/2){s=i[c].index;break}}}else for(var C=0;C0&&C(n[C].coordinate+n[C-1].coordinate)/2&&t<=(n[C].coordinate+n[C+1].coordinate)/2||C===u-1&&t>(n[C].coordinate+n[C-1].coordinate)/2){s=n[C].index;break}return s},Zw=function(t){var r,n=t,i=n.type.displayName,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,s=a.stroke,u=a.fill,f;switch(i){case"Line":f=s;break;case"Area":case"Radar":f=s&&s!=="none"?s:u;break;default:f=u;break}return f},_G=function(t){var r=t.barSize,n=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},u=Object.keys(a),f=0,c=u.length;f=0});if(S&&S.length){var O=S[0].type.defaultProps,E=O!==void 0?At(At({},O),S[0].props):S[0].props,C=E.barSize,A=E[w];s[A]||(s[A]=[]);var N=qe(C)?r:C;s[A].push({item:S[0],stackList:S.slice(1),barSize:qe(N)?void 0:ur(N,n,0)})}}return s},SG=function(t){var r=t.barGap,n=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,u=t.maxBarSize,f=s.length;if(f<1)return null;var c=ur(r,i,0,!0),d,h=[];if(s[0].barSize===+s[0].barSize){var m=!1,g=i/f,b=s.reduce(function(C,A){return C+A.barSize||0},0);b+=(f-1)*c,b>=i&&(b-=(f-1)*c,c=0),b>=i&&g>0&&(m=!0,g*=.9,b=f*g);var y=(i-b)/2>>0,w={offset:y-c,size:0};d=s.reduce(function(C,A){var N={item:A.item,position:{offset:w.offset+w.size+c,size:m?g:A.barSize}},T=[].concat(AN(C),[N]);return w=T[T.length-1].position,A.stackList&&A.stackList.length&&A.stackList.forEach(function(R){T.push({item:R,position:w})}),T},h)}else{var S=ur(n,i,0,!0);i-2*S-(f-1)*c<=0&&(c=0);var O=(i-2*S-(f-1)*c)/f;O>1&&(O>>=0);var E=u===+u?Math.min(O,u):O;d=s.reduce(function(C,A,N){var T=[].concat(AN(C),[{item:A.item,position:{offset:S+(O+c)*N+(O-E)/2,size:E}}]);return A.stackList&&A.stackList.length&&A.stackList.forEach(function(R){T.push({item:R,position:T[T.length-1].position})}),T},h)}return d},OG=function(t,r,n,i){var a=n.children,s=n.width,u=n.margin,f=s-(u.left||0)-(u.right||0),c=ZI({children:a,legendWidth:f});if(c){var d=i||{},h=d.width,m=d.height,g=c.align,b=c.verticalAlign,y=c.layout;if((y==="vertical"||y==="horizontal"&&b==="middle")&&g!=="center"&&he(t[g]))return At(At({},t),{},Jo({},g,t[g]+(h||0)));if((y==="horizontal"||y==="vertical"&&g==="center")&&b!=="middle"&&he(t[b]))return At(At({},t),{},Jo({},b,t[b]+(m||0)))}return t},jG=function(t,r,n){return qe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},JI=function(t,r,n,i,a){var s=r.props.children,u=Fr(s,nu).filter(function(c){return jG(i,a,c.props.direction)});if(u&&u.length){var f=u.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var h=Bt(d,n);if(qe(h))return c;var m=Array.isArray(h)?[yp(h),gp(h)]:[h,h],g=f.reduce(function(b,y){var w=Bt(d,y,0),S=m[0]-Math.abs(Array.isArray(w)?w[0]:w),O=m[1]+Math.abs(Array.isArray(w)?w[1]:w);return[Math.min(S,b[0]),Math.max(O,b[1])]},[1/0,-1/0]);return[Math.min(g[0],c[0]),Math.max(g[1],c[1])]},[1/0,-1/0])}return null},EG=function(t,r,n,i,a){var s=r.map(function(u){return JI(t,u,n,a,i)}).filter(function(u){return!qe(u)});return s&&s.length?s.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]):null},eD=function(t,r,n,i,a){var s=r.map(function(f){var c=f.props.dataKey;return n==="number"&&c&&JI(t,f,c,i)||nc(t,c,n,a)});if(n==="number")return s.reduce(function(f,c){return[Math.min(f[0],c[0]),Math.max(f[1],c[1])]},[1/0,-1/0]);var u={};return s.reduce(function(f,c){for(var d=0,h=c.length;d=2?cr(u[0]-u[1])*2*c:c,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(h){var m=a?a.indexOf(h):h;return{coordinate:i(m)+c,value:h,offset:c}});return d.filter(function(h){return!Yc(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,m){return{coordinate:i(h)+c,value:h,index:m,offset:c}}):i.ticks&&!n?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+c,value:h,offset:c}}):i.domain().map(function(h,m){return{coordinate:i(h)+c,value:a?a[h]:h,index:m,offset:c}})},gx=new WeakMap,kf=function(t,r){if(typeof r!="function")return t;gx.has(t)||gx.set(t,new WeakMap);var n=gx.get(t);if(n.has(r))return n.get(r);var i=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,i),i},nD=function(t,r,n){var i=t.scale,a=t.type,s=t.layout,u=t.axisType;if(i==="auto")return s==="radial"&&u==="radiusAxis"?{scale:xc(),realScaleType:"band"}:s==="radial"&&u==="angleAxis"?{scale:rh(),realScaleType:"linear"}:a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:rc(),realScaleType:"point"}:a==="category"?{scale:xc(),realScaleType:"band"}:{scale:rh(),realScaleType:"linear"};if(Da(i)){var f="scale".concat(rp(i));return{scale:(hN[f]||rc)(),realScaleType:hN[f]?f:"point"}}return ze(i)?{scale:i}:{scale:rc(),realScaleType:"point"}},NN=1e-4,iD=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,i=t.range(),a=Math.min(i[0],i[1])-NN,s=Math.max(i[0],i[1])+NN,u=t(r[0]),f=t(r[n-1]);(us||fs)&&t.domain([r[0],r[n-1]])}},AG=function(t,r){if(!t)return null;for(var n=0,i=t.length;ni)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[u][n][0]=a,t[u][n][1]=a+f,a=t[u][n][1]):(t[u][n][0]=s,t[u][n][1]=s+f,s=t[u][n][1])}},CG=function(t){var r=t.length;if(!(r<=0))for(var n=0,i=t[0].length;n=0?(t[s][n][0]=a,t[s][n][1]=a+u,a=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},TG={sign:NG,expand:yq,none:as,silhouette:xq,wiggle:bq,positive:CG},kG=function(t,r,n){var i=r.map(function(u){return u.props.dataKey}),a=TG[n],s=gq().keys(i).value(function(u,f){return+Bt(u,f,0)}).order(Sb).offset(a);return s(t)},RG=function(t,r,n,i,a,s){if(!t)return null;var u=s?r.reverse():r,f={},c=u.reduce(function(h,m){var g,b=(g=m.type)!==null&&g!==void 0&&g.defaultProps?At(At({},m.type.defaultProps),m.props):m.props,y=b.stackId,w=b.hide;if(w)return h;var S=b[n],O=h[S]||{hasStack:!1,stackGroups:{}};if(zt(y)){var E=O.stackGroups[y]||{numericAxisId:n,cateAxisId:i,items:[]};E.items.push(m),O.hasStack=!0,O.stackGroups[y]=E}else O.stackGroups[Ds("_stackId_")]={numericAxisId:n,cateAxisId:i,items:[m]};return At(At({},h),{},Jo({},S,O))},f),d={};return Object.keys(c).reduce(function(h,m){var g=c[m];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(y,w){var S=g.stackGroups[w];return At(At({},y),{},Jo({},w,{numericAxisId:n,cateAxisId:i,items:S.items,stackedData:kG(t,S.items,a)}))},b)}return At(At({},h),{},Jo({},m,g))},d)},aD=function(t,r){var n=r.realScaleType,i=r.type,a=r.tickCount,s=r.originalDomain,u=r.allowDecimals,f=n||r.scale;if(f!=="auto"&&f!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=GV(c,a,u);return t.domain([yp(d),gp(d)]),{niceTicks:d}}if(a&&i==="number"){var h=t.domain(),m=KV(h,a,u);return{niceTicks:m}}return null};function CN(e){var t=e.axis,r=e.ticks,n=e.bandSize,i=e.entry,a=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!qe(i[t.dataKey])){var u=Dd(r,"value",i[t.dataKey]);if(u)return u.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var f=Bt(i,qe(s)?t.dataKey:s);return qe(f)?null:t.scale(f)}var TN=function(t){var r=t.axis,n=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,u=t.index;if(r.type==="category")return n[u]?n[u].coordinate+i:null;var f=Bt(s,r.dataKey,r.domain[u]);return qe(f)?null:r.scale(f)-a/2+i},MG=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var i=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return i<=0&&a>=0?0:a<0?a:i}return n[0]},IG=function(t,r){var n,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?At(At({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(zt(a)){var s=r[a];if(s){var u=s.items.indexOf(t);return u>=0?s.stackedData[u]:null}}return null},DG=function(t){return t.reduce(function(r,n){return[yp(n.concat([r[0]]).filter(he)),gp(n.concat([r[1]]).filter(he))]},[1/0,-1/0])},oD=function(t,r,n){return Object.keys(t).reduce(function(i,a){var s=t[a],u=s.stackedData,f=u.reduce(function(c,d){var h=DG(d.slice(r,n+1));return[Math.min(c[0],h[0]),Math.max(c[1],h[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},kN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,RN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Kb=function(t,r,n){if(ze(t))return t(r,n);if(!Array.isArray(t))return r;var i=[];if(he(t[0]))i[0]=n?t[0]:Math.min(t[0],r[0]);else if(kN.test(t[0])){var a=+kN.exec(t[0])[1];i[0]=r[0]-a}else ze(t[0])?i[0]=t[0](r[0]):i[0]=r[0];if(he(t[1]))i[1]=n?t[1]:Math.max(t[1],r[1]);else if(RN.test(t[1])){var s=+RN.exec(t[1])[1];i[1]=r[1]+s}else ze(t[1])?i[1]=t[1](r[1]):i[1]=r[1];return i},ch=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!n||i>0)return i}if(t&&r&&r.length>=2){for(var a=Ew(r,function(h){return h.coordinate}),s=1/0,u=1,f=a.length;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},HG=function(t,r,n,i,a){var s=t.width,u=t.height,f=t.startAngle,c=t.endAngle,d=ur(t.cx,s,s/2),h=ur(t.cy,u,u/2),m=cD(s,u,n),g=ur(t.innerRadius,m,0),b=ur(t.outerRadius,m,m*.8),y=Object.keys(r);return y.reduce(function(w,S){var O=r[S],E=O.domain,C=O.reversed,A;if(qe(O.range))i==="angleAxis"?A=[f,c]:i==="radiusAxis"&&(A=[g,b]),C&&(A=[A[1],A[0]]);else{A=O.range;var N=A,T=BG(N,2);f=T[0],c=T[1]}var R=nD(O,a),I=R.realScaleType,q=R.scale;q.domain(E).range(A),iD(q);var L=aD(q,ai(ai({},O),{},{realScaleType:I})),D=ai(ai(ai({},O),L),{},{range:A,radius:b,realScaleType:I,scale:q,cx:d,cy:h,innerRadius:g,outerRadius:b,startAngle:f,endAngle:c});return ai(ai({},w),{},lD({},S,D))},{})},VG=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2))},GG=function(t,r){var n=t.x,i=t.y,a=r.cx,s=r.cy,u=VG({x:n,y:i},{x:a,y:s});if(u<=0)return{radius:u};var f=(n-a)/u,c=Math.acos(f);return i>s&&(c=2*Math.PI-c),{radius:u,angle:WG(c),angleInRadian:c}},KG=function(t){var r=t.startAngle,n=t.endAngle,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return{startAngle:r-s*360,endAngle:n-s*360}},XG=function(t,r){var n=r.startAngle,i=r.endAngle,a=Math.floor(n/360),s=Math.floor(i/360),u=Math.min(a,s);return t+u*360},LN=function(t,r){var n=t.x,i=t.y,a=GG({x:n,y:i},r),s=a.radius,u=a.angle,f=r.innerRadius,c=r.outerRadius;if(sc)return!1;if(s===0)return!0;var d=KG(r),h=d.startAngle,m=d.endAngle,g=u,b;if(h<=m){for(;g>m;)g-=360;for(;g=h&&g<=m}else{for(;g>h;)g-=360;for(;g=m&&g<=h}return b?ai(ai({},r),{},{radius:s,angle:XG(g,r)}):null},uD=function(t){return!P.isValidElement(t)&&!ze(t)&&typeof t!="boolean"?t.className:""};function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}var YG=["offset"];function QG(e){return tK(e)||eK(e)||JG(e)||ZG()}function ZG(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JG(e,t){if(e){if(typeof e=="string")return Xb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xb(e,t)}}function eK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tK(e){if(Array.isArray(e))return Xb(e)}function Xb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function nK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $t(e){for(var t=1;t=0?1:-1,E,C;i==="insideStart"?(E=g+O*s,C=y):i==="insideEnd"?(E=b-O*s,C=!y):i==="end"&&(E=b+O*s,C=y),C=S<=0?C:!C;var A=mt(c,d,w,E),N=mt(c,d,w,E+(C?1:-1)*359),T="M".concat(A.x,",").concat(A.y,` + A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`, + `).concat(N.x,",").concat(N.y),R=qe(t.id)?Ds("recharts-radial-line-"):t.id;return z.createElement("text",Cc({},n,{dominantBaseline:"central",className:Ue("recharts-radial-bar-label",u)}),z.createElement("defs",null,z.createElement("path",{id:R,d:T})),z.createElement("textPath",{xlinkHref:"#".concat(R)},r))},uK=function(t){var r=t.viewBox,n=t.offset,i=t.position,a=r,s=a.cx,u=a.cy,f=a.innerRadius,c=a.outerRadius,d=a.startAngle,h=a.endAngle,m=(d+h)/2;if(i==="outside"){var g=mt(s,u,c+n,m),b=g.x,y=g.y;return{x:b,y,textAnchor:b>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:u,textAnchor:"middle",verticalAnchor:"end"};var w=(f+c)/2,S=mt(s,u,w,m),O=S.x,E=S.y;return{x:O,y:E,textAnchor:"middle",verticalAnchor:"middle"}},fK=function(t){var r=t.viewBox,n=t.parentViewBox,i=t.offset,a=t.position,s=r,u=s.x,f=s.y,c=s.width,d=s.height,h=d>=0?1:-1,m=h*i,g=h>0?"end":"start",b=h>0?"start":"end",y=c>=0?1:-1,w=y*i,S=y>0?"end":"start",O=y>0?"start":"end";if(a==="top"){var E={x:u+c/2,y:f-h*i,textAnchor:"middle",verticalAnchor:g};return $t($t({},E),n?{height:Math.max(f-n.y,0),width:c}:{})}if(a==="bottom"){var C={x:u+c/2,y:f+d+m,textAnchor:"middle",verticalAnchor:b};return $t($t({},C),n?{height:Math.max(n.y+n.height-(f+d),0),width:c}:{})}if(a==="left"){var A={x:u-w,y:f+d/2,textAnchor:S,verticalAnchor:"middle"};return $t($t({},A),n?{width:Math.max(A.x-n.x,0),height:d}:{})}if(a==="right"){var N={x:u+c+w,y:f+d/2,textAnchor:O,verticalAnchor:"middle"};return $t($t({},N),n?{width:Math.max(n.x+n.width-N.x,0),height:d}:{})}var T=n?{width:c,height:d}:{};return a==="insideLeft"?$t({x:u+w,y:f+d/2,textAnchor:O,verticalAnchor:"middle"},T):a==="insideRight"?$t({x:u+c-w,y:f+d/2,textAnchor:S,verticalAnchor:"middle"},T):a==="insideTop"?$t({x:u+c/2,y:f+m,textAnchor:"middle",verticalAnchor:b},T):a==="insideBottom"?$t({x:u+c/2,y:f+d-m,textAnchor:"middle",verticalAnchor:g},T):a==="insideTopLeft"?$t({x:u+w,y:f+m,textAnchor:O,verticalAnchor:b},T):a==="insideTopRight"?$t({x:u+c-w,y:f+m,textAnchor:S,verticalAnchor:b},T):a==="insideBottomLeft"?$t({x:u+w,y:f+d-m,textAnchor:O,verticalAnchor:g},T):a==="insideBottomRight"?$t({x:u+c-w,y:f+d-m,textAnchor:S,verticalAnchor:g},T):Is(a)&&(he(a.x)||Na(a.x))&&(he(a.y)||Na(a.y))?$t({x:u+ur(a.x,c),y:f+ur(a.y,d),textAnchor:"end",verticalAnchor:"end"},T):$t({x:u+c/2,y:f+d/2,textAnchor:"middle",verticalAnchor:"middle"},T)},dK=function(t){return"cx"in t&&he(t.cx)};function Vt(e){var t=e.offset,r=t===void 0?5:t,n=rK(e,YG),i=$t({offset:r},n),a=i.viewBox,s=i.position,u=i.value,f=i.children,c=i.content,d=i.className,h=d===void 0?"":d,m=i.textBreakAll;if(!a||qe(u)&&qe(f)&&!P.isValidElement(c)&&!ze(c))return null;if(P.isValidElement(c))return P.cloneElement(c,i);var g;if(ze(c)){if(g=P.createElement(c,i),P.isValidElement(g))return g}else g=sK(i);var b=dK(a),y=Me(i,!0);if(b&&(s==="insideStart"||s==="insideEnd"||s==="end"))return cK(i,g,y);var w=b?uK(i):fK(i);return z.createElement($a,Cc({className:Ue("recharts-label",h)},y,w,{breakAll:m}),g)}Vt.displayName="Label";var fD=function(t){var r=t.cx,n=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,u=t.r,f=t.radius,c=t.innerRadius,d=t.outerRadius,h=t.x,m=t.y,g=t.top,b=t.left,y=t.width,w=t.height,S=t.clockWise,O=t.labelViewBox;if(O)return O;if(he(y)&&he(w)){if(he(h)&&he(m))return{x:h,y:m,width:y,height:w};if(he(g)&&he(b))return{x:g,y:b,width:y,height:w}}return he(h)&&he(m)?{x:h,y:m,width:0,height:0}:he(r)&&he(n)?{cx:r,cy:n,startAngle:a||i||0,endAngle:s||i||0,innerRadius:c||0,outerRadius:d||f||u||0,clockWise:S}:t.viewBox?t.viewBox:{}},hK=function(t,r){return t?t===!0?z.createElement(Vt,{key:"label-implicit",viewBox:r}):zt(t)?z.createElement(Vt,{key:"label-implicit",viewBox:r,value:t}):P.isValidElement(t)?t.type===Vt?P.cloneElement(t,{key:"label-implicit",viewBox:r}):z.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):ze(t)?z.createElement(Vt,{key:"label-implicit",content:t,viewBox:r}):Is(t)?z.createElement(Vt,Cc({viewBox:r},t,{key:"label-implicit"})):null:null},pK=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var i=t.children,a=fD(t),s=Fr(i,Vt).map(function(f,c){return P.cloneElement(f,{viewBox:r||a,key:"label-".concat(c)})});if(!n)return s;var u=hK(t.label,r||a);return[u].concat(QG(s))};Vt.parseViewBox=fD;Vt.renderCallByParent=pK;var yx,BN;function mK(){if(BN)return yx;BN=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return yx=e,yx}var vK=mK();const gK=it(vK);function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}var yK=["valueAccessor"],xK=["data","dataKey","clockWise","id","textBreakAll"];function bK(e){return OK(e)||SK(e)||_K(e)||wK()}function wK(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _K(e,t){if(e){if(typeof e=="string")return Yb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yb(e,t)}}function SK(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function OK(e){if(Array.isArray(e))return Yb(e)}function Yb(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PK(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var NK=function(t){return Array.isArray(t.value)?gK(t.value):t.value};function fi(e){var t=e.valueAccessor,r=t===void 0?NK:t,n=qN(e,yK),i=n.data,a=n.dataKey,s=n.clockWise,u=n.id,f=n.textBreakAll,c=qN(n,xK);return!i||!i.length?null:z.createElement(Ze,{className:"recharts-label-list"},i.map(function(d,h){var m=qe(a)?r(d,h):Bt(d&&d.payload,a),g=qe(u)?{}:{id:"".concat(u,"-").concat(h)};return z.createElement(Vt,fh({},Me(d,!0),c,g,{parentViewBox:d.parentViewBox,value:m,textBreakAll:f,viewBox:Vt.parseViewBox(qe(s)?d:FN(FN({},d),{},{clockWise:s})),key:"label-".concat(h),index:h}))}))}fi.displayName="LabelList";function CK(e,t){return e?e===!0?z.createElement(fi,{key:"labelList-implicit",data:t}):z.isValidElement(e)||ze(e)?z.createElement(fi,{key:"labelList-implicit",data:t,content:e}):Is(e)?z.createElement(fi,fh({data:t},e,{key:"labelList-implicit"})):null:null}function TK(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,i=Fr(n,fi).map(function(s,u){return P.cloneElement(s,{data:t,key:"labelList-".concat(u)})});if(!r)return i;var a=CK(e.label,t);return[a].concat(bK(i))}fi.renderCallByParent=TK;function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>c),`, + `).concat(h.x,",").concat(h.y,` + `);if(i>0){var g=mt(r,n,i,s),b=mt(r,n,i,c);m+="L ".concat(b.x,",").concat(b.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(f)>180),",").concat(+(s<=c),`, + `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(r,",").concat(n," Z");return m},DK=function(t){var r=t.cx,n=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,u=t.forceCornerRadius,f=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,h=cr(d-c),m=Rf({cx:r,cy:n,radius:a,angle:c,sign:h,cornerRadius:s,cornerIsExternal:f}),g=m.circleTangency,b=m.lineTangency,y=m.theta,w=Rf({cx:r,cy:n,radius:a,angle:d,sign:-h,cornerRadius:s,cornerIsExternal:f}),S=w.circleTangency,O=w.lineTangency,E=w.theta,C=f?Math.abs(c-d):Math.abs(c-d)-y-E;if(C<0)return u?"M ".concat(b.x,",").concat(b.y,` + a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 + a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 + `):dD({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d});var A="M ".concat(b.x,",").concat(b.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,` + A`).concat(a,",").concat(a,",0,").concat(+(C>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(O.x,",").concat(O.y,` + `);if(i>0){var N=Rf({cx:r,cy:n,radius:i,angle:c,sign:h,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),T=N.circleTangency,R=N.lineTangency,I=N.theta,q=Rf({cx:r,cy:n,radius:i,angle:d,sign:-h,isExternal:!0,cornerRadius:s,cornerIsExternal:f}),L=q.circleTangency,D=q.lineTangency,U=q.theta,H=f?Math.abs(c-d):Math.abs(c-d)-I-U;if(H<0&&s===0)return"".concat(A,"L").concat(r,",").concat(n,"Z");A+="L".concat(D.x,",").concat(D.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(L.x,",").concat(L.y,` + A`).concat(i,",").concat(i,",0,").concat(+(H>180),",").concat(+(h>0),",").concat(T.x,",").concat(T.y,` + A`).concat(s,",").concat(s,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else A+="L".concat(r,",").concat(n,"Z");return A},LK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},hD=function(t){var r=WN(WN({},LK),t),n=r.cx,i=r.cy,a=r.innerRadius,s=r.outerRadius,u=r.cornerRadius,f=r.forceCornerRadius,c=r.cornerIsExternal,d=r.startAngle,h=r.endAngle,m=r.className;if(s0&&Math.abs(d-h)<360?w=DK({cx:n,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(y,b/2),forceCornerRadius:f,cornerIsExternal:c,startAngle:d,endAngle:h}):w=dD({cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:d,endAngle:h}),z.createElement("path",Qb({},Me(r,!0),{className:g,d:w,role:"img"}))};function Rc(e){"@babel/helpers - typeof";return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;tXK.call(e,t));function eo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ZK="__v",JK="__o",eX="_owner",{getOwnPropertyDescriptor:ZN,keys:JN}=Object;function tX(e,t){return e.byteLength===t.byteLength&&hh(new Uint8Array(e),new Uint8Array(t))}function rX(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function nX(e,t){return e.byteLength===t.byteLength&&hh(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function iX(e,t){return eo(e.getTime(),t.getTime())}function aX(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function oX(e,t){return e===t}function eC(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.entries();let s,u,f=0;for(;(s=a.next())&&!s.done;){const c=t.entries();let d=!1,h=0;for(;(u=c.next())&&!u.done;){if(i[h]){h++;continue}const m=s.value,g=u.value;if(r.equals(m[0],g[0],f,h,e,t,r)&&r.equals(m[1],g[1],m[0],g[0],e,t,r)){d=i[h]=!0;break}h++}if(!d)return!1;f++}return!0}const sX=eo;function lX(e,t,r){const n=JN(e);let i=n.length;if(JN(t).length!==i)return!1;for(;i-- >0;)if(!pD(e,t,r,n[i]))return!1;return!0}function Fl(e,t,r){const n=QN(e);let i=n.length;if(QN(t).length!==i)return!1;let a,s,u;for(;i-- >0;)if(a=n[i],!pD(e,t,r,a)||(s=ZN(e,a),u=ZN(t,a),(s||u)&&(!s||!u||s.configurable!==u.configurable||s.enumerable!==u.enumerable||s.writable!==u.writable)))return!1;return!0}function cX(e,t){return eo(e.valueOf(),t.valueOf())}function uX(e,t){return e.source===t.source&&e.flags===t.flags}function tC(e,t,r){const n=e.size;if(n!==t.size)return!1;if(!n)return!0;const i=new Array(n),a=e.values();let s,u;for(;(s=a.next())&&!s.done;){const f=t.values();let c=!1,d=0;for(;(u=f.next())&&!u.done;){if(!i[d]&&r.equals(s.value,u.value,s.value,u.value,e,t,r)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function hh(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function fX(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function pD(e,t,r,n){return(n===eX||n===JK||n===ZK)&&(e.$$typeof||t.$$typeof)?!0:QK(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}const dX="[object ArrayBuffer]",hX="[object Arguments]",pX="[object Boolean]",mX="[object DataView]",vX="[object Date]",gX="[object Error]",yX="[object Map]",xX="[object Number]",bX="[object Object]",wX="[object RegExp]",_X="[object Set]",SX="[object String]",OX={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},jX="[object URL]",EX=Object.prototype.toString;function AX({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:u,areObjectsEqual:f,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:h,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:b}){return function(w,S,O){if(w===S)return!0;if(w==null||S==null)return!1;const E=typeof w;if(E!==typeof S)return!1;if(E!=="object")return E==="number"?u(w,S,O):E==="function"?a(w,S,O):!1;const C=w.constructor;if(C!==S.constructor)return!1;if(C===Object)return f(w,S,O);if(Array.isArray(w))return t(w,S,O);if(C===Date)return n(w,S,O);if(C===RegExp)return d(w,S,O);if(C===Map)return s(w,S,O);if(C===Set)return h(w,S,O);const A=EX.call(w);if(A===vX)return n(w,S,O);if(A===wX)return d(w,S,O);if(A===yX)return s(w,S,O);if(A===_X)return h(w,S,O);if(A===bX)return typeof w.then!="function"&&typeof S.then!="function"&&f(w,S,O);if(A===jX)return g(w,S,O);if(A===gX)return i(w,S,O);if(A===hX)return f(w,S,O);if(OX[A])return m(w,S,O);if(A===dX)return e(w,S,O);if(A===mX)return r(w,S,O);if(A===pX||A===xX||A===SX)return c(w,S,O);if(b){let N=b[A];if(!N){const T=YK(w);T&&(N=b[T])}if(N)return N(w,S,O)}return!1}}function PX({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:tX,areArraysEqual:r?Fl:rX,areDataViewsEqual:nX,areDatesEqual:iX,areErrorsEqual:aX,areFunctionsEqual:oX,areMapsEqual:r?_x(eC,Fl):eC,areNumbersEqual:sX,areObjectsEqual:r?Fl:lX,arePrimitiveWrappersEqual:cX,areRegExpsEqual:uX,areSetsEqual:r?_x(tC,Fl):tC,areTypedArraysEqual:r?_x(hh,Fl):hh,areUrlsEqual:fX,unknownTagComparators:void 0};if(t&&(n=Object.assign({},n,t(n))),e){const i=If(n.areArraysEqual),a=If(n.areMapsEqual),s=If(n.areObjectsEqual),u=If(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return n}function NX(e){return function(t,r,n,i,a,s,u){return e(t,r,u)}}function CX({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(u,f){const{cache:c=e?new WeakMap:void 0,meta:d}=r();return t(u,f,{cache:c,equals:n,meta:d,strict:i})};if(e)return function(u,f){return t(u,f,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};const a={cache:void 0,equals:n,meta:void 0,strict:i};return function(u,f){return t(u,f,a)}}const TX=ea();ea({strict:!0});ea({circular:!0});ea({circular:!0,strict:!0});ea({createInternalComparator:()=>eo});ea({strict:!0,createInternalComparator:()=>eo});ea({circular:!0,createInternalComparator:()=>eo});ea({circular:!0,createInternalComparator:()=>eo,strict:!0});function ea(e={}){const{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=PX(e),s=AX(a),u=r?r(s):NX(s);return CX({circular:t,comparator:s,createState:n,equals:u,strict:i})}function kX(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function rC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function i(a){r<0&&(r=a),a-r>t?(e(a),r=-1):kX(i)};requestAnimationFrame(n)}function Jb(e){"@babel/helpers - typeof";return Jb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jb(e)}function RX(e){return LX(e)||DX(e)||IX(e)||MX()}function MX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IX(e,t){if(e){if(typeof e=="string")return nC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nC(e,t)}}function nC(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?1:S<0?0:S},y=function(S){for(var O=S>1?1:S,E=O,C=0;C<8;++C){var A=h(E)-O,N=g(E);if(Math.abs(A-O)0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,i=t.damping,a=i===void 0?8:i,s=t.dt,u=s===void 0?17:s,f=function(d,h,m){var g=-(d-h)*n,b=m*a,y=m+(g-b)*u/1e3,w=m*u/1e3+d;return Math.abs(w-h)e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pY(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a=0)&&(r[i]=e[i]);return r}function Sx(e){return yY(e)||gY(e)||vY(e)||mY()}function mY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vY(e,t){if(e){if(typeof e=="string")return i1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i1(e,t)}}function gY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yY(e){if(Array.isArray(e))return i1(e)}function i1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vh(e){return vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vh(e)}var Fn=(function(e){SY(r,e);var t=OY(r);function r(n,i){var a;xY(this,r),a=t.call(this,n,i);var s=a.props,u=s.isActive,f=s.attributeName,c=s.from,d=s.to,h=s.steps,m=s.children,g=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(s1(a)),a.changeStyle=a.changeStyle.bind(s1(a)),!u||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:d}),o1(a);if(h&&h.length)a.state={style:h[0].style};else if(c){if(typeof m=="function")return a.state={style:c},o1(a);a.state={style:f?Ql({},f,c):c}}else a.state={style:{}};return a}return wY(r,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,u=a.canBegin,f=a.attributeName,c=a.shouldReAnimate,d=a.to,h=a.from,m=this.state.style;if(u){if(!s){var g={style:f?Ql({},f,d):d};this.state&&m&&(f&&m[f]!==d||!f&&m!==d)&&this.setState(g);return}if(!(TX(i.to,d)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=b||c?h:i.to;if(this.state&&m){var w={style:f?Ql({},f,y):y};(f&&m[f]!==y||!f&&m!==y)&&this.setState(w)}this.runAnimation(mn(mn({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,u=i.to,f=i.duration,c=i.easing,d=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=fY(s,u,eY(c),f,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([m,d,b,f,h])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,u=i.begin,f=i.onAnimationStart,c=s[0],d=c.style,h=c.duration,m=h===void 0?0:h,g=function(y,w,S){if(S===0)return y;var O=w.duration,E=w.easing,C=E===void 0?"ease":E,A=w.style,N=w.properties,T=w.onAnimationEnd,R=S>0?s[S-1]:w,I=N||Object.keys(A);if(typeof C=="function"||C==="spring")return[].concat(Sx(y),[a.runJSAnimation.bind(a,{from:R.style,to:A,duration:O,easing:C}),O]);var q=oC(I,O,C),L=mn(mn(mn({},R.style),A),{},{transition:q});return[].concat(Sx(y),[L,O,T]).filter(qX)};return this.manager.start([f].concat(Sx(s.reduce(g,[d,Math.max(m,u)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=$X());var a=i.begin,s=i.duration,u=i.attributeName,f=i.to,c=i.easing,d=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof c=="function"||typeof g=="function"||c==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var y=u?Ql({},u,f):f,w=oC(Object.keys(y),s,c);b.start([d,a,mn(mn({},y),{},{transition:w}),s,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var u=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=hY(i,dY),c=P.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!u||c===0||s<=0)return a;var h=function(g){var b=g.props,y=b.style,w=y===void 0?{}:y,S=b.className,O=P.cloneElement(g,mn(mn({},f),{},{style:mn(mn({},w),d),className:S}));return O};return c===1?h(P.Children.only(a)):z.createElement("div",null,P.Children.map(a,function(m){return h(m)}))}}]),r})(P.PureComponent);Fn.displayName="Animate";Fn.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Fn.propTypes={from:ot.oneOfType([ot.object,ot.string]),to:ot.oneOfType([ot.object,ot.string]),attributeName:ot.string,duration:ot.number,begin:ot.number,easing:ot.oneOfType([ot.string,ot.func]),steps:ot.arrayOf(ot.shape({duration:ot.number.isRequired,style:ot.object.isRequired,easing:ot.oneOfType([ot.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ot.func]),properties:ot.arrayOf("string"),onAnimationEnd:ot.func})),children:ot.oneOfType([ot.node,ot.func]),isActive:ot.bool,canBegin:ot.bool,onAnimationEnd:ot.func,shouldReAnimate:ot.bool,onAnimationStart:ot.func,onAnimationReStart:ot.func};function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0?1:-1,f=n>=0?1:-1,c=i>=0&&n>=0||i<0&&n<0?1:0,d;if(s>0&&a instanceof Array){for(var h=[0,0,0,0],m=0,g=4;ms?s:a[m];d="M".concat(t,",").concat(r+u*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(t+f*h[0],",").concat(r)),d+="L ".concat(t+n-f*h[1],",").concat(r),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`, + `).concat(t+n,",").concat(r+u*h[1])),d+="L ".concat(t+n,",").concat(r+i-u*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`, + `).concat(t+n-f*h[2],",").concat(r+i)),d+="L ".concat(t+f*h[3],",").concat(r+i),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`, + `).concat(t,",").concat(r+i-u*h[3])),d+="Z"}else if(s>0&&a===+a&&a>0){var b=Math.min(s,a);d="M ".concat(t,",").concat(r+u*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+f*b,",").concat(r,` + L `).concat(t+n-f*b,",").concat(r,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+n,",").concat(r+u*b,` + L `).concat(t+n,",").concat(r+i-u*b,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t+n-f*b,",").concat(r+i,` + L `).concat(t+f*b,",").concat(r+i,` + A `).concat(b,",").concat(b,",0,0,").concat(c,",").concat(t,",").concat(r+i-u*b," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(i," h ").concat(-n," Z");return d},MY=function(t,r){if(!t||!r)return!1;var n=t.x,i=t.y,a=r.x,s=r.y,u=r.width,f=r.height;if(Math.abs(u)>0&&Math.abs(f)>0){var c=Math.min(a,a+u),d=Math.max(a,a+u),h=Math.min(s,s+f),m=Math.max(s,s+f);return n>=c&&n<=d&&i>=h&&i<=m}return!1},IY={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Jw=function(t){var r=pC(pC({},IY),t),n=P.useRef(),i=P.useState(-1),a=EY(i,2),s=a[0],u=a[1];P.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var C=n.current.getTotalLength();C&&u(C)}catch{}},[]);var f=r.x,c=r.y,d=r.width,h=r.height,m=r.radius,g=r.className,b=r.animationEasing,y=r.animationDuration,w=r.animationBegin,S=r.isAnimationActive,O=r.isUpdateAnimationActive;if(f!==+f||c!==+c||d!==+d||h!==+h||d===0||h===0)return null;var E=Ue("recharts-rectangle",g);return O?z.createElement(Fn,{canBegin:s>0,from:{width:d,height:h,x:f,y:c},to:{width:d,height:h,x:f,y:c},duration:y,animationEasing:b,isActive:O},function(C){var A=C.width,N=C.height,T=C.x,R=C.y;return z.createElement(Fn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,isActive:S,easing:b},z.createElement("path",gh({},Me(r,!0),{className:E,d:mC(T,R,A,N,m),ref:n})))}):z.createElement("path",gh({},Me(r,!0),{className:E,d:mC(f,c,d,h,m)}))},DY=["points","className","baseLinePoints","connectNulls"];function Ho(){return Ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $Y(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vC(e){return qY(e)||FY(e)||zY(e)||BY()}function BY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zY(e,t){if(e){if(typeof e=="string")return l1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l1(e,t)}}function FY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qY(e){if(Array.isArray(e))return l1(e)}function l1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&arguments[0]!==void 0?arguments[0]:[],r=[[]];return t.forEach(function(n){gC(n)?r[r.length-1].push(n):r[r.length-1].length>0&&r.push([])}),gC(t[0])&&r[r.length-1].push(t[0]),r[r.length-1].length<=0&&(r=r.slice(0,-1)),r},ac=function(t,r){var n=UY(t);r&&(n=[n.reduce(function(a,s){return[].concat(vC(a),vC(s))},[])]);var i=n.map(function(a){return a.reduce(function(s,u,f){return"".concat(s).concat(f===0?"M":"L").concat(u.x,",").concat(u.y)},"")}).join("");return n.length===1?"".concat(i,"Z"):i},WY=function(t,r,n){var i=ac(t,n);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(ac(r.reverse(),n).slice(1))},HY=function(t){var r=t.points,n=t.className,i=t.baseLinePoints,a=t.connectNulls,s=LY(t,DY);if(!r||!r.length)return null;var u=Ue("recharts-polygon",n);if(i&&i.length){var f=s.stroke&&s.stroke!=="none",c=WY(r,i,a);return z.createElement("g",{className:u},z.createElement("path",Ho({},Me(s,!0),{fill:c.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:c})),f?z.createElement("path",Ho({},Me(s,!0),{fill:"none",d:ac(r,a)})):null,f?z.createElement("path",Ho({},Me(s,!0),{fill:"none",d:ac(i,a)})):null)}var d=ac(r,a);return z.createElement("path",Ho({},Me(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",className:u,d}))};function c1(){return c1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZY(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var JY=function(t,r,n,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(r,"h").concat(n)},eQ=function(t){var r=t.x,n=r===void 0?0:r,i=t.y,a=i===void 0?0:i,s=t.top,u=s===void 0?0:s,f=t.left,c=f===void 0?0:f,d=t.width,h=d===void 0?0:d,m=t.height,g=m===void 0?0:m,b=t.className,y=QY(t,VY),w=GY({x:n,y:a,top:u,left:c,width:h,height:g},y);return!he(n)||!he(a)||!he(h)||!he(g)||!he(u)||!he(c)?null:z.createElement("path",u1({},Me(w,!0),{className:Ue("recharts-cross",b),d:JY(n,a,h,g,u,c)}))},Ox,xC;function tQ(){if(xC)return Ox;xC=1;var e=vp(),t=II(),r=Vn();function n(i,a){return i&&i.length?e(i,r(a,2),t):void 0}return Ox=n,Ox}var rQ=tQ();const nQ=it(rQ);var jx,bC;function iQ(){if(bC)return jx;bC=1;var e=vp(),t=Vn(),r=DI();function n(i,a){return i&&i.length?e(i,t(a,2),r):void 0}return jx=n,jx}var aQ=iQ();const oQ=it(aQ);var sQ=["cx","cy","angle","ticks","axisLine"],lQ=["ticks","tick","angle","tickFormatter","stroke"];function ms(e){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function oc(){return oc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function uQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SC(e,t){for(var r=0;rEC?s=i==="outer"?"start":"end":a<-EC?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var n=this.props,i=n.cx,a=n.cy,s=n.radius,u=n.axisLine,f=n.axisLineType,c=Sa(Sa({},Me(this.props,!1)),{},{fill:"none"},Me(u,!1));if(f==="circle")return z.createElement(wp,Pa({className:"recharts-polar-angle-axis-line"},c,{cx:i,cy:a,r:s}));var d=this.props.ticks,h=d.map(function(m){return mt(i,a,s,m.coordinate)});return z.createElement(HY,Pa({className:"recharts-polar-angle-axis-line"},c,{points:h}))}},{key:"renderTicks",value:function(){var n=this,i=this.props,a=i.ticks,s=i.tick,u=i.tickLine,f=i.tickFormatter,c=i.stroke,d=Me(this.props,!1),h=Me(s,!1),m=Sa(Sa({},d),{},{fill:"none"},Me(u,!1)),g=a.map(function(b,y){var w=n.getTickLineCoord(b),S=n.getTickTextAnchor(b),O=Sa(Sa(Sa({textAnchor:S},d),{},{stroke:"none",fill:c},h),{},{index:y,payload:b,x:w.x2,y:w.y2});return z.createElement(Ze,Pa({className:Ue("recharts-polar-angle-axis-tick",uD(s)),key:"tick-".concat(b.coordinate)},La(n.props,b,y)),u&&z.createElement("line",Pa({className:"recharts-polar-angle-axis-tick-line"},m,w)),s&&t.renderTickItem(s,O,f?f(b.value,y):b.value))});return z.createElement(Ze,{className:"recharts-polar-angle-axis-ticks"},g)}},{key:"render",value:function(){var n=this.props,i=n.ticks,a=n.radius,s=n.axisLine;return a<=0||!i||!i.length?null:z.createElement(Ze,{className:Ue("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(n,i,a){var s;return z.isValidElement(n)?s=z.cloneElement(n,i):ze(n)?s=n(i):s=z.createElement($a,Pa({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])})(P.PureComponent);Op(jp,"displayName","PolarAngleAxis");Op(jp,"axisType","angleAxis");Op(jp,"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 Ex,AC;function jQ(){if(AC)return Ex;AC=1;var e=IM(),t=e(Object.getPrototypeOf,Object);return Ex=t,Ex}var Ax,PC;function EQ(){if(PC)return Ax;PC=1;var e=yi(),t=jQ(),r=xi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,f=s.call(Object);function c(d){if(!r(d)||e(d)!=n)return!1;var h=t(d);if(h===null)return!0;var m=u.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&s.call(m)==f}return Ax=c,Ax}var AQ=EQ();const PQ=it(AQ);var Px,NC;function NQ(){if(NC)return Px;NC=1;var e=yi(),t=xi(),r="[object Boolean]";function n(i){return i===!0||i===!1||t(i)&&e(i)==r}return Px=n,Px}var CQ=NQ();const TQ=it(CQ);function $c(e){"@babel/helpers - typeof";return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,from:{upperWidth:0,lowerWidth:0,height:m,x:f,y:c},to:{upperWidth:d,lowerWidth:h,height:m,x:f,y:c},duration:y,animationEasing:b,isActive:S},function(E){var C=E.upperWidth,A=E.lowerWidth,N=E.height,T=E.x,R=E.y;return z.createElement(Fn,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:w,duration:y,easing:b},z.createElement("path",bh({},Me(r,!0),{className:O,d:RC(T,R,C,A,N),ref:n})))}):z.createElement("g",null,z.createElement("path",bh({},Me(r,!0),{className:O,d:RC(f,c,d,h,m)})))},qQ=["option","shapeType","propTransformer","activeClassName","isActive"];function Bc(e){"@babel/helpers - typeof";return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function UQ(e,t){if(e==null)return{};var r=WQ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WQ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function MC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function wh(e){for(var t=1;t0?zr(E,"paddingAngle",0):0;if(A){var T=Lr(A.endAngle-A.startAngle,E.endAngle-E.startAngle),R=ht(ht({},E),{},{startAngle:O+N,endAngle:O+T(y)+N});w.push(R),O=R.endAngle}else{var I=E.endAngle,q=E.startAngle,L=Lr(0,I-q),D=L(y),U=ht(ht({},E),{},{startAngle:O+N,endAngle:O+D+N});w.push(U),O=U.endAngle}}),z.createElement(Ze,null,n.renderSectorsStatically(w))})}},{key:"attachKeyboardHandlers",value:function(n){var i=this;n.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var u=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[u].focus(),i.setState({sectorToFocus:u});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var n=this.props,i=n.sectors,a=n.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!ru(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var n=this,i=this.props,a=i.hide,s=i.sectors,u=i.className,f=i.label,c=i.cx,d=i.cy,h=i.innerRadius,m=i.outerRadius,g=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!s||!s.length||!he(c)||!he(d)||!he(h)||!he(m))return null;var y=Ue("recharts-pie",u);return z.createElement(Ze,{tabIndex:this.props.rootTabIndex,className:y,ref:function(S){n.pieRef=S}},this.renderSectors(),f&&this.renderLabels(s),Vt.renderCallByParent(this.props,null,!1),(!g||b)&&fi.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return i.prevIsAnimationActive!==n.isAnimationActive?{prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:[],isAnimationFinished:!0}:n.isAnimationActive&&n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curSectors:n.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:n.sectors!==i.curSectors?{curSectors:n.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(n,i){return n>i?"start":n=360?O:O-1)*f,C=w-O*g-E,A=i.reduce(function(R,I){var q=Bt(I,S,0);return R+(he(q)?q:0)},0),N;if(A>0){var T;N=i.map(function(R,I){var q=Bt(R,S,0),L=Bt(R,d,I),D=(he(q)?q:0)/A,U;I?U=T.endAngle+cr(y)*f*(q!==0?1:0):U=s;var H=U+cr(y)*((q!==0?g:0)+D*C),V=(U+H)/2,K=(b.innerRadius+b.outerRadius)/2,X=[{name:L,value:q,payload:R,dataKey:S,type:m}],B=mt(b.cx,b.cy,K,V);return T=ht(ht(ht({percent:D,cornerRadius:a,name:L,tooltipPayload:X,midAngle:V,middleRadius:K,tooltipPosition:B},R),b),{},{value:Bt(R,S),startAngle:U,endAngle:H,payload:R,paddingAngle:cr(y)*f}),T})}return ht(ht({},b),{},{sectors:N,data:i})});var Nx,$C;function fZ(){if($C)return Nx;$C=1;var e=Math.ceil,t=Math.max;function r(n,i,a,s){for(var u=-1,f=t(e((i-n)/(a||1)),0),c=Array(f);f--;)c[s?f:++u]=n,n+=a;return c}return Nx=r,Nx}var Cx,BC;function PD(){if(BC)return Cx;BC=1;var e=QM(),t=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*r}return i===i?i:0}return Cx=n,Cx}var Tx,zC;function dZ(){if(zC)return Tx;zC=1;var e=fZ(),t=lp(),r=PD();function n(i){return function(a,s,u){return u&&typeof u!="number"&&t(a,s,u)&&(s=u=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),u=u===void 0?a0&&n.handleDrag(i.changedTouches[0])}),Rr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=n.props,a=i.endIndex,s=i.onDragEnd,u=i.startIndex;s?.({endIndex:a,startIndex:u})}),n.detachDragEndListener()}),Rr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Rr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Rr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Rr(n,"handleSlideDragStart",function(i){var a=VC(i)?i.changedTouches[0]:i;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return OZ(t,e),bZ(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var i=n.startX,a=n.endX,s=this.state.scaleValues,u=this.props,f=u.gap,c=u.data,d=c.length-1,h=Math.min(i,a),m=Math.max(i,a),g=t.getIndexInRange(s,h),b=t.getIndexInRange(s,m);return{startIndex:g-g%f,endIndex:b===d?d:b-b%f}}},{key:"getTextOfTick",value:function(n){var i=this.props,a=i.data,s=i.tickFormatter,u=i.dataKey,f=Bt(a[n],u,n);return ze(s)?s(f,n):f}},{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(n){var i=this.state,a=i.slideMoveStartX,s=i.startX,u=i.endX,f=this.props,c=f.x,d=f.width,h=f.travellerWidth,m=f.startIndex,g=f.endIndex,b=f.onChange,y=n.pageX-a;y>0?y=Math.min(y,c+d-h-u,c+d-h-s):y<0&&(y=Math.max(y,c-s,c-u));var w=this.getIndex({startX:s+y,endX:u+y});(w.startIndex!==m||w.endIndex!==g)&&b&&b(w),this.setState({startX:s+y,endX:u+y,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,i){var a=VC(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,u=i.endX,f=i.startX,c=this.state[s],d=this.props,h=d.x,m=d.width,g=d.travellerWidth,b=d.onChange,y=d.gap,w=d.data,S={startX:this.state.startX,endX:this.state.endX},O=n.pageX-a;O>0?O=Math.min(O,h+m-g-c):O<0&&(O=Math.max(O,h-c)),S[s]=c+O;var E=this.getIndex(S),C=E.startIndex,A=E.endIndex,N=function(){var R=w.length-1;return s==="startX"&&(u>f?C%y===0:A%y===0)||uf?A%y===0:C%y===0)||u>f&&A===R};this.setState(Rr(Rr({},s,c+O),"brushMoveStartX",n.pageX),function(){b&&N()&&b(E)})}},{key:"handleTravellerMoveKeyboard",value:function(n,i){var a=this,s=this.state,u=s.scaleValues,f=s.startX,c=s.endX,d=this.state[i],h=u.indexOf(d);if(h!==-1){var m=h+n;if(!(m===-1||m>=u.length)){var g=u[m];i==="startX"&&g>=c||i==="endX"&&g<=f||this.setState(Rr({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,f=n.fill,c=n.stroke;return z.createElement("rect",{stroke:c,fill:f,x:i,y:a,width:s,height:u})}},{key:"renderPanorama",value:function(){var n=this.props,i=n.x,a=n.y,s=n.width,u=n.height,f=n.data,c=n.children,d=n.padding,h=P.Children.only(c);return h?z.cloneElement(h,{x:i,y:a,width:s,height:u,margin:d,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(n,i){var a,s,u=this,f=this.props,c=f.y,d=f.travellerWidth,h=f.height,m=f.traveller,g=f.ariaLabel,b=f.data,y=f.startIndex,w=f.endIndex,S=Math.max(n,this.props.x),O=Rx(Rx({},Me(this.props,!1)),{},{x:S,y:c,width:d,height:h}),E=g||"Min value: ".concat((a=b[y])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=b[w])===null||s===void 0?void 0:s.name);return z.createElement(Ze,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(A){["ArrowLeft","ArrowRight"].includes(A.key)&&(A.preventDefault(),A.stopPropagation(),u.handleTravellerMoveKeyboard(A.key==="ArrowRight"?1:-1,i))},onFocus:function(){u.setState({isTravellerFocused:!0})},onBlur:function(){u.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,O))}},{key:"renderSlide",value:function(n,i){var a=this.props,s=a.y,u=a.height,f=a.stroke,c=a.travellerWidth,d=Math.min(n,i)+c,h=Math.max(Math.abs(i-n)-c,0);return z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:d,y:s,width:h,height:u})}},{key:"renderText",value:function(){var n=this.props,i=n.startIndex,a=n.endIndex,s=n.y,u=n.height,f=n.travellerWidth,c=n.stroke,d=this.state,h=d.startX,m=d.endX,g=5,b={pointerEvents:"none",fill:c};return z.createElement(Ze,{className:"recharts-brush-texts"},z.createElement($a,Oh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:s+u/2},b),this.getTextOfTick(i)),z.createElement($a,Oh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+f+g,y:s+u/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var n=this.props,i=n.data,a=n.className,s=n.children,u=n.x,f=n.y,c=n.width,d=n.height,h=n.alwaysShowText,m=this.state,g=m.startX,b=m.endX,y=m.isTextActive,w=m.isSlideMoving,S=m.isTravellerMoving,O=m.isTravellerFocused;if(!i||!i.length||!he(u)||!he(f)||!he(c)||!he(d)||c<=0||d<=0)return null;var E=Ue("recharts-brush",a),C=z.Children.count(s)===1,A=yZ("userSelect","none");return z.createElement(Ze,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:A},this.renderBackground(),C&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(y||w||S||O||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var i=n.x,a=n.y,s=n.width,u=n.height,f=n.stroke,c=Math.floor(a+u/2)-1;return z.createElement(z.Fragment,null,z.createElement("rect",{x:i,y:a,width:s,height:u,fill:f,stroke:"none"}),z.createElement("line",{x1:i+1,y1:c,x2:i+s-1,y2:c,fill:"none",stroke:"#fff"}),z.createElement("line",{x1:i+1,y1:c+2,x2:i+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,i){var a;return z.isValidElement(n)?a=z.cloneElement(n,i):ze(n)?a=n(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(n,i){var a=n.data,s=n.width,u=n.x,f=n.travellerWidth,c=n.updateId,d=n.startIndex,h=n.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return Rx({prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:u,prevWidth:s},a&&a.length?EZ({data:a,width:s,x:u,travellerWidth:f,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||u!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([u,u+s-f]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:f,prevUpdateId:c,prevX:u,prevWidth:s,startX:i.scale(n.startIndex),endX:i.scale(n.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(n,i){for(var a=n.length,s=0,u=a-1;u-s>1;){var f=Math.floor((s+u)/2);n[f]>i?u=f:s=f}return i>=n[u]?u:s}}])})(P.PureComponent);Rr(xs,"displayName","Brush");Rr(xs,"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 Mx,GC;function AZ(){if(GC)return Mx;GC=1;var e=jw();function t(r,n){var i;return e(r,function(a,s,u){return i=n(a,s,u),!i}),!!i}return Mx=t,Mx}var Ix,KC;function PZ(){if(KC)return Ix;KC=1;var e=PM(),t=Vn(),r=AZ(),n=Sr(),i=lp();function a(s,u,f){var c=n(s)?e:r;return f&&i(s,u,f)&&(u=void 0),c(s,t(u,3))}return Ix=a,Ix}var NZ=PZ();const CZ=it(NZ);var $n=function(t,r){var n=t.alwaysShow,i=t.ifOverflow;return n&&(i="extendDomain"),i===r},Dx,XC;function TZ(){if(XC)return Dx;XC=1;var e=VM();function t(r,n,i){n=="__proto__"&&e?e(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Dx=t,Dx}var Lx,YC;function kZ(){if(YC)return Lx;YC=1;var e=TZ(),t=WM(),r=Vn();function n(i,a){var s={};return a=r(a,3),t(i,function(u,f,c){e(s,f,a(u,f,c))}),s}return Lx=n,Lx}var RZ=kZ();const MZ=it(RZ);var $x,QC;function IZ(){if(QC)return $x;QC=1;function e(t,r){for(var n=-1,i=t==null?0:t.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function WZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function HZ(e,t){var r=e.x,n=e.y,i=UZ(e,BZ),a="".concat(r),s=parseInt(a,10),u="".concat(n),f=parseInt(u,10),c="".concat(t.height||i.height),d=parseInt(c,10),h="".concat(t.width||i.width),m=parseInt(h,10);return ql(ql(ql(ql(ql({},t),i),s?{x:s}:{}),f?{y:f}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function tT(e){return z.createElement(jD,m1({shapeType:"rectangle",propTransformer:HZ,activeClassName:"recharts-active-bar"},e))}var VZ=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,i){if(typeof t=="number")return t;var a=he(n)||dF(n);return a?t(n,i):(a||za(),r)}},GZ=["value","background"],RD;function bs(e){"@babel/helpers - typeof";return bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bs(e)}function KZ(e,t){if(e==null)return{};var r=XZ(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function XZ(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(V)0&&Math.abs(H)0&&(U=Math.min((ae||0)-(H[pe-1]||0),U))}),Number.isFinite(U)){var V=U/D,K=y.layout==="vertical"?n.height:n.width;if(y.padding==="gap"&&(T=V*K/2),y.padding==="no-gap"){var X=ur(t.barCategoryGap,V*K),B=V*K/2;T=B-X-(B-X)/K*X}}}i==="xAxis"?R=[n.left+(E.left||0)+(T||0),n.left+n.width-(E.right||0)-(T||0)]:i==="yAxis"?R=f==="horizontal"?[n.top+n.height-(E.bottom||0),n.top+(E.top||0)]:[n.top+(E.top||0)+(T||0),n.top+n.height-(E.bottom||0)-(T||0)]:R=y.range,A&&(R=[R[1],R[0]]);var Z=nD(y,a,m),ee=Z.scale,M=Z.realScaleType;ee.domain(S).range(R),iD(ee);var $=aD(ee,bn(bn({},y),{},{realScaleType:M}));i==="xAxis"?(L=w==="top"&&!C||w==="bottom"&&C,I=n.left,q=h[N]-L*y.height):i==="yAxis"&&(L=w==="left"&&!C||w==="right"&&C,I=h[N]-L*y.width,q=n.top);var Q=bn(bn(bn({},y),$),{},{realScaleType:M,x:I,y:q,scale:ee,width:i==="xAxis"?n.width:y.width,height:i==="yAxis"?n.height:y.height});return Q.bandSize=ch(Q,$),!y.hide&&i==="xAxis"?h[N]+=(L?-1:1)*Q.height:y.hide||(h[N]+=(L?-1:1)*Q.width),bn(bn({},g),{},Pp({},b,Q))},{})},$D=function(t,r){var n=t.x,i=t.y,a=r.x,s=r.y;return{x:Math.min(n,a),y:Math.min(i,s),width:Math.abs(a-n),height:Math.abs(s-i)}},oJ=function(t){var r=t.x1,n=t.y1,i=t.x2,a=t.y2;return $D({x:r,y:n},{x:i,y:a})},BD=(function(){function e(t){nJ(this,e),this.scale=t}return iJ(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.bandAware,a=n.position;if(r!==void 0){if(a)switch(a){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var u=this.bandwidth?this.bandwidth():0;return this.scale(r)+u}default:return this.scale(r)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+f}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),i=n[0],a=n[n.length-1];return i<=a?r>=i&&r<=a:r>=a&&r<=i}}],[{key:"create",value:function(r){return new e(r)}}])})();Pp(BD,"EPS",1e-4);var e_=function(t){var r=Object.keys(t).reduce(function(n,i){return bn(bn({},n),{},Pp({},i,BD.create(t[i])))},{});return bn(bn({},r),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,u=a.position;return MZ(i,function(f,c){return r[c].apply(f,{bandAware:s,position:u})})},isInRange:function(i){return kD(i,function(a,s){return r[s].isInRange(a)})}})};function sJ(e){return(e%180+180)%180}var lJ=function(t){var r=t.width,n=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=sJ(i),s=a*Math.PI/180,u=Math.atan(n/r),f=s>u&&s-1?f[c?a[d]:d]:void 0}}return Fx=n,Fx}var qx,sT;function uJ(){if(sT)return qx;sT=1;var e=PD();function t(r){var n=e(r),i=n%1;return n===n?i?n-i:n:0}return qx=t,qx}var Ux,lT;function fJ(){if(lT)return Ux;lT=1;var e=BM(),t=Vn(),r=uJ(),n=Math.max;function i(a,s,u){var f=a==null?0:a.length;if(!f)return-1;var c=u==null?0:r(u);return c<0&&(c=n(f+c,0)),e(a,t(s,3),c)}return Ux=i,Ux}var Wx,cT;function dJ(){if(cT)return Wx;cT=1;var e=cJ(),t=fJ(),r=e(t);return Wx=r,Wx}var hJ=dJ();const pJ=it(hJ);var mJ=tM();const vJ=it(mJ);var gJ=vJ(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("")}),t_=P.createContext(void 0),r_=P.createContext(void 0),zD=P.createContext(void 0),FD=P.createContext({}),qD=P.createContext(void 0),UD=P.createContext(0),WD=P.createContext(0),uT=function(t){var r=t.state,n=r.xAxisMap,i=r.yAxisMap,a=r.offset,s=t.clipPathId,u=t.children,f=t.width,c=t.height,d=gJ(a);return z.createElement(t_.Provider,{value:n},z.createElement(r_.Provider,{value:i},z.createElement(FD.Provider,{value:a},z.createElement(zD.Provider,{value:d},z.createElement(qD.Provider,{value:s},z.createElement(UD.Provider,{value:c},z.createElement(WD.Provider,{value:f},u)))))))},yJ=function(){return P.useContext(qD)},HD=function(t){var r=P.useContext(t_);r==null&&za();var n=r[t];return n==null&&za(),n},xJ=function(){var t=P.useContext(t_);return Wi(t)},bJ=function(){var t=P.useContext(r_),r=pJ(t,function(n){return kD(n.domain,Number.isFinite)});return r||Wi(t)},VD=function(t){var r=P.useContext(r_);r==null&&za();var n=r[t];return n==null&&za(),n},wJ=function(){var t=P.useContext(zD);return t},_J=function(){return P.useContext(FD)},n_=function(){return P.useContext(WD)},i_=function(){return P.useContext(UD)};function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function SJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OJ(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);re*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function aee(e,t){return JD(e,t+1)}function oee(e,t,r,n,i){for(var a=(n||[]).slice(),s=t.start,u=t.end,f=0,c=1,d=s,h=function(){var b=n?.[f];if(b===void 0)return{v:JD(n,c)};var y=f,w,S=function(){return w===void 0&&(w=r(b,y)),w},O=b.coordinate,E=f===0||Th(e,O,S,d,u);E||(f=0,d=s,c+=1),E&&(d=O+e*(S()/2+i),f+=c)},m;c<=a.length;)if(m=h(),m)return m.v;return[]}function Wc(e){"@babel/helpers - typeof";return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}function yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nr(e){for(var t=1;t0?g.coordinate-w*e:g.coordinate})}else a[m]=g=nr(nr({},g),{},{tickCoord:g.coordinate});var S=Th(e,g.tickCoord,y,u,f);S&&(f=g.tickCoord-e*(y()/2+i),a[m]=nr(nr({},g),{},{isShow:!0}))},d=s-1;d>=0;d--)c(d);return a}function fee(e,t,r,n,i,a){var s=(n||[]).slice(),u=s.length,f=t.start,c=t.end;if(a){var d=n[u-1],h=r(d,u-1),m=e*(d.coordinate+e*h/2-c);s[u-1]=d=nr(nr({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate});var g=Th(e,d.tickCoord,function(){return h},f,c);g&&(c=d.tickCoord-e*(h/2+i),s[u-1]=nr(nr({},d),{},{isShow:!0}))}for(var b=a?u-1:u,y=function(O){var E=s[O],C,A=function(){return C===void 0&&(C=r(E,O)),C};if(O===0){var N=e*(E.coordinate-e*A()/2-f);s[O]=E=nr(nr({},E),{},{tickCoord:N<0?E.coordinate-N*e:E.coordinate})}else s[O]=E=nr(nr({},E),{},{tickCoord:E.coordinate});var T=Th(e,E.tickCoord,A,f,c);T&&(f=E.tickCoord+e*(A()/2+i),s[O]=nr(nr({},E),{},{isShow:!0}))},w=0;w=2?cr(i[1].coordinate-i[0].coordinate):1,S=iee(a,w,g);return f==="equidistantPreserveStart"?oee(w,S,y,i,s):(f==="preserveStart"||f==="preserveStartEnd"?m=fee(w,S,y,i,s,f==="preserveStartEnd"):m=uee(w,S,y,i,s),m.filter(function(O){return O.isShow}))}var dee=["viewBox"],hee=["viewBox"],pee=["ticks"];function Os(e){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function Go(){return Go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function vee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bT(e,t){for(var r=0;r0?f(this.props):f(g)),s<=0||u<=0||!b||!b.length?null:z.createElement(Ze,{className:Ue("recharts-cartesian-axis",c),ref:function(w){n.layerReference=w}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Vt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,i,a){var s,u=Ue(i.className,"recharts-cartesian-axis-tick-value");return z.isValidElement(n)?s=z.cloneElement(n,Lt(Lt({},i),{},{className:u})):ze(n)?s=n(Lt(Lt({},i),{},{className:u})):s=z.createElement($a,Go({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])})(P.Component);l_(Fs,"displayName","CartesianAxis");l_(Fs,"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 See=["x1","y1","x2","y2","key"],Oee=["offset"];function Fa(e){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fa(e)}function wT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ir(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Pee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Nee=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,i=t.x,a=t.y,s=t.width,u=t.height,f=t.ry;return z.createElement("rect",{x:i,y:a,ry:f,width:s,height:u,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function rL(e,t){var r;if(z.isValidElement(e))r=z.cloneElement(e,t);else if(ze(e))r=e(t);else{var n=t.x1,i=t.y1,a=t.x2,s=t.y2,u=t.key,f=_T(t,See),c=Me(f,!1);c.offset;var d=_T(c,Oee);r=z.createElement("line",ka({},d,{x1:n,y1:i,x2:a,y2:s,fill:"none",key:u}))}return r}function Cee(e){var t=e.x,r=e.width,n=e.horizontal,i=n===void 0?!0:n,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(u,f){var c=ir(ir({},e),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(f),index:f});return rL(i,c)});return z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Tee(e){var t=e.y,r=e.height,n=e.vertical,i=n===void 0?!0:n,a=e.verticalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(u,f){var c=ir(ir({},e),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(f),index:f});return rL(i,c)});return z.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function kee(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,i=e.y,a=e.width,s=e.height,u=e.horizontalPoints,f=e.horizontal,c=f===void 0?!0:f;if(!c||!t||!t.length)return null;var d=u.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],y=b?i+s-m:d[g+1]-m;if(y<=0)return null;var w=g%t.length;return z.createElement("rect",{key:"react-".concat(g),y:m,x:n,height:y,width:a,stroke:"none",fill:t[w],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function Ree(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,i=e.fillOpacity,a=e.x,s=e.y,u=e.width,f=e.height,c=e.verticalPoints;if(!r||!n||!n.length)return null;var d=c.map(function(m){return Math.round(m+a-a)}).sort(function(m,g){return m-g});a!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],y=b?a+u-m:d[g+1]-m;if(y<=0)return null;var w=g%n.length;return z.createElement("rect",{key:"react-".concat(g),x:m,y:s,width:y,height:f,stroke:"none",fill:n[w],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var Mee=function(t,r){var n=t.xAxis,i=t.width,a=t.height,s=t.offset;return rD(s_(ir(ir(ir({},Fs.defaultProps),n),{},{ticks:li(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.left,s.left+s.width,r)},Iee=function(t,r){var n=t.yAxis,i=t.width,a=t.height,s=t.offset;return rD(s_(ir(ir(ir({},Fs.defaultProps),n),{},{ticks:li(n,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.top,s.top+s.height,r)},Ro={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Rh(e){var t,r,n,i,a,s,u=n_(),f=i_(),c=_J(),d=ir(ir({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ro.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:Ro.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:Ro.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ro.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Ro.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:Ro.verticalFill,x:he(e.x)?e.x:c.left,y:he(e.y)?e.y:c.top,width:he(e.width)?e.width:c.width,height:he(e.height)?e.height:c.height}),h=d.x,m=d.y,g=d.width,b=d.height,y=d.syncWithTicks,w=d.horizontalValues,S=d.verticalValues,O=xJ(),E=bJ();if(!he(g)||g<=0||!he(b)||b<=0||!he(h)||h!==+h||!he(m)||m!==+m)return null;var C=d.verticalCoordinatesGenerator||Mee,A=d.horizontalCoordinatesGenerator||Iee,N=d.horizontalPoints,T=d.verticalPoints;if((!N||!N.length)&&ze(A)){var R=w&&w.length,I=A({yAxis:E?ir(ir({},E),{},{ticks:R?w:E.ticks}):void 0,width:u,height:f,offset:c},R?!0:y);Sn(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Fa(I),"]")),Array.isArray(I)&&(N=I)}if((!T||!T.length)&&ze(C)){var q=S&&S.length,L=C({xAxis:O?ir(ir({},O),{},{ticks:q?S:O.ticks}):void 0,width:u,height:f,offset:c},q?!0:y);Sn(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Fa(L),"]")),Array.isArray(L)&&(T=L)}return z.createElement("g",{className:"recharts-cartesian-grid"},z.createElement(Nee,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),z.createElement(Cee,ka({},d,{offset:c,horizontalPoints:N,xAxis:O,yAxis:E})),z.createElement(Tee,ka({},d,{offset:c,verticalPoints:T,xAxis:O,yAxis:E})),z.createElement(kee,ka({},d,{horizontalPoints:N})),z.createElement(Ree,ka({},d,{verticalPoints:T})))}Rh.displayName="CartesianGrid";var Dee=["type","layout","connectNulls","ref"],Lee=["key"];function js(e){"@babel/helpers - typeof";return js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},js(e)}function ST(e,t){if(e==null)return{};var r=$ee(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $ee(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function sc(){return sc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);rh){g=[].concat(Mo(f.slice(0,b)),[h-y]);break}var w=g.length%2===0?[0,m]:[m];return[].concat(Mo(t.repeat(f,d)),Mo(g),w).map(function(S){return"".concat(S,"px")}).join(", ")}),wn(r,"id",Ds("recharts-line-")),wn(r,"pathRef",function(s){r.mainCurve=s}),wn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),wn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return Kee(t,e),Wee(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.points,u=a.xAxis,f=a.yAxis,c=a.layout,d=a.children,h=Fr(d,nu);if(!h)return null;var m=function(y,w){return{x:y.x,y:y.y,value:y.value,errorVal:Bt(y.payload,w)}},g={clipPath:n?"url(#clipPath-".concat(i,")"):null};return z.createElement(Ze,g,h.map(function(b){return z.cloneElement(b,{key:"bar-".concat(b.props.dataKey),data:s,xAxis:u,yAxis:f,layout:c,dataPointFormatter:m})}))}},{key:"renderDots",value:function(n,i,a){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var u=this.props,f=u.dot,c=u.points,d=u.dataKey,h=Me(this.props,!1),m=Me(f,!0),g=c.map(function(y,w){var S=kr(kr(kr({key:"dot-".concat(w),r:3},h),m),{},{index:w,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:c});return t.renderDotItem(f,S)}),b={clipPath:n?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return z.createElement(Ze,sc({className:"recharts-line-dots",key:"dots"},b),g)}},{key:"renderCurveStatically",value:function(n,i,a,s){var u=this.props,f=u.type,c=u.layout,d=u.connectNulls;u.ref;var h=ST(u,Dee),m=kr(kr(kr({},Me(h,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(a,")"):null,points:n},s),{},{type:f,layout:c,connectNulls:d});return z.createElement(dh,sc({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,i){var a=this,s=this.props,u=s.points,f=s.strokeDasharray,c=s.isAnimationActive,d=s.animationBegin,h=s.animationDuration,m=s.animationEasing,g=s.animationId,b=s.animateNewValues,y=s.width,w=s.height,S=this.state,O=S.prevPoints,E=S.totalLength;return z.createElement(Fn,{begin:d,duration:h,isActive:c,easing:m,from:{t:0},to:{t:1},key:"line-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var A=C.t;if(O){var N=O.length/u.length,T=u.map(function(D,U){var H=Math.floor(U*N);if(O[H]){var V=O[H],K=Lr(V.x,D.x),X=Lr(V.y,D.y);return kr(kr({},D),{},{x:K(A),y:X(A)})}if(b){var B=Lr(y*2,D.x),Z=Lr(w/2,D.y);return kr(kr({},D),{},{x:B(A),y:Z(A)})}return kr(kr({},D),{},{x:D.x,y:D.y})});return a.renderCurveStatically(T,n,i)}var R=Lr(0,E),I=R(A),q;if(f){var L="".concat(f).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});q=a.getStrokeDasharray(I,E,L)}else q=a.generateSimpleStrokeDasharray(E,I);return a.renderCurveStatically(u,n,i,{strokeDasharray:q})})}},{key:"renderCurve",value:function(n,i){var a=this.props,s=a.points,u=a.isAnimationActive,f=this.state,c=f.prevPoints,d=f.totalLength;return u&&s&&s.length&&(!c&&d>0||!ru(c,s))?this.renderCurveWithAnimation(n,i):this.renderCurveStatically(s,n,i)}},{key:"render",value:function(){var n,i=this.props,a=i.hide,s=i.dot,u=i.points,f=i.className,c=i.xAxis,d=i.yAxis,h=i.top,m=i.left,g=i.width,b=i.height,y=i.isAnimationActive,w=i.id;if(a||!u||!u.length)return null;var S=this.state.isAnimationFinished,O=u.length===1,E=Ue("recharts-line",f),C=c&&c.allowDataOverflow,A=d&&d.allowDataOverflow,N=C||A,T=qe(w)?this.id:w,R=(n=Me(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},I=R.r,q=I===void 0?3:I,L=R.strokeWidth,D=L===void 0?2:L,U=OF(s)?s:{},H=U.clipDot,V=H===void 0?!0:H,K=q*2+D;return z.createElement(Ze,{className:E},C||A?z.createElement("defs",null,z.createElement("clipPath",{id:"clipPath-".concat(T)},z.createElement("rect",{x:C?m:m-g/2,y:A?h:h-b/2,width:C?g:g*2,height:A?b:b*2})),!V&&z.createElement("clipPath",{id:"clipPath-dots-".concat(T)},z.createElement("rect",{x:m-K/2,y:h-K/2,width:g+K,height:b+K}))):null,!O&&this.renderCurve(N,T),this.renderErrorBar(N,T),(O||s)&&this.renderDots(N,V,T),(!y||S)&&fi.renderCallByParent(this.props,u))}}],[{key:"getDerivedStateFromProps",value:function(n,i){return n.animationId!==i.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:i.curPoints}:n.points!==i.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,i){for(var a=n.length%2!==0?[].concat(Mo(n),[0]):n,s=[],u=0;ue.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function $te(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Bte(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zte(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?s:t&&t.length&&he(i)&&he(a)?t.slice(i,a+1):[]};function gL(e){return e==="number"?[0,"auto"]:void 0}var M1=function(t,r,n,i){var a=t.graphicalItems,s=t.tooltipAxis,u=Rp(r,t);return n<0||!a||!a.length||n>=u.length?null:a.reduce(function(f,c){var d,h=(d=c.props.data)!==null&&d!==void 0?d:r;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(s.dataKey&&!s.allowDuplicatedCategory){var g=h===void 0?u:h;m=Dd(g,s.dataKey,i)}else m=h&&h[n]||u[n];return m?[].concat(Ns(f),[sD(c,m)]):f},[])},kT=function(t,r,n,i){var a=i||{x:t.chartX,y:t.chartY},s=Zte(a,n),u=t.orderedTooltipTicks,f=t.tooltipAxis,c=t.tooltipTicks,d=wG(s,u,c,f);if(d>=0&&c){var h=c[d]&&c[d].value,m=M1(t,r,d,h),g=Jte(n,u,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},ere=function(t,r){var n=r.axes,i=r.graphicalItems,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=tD(d,a);return n.reduce(function(b,y){var w,S=y.type.defaultProps!==void 0?ne(ne({},y.type.defaultProps),y.props):y.props,O=S.type,E=S.dataKey,C=S.allowDataOverflow,A=S.allowDuplicatedCategory,N=S.scale,T=S.ticks,R=S.includeHidden,I=S[s];if(b[I])return b;var q=Rp(t.data,{graphicalItems:i.filter(function($){var Q,ae=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s];return ae===I}),dataStartIndex:f,dataEndIndex:c}),L=q.length,D,U,H;Ete(S.domain,C,O)&&(D=Kb(S.domain,null,C),g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category")));var V=gL(O);if(!D||D.length===0){var K,X=(K=S.domain)!==null&&K!==void 0?K:V;if(E){if(D=nc(q,E,O),O==="category"&&g){var B=pF(D);A&&B?(U=D,D=Sh(0,L)):A||(D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0?$:[].concat(Ns($),[Q])},[]))}else if(O==="category")A?D=D.filter(function($){return $!==""&&!qe($)}):D=MN(X,D,y).reduce(function($,Q){return $.indexOf(Q)>=0||Q===""||qe(Q)?$:[].concat(Ns($),[Q])},[]);else if(O==="number"){var Z=EG(q,i.filter(function($){var Q,ae,pe=s in $.props?$.props[s]:(Q=$.type.defaultProps)===null||Q===void 0?void 0:Q[s],ye="hide"in $.props?$.props.hide:(ae=$.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return pe===I&&(R||!ye)}),E,a,d);Z&&(D=Z)}g&&(O==="number"||N!=="auto")&&(H=nc(q,E,"category"))}else g?D=Sh(0,L):u&&u[I]&&u[I].hasStack&&O==="number"?D=m==="expand"?[0,1]:oD(u[I].stackGroups,f,c):D=eD(q,i.filter(function($){var Q=s in $.props?$.props[s]:$.type.defaultProps[s],ae="hide"in $.props?$.props.hide:$.type.defaultProps.hide;return Q===I&&(R||!ae)}),O,d,!0);if(O==="number")D=T1(h,D,I,a,T),X&&(D=Kb(X,D,C));else if(O==="category"&&X){var ee=X,M=D.every(function($){return ee.indexOf($)>=0});M&&(D=ee)}}return ne(ne({},b),{},Le({},I,ne(ne({},S),{},{axisType:a,domain:D,categoricalDomain:H,duplicateDomain:U,originalDomain:(w=S.domain)!==null&&w!==void 0?w:V,isCategorical:g,layout:d})))},{})},tre=function(t,r){var n=r.graphicalItems,i=r.Axis,a=r.axisType,s=r.axisIdKey,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.layout,h=t.children,m=Rp(t.data,{graphicalItems:n,dataStartIndex:f,dataEndIndex:c}),g=m.length,b=tD(d,a),y=-1;return n.reduce(function(w,S){var O=S.type.defaultProps!==void 0?ne(ne({},S.type.defaultProps),S.props):S.props,E=O[s],C=gL("number");if(!w[E]){y++;var A;return b?A=Sh(0,g):u&&u[E]&&u[E].hasStack?(A=oD(u[E].stackGroups,f,c),A=T1(h,A,E,a)):(A=Kb(C,eD(m,n.filter(function(N){var T,R,I=s in N.props?N.props[s]:(T=N.type.defaultProps)===null||T===void 0?void 0:T[s],q="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return I===E&&!q}),"number",d),i.defaultProps.allowDataOverflow),A=T1(h,A,E,a)),ne(ne({},w),{},Le({},E,ne(ne({axisType:a},i.defaultProps),{},{hide:!0,orientation:zr(Yte,"".concat(a,".").concat(y%2),null),domain:A,originalDomain:C,isCategorical:b,layout:d})))}return w},{})},rre=function(t,r){var n=r.axisType,i=n===void 0?"xAxis":n,a=r.AxisComp,s=r.graphicalItems,u=r.stackGroups,f=r.dataStartIndex,c=r.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Fr(d,a),g={};return m&&m.length?g=ere(t,{axes:m,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c}):s&&s.length&&(g=tre(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:h,stackGroups:u,dataStartIndex:f,dataEndIndex:c})),g},nre=function(t){var r=Wi(t),n=li(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:Ew(n,function(i){return i.coordinate}),tooltipAxis:r,tooltipAxisBandSize:ch(r,n)}},RT=function(t){var r=t.children,n=t.defaultShowTooltip,i=Mr(r,xs),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},ire=function(t){return!t||!t.length?!1:t.some(function(r){var n=ci(r&&r.type);return n&&n.indexOf("Bar")>=0})},MT=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},are=function(t,r){var n=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,u=t.yAxisMap,f=u===void 0?{}:u,c=n.width,d=n.height,h=n.children,m=n.margin||{},g=Mr(h,xs),b=Mr(h,Qo),y=Object.keys(f).reduce(function(A,N){var T=f[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,A[R]+T.width)):A},{left:m.left||0,right:m.right||0}),w=Object.keys(s).reduce(function(A,N){var T=s[N],R=T.orientation;return!T.mirror&&!T.hide?ne(ne({},A),{},Le({},R,zr(A,"".concat(R))+T.height)):A},{top:m.top||0,bottom:m.bottom||0}),S=ne(ne({},w),y),O=S.bottom;g&&(S.bottom+=g.props.height||xs.defaultProps.height),b&&r&&(S=OG(S,i,n,r));var E=c-S.left-S.right,C=d-S.top-S.bottom;return ne(ne({brushBottom:O},S),{},{width:Math.max(E,0),height:Math.max(C,0)})},ore=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},c_=function(t){var r=t.chartName,n=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,u=s===void 0?["axis"]:s,f=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,O){var E=O.graphicalItems,C=O.stackGroups,A=O.offset,N=O.updateId,T=O.dataStartIndex,R=O.dataEndIndex,I=S.barSize,q=S.layout,L=S.barGap,D=S.barCategoryGap,U=S.maxBarSize,H=MT(q),V=H.numericAxisName,K=H.cateAxisName,X=ire(E),B=[];return E.forEach(function(Z,ee){var M=Rp(S.data,{graphicalItems:[Z],dataStartIndex:T,dataEndIndex:R}),$=Z.type.defaultProps!==void 0?ne(ne({},Z.type.defaultProps),Z.props):Z.props,Q=$.dataKey,ae=$.maxBarSize,pe=$["".concat(V,"Id")],ye=$["".concat(K,"Id")],oe={},me=f.reduce(function(Kt,Xt){var io=O["".concat(Xt.axisType,"Map")],Vs=$["".concat(Xt.axisType,"Id")];io&&io[Vs]||Xt.axisType==="zAxis"||za();var Gs=io[Vs];return ne(ne({},Kt),{},Le(Le({},Xt.axisType,Gs),"".concat(Xt.axisType,"Ticks"),li(Gs)))},oe),ie=me[K],ue=me["".concat(K,"Ticks")],ve=C&&C[pe]&&C[pe].hasStack&&IG(Z,C[pe].stackGroups),re=ci(Z.type).indexOf("Bar")>=0,De=ch(ie,ue),Te=[],Ke=X&&_G({barSize:I,stackGroups:C,totalSize:ore(me,K)});if(re){var lt,vt,dr=qe(ae)?U:ae,Or=(lt=(vt=ch(ie,ue,!0))!==null&&vt!==void 0?vt:dr)!==null&<!==void 0?lt:0;Te=SG({barGap:L,barCategoryGap:D,bandSize:Or!==De?Or:De,sizeList:Ke[ye],maxBarSize:dr}),Or!==De&&(Te=Te.map(function(Kt){return ne(ne({},Kt),{},{position:ne(ne({},Kt.position),{},{offset:Kt.position.offset-Or/2})})}))}var jr=Z&&Z.type&&Z.type.getComposedData;jr&&B.push({props:ne(ne({},jr(ne(ne({},me),{},{displayedData:M,props:S,dataKey:Q,item:Z,bandSize:De,barPosition:Te,offset:A,stackedData:ve,layout:q,dataStartIndex:T,dataEndIndex:R}))),{},Le(Le(Le({key:Z.key||"item-".concat(ee)},V,me[V]),K,me[K]),"animationId",N)),childIndex:AF(Z,S.children),item:Z})}),B},g=function(S,O){var E=S.props,C=S.dataStartIndex,A=S.dataEndIndex,N=S.updateId;if(!KE({props:E}))return null;var T=E.children,R=E.layout,I=E.stackOffset,q=E.data,L=E.reverseStackOrder,D=MT(R),U=D.numericAxisName,H=D.cateAxisName,V=Fr(T,n),K=RG(q,V,"".concat(U,"Id"),"".concat(H,"Id"),I,L),X=f.reduce(function($,Q){var ae="".concat(Q.axisType,"Map");return ne(ne({},$),{},Le({},ae,rre(E,ne(ne({},Q),{},{graphicalItems:V,stackGroups:Q.axisType===U&&K,dataStartIndex:C,dataEndIndex:A}))))},{}),B=are(ne(ne({},X),{},{props:E,graphicalItems:V}),O?.legendBBox);Object.keys(X).forEach(function($){X[$]=d(E,X[$],B,$.replace("Map",""),r)});var Z=X["".concat(H,"Map")],ee=nre(Z),M=m(E,ne(ne({},X),{},{dataStartIndex:C,dataEndIndex:A,updateId:N,graphicalItems:V,stackGroups:K,offset:B}));return ne(ne({formattedGraphicalItems:M,graphicalItems:V,offset:B,stackGroups:K},ee),X)},b=(function(w){function S(O){var E,C,A;return Bte(this,S),A=qte(this,S,[O]),Le(A,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(A,"accessibilityManager",new jte),Le(A,"handleLegendBBoxUpdate",function(N){if(N){var T=A.state,R=T.dataStartIndex,I=T.dataEndIndex,q=T.updateId;A.setState(ne({legendBBox:N},g({props:A.props,dataStartIndex:R,dataEndIndex:I,updateId:q},ne(ne({},A.state),{},{legendBBox:N}))))}}),Le(A,"handleReceiveSyncEvent",function(N,T,R){if(A.props.syncId===N){if(R===A.eventEmitterSymbol&&typeof A.props.syncMethod!="function")return;A.applySyncEvent(T)}}),Le(A,"handleBrushChange",function(N){var T=N.startIndex,R=N.endIndex;if(T!==A.state.dataStartIndex||R!==A.state.dataEndIndex){var I=A.state.updateId;A.setState(function(){return ne({dataStartIndex:T,dataEndIndex:R},g({props:A.props,dataStartIndex:T,dataEndIndex:R,updateId:I},A.state))}),A.triggerSyncEvent({dataStartIndex:T,dataEndIndex:R})}}),Le(A,"handleMouseEnter",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseEnter;ze(I)&&I(R,N)}}),Le(A,"triggeredAfterMouseMove",function(N){var T=A.getMouseInfo(N),R=T?ne(ne({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};A.setState(R),A.triggerSyncEvent(R);var I=A.props.onMouseMove;ze(I)&&I(R,N)}),Le(A,"handleItemMouseEnter",function(N){A.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),Le(A,"handleItemMouseLeave",function(){A.setState(function(){return{isTooltipActive:!1}})}),Le(A,"handleMouseMove",function(N){N.persist(),A.throttleTriggeredAfterMouseMove(N)}),Le(A,"handleMouseLeave",function(N){A.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};A.setState(T),A.triggerSyncEvent(T);var R=A.props.onMouseLeave;ze(R)&&R(T,N)}),Le(A,"handleOuterEvent",function(N){var T=EF(N),R=zr(A.props,"".concat(T));if(T&&ze(R)){var I,q;/.*touch.*/i.test(T)?q=A.getMouseInfo(N.changedTouches[0]):q=A.getMouseInfo(N),R((I=q)!==null&&I!==void 0?I:{},N)}}),Le(A,"handleClick",function(N){var T=A.getMouseInfo(N);if(T){var R=ne(ne({},T),{},{isTooltipActive:!0});A.setState(R),A.triggerSyncEvent(R);var I=A.props.onClick;ze(I)&&I(R,N)}}),Le(A,"handleMouseDown",function(N){var T=A.props.onMouseDown;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleMouseUp",function(N){var T=A.props.onMouseUp;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),Le(A,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseDown(N.changedTouches[0])}),Le(A,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&A.handleMouseUp(N.changedTouches[0])}),Le(A,"handleDoubleClick",function(N){var T=A.props.onDoubleClick;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"handleContextMenu",function(N){var T=A.props.onContextMenu;if(ze(T)){var R=A.getMouseInfo(N);T(R,N)}}),Le(A,"triggerSyncEvent",function(N){A.props.syncId!==void 0&&Gx.emit(Kx,A.props.syncId,N,A.eventEmitterSymbol)}),Le(A,"applySyncEvent",function(N){var T=A.props,R=T.layout,I=T.syncMethod,q=A.state.updateId,L=N.dataStartIndex,D=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)A.setState(ne({dataStartIndex:L,dataEndIndex:D},g({props:A.props,dataStartIndex:L,dataEndIndex:D,updateId:q},A.state)));else if(N.activeTooltipIndex!==void 0){var U=N.chartX,H=N.chartY,V=N.activeTooltipIndex,K=A.state,X=K.offset,B=K.tooltipTicks;if(!X)return;if(typeof I=="function")V=I(B,N);else if(I==="value"){V=-1;for(var Z=0;Z=0){var ve,re;if(U.dataKey&&!U.allowDuplicatedCategory){var De=typeof U.dataKey=="function"?ue:"payload.".concat(U.dataKey.toString());ve=Dd(Z,De,V),re=ee&&M&&Dd(M,De,V)}else ve=Z?.[H],re=ee&&M&&M[H];if(ye||pe){var Te=N.props.activeIndex!==void 0?N.props.activeIndex:H;return[P.cloneElement(N,ne(ne(ne({},I.props),me),{},{activeIndex:Te})),null,null]}if(!qe(ve))return[ie].concat(Ns(A.renderActivePoints({item:I,activePoint:ve,basePoint:re,childIndex:H,isRange:ee})))}else{var Ke,lt=(Ke=A.getItemByXY(A.state.activeCoordinate))!==null&&Ke!==void 0?Ke:{graphicalItem:ie},vt=lt.graphicalItem,dr=vt.item,Or=dr===void 0?N:dr,jr=vt.childIndex,Kt=ne(ne(ne({},I.props),me),{},{activeIndex:jr});return[P.cloneElement(Or,Kt),null,null]}return ee?[ie,null,null]:[ie,null]}),Le(A,"renderCustomized",function(N,T,R){return P.cloneElement(N,ne(ne({key:"recharts-customized-".concat(R)},A.props),A.state))}),Le(A,"renderMap",{CartesianGrid:{handler:Lf,once:!0},ReferenceArea:{handler:A.renderReferenceElement},ReferenceLine:{handler:Lf},ReferenceDot:{handler:A.renderReferenceElement},XAxis:{handler:Lf},YAxis:{handler:Lf},Brush:{handler:A.renderBrush,once:!0},Bar:{handler:A.renderGraphicChild},Line:{handler:A.renderGraphicChild},Area:{handler:A.renderGraphicChild},Radar:{handler:A.renderGraphicChild},RadialBar:{handler:A.renderGraphicChild},Scatter:{handler:A.renderGraphicChild},Pie:{handler:A.renderGraphicChild},Funnel:{handler:A.renderGraphicChild},Tooltip:{handler:A.renderCursor,once:!0},PolarGrid:{handler:A.renderPolarGrid,once:!0},PolarAngleAxis:{handler:A.renderPolarAxis},PolarRadiusAxis:{handler:A.renderPolarAxis},Customized:{handler:A.renderCustomized}}),A.clipPathId="".concat((E=O.id)!==null&&E!==void 0?E:Ds("recharts"),"-clip"),A.throttleTriggeredAfterMouseMove=ZM(A.triggeredAfterMouseMove,(C=O.throttleDelay)!==null&&C!==void 0?C:1e3/60),A.state={},A}return Hte(S,w),Fte(S,[{key:"componentDidMount",value:function(){var E,C;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,C=E.children,A=E.data,N=E.height,T=E.layout,R=Mr(C,Dr);if(R){var I=R.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var q=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,L=M1(this.state,A,I,q),D=this.state.tooltipTicks[I].coordinate,U=(this.state.offset.top+N)/2,H=T==="horizontal",V=H?{x:D,y:U}:{y:D,x:U},K=this.state.formattedGraphicalItems.find(function(B){var Z=B.item;return Z.type.name==="Scatter"});K&&(V=ne(ne({},V),K.props.points[I].tooltipPosition),L=K.props.points[I].tooltipPayload);var X={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:q,activePayload:L,activeCoordinate:V};this.setState(X),this.renderCursor(R),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,C){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==C.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){var A,N;this.accessibilityManager.setDetails({offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(E){vb([Mr(E.children,Dr)],[Mr(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=Mr(this.props.children,Dr);if(E&&typeof E.props.shared=="boolean"){var C=E.props.shared?"axis":"item";return u.indexOf(C)>=0?C:a}return a}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var C=this.container,A=C.getBoundingClientRect(),N=hU(A),T={chartX:Math.round(E.pageX-N.left),chartY:Math.round(E.pageY-N.top)},R=A.width/C.offsetWidth||1,I=this.inRange(T.chartX,T.chartY,R);if(!I)return null;var q=this.state,L=q.xAxisMap,D=q.yAxisMap,U=this.getTooltipEventType(),H=kT(this.state,this.props.data,this.props.layout,I);if(U!=="axis"&&L&&D){var V=Wi(L).scale,K=Wi(D).scale,X=V&&V.invert?V.invert(T.chartX):null,B=K&&K.invert?K.invert(T.chartY):null;return ne(ne({},T),{},{xValue:X,yValue:B},H)}return H?ne(ne({},T),H):null}},{key:"inRange",value:function(E,C){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,T=E/A,R=C/A;if(N==="horizontal"||N==="vertical"){var I=this.state.offset,q=T>=I.left&&T<=I.left+I.width&&R>=I.top&&R<=I.top+I.height;return q?{x:T,y:R}:null}var L=this.state,D=L.angleAxisMap,U=L.radiusAxisMap;if(D&&U){var H=Wi(D);return LN({x:T,y:R},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,C=this.getTooltipEventType(),A=Mr(E,Dr),N={};A&&C==="axis"&&(A.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=Ld(this.props,this.handleOuterEvent);return ne(ne({},T),N)}},{key:"addListener",value:function(){Gx.on(Kx,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Gx.removeListener(Kx,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,C,A){for(var N=this.state.formattedGraphicalItems,T=0,R=N.length;Tp.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-lg border border-gray-100 hover:bg-gray-100 transition-colors",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-600 font-bold text-xs",children:e.template.substring(0,2)}),p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-semibold text-gray-900",children:e.product}),p.jsxs("p",{className:"text-xs text-gray-500",children:[e.id," • ",e.user]})]})]}),p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx("span",{className:"text-xs text-gray-500 font-medium",children:e.time}),p.jsx(Rn,{variant:"secondary",className:e.status==="expired"?"bg-red-100 text-red-700":"bg-green-100 text-green-700",children:e.status})]})]},e.id))})})]})]}),p.jsx("div",{className:"space-y-6",children:p.jsxs(Ir,{className:"shadow-sm border-gray-200",children:[p.jsx(yn,{children:p.jsxs(xn,{className:"text-base font-bold text-gray-800 flex items-center gap-2",children:[p.jsx(ub,{className:"w-5 h-5 text-gray-500"}),"By Category"]})}),p.jsxs(tn,{children:[p.jsxs("div",{className:"h-[200px] relative",children:[p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(lre,{children:[p.jsx(wi,{data:Yx,cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",children:Yx.map((e,t)=>p.jsx(cp,{fill:e.color},`cell-${t}`))}),p.jsx(Dr,{})]})}),p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center flex-col pointer-events-none",children:[p.jsx("span",{className:"text-2xl font-bold text-gray-900",children:"1000"}),p.jsx("span",{className:"text-xs text-gray-500",children:"Total"})]})]}),p.jsx("div",{className:"mt-4 space-y-2",children:Yx.map(e=>p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:e.color}}),p.jsx("span",{className:"text-gray-600",children:e.name})]}),p.jsx("span",{className:"font-medium text-gray-900",children:e.value})]},e.name))})]})]})})]})]})}function Io({title:e,value:t,trend:r,trendUp:n,icon:i,color:a,bgColor:s}){return p.jsx(Ir,{className:"border-gray-200 shadow-sm hover:shadow-md transition-shadow",children:p.jsxs(tn,{className:"p-6",children:[p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("div",{children:[p.jsx("p",{className:"text-sm font-medium text-gray-500 mb-1",children:e}),p.jsx("h3",{className:"text-2xl font-bold text-gray-900",children:t})]}),p.jsx("div",{className:`p-2 rounded-lg ${s}`,children:p.jsx(i,{className:`w-5 h-5 ${a}`})})]}),p.jsxs("div",{className:"mt-4 flex items-center text-sm",children:[n?p.jsx(fR,{className:"w-4 h-4 text-green-500 mr-1"}):p.jsx(aB,{className:"w-4 h-4 text-red-500 mr-1"}),p.jsx("span",{className:n?"text-green-600 font-medium":"text-red-600 font-medium",children:r}),p.jsx("span",{className:"text-gray-400 ml-1",children:"Vs. last period"})]})]})})}function dre({title:e}){return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[1,2,3,4].map(t=>p.jsxs(Ir,{children:[p.jsx(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:p.jsxs(xn,{className:"text-sm font-medium",children:["Metric ",t]})}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"000"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+0.0% from last month"})]})]},t))}),p.jsx(Ir,{className:"min-h-[400px] flex items-center justify-center border-dashed",children:p.jsxs("div",{className:"text-center text-muted-foreground",children:[p.jsxs("h3",{className:"text-lg font-medium",children:[e," Module"]}),p.jsx("p",{children:"This module is currently under development."})]})})]})}function br({className:e,...t}){return p.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:p.jsx("table",{"data-slot":"table",className:Ie("w-full caption-bottom text-sm",e),...t})})}function wr({className:e,...t}){return p.jsx("thead",{"data-slot":"table-header",className:Ie("[&_tr]:border-b",e),...t})}function _r({className:e,...t}){return p.jsx("tbody",{"data-slot":"table-body",className:Ie("[&_tr:last-child]:border-0",e),...t})}function Qe({className:e,...t}){return p.jsx("tr",{"data-slot":"table-row",className:Ie("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function ge({className:e,...t}){return p.jsx("th",{"data-slot":"table-head",className:Ie("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function fe({className:e,...t}){return p.jsx("td",{"data-slot":"table-cell",className:Ie("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function IT(e){const t=hre(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(mre);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function hre(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=gre(i),u=vre(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pre=Symbol("radix.slottable");function mre(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pre}function vre(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function gre(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xL(e){const t=e+"CollectionProvider",[r,n]=gi(t),[i,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=y=>{const{scope:w,children:S}=y,O=z.useRef(null),E=z.useRef(new Map).current;return p.jsx(i,{scope:w,itemMap:E,collectionRef:O,children:S})};s.displayName=t;const u=e+"CollectionSlot",f=IT(u),c=z.forwardRef((y,w)=>{const{scope:S,children:O}=y,E=a(u,S),C=Je(w,E.collectionRef);return p.jsx(f,{ref:C,children:O})});c.displayName=u;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=IT(d),g=z.forwardRef((y,w)=>{const{scope:S,children:O,...E}=y,C=z.useRef(null),A=Je(w,C),N=a(d,S);return z.useEffect(()=>(N.itemMap.set(C,{ref:C,...E}),()=>void N.itemMap.delete(C))),p.jsx(m,{[h]:"",ref:A,children:O})});g.displayName=d;function b(y){const w=a(e+"CollectionConsumer",y);return z.useCallback(()=>{const O=w.collectionRef.current;if(!O)return[];const E=Array.from(O.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((N,T)=>E.indexOf(N.ref.current)-E.indexOf(T.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:s,Slot:c,ItemSlot:g},b,n]}function yre(e,t=globalThis?.document){const r=ar(e);P.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xre="DismissableLayer",I1="dismissableLayer.update",bre="dismissableLayer.pointerDownOutside",wre="dismissableLayer.focusOutside",DT,bL=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),u_=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...f}=e,c=P.useContext(bL),[d,h]=P.useState(null),m=d?.ownerDocument??globalThis?.document,[,g]=P.useState({}),b=Je(t,T=>h(T)),y=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),S=y.indexOf(w),O=d?y.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,C=O>=S,A=Ore(T=>{const R=T.target,I=[...c.branches].some(q=>q.contains(R));!C||I||(i?.(T),s?.(T),T.defaultPrevented||u?.())},m),N=jre(T=>{const R=T.target;[...c.branches].some(q=>q.contains(R))||(a?.(T),s?.(T),T.defaultPrevented||u?.())},m);return yre(T=>{O===c.layers.size-1&&(n?.(T),!T.defaultPrevented&&u&&(T.preventDefault(),u()))},m),P.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(DT=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),LT(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=DT)}},[d,m,r,c]),P.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),LT())},[d,c]),P.useEffect(()=>{const T=()=>g({});return document.addEventListener(I1,T),()=>document.removeEventListener(I1,T)},[]),p.jsx(We.div,{...f,ref:b,style:{pointerEvents:E?C?"auto":"none":void 0,...e.style},onFocusCapture:Fe(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Fe(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Fe(e.onPointerDownCapture,A.onPointerDownCapture)})});u_.displayName=xre;var _re="DismissableLayerBranch",Sre=P.forwardRef((e,t)=>{const r=P.useContext(bL),n=P.useRef(null),i=Je(t,n);return P.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),p.jsx(We.div,{...e,ref:i})});Sre.displayName=_re;function Ore(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const a=u=>{if(u.target&&!n.current){let f=function(){wL(bre,r,c,{discrete:!0})};const c={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=f,t.addEventListener("click",i.current,{once:!0})):f()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function jre(e,t=globalThis?.document){const r=ar(e),n=P.useRef(!1);return P.useEffect(()=>{const i=a=>{a.target&&!n.current&&wL(wre,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function LT(){const e=new CustomEvent(I1);document.dispatchEvent(e)}function wL(e,t,r,{discrete:n}){const i=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?P6(i,a):i.dispatchEvent(a)}var Qx=0;function _L(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$T()),document.body.insertAdjacentElement("beforeend",e[1]??$T()),Qx++,()=>{Qx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Qx--}},[])}function $T(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Zx="focusScope.autoFocusOnMount",Jx="focusScope.autoFocusOnUnmount",BT={bubbles:!1,cancelable:!0},Ere="FocusScope",f_=P.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[u,f]=P.useState(null),c=ar(i),d=ar(a),h=P.useRef(null),m=Je(t,y=>f(y)),g=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(n){let y=function(E){if(g.paused||!u)return;const C=E.target;u.contains(C)?h.current=C:qi(h.current,{select:!0})},w=function(E){if(g.paused||!u)return;const C=E.relatedTarget;C!==null&&(u.contains(C)||qi(h.current,{select:!0}))},S=function(E){if(document.activeElement===document.body)for(const A of E)A.removedNodes.length>0&&qi(u)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const O=new MutationObserver(S);return u&&O.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),O.disconnect()}}},[n,u,g.paused]),P.useEffect(()=>{if(u){FT.add(g);const y=document.activeElement;if(!u.contains(y)){const S=new CustomEvent(Zx,BT);u.addEventListener(Zx,c),u.dispatchEvent(S),S.defaultPrevented||(Are(kre(SL(u)),{select:!0}),document.activeElement===y&&qi(u))}return()=>{u.removeEventListener(Zx,c),setTimeout(()=>{const S=new CustomEvent(Jx,BT);u.addEventListener(Jx,d),u.dispatchEvent(S),S.defaultPrevented||qi(y??document.body,{select:!0}),u.removeEventListener(Jx,d),FT.remove(g)},0)}}},[u,c,d,g]);const b=P.useCallback(y=>{if(!r&&!n||g.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,S=document.activeElement;if(w&&S){const O=y.currentTarget,[E,C]=Pre(O);E&&C?!y.shiftKey&&S===C?(y.preventDefault(),r&&qi(E,{select:!0})):y.shiftKey&&S===E&&(y.preventDefault(),r&&qi(C,{select:!0})):S===O&&y.preventDefault()}},[r,n,g.paused]);return p.jsx(We.div,{tabIndex:-1,...s,ref:m,onKeyDown:b})});f_.displayName=Ere;function Are(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qi(n,{select:t}),document.activeElement!==r)return}function Pre(e){const t=SL(e),r=zT(t,e),n=zT(t.reverse(),e);return[r,n]}function SL(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zT(e,t){for(const r of e)if(!Nre(r,{upTo:t}))return r}function Nre(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Cre(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Cre(e)&&t&&e.select()}}var FT=Tre();function Tre(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=qT(e,t),e.unshift(t)},remove(t){e=qT(e,t),e[0]?.resume()}}}function qT(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function kre(e){return e.filter(t=>t.tagName!=="A")}var Rre=X1[" useId ".trim().toString()]||(()=>{}),Mre=0;function Gi(e){const[t,r]=P.useState(Rre());return Rt(()=>{r(n=>n??String(Mre++))},[e]),e||(t?`radix-${t}`:"")}const Ire=["top","right","bottom","left"],Xi=Math.min,$r=Math.max,$h=Math.round,$f=Math.floor,Bn=e=>({x:e,y:e}),Dre={left:"right",right:"left",bottom:"top",top:"bottom"},Lre={start:"end",end:"start"};function D1(e,t,r){return $r(e,Xi(t,r))}function mi(e,t){return typeof e=="function"?e(t):e}function vi(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function d_(e){return e==="x"?"y":"x"}function h_(e){return e==="y"?"height":"width"}const $re=new Set(["top","bottom"]);function Dn(e){return $re.has(vi(e))?"y":"x"}function p_(e){return d_(Dn(e))}function Bre(e,t,r){r===void 0&&(r=!1);const n=Us(e),i=p_(e),a=h_(i);let s=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bh(s)),[s,Bh(s)]}function zre(e){const t=Bh(e);return[L1(e),t,L1(t)]}function L1(e){return e.replace(/start|end/g,t=>Lre[t])}const UT=["left","right"],WT=["right","left"],Fre=["top","bottom"],qre=["bottom","top"];function Ure(e,t,r){switch(e){case"top":case"bottom":return r?t?WT:UT:t?UT:WT;case"left":case"right":return t?Fre:qre;default:return[]}}function Wre(e,t,r,n){const i=Us(e);let a=Ure(vi(e),r==="start",n);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(L1)))),a}function Bh(e){return e.replace(/left|right|bottom|top/g,t=>Dre[t])}function Hre(e){return{top:0,right:0,bottom:0,left:0,...e}}function OL(e){return typeof e!="number"?Hre(e):{top:e,right:e,bottom:e,left:e}}function zh(e){const{x:t,y:r,width:n,height:i}=e;return{width:n,height:i,top:r,left:t,right:t+n,bottom:r+i,x:t,y:r}}function HT(e,t,r){let{reference:n,floating:i}=e;const a=Dn(t),s=p_(t),u=h_(s),f=vi(t),c=a==="y",d=n.x+n.width/2-i.width/2,h=n.y+n.height/2-i.height/2,m=n[u]/2-i[u]/2;let g;switch(f){case"top":g={x:d,y:n.y-i.height};break;case"bottom":g={x:d,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:h};break;case"left":g={x:n.x-i.width,y:h};break;default:g={x:n.x,y:n.y}}switch(Us(t)){case"start":g[s]-=m*(r&&c?-1:1);break;case"end":g[s]+=m*(r&&c?-1:1);break}return g}async function Vre(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:a,rects:s,elements:u,strategy:f}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=mi(t,e),b=OL(g),w=u[m?h==="floating"?"reference":"floating":h],S=zh(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(w)))==null||r?w:w.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:c,rootBoundary:d,strategy:f})),O=h==="floating"?{x:n,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),C=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},A=zh(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:O,offsetParent:E,strategy:f}):O);return{top:(S.top-A.top+b.top)/C.y,bottom:(A.bottom-S.bottom+b.bottom)/C.y,left:(S.left-A.left+b.left)/C.x,right:(A.right-S.right+b.right)/C.x}}const Gre=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:a=[],platform:s}=r,u=a.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=HT(c,n,f),m=n,g={},b=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:i,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:c,padding:d=0}=mi(e,t)||{};if(c==null)return{};const h=OL(d),m={x:r,y:n},g=p_(i),b=h_(g),y=await s.getDimensions(c),w=g==="y",S=w?"top":"left",O=w?"bottom":"right",E=w?"clientHeight":"clientWidth",C=a.reference[b]+a.reference[g]-m[g]-a.floating[b],A=m[g]-a.reference[g],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let T=N?N[E]:0;(!T||!await(s.isElement==null?void 0:s.isElement(N)))&&(T=u.floating[E]||a.floating[b]);const R=C/2-A/2,I=T/2-y[b]/2-1,q=Xi(h[S],I),L=Xi(h[O],I),D=q,U=T-y[b]-L,H=T/2-y[b]/2+R,V=D1(D,H,U),K=!f.arrow&&Us(i)!=null&&H!==V&&a.reference[b]/2-(HH<=0)){var L,D;const H=(((L=a.flip)==null?void 0:L.index)||0)+1,V=T[H];if(V&&(!(h==="alignment"?O!==Dn(V):!1)||q.every(B=>Dn(B.placement)===O?B.overflows[0]>0:!0)))return{data:{index:H,overflows:q},reset:{placement:V}};let K=(D=q.filter(X=>X.overflows[0]<=0).sort((X,B)=>X.overflows[1]-B.overflows[1])[0])==null?void 0:D.placement;if(!K)switch(g){case"bestFit":{var U;const X=(U=q.filter(B=>{if(N){const Z=Dn(B.placement);return Z===O||Z==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(Z=>Z>0).reduce((Z,ee)=>Z+ee,0)]).sort((B,Z)=>B[1]-Z[1])[0])==null?void 0:U[0];X&&(K=X);break}case"initialPlacement":K=u;break}if(i!==K)return{reset:{placement:K}}}return{}}}};function VT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function GT(e){return Ire.some(t=>e[t]>=0)}const Yre=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:i="referenceHidden",...a}=mi(e,t);switch(i){case"referenceHidden":{const s=await n.detectOverflow(t,{...a,elementContext:"reference"}),u=VT(s,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:GT(u)}}}case"escaped":{const s=await n.detectOverflow(t,{...a,altBoundary:!0}),u=VT(s,r.floating);return{data:{escapedOffsets:u,escaped:GT(u)}}}default:return{}}}}},jL=new Set(["left","top"]);async function Qre(e,t){const{placement:r,platform:n,elements:i}=e,a=await(n.isRTL==null?void 0:n.isRTL(i.floating)),s=vi(r),u=Us(r),f=Dn(r)==="y",c=jL.has(s)?-1:1,d=a&&f?-1:1,h=mi(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return u&&typeof b=="number"&&(g=u==="end"?b*-1:b),f?{x:g*d,y:m*c}:{x:m*c,y:g*d}}const Zre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:i,y:a,placement:s,middlewareData:u}=t,f=await Qre(t,e);return s===((r=u.offset)==null?void 0:r.placement)&&(n=u.arrow)!=null&&n.alignmentOffset?{}:{x:i+f.x,y:a+f.y,data:{...f,placement:s}}}}},Jre=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i,platform:a}=t,{mainAxis:s=!0,crossAxis:u=!1,limiter:f={fn:S=>{let{x:O,y:E}=S;return{x:O,y:E}}},...c}=mi(e,t),d={x:r,y:n},h=await a.detectOverflow(t,c),m=Dn(vi(i)),g=d_(m);let b=d[g],y=d[m];if(s){const S=g==="y"?"top":"left",O=g==="y"?"bottom":"right",E=b+h[S],C=b-h[O];b=D1(E,b,C)}if(u){const S=m==="y"?"top":"left",O=m==="y"?"bottom":"right",E=y+h[S],C=y-h[O];y=D1(E,y,C)}const w=f.fn({...t,[g]:b,[m]:y});return{...w,data:{x:w.x-r,y:w.y-n,enabled:{[g]:s,[m]:u}}}}}},ene=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:a,middlewareData:s}=t,{offset:u=0,mainAxis:f=!0,crossAxis:c=!0}=mi(e,t),d={x:r,y:n},h=Dn(i),m=d_(h);let g=d[m],b=d[h];const y=mi(u,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(f){const E=m==="y"?"height":"width",C=a.reference[m]-a.floating[E]+w.mainAxis,A=a.reference[m]+a.reference[E]-w.mainAxis;gA&&(g=A)}if(c){var S,O;const E=m==="y"?"width":"height",C=jL.has(vi(i)),A=a.reference[h]-a.floating[E]+(C&&((S=s.offset)==null?void 0:S[h])||0)+(C?0:w.crossAxis),N=a.reference[h]+a.reference[E]+(C?0:((O=s.offset)==null?void 0:O[h])||0)-(C?w.crossAxis:0);bN&&(b=N)}return{[m]:g,[h]:b}}}},tne=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:i,rects:a,platform:s,elements:u}=t,{apply:f=()=>{},...c}=mi(e,t),d=await s.detectOverflow(t,c),h=vi(i),m=Us(i),g=Dn(i)==="y",{width:b,height:y}=a.floating;let w,S;h==="top"||h==="bottom"?(w=h,S=m===(await(s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(S=h,w=m==="end"?"top":"bottom");const O=y-d.top-d.bottom,E=b-d.left-d.right,C=Xi(y-d[w],O),A=Xi(b-d[S],E),N=!t.middlewareData.shift;let T=C,R=A;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=E),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(T=O),N&&!m){const q=$r(d.left,0),L=$r(d.right,0),D=$r(d.top,0),U=$r(d.bottom,0);g?R=b-2*(q!==0||L!==0?q+L:$r(d.left,d.right)):T=y-2*(D!==0||U!==0?D+U:$r(d.top,d.bottom))}await f({...t,availableWidth:R,availableHeight:T});const I=await s.getDimensions(u.floating);return b!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function Mp(){return typeof window<"u"}function Ws(e){return EL(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(EL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EL(e){return Mp()?e instanceof Node||e instanceof qr(e).Node:!1}function On(e){return Mp()?e instanceof Element||e instanceof qr(e).Element:!1}function qn(e){return Mp()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function KT(e){return!Mp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}const rne=new Set(["inline","contents"]);function iu(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=jn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!rne.has(i)}const nne=new Set(["table","td","th"]);function ine(e){return nne.has(Ws(e))}const ane=[":popover-open",":modal"];function Ip(e){return ane.some(t=>{try{return e.matches(t)}catch{return!1}})}const one=["transform","translate","scale","rotate","perspective"],sne=["transform","translate","scale","rotate","perspective","filter"],lne=["paint","layout","strict","content"];function m_(e){const t=v_(),r=On(e)?jn(e):e;return one.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||sne.some(n=>(r.willChange||"").includes(n))||lne.some(n=>(r.contain||"").includes(n))}function cne(e){let t=Yi(e);for(;qn(t)&&!Cs(t);){if(m_(t))return t;if(Ip(t))return null;t=Yi(t)}return null}function v_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const une=new Set(["html","body","#document"]);function Cs(e){return une.has(Ws(e))}function jn(e){return qr(e).getComputedStyle(e)}function Dp(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yi(e){if(Ws(e)==="html")return e;const t=e.assignedSlot||e.parentNode||KT(e)&&e.host||Gn(e);return KT(t)?t.host:t}function AL(e){const t=Yi(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:qn(t)&&iu(t)?t:AL(t)}function Gc(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const i=AL(e),a=i===((n=e.ownerDocument)==null?void 0:n.body),s=qr(i);if(a){const u=$1(s);return t.concat(s,s.visualViewport||[],iu(i)?i:[],u&&r?Gc(u):[])}return t.concat(i,Gc(i,[],r))}function $1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PL(e){const t=jn(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=qn(e),a=i?e.offsetWidth:r,s=i?e.offsetHeight:n,u=$h(r)!==a||$h(n)!==s;return u&&(r=a,n=s),{width:r,height:n,$:u}}function g_(e){return On(e)?e:e.contextElement}function es(e){const t=g_(e);if(!qn(t))return Bn(1);const r=t.getBoundingClientRect(),{width:n,height:i,$:a}=PL(t);let s=(a?$h(r.width):r.width)/n,u=(a?$h(r.height):r.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!u||!Number.isFinite(u))&&(u=1),{x:s,y:u}}const fne=Bn(0);function NL(e){const t=qr(e);return!v_()||!t.visualViewport?fne:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dne(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==qr(e)?!1:t}function Wa(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),a=g_(e);let s=Bn(1);t&&(n?On(n)&&(s=es(n)):s=es(e));const u=dne(a,r,n)?NL(a):Bn(0);let f=(i.left+u.x)/s.x,c=(i.top+u.y)/s.y,d=i.width/s.x,h=i.height/s.y;if(a){const m=qr(a),g=n&&On(n)?qr(n):n;let b=m,y=$1(b);for(;y&&n&&g!==b;){const w=es(y),S=y.getBoundingClientRect(),O=jn(y),E=S.left+(y.clientLeft+parseFloat(O.paddingLeft))*w.x,C=S.top+(y.clientTop+parseFloat(O.paddingTop))*w.y;f*=w.x,c*=w.y,d*=w.x,h*=w.y,f+=E,c+=C,b=qr(y),y=$1(b)}}return zh({width:d,height:h,x:f,y:c})}function Lp(e,t){const r=Dp(e).scrollLeft;return t?t.left+r:Wa(Gn(e)).left+r}function CL(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Lp(e,r),i=r.top+t.scrollTop;return{x:n,y:i}}function hne(e){let{elements:t,rect:r,offsetParent:n,strategy:i}=e;const a=i==="fixed",s=Gn(n),u=t?Ip(t.floating):!1;if(n===s||u&&a)return r;let f={scrollLeft:0,scrollTop:0},c=Bn(1);const d=Bn(0),h=qn(n);if((h||!h&&!a)&&((Ws(n)!=="body"||iu(s))&&(f=Dp(n)),qn(n))){const g=Wa(n);c=es(n),d.x=g.x+n.clientLeft,d.y=g.y+n.clientTop}const m=s&&!h&&!a?CL(s,f):Bn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-f.scrollLeft*c.x+d.x+m.x,y:r.y*c.y-f.scrollTop*c.y+d.y+m.y}}function pne(e){return Array.from(e.getClientRects())}function mne(e){const t=Gn(e),r=Dp(e),n=e.ownerDocument.body,i=$r(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$r(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Lp(e);const u=-r.scrollTop;return jn(n).direction==="rtl"&&(s+=$r(t.clientWidth,n.clientWidth)-i),{width:i,height:a,x:s,y:u}}const XT=25;function vne(e,t){const r=qr(e),n=Gn(e),i=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,u=0,f=0;if(i){a=i.width,s=i.height;const d=v_();(!d||d&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}const c=Lp(n);if(c<=0){const d=n.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(n.clientWidth-h.clientWidth-g);b<=XT&&(a-=b)}else c<=XT&&(a+=c);return{width:a,height:s,x:u,y:f}}const gne=new Set(["absolute","fixed"]);function yne(e,t){const r=Wa(e,!0,t==="fixed"),n=r.top+e.clientTop,i=r.left+e.clientLeft,a=qn(e)?es(e):Bn(1),s=e.clientWidth*a.x,u=e.clientHeight*a.y,f=i*a.x,c=n*a.y;return{width:s,height:u,x:f,y:c}}function YT(e,t,r){let n;if(t==="viewport")n=vne(e,r);else if(t==="document")n=mne(Gn(e));else if(On(t))n=yne(t,r);else{const i=NL(e);n={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zh(n)}function TL(e,t){const r=Yi(e);return r===t||!On(r)||Cs(r)?!1:jn(r).position==="fixed"||TL(r,t)}function xne(e,t){const r=t.get(e);if(r)return r;let n=Gc(e,[],!1).filter(u=>On(u)&&Ws(u)!=="body"),i=null;const a=jn(e).position==="fixed";let s=a?Yi(e):e;for(;On(s)&&!Cs(s);){const u=jn(s),f=m_(s);!f&&u.position==="fixed"&&(i=null),(a?!f&&!i:!f&&u.position==="static"&&!!i&&gne.has(i.position)||iu(s)&&!f&&TL(e,s))?n=n.filter(d=>d!==s):i=u,s=Yi(s)}return t.set(e,n),n}function bne(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const s=[...r==="clippingAncestors"?Ip(t)?[]:xne(t,this._c):[].concat(r),n],u=s[0],f=s.reduce((c,d)=>{const h=YT(t,d,i);return c.top=$r(h.top,c.top),c.right=Xi(h.right,c.right),c.bottom=Xi(h.bottom,c.bottom),c.left=$r(h.left,c.left),c},YT(t,u,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function wne(e){const{width:t,height:r}=PL(e);return{width:t,height:r}}function _ne(e,t,r){const n=qn(t),i=Gn(t),a=r==="fixed",s=Wa(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const f=Bn(0);function c(){f.x=Lp(i)}if(n||!n&&!a)if((Ws(t)!=="body"||iu(i))&&(u=Dp(t)),n){const g=Wa(t,!0,a,t);f.x=g.x+t.clientLeft,f.y=g.y+t.clientTop}else i&&c();a&&!n&&i&&c();const d=i&&!n&&!a?CL(i,u):Bn(0),h=s.left+u.scrollLeft-f.x-d.x,m=s.top+u.scrollTop-f.y-d.y;return{x:h,y:m,width:s.width,height:s.height}}function eb(e){return jn(e).position==="static"}function QT(e,t){if(!qn(e)||jn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gn(e)===r&&(r=r.ownerDocument.body),r}function kL(e,t){const r=qr(e);if(Ip(e))return r;if(!qn(e)){let i=Yi(e);for(;i&&!Cs(i);){if(On(i)&&!eb(i))return i;i=Yi(i)}return r}let n=QT(e,t);for(;n&&ine(n)&&eb(n);)n=QT(n,t);return n&&Cs(n)&&eb(n)&&!m_(n)?r:n||cne(e)||r}const Sne=async function(e){const t=this.getOffsetParent||kL,r=this.getDimensions,n=await r(e.floating);return{reference:_ne(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function One(e){return jn(e).direction==="rtl"}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:hne,getDocumentElement:Gn,getClippingRect:bne,getOffsetParent:kL,getElementRects:Sne,getClientRects:pne,getDimensions:wne,getScale:es,isElement:On,isRTL:One};function RL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ene(e,t){let r=null,n;const i=Gn(e);function a(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function s(u,f){u===void 0&&(u=!1),f===void 0&&(f=1),a();const c=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=c;if(u||t(),!m||!g)return;const b=$f(h),y=$f(i.clientWidth-(d+m)),w=$f(i.clientHeight-(h+g)),S=$f(d),E={rootMargin:-b+"px "+-y+"px "+-w+"px "+-S+"px",threshold:$r(0,Xi(1,f))||1};let C=!0;function A(N){const T=N[0].intersectionRatio;if(T!==f){if(!C)return s();T?s(!1,T):n=setTimeout(()=>{s(!1,1e-7)},1e3)}T===1&&!RL(c,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(A,{...E,root:i.ownerDocument})}catch{r=new IntersectionObserver(A,E)}r.observe(e)}return s(!0),a}function Ane(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:f=!1}=n,c=g_(e),d=i||a?[...c?Gc(c):[],...Gc(t)]:[];d.forEach(S=>{i&&S.addEventListener("scroll",r,{passive:!0}),a&&S.addEventListener("resize",r)});const h=c&&u?Ene(c,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(S=>{let[O]=S;O&&O.target===c&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(t)})),r()}),c&&!f&&g.observe(c),g.observe(t));let b,y=f?Wa(e):null;f&&w();function w(){const S=Wa(e);y&&!RL(y,S)&&r(),y=S,b=requestAnimationFrame(w)}return r(),()=>{var S;d.forEach(O=>{i&&O.removeEventListener("scroll",r),a&&O.removeEventListener("resize",r)}),h?.(),(S=g)==null||S.disconnect(),g=null,f&&cancelAnimationFrame(b)}}const Pne=Zre,Nne=Jre,Cne=Xre,Tne=tne,kne=Yre,ZT=Kre,Rne=ene,Mne=(e,t,r)=>{const n=new Map,i={platform:jne,...r},a={...i.platform,_c:n};return Gre(e,t,{...i,platform:a})};var Ine=typeof document<"u",Dne=function(){},Ad=Ine?P.useLayoutEffect:Dne;function Fh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Fh(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const a=i[n];if(!(a==="_owner"&&e.$$typeof)&&!Fh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ML(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JT(e,t){const r=ML(e);return Math.round(t*r)/r}function tb(e){const t=P.useRef(e);return Ad(()=>{t.current=e}),t}function Lne(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:a,floating:s}={},transform:u=!0,whileElementsMounted:f,open:c}=e,[d,h]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=P.useState(n);Fh(m,n)||g(n);const[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useCallback(B=>{B!==N.current&&(N.current=B,y(B))},[]),E=P.useCallback(B=>{B!==T.current&&(T.current=B,S(B))},[]),C=a||b,A=s||w,N=P.useRef(null),T=P.useRef(null),R=P.useRef(d),I=f!=null,q=tb(f),L=tb(i),D=tb(c),U=P.useCallback(()=>{if(!N.current||!T.current)return;const B={placement:t,strategy:r,middleware:m};L.current&&(B.platform=L.current),Mne(N.current,T.current,B).then(Z=>{const ee={...Z,isPositioned:D.current!==!1};H.current&&!Fh(R.current,ee)&&(R.current=ee,Kc.flushSync(()=>{h(ee)}))})},[m,t,r,L,D]);Ad(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[c]);const H=P.useRef(!1);Ad(()=>(H.current=!0,()=>{H.current=!1}),[]),Ad(()=>{if(C&&(N.current=C),A&&(T.current=A),C&&A){if(q.current)return q.current(C,A,U);U()}},[C,A,U,q,I]);const V=P.useMemo(()=>({reference:N,floating:T,setReference:O,setFloating:E}),[O,E]),K=P.useMemo(()=>({reference:C,floating:A}),[C,A]),X=P.useMemo(()=>{const B={position:r,left:0,top:0};if(!K.floating)return B;const Z=JT(K.floating,d.x),ee=JT(K.floating,d.y);return u?{...B,transform:"translate("+Z+"px, "+ee+"px)",...ML(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:ee}},[r,u,K.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:U,refs:V,elements:K,floatingStyles:X}),[d,U,V,K,X])}const $ne=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:i}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?ZT({element:n.current,padding:i}).fn(r):{}:n?ZT({element:n,padding:i}).fn(r):{}}}},Bne=(e,t)=>({...Pne(e),options:[e,t]}),zne=(e,t)=>({...Nne(e),options:[e,t]}),Fne=(e,t)=>({...Rne(e),options:[e,t]}),qne=(e,t)=>({...Cne(e),options:[e,t]}),Une=(e,t)=>({...Tne(e),options:[e,t]}),Wne=(e,t)=>({...kne(e),options:[e,t]}),Hne=(e,t)=>({...$ne(e),options:[e,t]});var Vne="Arrow",IL=P.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...a}=e;return p.jsx(We.svg,{...a,ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});IL.displayName=Vne;var Gne=IL;function y_(e){const[t,r]=P.useState(void 0);return Rt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,u;if("borderBoxSize"in a){const f=a.borderBoxSize,c=Array.isArray(f)?f[0]:f;s=c.inlineSize,u=c.blockSize}else s=e.offsetWidth,u=e.offsetHeight;r({width:s,height:u})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var x_="Popper",[DL,LL]=gi(x_),[Kne,$L]=DL(x_),BL=e=>{const{__scopePopper:t,children:r}=e,[n,i]=P.useState(null);return p.jsx(Kne,{scope:t,anchor:n,onAnchorChange:i,children:r})};BL.displayName=x_;var zL="PopperAnchor",FL=P.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,a=$L(zL,r),s=P.useRef(null),u=Je(t,s),f=P.useRef(null);return P.useEffect(()=>{const c=f.current;f.current=n?.current||s.current,c!==f.current&&a.onAnchorChange(f.current)}),n?null:p.jsx(We.div,{...i,ref:u})});FL.displayName=zL;var b_="PopperContent",[Xne,Yne]=DL(b_),qL=P.forwardRef((e,t)=>{const{__scopePopper:r,side:n="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:u=0,avoidCollisions:f=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...y}=e,w=$L(b_,r),[S,O]=P.useState(null),E=Je(t,oe=>O(oe)),[C,A]=P.useState(null),N=y_(C),T=N?.width??0,R=N?.height??0,I=n+(a!=="center"?"-"+a:""),q=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(c)?c:[c],D=L.length>0,U={padding:q,boundary:L.filter(Zne),altBoundary:D},{refs:H,floatingStyles:V,placement:K,isPositioned:X,middlewareData:B}=Lne({strategy:"fixed",placement:I,whileElementsMounted:(...oe)=>Ane(...oe,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[Bne({mainAxis:i+R,alignmentAxis:s}),f&&zne({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Fne():void 0,...U}),f&&qne({...U}),Une({...U,apply:({elements:oe,rects:me,availableWidth:ie,availableHeight:ue})=>{const{width:ve,height:re}=me.reference,De=oe.floating.style;De.setProperty("--radix-popper-available-width",`${ie}px`),De.setProperty("--radix-popper-available-height",`${ue}px`),De.setProperty("--radix-popper-anchor-width",`${ve}px`),De.setProperty("--radix-popper-anchor-height",`${re}px`)}}),C&&Hne({element:C,padding:u}),Jne({arrowWidth:T,arrowHeight:R}),m&&Wne({strategy:"referenceHidden",...U})]}),[Z,ee]=HL(K),M=ar(b);Rt(()=>{X&&M?.()},[X,M]);const $=B.arrow?.x,Q=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[pe,ye]=P.useState();return Rt(()=>{S&&ye(window.getComputedStyle(S).zIndex)},[S]),p.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:X?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Xne,{scope:r,placedSide:Z,onArrowChange:A,arrowX:$,arrowY:Q,shouldHideArrow:ae,children:p.jsx(We.div,{"data-side":Z,"data-align":ee,...y,ref:E,style:{...y.style,animation:X?void 0:"none"}})})})});qL.displayName=b_;var UL="PopperArrow",Qne={top:"bottom",right:"left",bottom:"top",left:"right"},WL=P.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,a=Yne(UL,n),s=Qne[a.placedSide];return p.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:p.jsx(Gne,{...i,ref:r,style:{...i.style,display:"block"}})})});WL.displayName=UL;function Zne(e){return e!==null}var Jne=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:n,middlewareData:i}=t,s=i.arrow?.centerOffset!==0,u=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[c,d]=HL(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(i.arrow?.x??0)+u/2,g=(i.arrow?.y??0)+f/2;let b="",y="";return c==="bottom"?(b=s?h:`${m}px`,y=`${-f}px`):c==="top"?(b=s?h:`${m}px`,y=`${n.floating.height+f}px`):c==="right"?(b=`${-f}px`,y=s?h:`${g}px`):c==="left"&&(b=`${n.floating.width+f}px`,y=s?h:`${g}px`),{data:{x:b,y}}}});function HL(e){const[t,r="center"]=e.split("-");return[t,r]}var eie=BL,tie=FL,rie=qL,nie=WL,iie="Portal",w_=P.forwardRef((e,t)=>{const{container:r,...n}=e,[i,a]=P.useState(!1);Rt(()=>a(!0),[]);const s=r||i&&globalThis?.document?.body;return s?b6.createPortal(p.jsx(We.div,{...n,ref:t}),s):null});w_.displayName=iie;function aie(e){const t=oie(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(lie);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function oie(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=uie(i),u=cie(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sie=Symbol("radix.slottable");function lie(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sie}function cie(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function uie(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fie=X1[" useInsertionEffect ".trim().toString()]||Rt;function Ha({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[i,a,s]=die({defaultProp:t,onChange:r}),u=e!==void 0,f=u?e:i;{const d=P.useRef(e!==void 0);P.useEffect(()=>{const h=d.current;h!==u&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=u},[u,n])}const c=P.useCallback(d=>{if(u){const h=hie(d)?d(e):d;h!==e&&s.current?.(h)}else a(d)},[u,e,a,s]);return[f,c]}function die({defaultProp:e,onChange:t}){const[r,n]=P.useState(e),i=P.useRef(r),a=P.useRef(t);return fie(()=>{a.current=t},[t]),P.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,n,a]}function hie(e){return typeof e=="function"}function __(e){const t=P.useRef({value:e,previous:e});return P.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var VL=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),pie="VisuallyHidden",mie=P.forwardRef((e,t)=>p.jsx(We.span,{...e,ref:t,style:{...VL,...e.style}}));mie.displayName=pie;var vie=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Do=new WeakMap,Bf=new WeakMap,zf={},rb=0,GL=function(e){return e&&(e.host||GL(e.parentNode))},gie=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=GL(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},yie=function(e,t,r,n){var i=gie(t,Array.isArray(e)?e:[e]);zf[r]||(zf[r]=new WeakMap);var a=zf[r],s=[],u=new Set,f=new Set(i),c=function(h){!h||u.has(h)||(u.add(h),c(h.parentNode))};i.forEach(c);var d=function(h){!h||f.has(h)||Array.prototype.forEach.call(h.children,function(m){if(u.has(m))d(m);else try{var g=m.getAttribute(n),b=g!==null&&g!=="false",y=(Do.get(m)||0)+1,w=(a.get(m)||0)+1;Do.set(m,y),a.set(m,w),s.push(m),y===1&&b&&Bf.set(m,!0),w===1&&m.setAttribute(r,"true"),b||m.setAttribute(n,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),u.clear(),rb++,function(){s.forEach(function(h){var m=Do.get(h)-1,g=a.get(h)-1;Do.set(h,m),a.set(h,g),m||(Bf.has(h)||h.removeAttribute(n),Bf.delete(h)),g||h.removeAttribute(r)}),rb--,rb||(Do=new WeakMap,Do=new WeakMap,Bf=new WeakMap,zf={})}},KL=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=vie(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live], script"))),yie(n,i,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(t){for(var r,n=1,i=arguments.length;n"u")return Iie;var t=Die(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},$ie=ZL(),ts="data-scroll-locked",Bie=function(e,t,r,n){var i=e.left,a=e.top,s=e.right,u=e.gap;return r===void 0&&(r="margin"),` + .`.concat(bie,` { + overflow: hidden `).concat(n,`; + padding-right: `).concat(u,"px ").concat(n,`; + } + body[`).concat(ts,`] { + overflow: hidden `).concat(n,`; + overscroll-behavior: contain; + `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` + padding-left: `.concat(i,`px; + padding-top: `).concat(a,`px; + padding-right: `).concat(s,`px; + margin-left:0; + margin-top:0; + margin-right: `).concat(u,"px ").concat(n,`; + `),r==="padding"&&"padding-right: ".concat(u,"px ").concat(n,";")].filter(Boolean).join(""),` + } + + .`).concat(Pd,` { + right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(Nd,` { + margin-right: `).concat(u,"px ").concat(n,`; + } + + .`).concat(Pd," .").concat(Pd,` { + right: 0 `).concat(n,`; + } + + .`).concat(Nd," .").concat(Nd,` { + margin-right: 0 `).concat(n,`; + } + + body[`).concat(ts,`] { + `).concat(wie,": ").concat(u,`px; + } +`)},tk=function(){var e=parseInt(document.body.getAttribute(ts)||"0",10);return isFinite(e)?e:0},zie=function(){P.useEffect(function(){return document.body.setAttribute(ts,(tk()+1).toString()),function(){var e=tk()-1;e<=0?document.body.removeAttribute(ts):document.body.setAttribute(ts,e.toString())}},[])},Fie=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n;zie();var a=P.useMemo(function(){return Lie(i)},[i]);return P.createElement($ie,{styles:Bie(a,!t,i,r?"":"!important")})},B1=!1;if(typeof window<"u")try{var Ff=Object.defineProperty({},"passive",{get:function(){return B1=!0,!0}});window.addEventListener("test",Ff,Ff),window.removeEventListener("test",Ff,Ff)}catch{B1=!1}var Lo=B1?{passive:!1}:!1,qie=function(e){return e.tagName==="TEXTAREA"},JL=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!qie(e)&&r[t]==="visible")},Uie=function(e){return JL(e,"overflowY")},Wie=function(e){return JL(e,"overflowX")},rk=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var i=e$(e,n);if(i){var a=t$(e,n),s=a[1],u=a[2];if(s>u)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Hie=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Vie=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},e$=function(e,t){return e==="v"?Uie(t):Wie(t)},t$=function(e,t){return e==="v"?Hie(t):Vie(t)},Gie=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kie=function(e,t,r,n,i){var a=Gie(e,window.getComputedStyle(t).direction),s=a*n,u=r.target,f=t.contains(u),c=!1,d=s>0,h=0,m=0;do{if(!u)break;var g=t$(e,u),b=g[0],y=g[1],w=g[2],S=y-w-a*b;(b||S)&&e$(e,u)&&(h+=S,m+=b);var O=u.parentNode;u=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!f&&u!==document.body||f&&(t.contains(u)||t===u));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(c=!0),c},qf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nk=function(e){return[e.deltaX,e.deltaY]},ik=function(e){return e&&"current"in e?e.current:e},Xie=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yie=function(e){return` + .block-interactivity-`.concat(e,` {pointer-events: none;} + .allow-interactivity-`).concat(e,` {pointer-events: all;} +`)},Qie=0,$o=[];function Zie(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),i=P.useState(Qie++)[0],a=P.useState(ZL)[0],s=P.useRef(e);P.useEffect(function(){s.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var y=xie([e.lockRef.current],(e.shards||[]).map(ik),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=P.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!s.current.allowPinchZoom;var S=qf(y),O=r.current,E="deltaX"in y?y.deltaX:O[0]-S[0],C="deltaY"in y?y.deltaY:O[1]-S[1],A,N=y.target,T=Math.abs(E)>Math.abs(C)?"h":"v";if("touches"in y&&T==="h"&&N.type==="range")return!1;var R=window.getSelection(),I=R&&R.anchorNode,q=I?I===N||I.contains(N):!1;if(q)return!1;var L=rk(T,N);if(!L)return!0;if(L?A=T:(A=T==="v"?"h":"v",L=rk(T,N)),!L)return!1;if(!n.current&&"changedTouches"in y&&(E||C)&&(n.current=A),!A)return!0;var D=n.current||A;return Kie(D,w,y,D==="h"?E:C)},[]),f=P.useCallback(function(y){var w=y;if(!(!$o.length||$o[$o.length-1]!==a)){var S="deltaY"in w?nk(w):qf(w),O=t.current.filter(function(A){return A.name===w.type&&(A.target===w.target||w.target===A.shadowParent)&&Xie(A.delta,S)})[0];if(O&&O.should){w.cancelable&&w.preventDefault();return}if(!O){var E=(s.current.shards||[]).map(ik).filter(Boolean).filter(function(A){return A.contains(w.target)}),C=E.length>0?u(w,E[0]):!s.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),c=P.useCallback(function(y,w,S,O){var E={name:y,delta:w,target:S,should:O,shadowParent:Jie(S)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(C){return C!==E})},1)},[]),d=P.useCallback(function(y){r.current=qf(y),n.current=void 0},[]),h=P.useCallback(function(y){c(y.type,nk(y),y.target,u(y,e.lockRef.current))},[]),m=P.useCallback(function(y){c(y.type,qf(y),y.target,u(y,e.lockRef.current))},[]);P.useEffect(function(){return $o.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Lo),document.addEventListener("touchmove",f,Lo),document.addEventListener("touchstart",d,Lo),function(){$o=$o.filter(function(y){return y!==a}),document.removeEventListener("wheel",f,Lo),document.removeEventListener("touchmove",f,Lo),document.removeEventListener("touchstart",d,Lo)}},[]);var g=e.removeScrollBar,b=e.inert;return P.createElement(P.Fragment,null,b?P.createElement(a,{styles:Yie(i)}):null,g?P.createElement(Fie,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Jie(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eae=Pie(QL,Zie);var S_=P.forwardRef(function(e,t){return P.createElement($p,Mn({},e,{ref:t,sideCar:eae}))});S_.classNames=$p.classNames;var tae=[" ","Enter","ArrowUp","ArrowDown"],rae=[" ","Enter"],Va="Select",[Bp,zp,nae]=xL(Va),[Hs]=gi(Va,[nae,LL]),Fp=LL(),[iae,ta]=Hs(Va),[aae,oae]=Hs(Va),r$=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:u,onValueChange:f,dir:c,name:d,autoComplete:h,disabled:m,required:g,form:b}=e,y=Fp(t),[w,S]=P.useState(null),[O,E]=P.useState(null),[C,A]=P.useState(!1),N=Kh(c),[T,R]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:Va}),[I,q]=Ha({prop:s,defaultProp:u,onChange:f,caller:Va}),L=P.useRef(null),D=w?b||!!w.closest("form"):!0,[U,H]=P.useState(new Set),V=Array.from(U).map(K=>K.props.value).join(";");return p.jsx(eie,{...y,children:p.jsxs(iae,{required:g,scope:t,trigger:w,onTriggerChange:S,valueNode:O,onValueNodeChange:E,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:Gi(),value:I,onValueChange:q,open:T,onOpenChange:R,dir:N,triggerPointerDownPosRef:L,disabled:m,children:[p.jsx(Bp.Provider,{scope:t,children:p.jsx(aae,{scope:e.__scopeSelect,onNativeOptionAdd:P.useCallback(K=>{H(X=>new Set(X).add(K))},[]),onNativeOptionRemove:P.useCallback(K=>{H(X=>{const B=new Set(X);return B.delete(K),B})},[]),children:r})}),D?p.jsxs(O$,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:I,onChange:K=>q(K.target.value),disabled:m,form:b,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},V):null]})})};r$.displayName=Va;var n$="SelectTrigger",i$=P.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...i}=e,a=Fp(r),s=ta(n$,r),u=s.disabled||n,f=Je(t,s.onTriggerChange),c=zp(r),d=P.useRef("touch"),[h,m,g]=E$(y=>{const w=c().filter(E=>!E.disabled),S=w.find(E=>E.value===s.value),O=A$(w,y,S);O!==void 0&&s.onValueChange(O.value)}),b=y=>{u||(s.onOpenChange(!0),g()),y&&(s.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return p.jsx(tie,{asChild:!0,...a,children:p.jsx(We.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":j$(s.value)?"":void 0,...i,ref:f,onClick:Fe(i.onClick,y=>{y.currentTarget.focus(),d.current!=="mouse"&&b(y)}),onPointerDown:Fe(i.onPointerDown,y=>{d.current=y.pointerType;const w=y.target;w.hasPointerCapture(y.pointerId)&&w.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(b(y),y.preventDefault())}),onKeyDown:Fe(i.onKeyDown,y=>{const w=h.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(w&&y.key===" ")&&tae.includes(y.key)&&(b(),y.preventDefault())})})})});i$.displayName=n$;var a$="SelectValue",o$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,children:a,placeholder:s="",...u}=e,f=ta(a$,r),{onValueNodeHasChildrenChange:c}=f,d=a!==void 0,h=Je(t,f.onValueNodeChange);return Rt(()=>{c(d)},[c,d]),p.jsx(We.span,{...u,ref:h,style:{pointerEvents:"none"},children:j$(f.value)?p.jsx(p.Fragment,{children:s}):a})});o$.displayName=a$;var sae="SelectIcon",s$=P.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...i}=e;return p.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:n||"▼"})});s$.displayName=sae;var lae="SelectPortal",l$=e=>p.jsx(w_,{asChild:!0,...e});l$.displayName=lae;var Ga="SelectContent",c$=P.forwardRef((e,t)=>{const r=ta(Ga,e.__scopeSelect),[n,i]=P.useState();if(Rt(()=>{i(new DocumentFragment)},[]),!r.open){const a=n;return a?Kc.createPortal(p.jsx(u$,{scope:e.__scopeSelect,children:p.jsx(Bp.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),a):null}return p.jsx(f$,{...e,ref:t})});c$.displayName=Ga;var gn=10,[u$,ra]=Hs(Ga),cae="SelectContentImpl",uae=aie("SelectContent.RemoveScroll"),f$=P.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w,...S}=e,O=ta(Ga,r),[E,C]=P.useState(null),[A,N]=P.useState(null),T=Je(t,oe=>C(oe)),[R,I]=P.useState(null),[q,L]=P.useState(null),D=zp(r),[U,H]=P.useState(!1),V=P.useRef(!1);P.useEffect(()=>{if(E)return KL(E)},[E]),_L();const K=P.useCallback(oe=>{const[me,...ie]=D().map(re=>re.ref.current),[ue]=ie.slice(-1),ve=document.activeElement;for(const re of oe)if(re===ve||(re?.scrollIntoView({block:"nearest"}),re===me&&A&&(A.scrollTop=0),re===ue&&A&&(A.scrollTop=A.scrollHeight),re?.focus(),document.activeElement!==ve))return},[D,A]),X=P.useCallback(()=>K([R,E]),[K,R,E]);P.useEffect(()=>{U&&X()},[U,X]);const{onOpenChange:B,triggerPointerDownPosRef:Z}=O;P.useEffect(()=>{if(E){let oe={x:0,y:0};const me=ue=>{oe={x:Math.abs(Math.round(ue.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ue.pageY)-(Z.current?.y??0))}},ie=ue=>{oe.x<=10&&oe.y<=10?ue.preventDefault():E.contains(ue.target)||B(!1),document.removeEventListener("pointermove",me),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",ie,{capture:!0})}}},[E,B,Z]),P.useEffect(()=>{const oe=()=>B(!1);return window.addEventListener("blur",oe),window.addEventListener("resize",oe),()=>{window.removeEventListener("blur",oe),window.removeEventListener("resize",oe)}},[B]);const[ee,M]=E$(oe=>{const me=D().filter(ve=>!ve.disabled),ie=me.find(ve=>ve.ref.current===document.activeElement),ue=A$(me,oe,ie);ue&&setTimeout(()=>ue.ref.current.focus())}),$=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&(I(oe),ue&&(V.current=!0))},[O.value]),Q=P.useCallback(()=>E?.focus(),[E]),ae=P.useCallback((oe,me,ie)=>{const ue=!V.current&&!ie;(O.value!==void 0&&O.value===me||ue)&&L(oe)},[O.value]),pe=n==="popper"?z1:d$,ye=pe===z1?{side:u,sideOffset:f,align:c,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:y,avoidCollisions:w}:{};return p.jsx(u$,{scope:r,content:E,viewport:A,onViewportChange:N,itemRefCallback:$,selectedItem:R,onItemLeave:Q,itemTextRefCallback:ae,focusSelectedItem:X,selectedItemText:q,position:n,isPositioned:U,searchRef:ee,children:p.jsx(S_,{as:uae,allowPinchZoom:!0,children:p.jsx(f_,{asChild:!0,trapped:O.open,onMountAutoFocus:oe=>{oe.preventDefault()},onUnmountAutoFocus:Fe(i,oe=>{O.trigger?.focus({preventScroll:!0}),oe.preventDefault()}),children:p.jsx(u_,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:oe=>oe.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:p.jsx(pe,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:oe=>oe.preventDefault(),...S,...ye,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Fe(S.onKeyDown,oe=>{const me=oe.ctrlKey||oe.altKey||oe.metaKey;if(oe.key==="Tab"&&oe.preventDefault(),!me&&oe.key.length===1&&M(oe.key),["ArrowUp","ArrowDown","Home","End"].includes(oe.key)){let ue=D().filter(ve=>!ve.disabled).map(ve=>ve.ref.current);if(["ArrowUp","End"].includes(oe.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(oe.key)){const ve=oe.target,re=ue.indexOf(ve);ue=ue.slice(re+1)}setTimeout(()=>K(ue)),oe.preventDefault()}})})})})})})});f$.displayName=cae;var fae="SelectItemAlignedPosition",d$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...i}=e,a=ta(Ga,r),s=ra(Ga,r),[u,f]=P.useState(null),[c,d]=P.useState(null),h=Je(t,T=>d(T)),m=zp(r),g=P.useRef(!1),b=P.useRef(!0),{viewport:y,selectedItem:w,selectedItemText:S,focusSelectedItem:O}=s,E=P.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&c&&y&&w&&S){const T=a.trigger.getBoundingClientRect(),R=c.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),q=S.getBoundingClientRect();if(a.dir!=="rtl"){const ve=q.left-R.left,re=I.left-ve,De=T.left-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.left=vt+"px"}else{const ve=R.right-q.right,re=window.innerWidth-I.right-ve,De=window.innerWidth-T.right-re,Te=T.width+De,Ke=Math.max(Te,R.width),lt=window.innerWidth-gn,vt=hb(re,[gn,Math.max(gn,lt-Ke)]);u.style.minWidth=Te+"px",u.style.right=vt+"px"}const L=m(),D=window.innerHeight-gn*2,U=y.scrollHeight,H=window.getComputedStyle(c),V=parseInt(H.borderTopWidth,10),K=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),B=parseInt(H.paddingBottom,10),Z=V+K+U+B+X,ee=Math.min(w.offsetHeight*5,Z),M=window.getComputedStyle(y),$=parseInt(M.paddingTop,10),Q=parseInt(M.paddingBottom,10),ae=T.top+T.height/2-gn,pe=D-ae,ye=w.offsetHeight/2,oe=w.offsetTop+ye,me=V+K+oe,ie=Z-me;if(me<=ae){const ve=L.length>0&&w===L[L.length-1].ref.current;u.style.bottom="0px";const re=c.clientHeight-y.offsetTop-y.offsetHeight,De=Math.max(pe,ye+(ve?Q:0)+re+X),Te=me+De;u.style.height=Te+"px"}else{const ve=L.length>0&&w===L[0].ref.current;u.style.top="0px";const De=Math.max(ae,V+y.offsetTop+(ve?$:0)+ye)+ie;u.style.height=De+"px",y.scrollTop=me-ae+y.offsetTop}u.style.margin=`${gn}px 0`,u.style.minHeight=ee+"px",u.style.maxHeight=D+"px",n?.(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,u,c,y,w,S,a.dir,n]);Rt(()=>E(),[E]);const[C,A]=P.useState();Rt(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const N=P.useCallback(T=>{T&&b.current===!0&&(E(),O?.(),b.current=!1)},[E,O]);return p.jsx(hae,{scope:r,contentWrapper:u,shouldExpandOnScrollRef:g,onScrollButtonChange:N,children:p.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(We.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});d$.displayName=fae;var dae="SelectPopperPosition",z1=P.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:i=gn,...a}=e,s=Fp(r);return p.jsx(rie,{...s,...a,ref:t,align:n,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});z1.displayName=dae;var[hae,O_]=Hs(Ga,{}),F1="SelectViewport",h$=P.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...i}=e,a=ra(F1,r),s=O_(F1,r),u=Je(t,a.onViewportChange),f=P.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),p.jsx(Bp.Slot,{scope:r,children:p.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Fe(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=s;if(m?.current&&h){const g=Math.abs(f.current-d.scrollTop);if(g>0){const b=window.innerHeight-gn*2,y=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),S=Math.max(y,w);if(S0?C:0,h.style.justifyContent="flex-end")}}}f.current=d.scrollTop})})})]})});h$.displayName=F1;var p$="SelectGroup",[pae,mae]=Hs(p$),vae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Gi();return p.jsx(pae,{scope:r,id:i,children:p.jsx(We.div,{role:"group","aria-labelledby":i,...n,ref:t})})});vae.displayName=p$;var m$="SelectLabel",gae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=mae(m$,r);return p.jsx(We.div,{id:i.id,...n,ref:t})});gae.displayName=m$;var qh="SelectItem",[yae,v$]=Hs(qh),g$=P.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:i=!1,textValue:a,...s}=e,u=ta(qh,r),f=ra(qh,r),c=u.value===n,[d,h]=P.useState(a??""),[m,g]=P.useState(!1),b=Je(t,O=>f.itemRefCallback?.(O,n,i)),y=Gi(),w=P.useRef("touch"),S=()=>{i||(u.onValueChange(n),u.onOpenChange(!1))};if(n==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(yae,{scope:r,value:n,disabled:i,textId:y,isSelected:c,onItemTextChange:P.useCallback(O=>{h(E=>E||(O?.textContent??"").trim())},[]),children:p.jsx(Bp.ItemSlot,{scope:r,value:n,disabled:i,textValue:d,children:p.jsx(We.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":c&&m,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:b,onFocus:Fe(s.onFocus,()=>g(!0)),onBlur:Fe(s.onBlur,()=>g(!1)),onClick:Fe(s.onClick,()=>{w.current!=="mouse"&&S()}),onPointerUp:Fe(s.onPointerUp,()=>{w.current==="mouse"&&S()}),onPointerDown:Fe(s.onPointerDown,O=>{w.current=O.pointerType}),onPointerMove:Fe(s.onPointerMove,O=>{w.current=O.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Fe(s.onPointerLeave,O=>{O.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Fe(s.onKeyDown,O=>{f.searchRef?.current!==""&&O.key===" "||(rae.includes(O.key)&&S(),O.key===" "&&O.preventDefault())})})})})});g$.displayName=qh;var Zl="SelectItemText",y$=P.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:i,...a}=e,s=ta(Zl,r),u=ra(Zl,r),f=v$(Zl,r),c=oae(Zl,r),[d,h]=P.useState(null),m=Je(t,S=>h(S),f.onItemTextChange,S=>u.itemTextRefCallback?.(S,f.value,f.disabled)),g=d?.textContent,b=P.useMemo(()=>p.jsx("option",{value:f.value,disabled:f.disabled,children:g},f.value),[f.disabled,f.value,g]),{onNativeOptionAdd:y,onNativeOptionRemove:w}=c;return Rt(()=>(y(b),()=>w(b)),[y,w,b]),p.jsxs(p.Fragment,{children:[p.jsx(We.span,{id:f.textId,...a,ref:m}),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kc.createPortal(a.children,s.valueNode):null]})});y$.displayName=Zl;var x$="SelectItemIndicator",b$=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return v$(x$,r).isSelected?p.jsx(We.span,{"aria-hidden":!0,...n,ref:t}):null});b$.displayName=x$;var q1="SelectScrollUpButton",w$=P.forwardRef((e,t)=>{const r=ra(q1,e.__scopeSelect),n=O_(q1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollTop>0;a(c)};const f=r.viewport;return u(),f.addEventListener("scroll",u),()=>f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop-f.offsetHeight)}}):null});w$.displayName=q1;var U1="SelectScrollDownButton",_$=P.forwardRef((e,t)=>{const r=ra(U1,e.__scopeSelect),n=O_(U1,e.__scopeSelect),[i,a]=P.useState(!1),s=Je(t,n.onScrollButtonChange);return Rt(()=>{if(r.viewport&&r.isPositioned){let u=function(){const c=f.scrollHeight-f.clientHeight,d=Math.ceil(f.scrollTop)f.removeEventListener("scroll",u)}},[r.viewport,r.isPositioned]),i?p.jsx(S$,{...e,ref:s,onAutoScroll:()=>{const{viewport:u,selectedItem:f}=r;u&&f&&(u.scrollTop=u.scrollTop+f.offsetHeight)}}):null});_$.displayName=U1;var S$=P.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...i}=e,a=ra("SelectScrollButton",r),s=P.useRef(null),u=zp(r),f=P.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return P.useEffect(()=>()=>f(),[f]),Rt(()=>{u().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[u]),p.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Fe(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:Fe(i.onPointerMove,()=>{a.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:Fe(i.onPointerLeave,()=>{f()})})}),xae="SelectSeparator",bae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return p.jsx(We.div,{"aria-hidden":!0,...n,ref:t})});bae.displayName=xae;var W1="SelectArrow",wae=P.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,i=Fp(r),a=ta(W1,r),s=ra(W1,r);return a.open&&s.position==="popper"?p.jsx(nie,{...i,...n,ref:t}):null});wae.displayName=W1;var _ae="SelectBubbleInput",O$=P.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const i=P.useRef(null),a=Je(n,i),s=__(t);return P.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(f,"value").set;if(s!==t&&d){const h=new Event("change",{bubbles:!0});d.call(u,t),u.dispatchEvent(h)}},[s,t]),p.jsx(We.select,{...r,style:{...VL,...r.style},ref:a,defaultValue:t})});O$.displayName=_ae;function j$(e){return e===""||e===void 0}function E$(e){const t=ar(e),r=P.useRef(""),n=P.useRef(0),i=P.useCallback(s=>{const u=r.current+s;t(u),(function f(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>f(""),1e3))})(u)},[t]),a=P.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return P.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,i,a]}function A$(e,t,r){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1;let s=Sae(e,Math.max(a,0));i.length===1&&(s=s.filter(c=>c!==r));const f=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==r?f:void 0}function Sae(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Oae=r$,jae=i$,Eae=o$,Aae=s$,Pae=l$,Nae=c$,Cae=h$,Tae=g$,kae=y$,Rae=b$,Mae=w$,Iae=_$;function tt({...e}){return p.jsx(Oae,{"data-slot":"select",...e})}function rt({...e}){return p.jsx(Eae,{"data-slot":"select-value",...e})}function nt({className:e,size:t="default",children:r,...n}){return p.jsxs(jae,{"data-slot":"select-trigger","data-size":t,className:Ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,p.jsx(Aae,{asChild:!0,children:p.jsx(cc,{className:"size-4 opacity-50"})})]})}function st({className:e,children:t,position:r="popper",...n}){return p.jsx(Pae,{children:p.jsxs(Nae,{"data-slot":"select-content",className:Ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:[p.jsx(Dae,{}),p.jsx(Cae,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(Lae,{})]})})}function Ae({className:e,children:t,...r}){return p.jsxs(Tae,{"data-slot":"select-item",className:Ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[p.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(Rae,{children:p.jsx(dR,{className:"size-4"})})}),p.jsx(kae,{children:t})]})}function Dae({className:e,...t}){return p.jsx(Mae,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(jB,{className:"size-4"})})}function Lae({className:e,...t}){return p.jsx(Iae,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(cc,{className:"size-4"})})}function $ae(){const e=[{id:1,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Defrost",lastEdited:"2025.12.03.11:45",hasError:!1},{id:2,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Opened/Preped",lastEdited:"2025.12.03.11:45",hasError:!1},{id:3,location:"Location A",labelCategory:"Prep",productCategory:"Meat",product:"Chicken",template:'2"x2" Basic',labelType:"Heated",lastEdited:"2025.12.03.11:45",hasError:!1},{id:4,location:"Location A",labelCategory:"Grab'n'Go",productCategory:"Sandwich",product:"Chicken Sandwich",template:`2"x6" G'n'G`,labelType:"",lastEdited:"2025.12.03.11:45",hasError:!0}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 text-gray-900 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0 text-gray-900",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs("div",{className:"flex rounded-md border border-gray-300 bg-white h-10 overflow-hidden shrink-0",children:[p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Import"}),p.jsx("button",{type:"button",className:"px-4 h-full border-r border-gray-200 text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Export"}),p.jsx("button",{type:"button",className:"px-4 h-full text-sm font-medium text-gray-900 hover:bg-gray-50 transition-colors",children:"Bulk Edit"})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"text-red-600 font-bold italic text-lg",children:"One or more of your labels are missing fields from their templates (! ! ! 1 in total)."}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[140px]",children:"Product Category"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Product"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Template"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Label Type"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.location}),p.jsx(fe,{children:t.labelCategory}),p.jsx(fe,{children:t.productCategory}),p.jsx(fe,{children:t.product}),p.jsxs(fe,{className:"font-medium",children:[t.template,t.hasError&&p.jsx("span",{className:"text-red-600 font-bold ml-2",children:"! ! !"})]}),p.jsx(fe,{children:t.labelType||"-"}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function Bae(){const e=[{id:1,category:"Prep",count:54,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:2,category:"Green",count:33,photo:"XXX",lastEdited:"2025.12.03.11:45"},{id:3,category:"Red",count:44,photo:"XXX",lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Category ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Category"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Category Photo"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.category}),p.jsx(fe,{className:"font-numeric",children:t.count}),p.jsx(fe,{className:"text-gray-500",children:t.photo}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function zae(){const e=[{id:1,type:"Defrost",count:54,lastEdited:"2025.12.03.11:45"},{id:2,type:"Thawed",count:33,lastEdited:"2025.12.03.11:45"},{id:3,type:"Opened",count:44,lastEdited:"2025.12.03.11:45"},{id:4,type:"Preped",count:17,lastEdited:"2025.12.03.11:45"},{id:5,type:"Heated",count:67,lastEdited:"2025.12.03.11:45"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Search"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[150px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsx("span",{className:"text-sm font-medium text-gray-900 whitespace-nowrap shrink-0",children:"Location"}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Label Type ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[250px]",children:"Label Types"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"No. of Labels"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.type}),p.jsx(fe,{className:"font-numeric",children:t.count}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}const Fae="label-template-",qae="label-template-ids";function P$(e){return`${Fae}${e}`}function N$(){return qae}function Uae(){return`template-${Date.now()}`}function Wae(){return`el-${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function Hae(e){return{id:e??Uae(),name:"未命名模板",labelType:"PRICE",unit:"cm",width:6,height:4,appliedLocation:"ALL",showRuler:!0,showGrid:!0,elements:[]}}const ob=[{name:'2"×1"',width:2,height:1,unit:"inch"},{name:'2"×2"',width:2,height:2,unit:"inch"},{name:'3"×1"',width:3,height:1,unit:"inch"},{name:'3"×2"',width:3,height:2,unit:"inch"},{name:'4"×2"',width:4,height:2,unit:"inch"},{name:'4"×6"',width:4,height:6,unit:"inch"},{name:"6cm×4cm",width:6,height:4,unit:"cm"},{name:"10cm×6cm",width:10,height:6,unit:"cm"},{name:"A4",width:21,height:29.7,unit:"cm"},{name:"A5",width:14.8,height:21,unit:"cm"}];function Vae(e,t=20,r=20){const n=Wae(),a={TEXT_STATIC:{width:120,height:24,config:{text:"文本",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRODUCT:{width:120,height:24,config:{text:"商品名",fontFamily:"Arial",fontSize:14,fontWeight:"normal",textAlign:"left"}},TEXT_PRICE:{width:80,height:24,config:{text:"0.00",prefix:"¥",decimal:2,fontFamily:"Arial",fontSize:14,fontWeight:"bold",textAlign:"right"}},BARCODE:{width:160,height:48,config:{barcodeType:"CODE128",data:"123456789",showText:!0,orientation:"horizontal"}},QRCODE:{width:80,height:80,config:{data:"https://example.com",errorLevel:"M"}},IMAGE:{width:60,height:60,config:{src:"",scaleMode:"contain"}},DATE:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:0}},TIME:{width:100,height:24,config:{format:"HH:mm",offsetDays:0}},DURATION:{width:120,height:24,config:{format:"YYYY-MM-DD",offsetDays:3}},WEIGHT:{width:80,height:24,config:{unit:"g",value:500}},WEIGHT_PRICE:{width:100,height:24,config:{unitPrice:10,weight:.5,currency:"¥"}},BLANK:{width:40,height:24,config:{}},NUTRITION:{width:200,height:120,config:{calories:120,fat:"5g",protein:"3g",carbs:"10g",layout:"standard"}}}[e];return{id:n,type:e,x:t,y:r,width:a.width,height:a.height,rotation:"horizontal",border:"none",config:{...a.config}}}function C$(){try{const e=localStorage.getItem(N$());if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}function T$(e){try{const t=localStorage.getItem(P$(e));return t?JSON.parse(t):null}catch{return null}}function ak(){const e=C$(),t=[];for(const r of e){const n=T$(r);n&&t.push(n)}return t.sort((r,n)=>n.id>r.id?1:-1)}function Gae(e){localStorage.setItem(N$(),JSON.stringify(e))}function Kae(e){const t=P$(e.id);localStorage.setItem(t,JSON.stringify(e));const r=C$();r.includes(e.id)||(r.push(e.id),Gae(r))}function Xae(e){const t=Yae(e),r=P.forwardRef((n,i)=>{const{children:a,...s}=n,u=P.Children.toArray(a),f=u.find(Zae);if(f){const c=f.props.children,d=u.map(h=>h===f?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:h);return p.jsx(t,{...s,ref:i,children:P.isValidElement(c)?P.cloneElement(c,void 0,d):null})}return p.jsx(t,{...s,ref:i,children:a})});return r.displayName=`${e}.Slot`,r}function Yae(e){const t=P.forwardRef((r,n)=>{const{children:i,...a}=r;if(P.isValidElement(i)){const s=eoe(i),u=Jae(a,i.props);return i.type!==P.Fragment&&(u.ref=n?Rs(n,s):s),P.cloneElement(i,u)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qae=Symbol("radix.slottable");function Zae(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qae}function Jae(e,t){const r={...t};for(const n in t){const i=e[n],a=t[n];/^on[A-Z]/.test(n)?i&&a?r[n]=(...u)=>{const f=a(...u);return i(...u),f}:i&&(r[n]=i):n==="style"?r[n]={...i,...a}:n==="className"&&(r[n]=[i,a].filter(Boolean).join(" "))}return{...e,...r}}function eoe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qp="Dialog",[k$]=gi(qp),[toe,An]=k$(qp),R$=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=P.useRef(null),f=P.useRef(null),[c,d]=Ha({prop:n,defaultProp:i??!1,onChange:a,caller:qp});return p.jsx(toe,{scope:t,triggerRef:u,contentRef:f,contentId:Gi(),titleId:Gi(),descriptionId:Gi(),open:c,onOpenChange:d,onOpenToggle:P.useCallback(()=>d(h=>!h),[d]),modal:s,children:r})};R$.displayName=qp;var M$="DialogTrigger",roe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(M$,r),a=Je(t,i.triggerRef);return p.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":A_(i.open),...n,ref:a,onClick:Fe(e.onClick,i.onOpenToggle)})});roe.displayName=M$;var j_="DialogPortal",[noe,I$]=k$(j_,{forceMount:void 0}),D$=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=An(j_,t);return p.jsx(noe,{scope:t,forceMount:r,children:P.Children.map(n,s=>p.jsx(Un,{present:r||a.open,children:p.jsx(w_,{asChild:!0,container:i,children:s})}))})};D$.displayName=j_;var Uh="DialogOverlay",L$=P.forwardRef((e,t)=>{const r=I$(Uh,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Uh,e.__scopeDialog);return a.modal?p.jsx(Un,{present:n||a.open,children:p.jsx(aoe,{...i,ref:t})}):null});L$.displayName=Uh;var ioe=Xae("DialogOverlay.RemoveScroll"),aoe=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(Uh,r);return p.jsx(S_,{as:ioe,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(We.div,{"data-state":A_(i.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),Ka="DialogContent",$$=P.forwardRef((e,t)=>{const r=I$(Ka,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,a=An(Ka,e.__scopeDialog);return p.jsx(Un,{present:n||a.open,children:a.modal?p.jsx(ooe,{...i,ref:t}):p.jsx(soe,{...i,ref:t})})});$$.displayName=Ka;var ooe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(null),i=Je(t,r.contentRef,n);return P.useEffect(()=>{const a=n.current;if(a)return KL(a)},[]),p.jsx(B$,{...e,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fe(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Fe(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Fe(e.onFocusOutside,a=>a.preventDefault())})}),soe=P.forwardRef((e,t)=>{const r=An(Ka,e.__scopeDialog),n=P.useRef(!1),i=P.useRef(!1);return p.jsx(B$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;r.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),B$=P.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,u=An(Ka,r),f=P.useRef(null),c=Je(t,f);return _L(),p.jsxs(p.Fragment,{children:[p.jsx(f_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:a,children:p.jsx(u_,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":A_(u.open),...s,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(loe,{titleId:u.titleId}),p.jsx(uoe,{contentRef:f,descriptionId:u.descriptionId})]})]})}),E_="DialogTitle",z$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(E_,r);return p.jsx(We.h2,{id:i.titleId,...n,ref:t})});z$.displayName=E_;var F$="DialogDescription",q$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(F$,r);return p.jsx(We.p,{id:i.descriptionId,...n,ref:t})});q$.displayName=F$;var U$="DialogClose",W$=P.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=An(U$,r);return p.jsx(We.button,{type:"button",...n,ref:t,onClick:Fe(e.onClick,()=>i.onOpenChange(!1))})});W$.displayName=U$;function A_(e){return e?"open":"closed"}var H$="DialogTitleWarning",[Fle,V$]=k6(H$,{contentName:Ka,titleName:E_,docsSlug:"dialog"}),loe=({titleId:e})=>{const t=V$(H$),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. + +If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. + +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},coe="DialogDescriptionWarning",uoe=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${V$(coe).contentName}}.`;return P.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},foe=R$,doe=D$,hoe=L$,poe=$$,moe=z$,voe=q$,goe=W$;function na({...e}){return p.jsx(foe,{"data-slot":"dialog",...e})}function yoe({...e}){return p.jsx(doe,{"data-slot":"dialog-portal",...e})}function xoe({className:e,...t}){return p.jsx(hoe,{"data-slot":"dialog-overlay",className:Ie("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function ia({className:e,children:t,...r}){return p.jsxs(yoe,{"data-slot":"dialog-portal",children:[p.jsx(xoe,{}),p.jsxs(poe,{"data-slot":"dialog-content",className:Ie("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r,children:[t,p.jsxs(goe,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[p.jsx(ec,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function aa({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:Ie("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ro({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-footer",className:Ie("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function oa({className:e,...t}){return p.jsx(moe,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",e),...t})}function au({className:e,...t}){return p.jsx(voe,{"data-slot":"dialog-description",className:Ie("text-muted-foreground text-sm",e),...t})}const boe=[{title:"模版信息",items:[{label:"Text",type:"TEXT_STATIC"},{label:"QR Code",type:"QRCODE"},{label:"Barcode",type:"BARCODE"},{label:"Blank Space",type:"BLANK"},{label:"Price",type:"TEXT_PRICE"},{label:"Image",type:"IMAGE"},{label:"Logo",type:"IMAGE"}]},{title:"标签信息",items:[{label:"Label Name",type:"TEXT_PRODUCT"},{label:"Text",type:"TEXT_STATIC"},{label:"QR Code",type:"QRCODE"},{label:"Barcode",type:"BARCODE"},{label:"Nutrition Facts",type:"NUTRITION"},{label:"Price",type:"TEXT_PRICE"},{label:"Duration Date",type:"DATE"},{label:"Duration Time",type:"TIME"},{label:"Duration",type:"DURATION"},{label:"Image",type:"IMAGE"},{label:"Label Type",type:"TEXT_STATIC"},{label:"How-to",type:"TEXT_STATIC"},{label:"Expiration Alert",type:"TEXT_STATIC"}]},{title:"自动生成",items:[{label:"Company",type:"TEXT_STATIC"},{label:"Employee",type:"TEXT_STATIC"},{label:"Current Date",type:"DATE"},{label:"Current Time",type:"TIME"},{label:"Label ID",type:"TEXT_STATIC"}]},{title:"打印时输入",subtitle:"点击添加到画布",items:[{label:"Text",type:"TEXT_STATIC",config:{inputType:"text"}},{label:"Weight",type:"WEIGHT"},{label:"Number",type:"TEXT_STATIC",config:{inputType:"number",text:"0"}},{label:"Date & Time",type:"DATE",config:{inputType:"datetime"}},{label:"Multiple Options",type:"TEXT_STATIC",config:{inputType:"options"}}]}];function woe({onAddElement:e}){return p.jsxs("div",{className:"w-44 shrink-0 border-r border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-2 py-2 border-b border-gray-200 font-semibold text-gray-800 text-sm",children:"Elements"}),p.jsx(fc,{className:"flex-1",children:p.jsx("div",{className:"p-1.5 space-y-3",children:boe.map(t=>p.jsxs("div",{children:[p.jsx("div",{className:"px-2 py-1 text-xs font-medium text-gray-500 uppercase tracking-wide",children:t.title}),t.subtitle&&p.jsx("div",{className:"px-2 py-0.5 text-[10px] text-gray-400",children:t.subtitle}),p.jsx("div",{className:"grid grid-cols-2 gap-1 mt-0.5",children:t.items.map((r,n)=>p.jsx("button",{type:"button",onClick:()=>e(r.type,r.config),className:"text-left px-2 py-1 text-xs rounded hover:bg-gray-100 border border-transparent hover:border-gray-200 truncate",children:r.label},`${t.title}-${r.label}-${n}`))})]},t.title))})})]})}var Uf={},Ul={},Wf={},ok;function Wr(){if(ok)return Wf;ok=1,Object.defineProperty(Wf,"__esModule",{value:!0});function e(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}var t=function r(n,i){e(this,r),this.data=n,this.text=i.text||n,this.options=i};return Wf.default=t,Wf}var sk;function _oe(){if(sk)return Ul;sk=1,Object.defineProperty(Ul,"__esModule",{value:!0}),Ul.CODE39=void 0;var e=(function(){function y(w,S){for(var O=0;O=200){w=m.shift()-105;var S=n.SWAP[w];S!==void 0?y=d.next(m,g+1,S):((b===n.SET_A||b===n.SET_B)&&w===n.SHIFT&&(m[0]=b===n.SET_A?m[0]>95?m[0]-96:m[0]:m[0]<32?m[0]+96:m[0]),y=d.next(m,g+1,b))}else w=d.correctIndex(m,b),y=d.next(m,g+1,b);var O=d.getBar(w),E=w*g;return{result:O+y.result,checksum:E+y.checksum}}}]),d})(r.default);return Vf.default=f,Vf}var Gf={},uk;function Soe(){if(uk)return Gf;uk=1,Object.defineProperty(Gf,"__esModule",{value:!0});var e=ou(),t=function(u){return u.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},r=function(u){return u.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},n=function(u){return u.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function i(s,u){var f=u?e.A_CHARS:e.B_CHARS,c=s.match(new RegExp("^("+f+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(c)return c[1]+"Ì"+a(s.substring(c[1].length));var d=s.match(new RegExp("^"+f+"+"))[0];return d.length===s.length?s:d+String.fromCharCode(u?205:206)+i(s.substring(d.length),!u)}function a(s){var u=n(s),f=u.length;if(f===s.length)return s;s=s.substring(f);var c=t(s)>=r(s);return u+String.fromCharCode(c?206:205)+i(s,c)}return Gf.default=function(s){var u=void 0,f=n(s).length;if(f>=2)u=e.C_START_CHAR+a(s);else{var c=t(s)>r(s);u=(c?e.A_START_CHAR:e.B_START_CHAR)+i(s,c)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(d,h){return"Ë"+h})},Gf}var fk;function Ooe(){if(fk)return Hf;fk=1,Object.defineProperty(Hf,"__esModule",{value:!0});var e=Up(),t=i(e),r=Soe(),n=i(r);function i(c){return c&&c.__esModule?c:{default:c}}function a(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}function s(c,d){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:c}function u(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);c.prototype=Object.create(d&&d.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(c,d):c.__proto__=d)}var f=(function(c){u(d,c);function d(h,m){if(a(this,d),/^[\x00-\x7F\xC8-\xD3]+$/.test(h))var g=s(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,(0,n.default)(h),m));else var g=s(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,h,m));return s(g)}return d})(t.default);return Hf.default=f,Hf}var Kf={},dk;function joe(){if(dk)return Kf;dk=1,Object.defineProperty(Kf,"__esModule",{value:!0});var e=(function(){function c(d,h){for(var m=0;mb.width*10?b.width*10:b.fontSize,y.guardHeight=b.height+y.fontSize/2+b.textMargin,y}return e(m,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(b,y){return this.text.substr(b,y)}},{key:"leftEncode",value:function(b,y){return(0,n.default)(b,y)}},{key:"rightText",value:function(b,y){return this.text.substr(b,y)}},{key:"rightEncode",value:function(b,y){return(0,n.default)(b,y)}},{key:"encodeGuarded",value:function(){var b={fontSize:this.fontSize},y={height:this.guardHeight};return[{data:t.SIDE_BIN,options:y},{data:this.leftEncode(),text:this.leftText(),options:b},{data:t.MIDDLE_BIN,options:y},{data:this.rightEncode(),text:this.rightText(),options:b},{data:t.SIDE_BIN,options:y}]}},{key:"encodeFlat",value:function(){var b=[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN];return{data:b.join(""),text:this.text}}}]),m})(a.default);return Zf.default=d,Zf}var xk;function Noe(){if(xk)return Qf;xk=1,Object.defineProperty(Qf,"__esModule",{value:!0});var e=(function(){function h(m,g){for(var b=0;bb.width*10?y.fontSize=b.width*10:y.fontSize=b.fontSize,y.guardHeight=b.height+y.fontSize/2+b.textMargin,y}return e(m,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==d(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var b="";return b+="101",b+=(0,r.default)(this.data.substr(0,6),"LLLLLL"),b+="01010",b+=(0,r.default)(this.data.substr(6,6),"RRRRRR"),b+="101",{data:b,text:this.text}}},{key:"guardedEncoding",value:function(){var b=[];return this.displayValue&&b.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),b.push({data:"101"+(0,r.default)(this.data[0],"L"),options:{height:this.guardHeight}}),b.push({data:(0,r.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),b.push({data:"01010",options:{height:this.guardHeight}}),b.push({data:(0,r.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),b.push({data:(0,r.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&b.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),b}}]),m})(i.default);function d(h){var m=0,g;for(g=1;g<11;g+=2)m+=parseInt(h[g]);for(g=0;g<11;g+=2)m+=parseInt(h[g])*3;return(10-m%10)%10}return Wl.default=c,Wl}var nd={},Ok;function Roe(){if(Ok)return nd;Ok=1,Object.defineProperty(nd,"__esModule",{value:!0});var e=(function(){function b(y,w){for(var S=0;SS.width*10?O.fontSize=S.width*10:O.fontSize=S.fontSize,O.guardHeight=S.height+O.fontSize/2+S.textMargin,O}return e(y,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var S="";return S+="101",S+=this.encodeMiddleDigits(),S+="010101",{data:S,text:this.text}}},{key:"guardedEncoding",value:function(){var S=[];return this.displayValue&&S.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),S.push({data:"101",options:{height:this.guardHeight}}),S.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),S.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&S.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),S}},{key:"encodeMiddleDigits",value:function(){var S=this.upcA[0],O=this.upcA[this.upcA.length-1],E=h[parseInt(O)][parseInt(S)];return(0,r.default)(this.middleDigits,E)}}]),y})(i.default);function g(b,y){for(var w=parseInt(b[b.length-1]),S=d[w],O="",E=0,C=0;C=3&&this.number<=131070}}]),c})(r.default);return Vl.pharmacode=u,Vl}var Gl={},$k;function Woe(){if($k)return Gl;$k=1,Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.codabar=void 0;var e=(function(){function f(c,d){for(var h=0;h":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}),zo}var zk;function Y$(){if(zk)return fd;zk=1,Object.defineProperty(fd,"__esModule",{value:!0});var e=(function(){function c(d,h){for(var m=0;m0?d.fontSize+d.textMargin:0)+d.marginTop+d.marginBottom}function i(c,d,h){if(h.displayValue&&dd&&(d=c[h].height);return d}function f(c,d,h){var m;if(h)m=h;else if(typeof document<"u")m=document.createElement("canvas").getContext("2d");else return 0;m.font=d.fontOptions+" "+d.fontSize+"px "+d.font;var g=m.measureText(c);if(!g)return 0;var b=g.width;return b}return Tr.getMaximumHeightOfEncodings=u,Tr.getEncodingHeight=n,Tr.getBarcodePadding=i,Tr.calculateEncodingAttributes=a,Tr.getTotalWidthOfEncodings=s,Tr}var Zk;function Joe(){if(Zk)return wd;Zk=1,Object.defineProperty(wd,"__esModule",{value:!0});var e=(function(){function u(f,c){for(var d=0;d0?(g=0,h.textAlign="left"):c.textAlign=="right"?(g=d.width-1,h.textAlign="right"):(g=d.width/2,h.textAlign="center"),h.fillText(d.text,g,b)}}},{key:"moveCanvasDrawing",value:function(c){var d=this.canvas.getContext("2d");d.translate(c.width,0)}},{key:"restoreCanvas",value:function(){var c=this.canvas.getContext("2d");c.restore()}}]),u})();return wd.default=s,wd}var _d={},Jk;function ese(){if(Jk)return _d;Jk=1,Object.defineProperty(_d,"__esModule",{value:!0});var e=(function(){function f(c,d){for(var h=0;h0&&(this.drawRect(w-h.width*y,b,h.width*y,h.height,d),y=0);y>0&&this.drawRect(w-h.width*(y-1),b,h.width*y,h.height,d)}},{key:"drawSVGText",value:function(d,h,m){var g=this.document.createElementNS(s,"text");if(h.displayValue){var b,y;g.setAttribute("font-family",h.font),g.setAttribute("font-size",h.fontSize),h.fontOptions.includes("bold")&&g.setAttribute("font-weight","bold"),h.fontOptions.includes("italic")&&g.setAttribute("font-style","italic"),h.textPosition=="top"?y=h.fontSize-h.textMargin:y=h.height+h.textMargin+h.fontSize,h.textAlign=="left"||m.barcodePadding>0?(b=0,g.setAttribute("text-anchor","start")):h.textAlign=="right"?(b=m.width-1,g.setAttribute("text-anchor","end")):(b=m.width/2,g.setAttribute("text-anchor","middle")),g.setAttribute("x",b),g.setAttribute("y",y),g.appendChild(this.document.createTextNode(m.text)),d.appendChild(g)}}},{key:"setSvgAttributes",value:function(d,h){var m=this.svg;m.setAttribute("width",d+"px"),m.setAttribute("height",h+"px"),m.setAttribute("x","0px"),m.setAttribute("y","0px"),m.setAttribute("viewBox","0 0 "+d+" "+h),m.setAttribute("xmlns",s),m.setAttribute("version","1.1")}},{key:"createGroup",value:function(d,h,m){var g=this.document.createElementNS(s,"g");return g.setAttribute("transform","translate("+d+", "+h+")"),m.appendChild(g),g}},{key:"setGroupOptions",value:function(d,h){d.setAttribute("fill",h.lineColor)}},{key:"drawRect",value:function(d,h,m,g,b){var y=this.document.createElementNS(s,"rect");return y.setAttribute("x",d),y.setAttribute("y",h),y.setAttribute("width",m),y.setAttribute("height",g),b.appendChild(y),y}}]),f})();return _d.default=u,_d}var Sd={},eR;function tse(){if(eR)return Sd;eR=1,Object.defineProperty(Sd,"__esModule",{value:!0});var e=(function(){function n(i,a){for(var s=0;s"u"?"undefined":e(d))==="object"&&!d.nodeName)return{element:d,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException}}function f(d){var h=document.querySelectorAll(d);if(h.length!==0){for(var m=[],g=0;g"u")throw Error("No element to render on was provided.");return U._renderProperties=(0,c.default)(q),U._encodings=[],U._options=w.default,U._errorHandler=new g.default(U),typeof L<"u"&&(D=D||{},D.format||(D.format=T()),U.options(D)[D.format](L,D).render()),U};E.getModule=function(I){return t.default[I]};for(var C in t.default)t.default.hasOwnProperty(C)&&A(t.default,C);function A(I,q){O.prototype[q]=O.prototype[q.toUpperCase()]=O.prototype[q.toLowerCase()]=function(L,D){var U=this;return U._errorHandler.wrapBarcodeCall(function(){D.text=typeof D.text>"u"?void 0:""+D.text;var H=(0,n.default)(U._options,D);H=(0,h.default)(H);var V=I[q],K=N(L,V,H);return U._encodings.push(K),U})}}function N(I,q,L){I=""+I;var D=new q(I,L);if(!D.valid())throw new b.InvalidInputException(D.constructor.name,I);var U=D.encode();U=(0,a.default)(U);for(var H=0;Ht in e?lse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,H1=(e,t)=>{for(var r in t||(t={}))t3.call(t,r)&&oR(e,r,t[r]);if(Wh)for(var r of Wh(t))r3.call(t,r)&&oR(e,r,t[r]);return e},V1=(e,t)=>{var r={};for(var n in e)t3.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wh)for(var n of Wh(e))t.indexOf(n)<0&&r3.call(e,n)&&(r[n]=e[n]);return r};/** + * @license QR Code generator library (TypeScript) + * Copyright (c) Project Nayuki. + * SPDX-License-Identifier: MIT + */var Xa;(e=>{const t=class Ge{constructor(f,c,d,h){if(this.version=f,this.errorCorrectionLevel=c,this.modules=[],this.isFunction=[],fGe.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=f*4+17;let m=[];for(let b=0;b7)throw new RangeError("Invalid value");let b,y;for(b=d;;b++){const E=Ge.getNumDataCodewords(b,c)*8,C=s.getTotalBits(f,b);if(C<=E){y=C;break}if(b>=h)throw new RangeError("Data too long")}for(const E of[Ge.Ecc.MEDIUM,Ge.Ecc.QUARTILE,Ge.Ecc.HIGH])g&&y<=Ge.getNumDataCodewords(b,E)*8&&(c=E);let w=[];for(const E of f){r(E.mode.modeBits,4,w),r(E.numChars,E.mode.numCharCountBits(b),w);for(const C of E.getData())w.push(C)}i(w.length==y);const S=Ge.getNumDataCodewords(b,c)*8;i(w.length<=S),r(0,Math.min(4,S-w.length),w),r(0,(8-w.length%8)%8,w),i(w.length%8==0);for(let E=236;w.lengthO[C>>>3]|=E<<7-(C&7)),new Ge(b,c,O,m)}getModule(f,c){return 0<=f&&f>>9)*1335;const h=(c<<10|d)^21522;i(h>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,n(h,m));this.setFunctionModule(8,7,n(h,6)),this.setFunctionModule(8,8,n(h,7)),this.setFunctionModule(7,8,n(h,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,n(h,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,n(h,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,n(h,m));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let f=this.version;for(let d=0;d<12;d++)f=f<<1^(f>>>11)*7973;const c=this.version<<12|f;i(c>>>18==0);for(let d=0;d<18;d++){const h=n(c,d),m=this.size-11+d%3,g=Math.floor(d/3);this.setFunctionModule(m,g,h),this.setFunctionModule(g,m,h)}}drawFinderPattern(f,c){for(let d=-4;d<=4;d++)for(let h=-4;h<=4;h++){const m=Math.max(Math.abs(h),Math.abs(d)),g=f+h,b=c+d;0<=g&&g{(E!=y-m||A>=b)&&O.push(C[E])});return i(O.length==g),O}drawCodewords(f){if(f.length!=Math.floor(Ge.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let d=this.size-1;d>=1;d-=2){d==6&&(d=5);for(let h=0;h>>3],7-(c&7)),c++)}}i(c==f.length*8)}applyMask(f){if(f<0||f>7)throw new RangeError("Mask value out of range");for(let c=0;c5&&f++):(this.finderPenaltyAddHistory(b,y),g||(f+=this.finderPenaltyCountPatterns(y)*Ge.PENALTY_N3),g=this.modules[m][w],b=1);f+=this.finderPenaltyTerminateAndCount(g,b,y)*Ge.PENALTY_N3}for(let m=0;m5&&f++):(this.finderPenaltyAddHistory(b,y),g||(f+=this.finderPenaltyCountPatterns(y)*Ge.PENALTY_N3),g=this.modules[w][m],b=1);f+=this.finderPenaltyTerminateAndCount(g,b,y)*Ge.PENALTY_N3}for(let m=0;mg+(b?1:0),c);const d=this.size*this.size,h=Math.ceil(Math.abs(c*20-d*10)/d)-1;return i(0<=h&&h<=9),f+=h*Ge.PENALTY_N4,i(0<=f&&f<=2568888),f}getAlignmentPatternPositions(){if(this.version==1)return[];{const f=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(f*2-2))*2;let d=[6];for(let h=this.size-7;d.lengthGe.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*f+128)*f+64;if(f>=2){const d=Math.floor(f/7)+2;c-=(25*d-10)*d-55,f>=7&&(c-=36)}return i(208<=c&&c<=29648),c}static getNumDataCodewords(f,c){return Math.floor(Ge.getNumRawDataModules(f)/8)-Ge.ECC_CODEWORDS_PER_BLOCK[c.ordinal][f]*Ge.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][f]}static reedSolomonComputeDivisor(f){if(f<1||f>255)throw new RangeError("Degree out of range");let c=[];for(let h=0;h0);for(const h of f){const m=h^d.shift();d.push(0),c.forEach((g,b)=>d[b]^=Ge.reedSolomonMultiply(g,m))}return d}static reedSolomonMultiply(f,c){if(f>>>8||c>>>8)throw new RangeError("Byte out of range");let d=0;for(let h=7;h>=0;h--)d=d<<1^(d>>>7)*285,d^=(c>>>h&1)*f;return i(d>>>8==0),d}finderPenaltyCountPatterns(f){const c=f[1];i(c<=this.size*3);const d=c>0&&f[2]==c&&f[3]==c*3&&f[4]==c&&f[5]==c;return(d&&f[0]>=c*4&&f[6]>=c?1:0)+(d&&f[6]>=c*4&&f[0]>=c?1:0)}finderPenaltyTerminateAndCount(f,c,d){return f&&(this.finderPenaltyAddHistory(c,d),c=0),c+=this.size,this.finderPenaltyAddHistory(c,d),this.finderPenaltyCountPatterns(d)}finderPenaltyAddHistory(f,c){c[0]==0&&(f+=this.size),c.pop(),c.unshift(f)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;function r(u,f,c){if(f<0||f>31||u>>>f)throw new RangeError("Value out of range");for(let d=f-1;d>=0;d--)c.push(u>>>d&1)}function n(u,f){return(u>>>f&1)!=0}function i(u){if(!u)throw new Error("Assertion error")}const a=class Et{constructor(f,c,d){if(this.mode=f,this.numChars=c,this.bitData=d,c<0)throw new RangeError("Invalid argument");this.bitData=d.slice()}static makeBytes(f){let c=[];for(const d of f)r(d,8,c);return new Et(Et.Mode.BYTE,f.length,c)}static makeNumeric(f){if(!Et.isNumeric(f))throw new RangeError("String contains non-numeric characters");let c=[];for(let d=0;d=1<{(t=>{const r=class{constructor(i,a){this.ordinal=i,this.formatBits=a}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),t.Ecc=r})(e.QrCode||(e.QrCode={}))})(Xa||(Xa={}));(e=>{(t=>{const r=class{constructor(i,a){this.modeBits=i,this.numBitsCharCount=a}numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),t.Mode=r})(e.QrSegment||(e.QrSegment={}))})(Xa||(Xa={}));var Xo=Xa;/** + * @license qrcode.react + * Copyright (c) Paul O'Shannessy + * SPDX-License-Identifier: ISC + */var cse={L:Xo.QrCode.Ecc.LOW,M:Xo.QrCode.Ecc.MEDIUM,Q:Xo.QrCode.Ecc.QUARTILE,H:Xo.QrCode.Ecc.HIGH},n3=128,i3="L",a3="#FFFFFF",o3="#000000",s3=!1,l3=1,use=4,fse=0,dse=.1;function c3(e,t=0){const r=[];return e.forEach(function(n,i){let a=null;n.forEach(function(s,u){if(!s&&a!==null){r.push(`M${a+t} ${i+t}h${u-a}v1H${a+t}z`),a=null;return}if(u===n.length-1){if(!s)return;a===null?r.push(`M${u+t},${i+t} h1v1H${u+t}z`):r.push(`M${a+t},${i+t} h${u+1-a}v1H${a+t}z`);return}s&&a===null&&(a=u)})}),r.join("")}function u3(e,t){return e.slice().map((r,n)=>n=t.y+t.h?r:r.map((i,a)=>a=t.x+t.w?i:!1))}function hse(e,t,r,n){if(n==null)return null;const i=e.length+r*2,a=Math.floor(t*dse),s=i/t,u=(n.width||a)*s,f=(n.height||a)*s,c=n.x==null?e.length/2-u/2:n.x*s,d=n.y==null?e.length/2-f/2:n.y*s,h=n.opacity==null?1:n.opacity;let m=null;if(n.excavate){let b=Math.floor(c),y=Math.floor(d),w=Math.ceil(u+c-b),S=Math.ceil(f+d-y);m={x:b,y,w,h:S}}const g=n.crossOrigin;return{x:c,y:d,h:f,w:u,excavation:m,opacity:h,crossOrigin:g}}function pse(e,t){return t!=null?Math.max(Math.floor(t),0):e?use:fse}function f3({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:a,size:s,boostLevel:u}){let f=z.useMemo(()=>{const b=(Array.isArray(e)?e:[e]).reduce((y,w)=>(y.push(...Xo.QrSegment.makeSegments(w)),y),[]);return Xo.QrCode.encodeSegments(b,cse[t],r,void 0,void 0,u)},[e,t,r,u]);const{cells:c,margin:d,numCells:h,calculatedImageSettings:m}=z.useMemo(()=>{let g=f.getModules();const b=pse(n,i),y=g.length+b*2,w=hse(g,s,b,a);return{cells:g,margin:b,numCells:y,calculatedImageSettings:w}},[f,s,a,n,i]);return{qrcode:f,margin:d,cells:c,numCells:h,calculatedImageSettings:m}}var mse=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),vse=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,marginSize:m,imageSettings:g}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:w}=y,S=V1(y,["style"]),O=g?.src,E=z.useRef(null),C=z.useRef(null),A=z.useCallback(H=>{E.current=H,typeof r=="function"?r(H):r&&(r.current=H)},[r]),[N,T]=z.useState(!1),{margin:R,cells:I,numCells:q,calculatedImageSettings:L}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:m,imageSettings:g,size:a});z.useEffect(()=>{if(E.current!=null){const H=E.current,V=H.getContext("2d");if(!V)return;let K=I;const X=C.current,B=L!=null&&X!==null&&X.complete&&X.naturalHeight!==0&&X.naturalWidth!==0;B&&L.excavation!=null&&(K=u3(I,L.excavation));const Z=window.devicePixelRatio||1;H.height=H.width=a*Z;const ee=a/q*Z;V.scale(ee,ee),V.fillStyle=u,V.fillRect(0,0,q,q),V.fillStyle=f,mse?V.fill(new Path2D(c3(K,R))):I.forEach(function(M,$){M.forEach(function(Q,ae){Q&&V.fillRect(ae+R,$+R,1,1)})}),L&&(V.globalAlpha=L.opacity),B&&V.drawImage(X,L.x+R,L.y+R,L.w,L.h)}}),z.useEffect(()=>{T(!1)},[O]);const D=H1({height:a,width:a},w);let U=null;return O!=null&&(U=z.createElement("img",{src:O,key:O,style:{display:"none"},onLoad:()=>{T(!0)},ref:C,crossOrigin:L?.crossOrigin})),z.createElement(z.Fragment,null,z.createElement("canvas",H1({style:D,height:a,width:a,ref:A,role:"img"},S)),U)});vse.displayName="QRCodeCanvas";var d3=z.forwardRef(function(t,r){const n=t,{value:i,size:a=n3,level:s=i3,bgColor:u=a3,fgColor:f=o3,includeMargin:c=s3,minVersion:d=l3,boostLevel:h,title:m,marginSize:g,imageSettings:b}=n,y=V1(n,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:w,cells:S,numCells:O,calculatedImageSettings:E}=f3({value:i,level:s,minVersion:d,boostLevel:h,includeMargin:c,marginSize:g,imageSettings:b,size:a});let C=S,A=null;b!=null&&E!=null&&(E.excavation!=null&&(C=u3(S,E.excavation)),A=z.createElement("image",{href:b.src,height:E.h,width:E.w,x:E.x+w,y:E.y+w,preserveAspectRatio:"none",opacity:E.opacity,crossOrigin:E.crossOrigin}));const N=c3(C,w);return z.createElement("svg",H1({height:a,width:a,viewBox:`0 0 ${O} ${O}`,ref:r,role:"img"},y),!!m&&z.createElement("title",null,m),z.createElement("path",{fill:u,d:`M0,0 h${O}v${O}H0z`,shapeRendering:"crispEdges"}),z.createElement("path",{fill:f,d:N,shapeRendering:"crispEdges"}),A)});d3.displayName="QRCodeSVG";function gse({data:e,width:t,height:r,showText:n,orientation:i="horizontal"}){const a=P.useRef(null),s=i==="vertical",u=Math.max(20,(s?t:r)-(n?14:4));P.useEffect(()=>{if(a.current&&e)try{sse(a.current,e,{format:"CODE128",width:1,height:u,displayValue:n!==!1,margin:2,fontOptions:"",fontSize:10})}catch{}},[e,u,n]);const f=p.jsx("svg",{ref:a,className:"w-full h-full min-h-0",style:{maxHeight:s?t:r}});return s?p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx("div",{style:{transform:"rotate(-90deg)",transformOrigin:"center center",width:r,height:t,display:"flex",alignItems:"center",justifyContent:"center"},children:f})}):f}const lc=8;function qo(e){return Math.round(e/lc)*lc}function Hh(e,t){return t==="cm"?e*37.8:e*96}function sR(e,t){return t==="cm"?e/37.8:e/96}function h3({el:e}){const t=e.config,r=e.type,n={fontSize:t?.fontSize??14,fontFamily:t?.fontFamily??"Arial",fontWeight:t?.fontWeight??"normal",textAlign:t?.textAlign??"left",color:t?.color??"#000"},i=t?.inputType;if(r==="TEXT_STATIC"){const a=t?.text??"文本";return i==="number"?p.jsx("input",{type:"number",readOnly:!0,value:t?.text??"0",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:{...n,textAlign:"right"}}):i==="options"?p.jsxs("div",{className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 flex items-center pointer-events-none text-gray-500",style:n,children:[p.jsx("span",{className:"truncate flex-1",children:a||"请选择..."}),p.jsx("span",{className:"ml-auto text-gray-400",children:"▼"})]}):i==="text"?p.jsx("input",{type:"text",readOnly:!0,value:a,className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRODUCT"){const a=t?.text??"商品名";return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-pre-wrap break-all leading-tight",style:n,children:a})}if(r==="TEXT_PRICE"){const a=t?.prefix??"¥",s=t?.text??"0.00";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden flex items-center",style:{...n,justifyContent:n.textAlign==="center"?"center":n.textAlign==="right"?"flex-end":"flex-start"},children:[p.jsx("span",{children:a}),p.jsx("span",{children:s})]})}if(r==="BARCODE"){const a=t?.data??"123456789",s=t?.showText!==!1,u=t?.orientation==="vertical"?"vertical":"horizontal";return p.jsx("div",{className:"flex flex-col items-center justify-center w-full h-full overflow-hidden p-0.5",children:p.jsx("div",{className:"flex-1 w-full min-h-0 flex items-center justify-center",children:p.jsx(gse,{data:a,width:e.width,height:e.height,showText:s,orientation:u})})})}if(r==="QRCODE"){const a=t?.data??"https://example.com",s=Math.min(e.width,e.height)-4;return p.jsx("div",{className:"w-full h-full flex items-center justify-center p-0.5",children:p.jsx(d3,{value:a,size:Math.max(20,s),level:"M",includeMargin:!1})})}if(r==="IMAGE"){const a=t?.src;return a?p.jsx("img",{src:a,alt:"",className:"w-full h-full object-contain"}):p.jsx("div",{className:"w-full h-full flex flex-col items-center justify-center bg-gray-100 text-gray-500 text-[10px] border border-dashed border-gray-300",children:p.jsx("span",{className:"font-medium",children:"Logo"})})}if(r==="DATE"){const s=(t?.format??"YYYY-MM-DD").replace("YYYY","2025").replace("MM","02").replace("DD","01");return t?.inputType==="datetime"||t?.inputType==="date"?p.jsx("input",{type:"date",readOnly:!0,value:"2025-02-01",className:"w-full h-full min-w-0 border border-gray-300 bg-white rounded px-1 pointer-events-none text-[10px]",style:n}):p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="TIME"){const s=(t?.format??"HH:mm").replace("HH","12").replace("mm","30");return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:s})}if(r==="DURATION")return p.jsx("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:"保质期 2025-02-04"});if(r==="WEIGHT"){const a=t?.value??500,s=t?.unit??"g";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[a,s]})}if(r==="WEIGHT_PRICE"){const a=t?.unitPrice??10,s=t?.weight??.5,u=t?.currency??"¥";return p.jsxs("div",{className:"w-full h-full px-1 overflow-hidden whitespace-nowrap",style:n,children:[u,(a*s).toFixed(2)]})}if(r==="NUTRITION"){const a=t?.calories??120;return p.jsxs("div",{className:"text-[8px] p-0.5 w-full h-full overflow-hidden flex flex-col",children:[p.jsx("div",{className:"font-semibold border-b border-black",children:"Nutrition Facts"}),p.jsxs("div",{children:["Calories ",a]})]})}return r==="BLANK"?p.jsx("div",{className:"w-full h-full border border-dashed border-gray-200"}):p.jsx("div",{className:"text-gray-500 text-[10px] px-1 truncate w-full flex items-center justify-center",children:e.type.replace(/_/g," ")})}function yse({template:e,selectedId:t,onSelect:r,onUpdateElement:n,onDeleteElement:i,onTemplateChange:a,scale:s=1,onZoomIn:u,onZoomOut:f,onPreview:c}){const d=P.useRef(null),h=P.useRef(null),m=P.useRef(null),g=P.useRef(null),b=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[S,O]=z.useState(!1),[E,C]=z.useState(!1),A=P.useRef(null),[N,T]=z.useState({x:0,y:0}),R=P.useRef(null),I=Hh(e.width,e.unit),q=Hh(e.height,e.unit),L=e.showGrid!==!1,D=P.useCallback((M,$)=>{if(S||M.button===1)return;M.stopPropagation(),r($),h.current?.focus();const Q=e.elements.find(pe=>pe.id===$);if(!Q)return;const ae=document.getElementById(`element-${$}`);ae&&(ae.classList.add("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),ae.style.cursor="grabbing"),m.current={id:$,startX:M.clientX,startY:M.clientY,elX:Q.x,elY:Q.y},y.current={id:$,x:Q.x,y:Q.y},M.currentTarget.setPointerCapture?.(M.pointerId)},[e.elements,r,S]),U=P.useCallback(M=>{w.current!==null&&cancelAnimationFrame(w.current),w.current=requestAnimationFrame(()=>{M(),w.current=null})},[]),H=P.useCallback(M=>{if(E&&R.current){const $=M.clientX-R.current.startX,Q=M.clientY-R.current.startY;T({x:R.current.x+$,y:R.current.y+Q});return}if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q;return}if(m.current){const{id:$,startX:Q,startY:ae,elX:pe,elY:ye}=m.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=Math.max(0,pe+ie),re=Math.max(0,ye+ue),De=qo(ve),Te=qo(re),Ke=document.getElementById(`element-${$}`);Ke&&(Ke.style.left=`${De}px`,Ke.style.top=`${Te}px`),y.current={id:$,x:De,y:Te}})}if(g.current){const{id:$,corner:Q,startX:ae,startY:pe,w:ye,h:oe,elX:me,elY:ie}=g.current,ue=M.clientX,ve=M.clientY;U(()=>{const re=(ue-ae)/s,De=(ve-pe)/s;let Te=ye,Ke=oe,lt=me,vt=ie;Q.includes("e")&&(Te=Math.max(20,ye+re)),Q.includes("w")&&(Te=Math.max(20,ye-re),lt=me+re),Q.includes("s")&&(Ke=Math.max(12,oe+De)),Q.includes("n")&&(Ke=Math.max(12,oe-De),vt=ie+De);const dr=qo(Te),Or=qo(Ke),jr=qo(lt),Kt=qo(vt),Xt=document.getElementById(`element-${$}`);Xt&&(Xt.style.width=`${dr}px`,Xt.style.height=`${Or}px`,Xt.style.left=`${jr}px`,Xt.style.top=`${Kt}px`),y.current={id:$,width:dr,height:Or,x:jr,y:Kt}})}if(b.current&&a){const{edge:$,startX:Q,startY:ae,startW:pe,startH:ye}=b.current,oe=M.clientX,me=M.clientY;U(()=>{const ie=(oe-Q)/s,ue=(me-ae)/s,ve=sR(ie,e.unit),re=sR(ue,e.unit);if($==="bottom"){const De=Math.max(1,ye+re);a({height:De})}else{const De=Math.max(1,pe+ve);a({width:De})}})}},[E,a,s,e.unit,U]),V=P.useCallback(()=>{E&&(C(!1),A.current=null,R.current=null),w.current!==null&&(cancelAnimationFrame(w.current),w.current=null);const M=m.current?.id||g.current?.id;if(M){const $=document.getElementById(`element-${M}`);$&&($.classList.remove("z-50","opacity-90","shadow-xl","ring-2","ring-blue-400","ring-offset-2"),$.style.cursor="")}if(y.current){const{id:$,...Q}=y.current;n($,Q),y.current=null}m.current=null,g.current=null,b.current=null},[n]);P.useEffect(()=>{const M=Q=>{Q.code==="Space"&&!Q.repeat&&O(!0)},$=Q=>{Q.code==="Space"&&(O(!1),C(!1),A.current=null,R.current=null)};return window.addEventListener("keydown",M),window.addEventListener("keyup",$),()=>{window.removeEventListener("keydown",M),window.removeEventListener("keyup",$)}},[]),P.useEffect(()=>{const M=d.current;if(!M)return;const $=()=>{M.scrollLeft=Math.max(0,(M.scrollWidth-M.clientWidth)/2),M.scrollTop=Math.max(0,(M.scrollHeight-M.clientHeight)/2)},Q=requestAnimationFrame($),ae=setTimeout($,100);return()=>{cancelAnimationFrame(Q),clearTimeout(ae)}},[s,I,q]);const K=P.useCallback(M=>{if(!t)return;if(M.key==="Delete"||M.key==="Backspace"){M.preventDefault();const ye=e.elements.findIndex(oe=>oe.id===t);if(ye>=0){const oe=e.elements.filter(me=>me.id!==t);i(t),r(oe[ye]?.id??oe[ye-1]?.id??null)}return}const $=e.elements.find(ye=>ye.id===t);if(!$)return;const Q=M.shiftKey?1:lc;let ae=0,pe=0;switch(M.key){case"ArrowLeft":ae=-Q;break;case"ArrowRight":ae=Q;break;case"ArrowUp":pe=-Q;break;case"ArrowDown":pe=-Q;break;default:return}M.key==="ArrowDown"&&(pe=Q),M.preventDefault(),n($.id,{x:Math.max(0,$.x+ae),y:Math.max(0,$.y+pe)})},[t,e.elements,n,i,r]),X=()=>r(null),B=M=>{(S||M.button===1)&&(M.preventDefault(),C(!0),A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft||0,scrollTop:d.current?.scrollTop||0},M.currentTarget.setPointerCapture(M.pointerId))},Z=M=>{if(E&&A.current&&d.current){const $=M.clientX-A.current.x,Q=M.clientY-A.current.y;d.current.scrollLeft=A.current.scrollLeft-$,d.current.scrollTop=A.current.scrollTop-Q}},ee=M=>{E&&(C(!1),A.current=null)};return p.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden bg-gray-100",children:[p.jsxs("div",{className:"shrink-0 px-4 py-2 border-b border-gray-200 bg-white flex items-center justify-between gap-2 flex-wrap z-10",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Label Preview"}),p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c&&p.jsx("button",{type:"button",onClick:c,className:"h-8 px-3 rounded border border-gray-300 bg-white text-gray-700 hover:bg-gray-50 text-xs font-medium shadow-sm transition-all active:scale-95",children:"预览"}),a&&p.jsxs(p.Fragment,{children:[p.jsxs(tt,{value:(()=>{const M=ob.findIndex($=>$.width===e.width&&$.height===e.height&&$.unit===e.unit);return M>=0?String(M):"custom"})(),onValueChange:M=>{if(M==="custom")return;const $=ob[Number(M)];$&&a({width:$.width,height:$.height,unit:$.unit})},children:[p.jsx(nt,{className:"h-8 w-[130px] text-xs",children:p.jsx(rt,{placeholder:"画布大小"})}),p.jsxs(st,{children:[ob.map((M,$)=>p.jsx(Ae,{value:String($),className:"text-xs",children:M.name},$)),p.jsx(Ae,{value:"custom",className:"text-xs text-gray-500",children:"自定义"})]})]}),p.jsx("button",{type:"button",onClick:()=>a({showGrid:!L}),className:Ie("h-8 px-3 rounded border text-xs font-medium shadow-sm transition-colors",L?"border-gray-300 bg-white text-gray-700 hover:bg-gray-50":"border-gray-300 bg-gray-100 text-gray-500"),children:L?"隐藏网格":"显示网格"})]}),p.jsxs("div",{className:"flex items-center gap-1 bg-white rounded border border-gray-300 p-0.5 shadow-sm h-8",children:[p.jsx("button",{type:"button",onClick:f,disabled:!f,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"缩小",children:"−"}),p.jsxs("span",{className:"min-w-[3rem] text-center text-xs text-gray-600 font-medium",children:[Math.round(s*100),"%"]}),p.jsx("button",{type:"button",onClick:u,disabled:!u,className:"h-6 w-6 rounded hover:bg-gray-100 text-gray-600 disabled:opacity-50 disabled:pointer-events-none flex items-center justify-center text-sm font-medium active:scale-90 transition-transform",title:"放大",children:"+"})]})]})]}),p.jsx("div",{ref:d,className:Ie("flex-1 overflow-auto bg-gray-100 relative",S?"cursor-grab active:cursor-grabbing":""),onClick:X,onPointerDown:B,onPointerMove:Z,onPointerUp:ee,onPointerLeave:ee,children:p.jsx("div",{style:{minWidth:"100%",minHeight:"100%",width:"fit-content",height:"fit-content",display:"flex",padding:50,boxSizing:"border-box",transform:`translate(${N.x}px, ${N.y}px)`},children:p.jsxs("div",{ref:h,tabIndex:0,className:Ie("relative bg-white shadow-lg border border-dashed border-gray-300 origin-top-left outline-none m-auto",E?"cursor-grabbing":"cursor-grab"),style:{width:I,height:q,transform:`scale(${s})`,backgroundImage:L?`linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px), + linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px)`:void 0,backgroundSize:L?`${lc}px ${lc}px`:void 0,pointerEvents:S?"none":"auto"},onPointerDown:M=>{const $=M.target,Q=$.closest('[id^="element-"]'),ae=$.closest('[title*="拖拽拉高"]')||$.closest('[title*="拖拽拉宽"]');h.current?.contains($)&&!Q&&!ae&&!m.current&&!g.current&&(M.preventDefault(),M.stopPropagation(),C(!0),R.current={x:N.x,y:N.y,startX:M.clientX,startY:M.clientY},A.current={x:M.clientX,y:M.clientY,scrollLeft:d.current?.scrollLeft??0,scrollTop:d.current?.scrollTop??0},M.currentTarget.setPointerCapture?.(M.pointerId))},onPointerMove:H,onPointerUp:V,onKeyDown:K,children:[e.showRuler&&p.jsxs("div",{className:"absolute top-0 left-0 right-0 h-5 border-b border-gray-300 bg-gray-50 text-[10px] text-gray-500 flex items-center px-1 pointer-events-none select-none",children:[e.unit," ",e.width," × ",e.height]}),a&&p.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-3 cursor-ns-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-t border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉高纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"bottom",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),a&&p.jsx("div",{className:"absolute top-0 right-0 bottom-0 w-3 cursor-ew-resize flex items-center justify-center bg-gray-200/80 hover:bg-blue-400/30 border-l border-gray-300 text-[10px] text-gray-500 transition-colors",title:"拖拽拉宽纸张",onPointerDown:M=>{M.stopPropagation(),b.current={edge:"right",startX:M.clientX,startY:M.clientY,startW:e.width,startH:e.height},M.target.setPointerCapture?.(M.pointerId)},children:"⋮"}),e.elements.map(M=>p.jsxs("div",{id:`element-${M.id}`,className:Ie("absolute box-border cursor-move overflow-hidden transition-shadow",M.border==="line"&&"border border-gray-400",M.border==="dotted"&&"border border-dotted border-gray-400",t===M.id&&"ring-2 ring-blue-500 ring-offset-1 z-10"),style:{left:M.x,top:M.y,width:M.width,height:M.height},onClick:$=>{$.stopPropagation(),r(M.id)},onPointerDown:$=>D($,M.id),children:[p.jsx(h3,{el:M}),t===M.id&&p.jsxs(p.Fragment,{children:[["nw","ne","sw","se"].map($=>p.jsx("div",{className:"absolute w-4 h-4 bg-white border-2 border-blue-500 rounded-full z-20 shadow-md hover:scale-110 transition-transform",style:{cursor:"nwse-resize",top:$.startsWith("n")?-6:void 0,bottom:$.startsWith("s")?-6:void 0,left:$.endsWith("w")?-6:void 0,right:$.endsWith("e")?-6:void 0},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(pe=>pe.id===M.id);g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$)),["n","s","w","e"].map($=>p.jsx("div",{className:"absolute bg-blue-500/50 border border-white/50 rounded-sm z-10 shadow-sm hover:bg-blue-600",style:{cursor:$==="n"||$==="s"?"ns-resize":"ew-resize",width:$==="n"||$==="s"?"20px":"6px",height:$==="n"||$==="s"?"6px":"20px",top:$==="n"?-3:$==="s"?void 0:"50%",bottom:$==="s"?-3:void 0,left:$==="w"?-3:$==="e"?void 0:"50%",right:$==="e"?-3:void 0,transform:$==="n"||$==="s"?"translateX(-50%)":"translateY(-50%)"},onPointerDown:Q=>{Q.stopPropagation();const ae=e.elements.find(ye=>ye.id===M.id),pe=document.getElementById(`element-${M.id}`);pe&&pe.classList.add("z-50","opacity-90"),g.current={id:M.id,corner:$,startX:Q.clientX,startY:Q.clientY,w:ae.width,h:ae.height,elX:ae.x,elY:ae.y},Q.currentTarget.setPointerCapture?.(Q.pointerId)}},$))]})]},M.id))]})})})]})}function xse({template:e,maxWidth:t=480}){const r=Hh(e.width,e.unit),n=Hh(e.height,e.unit),i=t?Math.min(t/r,t/n,2):1,a=r*i,s=n*i;return p.jsx("div",{className:"flex items-center justify-center p-4 bg-gray-100 rounded",children:p.jsx("div",{style:{width:a,height:s},className:"relative bg-white shadow-lg overflow-hidden",children:p.jsx("div",{className:"origin-top-left",style:{position:"absolute",left:0,top:0,width:r,height:n,transform:`scale(${i})`,transformOrigin:"0 0"},children:e.elements.map(u=>p.jsx("div",{className:"absolute box-border overflow-hidden pointer-events-none flex items-center justify-center text-xs",style:{left:u.x,top:u.y,width:u.width,height:u.height,border:u.border==="line"?"1px solid #999":u.border==="dotted"?"1px dotted #999":void 0},children:p.jsx(h3,{el:u})},u.id))})})})}var bse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wse=bse.reduce((e,t)=>{const r=nw(`Primitive.${t}`),n=P.forwardRef((i,a)=>{const{asChild:s,...u}=i,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...u,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_se="Label",p3=P.forwardRef((e,t)=>p.jsx(wse.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));p3.displayName=_se;var Sse=p3;function we({className:e,...t}){return p.jsx(Sse,{"data-slot":"label",className:Ie("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var Vp="Switch",[Ose]=gi(Vp),[jse,Ese]=Ose(Vp),m3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f="on",onCheckedChange:c,form:d,...h}=e,[m,g]=P.useState(null),b=Je(t,E=>g(E)),y=P.useRef(!1),w=m?d||!!m.closest("form"):!0,[S,O]=Ha({prop:i,defaultProp:a??!1,onChange:c,caller:Vp});return p.jsxs(jse,{scope:r,checked:S,disabled:u,children:[p.jsx(We.button,{type:"button",role:"switch","aria-checked":S,"aria-required":s,"data-state":x3(S),"data-disabled":u?"":void 0,disabled:u,value:f,...h,ref:b,onClick:Fe(e.onClick,E=>{O(C=>!C),w&&(y.current=E.isPropagationStopped(),y.current||E.stopPropagation())})}),w&&p.jsx(y3,{control:m,bubbles:!y.current,name:n,value:f,checked:S,required:s,disabled:u,form:d,style:{transform:"translateX(-100%)"}})]})});m3.displayName=Vp;var v3="SwitchThumb",g3=P.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=Ese(v3,r);return p.jsx(We.span,{"data-state":x3(i.checked),"data-disabled":i.disabled?"":void 0,...n,ref:t})});g3.displayName=v3;var Ase="SwitchBubbleInput",y3=P.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...i},a)=>{const s=P.useRef(null),u=Je(s,a),f=__(r),c=y_(t);return P.useEffect(()=>{const d=s.current;if(!d)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(f!==r&&g){const b=new Event("click",{bubbles:n});g.call(d,r),d.dispatchEvent(b)}},[f,r,n]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:u,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});y3.displayName=Ase;function x3(e){return e?"checked":"unchecked"}var Pse=m3,Nse=g3;function no({className:e,...t}){return p.jsx(Pse,{"data-slot":"switch",className:Ie("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Nse,{"data-slot":"switch-thumb",className:Ie("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}function Cse({template:e,selectedElement:t,onTemplateChange:r,onElementChange:n,onDeleteElement:i}){return t?p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Element)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"X"}),p.jsx($e,{type:"number",value:t.x,onChange:a=>n(t.id,{x:Number(a.target.value)||0}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Y"}),p.jsx($e,{type:"number",value:t.y,onChange:a=>n(t.id,{y:Number(a.target.value)||0}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Width"}),p.jsx($e,{type:"number",value:t.width,onChange:a=>n(t.id,{width:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Height"}),p.jsx($e,{type:"number",value:t.height,onChange:a=>n(t.id,{height:Math.max(1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Rotation"}),p.jsxs(tt,{value:t.rotation,onValueChange:a=>n(t.id,{rotation:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"horizontal"}),p.jsx(Ae,{value:"vertical",children:"vertical"})]})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Border"}),p.jsxs(tt,{value:t.border,onValueChange:a=>n(t.id,{border:a}),children:[p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"none",children:"none"}),p.jsx(Ae,{value:"line",children:"line"}),p.jsx(Ae,{value:"dotted",children:"dotted"})]})]})]}),p.jsx(Tse,{element:t,onChange:a=>n(t.id,{config:{...t.config,...a}})}),i&&p.jsx("div",{className:"pt-4 border-t border-gray-100",children:p.jsx(Ne,{variant:"destructive",className:"w-full",onClick:()=>i(t.id),children:"Delete Element"})})]})})]}):p.jsxs("div",{className:"w-72 shrink-0 border-l border-gray-200 bg-white flex flex-col h-full",children:[p.jsx("div",{className:"px-3 py-2 border-b border-gray-200 font-semibold text-gray-800",children:"Properties (Template)"}),p.jsx(fc,{className:"flex-1",children:p.jsxs("div",{className:"p-3 space-y-3",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Template Name"}),p.jsx($e,{value:e.name,onChange:a=>r({name:a.target.value}),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Label Type"}),p.jsxs(tt,{value:e.labelType,onValueChange:a=>r({labelType:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"PRICE",children:"PRICE"}),p.jsx(Ae,{value:"NUTRITION",children:"NUTRITION"}),p.jsx(Ae,{value:"SHIPPING",children:"SHIPPING"})]})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Applied Location"}),p.jsxs(tt,{value:e.appliedLocation,onValueChange:a=>r({appliedLocation:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ALL",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Width"}),p.jsx($e,{type:"number",value:e.width,onChange:a=>r({width:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Height"}),p.jsx($e,{type:"number",value:e.height,onChange:a=>r({height:Math.max(.1,Number(a.target.value)||0)}),className:"h-8 text-sm"})]})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Unit"}),p.jsxs(tt,{value:e.unit,onValueChange:a=>r({unit:a}),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"cm",children:"cm"}),p.jsx(Ae,{value:"inch",children:"inch"})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{checked:e.showRuler,onCheckedChange:a=>r({showRuler:a})}),p.jsx(we,{className:"text-xs",children:"Show Ruler"})]})]})})]})}function Tse({element:e,onChange:t}){const r=e.config,n=(i,a)=>t({[i]:a});switch(e.type){case"TEXT_STATIC":case"TEXT_PRODUCT":case"TEXT_PRICE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Text"}),p.jsx($e,{value:r.text??"",onChange:i=>n("text",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Font Size"}),p.jsx($e,{type:"number",value:r.fontSize??14,onChange:i=>n("fontSize",Number(i.target.value)||14),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Text Align"}),p.jsxs(tt,{value:r.textAlign??"left",onValueChange:i=>n("textAlign",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"left",children:"Left"}),p.jsx(Ae,{value:"center",children:"Center"}),p.jsx(Ae,{value:"right",children:"Right"})]})]})]})]});case"BARCODE":return p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Data"}),p.jsx($e,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]}),p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"方向"}),p.jsxs(tt,{value:r.orientation??"horizontal",onValueChange:i=>n("orientation",i),children:[p.jsx(nt,{className:"h-8 text-sm mt-1",children:p.jsx(rt,{})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"horizontal",children:"水平"}),p.jsx(Ae,{value:"vertical",children:"竖排"})]})]})]})]});case"QRCODE":return p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Data (URL)"}),p.jsx($e,{value:r.data??"",onChange:i=>n("data",i.target.value),className:"h-8 text-sm mt-1"})]});case"WEIGHT":return p.jsxs("div",{children:[p.jsx(we,{className:"text-xs",children:"Value"}),p.jsx($e,{type:"number",value:r.value??0,onChange:i=>n("value",Number(i.target.value)||0),className:"h-8 text-sm mt-1"})]});default:return p.jsxs("div",{className:"text-xs text-gray-500",children:["Config for ",e.type," (edit in code if needed)"]})}}const kse=.5,Rse=2,lR=.25,Mse=1;function Ise({templateId:e,initialTemplate:t,onClose:r,onSaved:n}){const[i,a]=P.useState(()=>t?{...t}:Hae(e??void 0)),[s,u]=P.useState(null),[f,c]=P.useState(Mse),[d,h]=P.useState(!1),m=i.elements.find(E=>E.id===s)??null,g=P.useCallback((E,C)=>{const A=Vae(E,30,30);C&&Object.keys(C).length>0&&(A.config={...A.config,...C}),a(N=>({...N,elements:[...N.elements,A]})),u(A.id)},[]),b=P.useCallback((E,C)=>{a(A=>({...A,elements:A.elements.map(N=>N.id===E?{...N,...C}:N)}))},[]),y=P.useCallback(E=>{a(C=>({...C,elements:C.elements.filter(A=>A.id!==E)})),u(null)},[]),w=P.useCallback(E=>{a(C=>({...C,...E}))},[]),S=P.useCallback(()=>{Kae(i),n(),r()},[i,n,r]),O=P.useCallback(()=>{const E=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),C=URL.createObjectURL(E),A=document.createElement("a");A.href=C,A.download=`label-template-${i.id}.json`,A.click(),URL.revokeObjectURL(C)},[i]);return p.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[p.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200 bg-white shrink-0",children:[p.jsxs(Ne,{variant:"outline",size:"sm",onClick:r,children:[p.jsx(sB,{className:"w-4 h-4 mr-1"}),"Back"]}),p.jsx("span",{className:"text-sm font-medium text-gray-700 truncate flex-1",children:i.name}),p.jsxs(Ne,{size:"sm",onClick:O,variant:"outline",children:[p.jsx(Y1,{className:"w-4 h-4 mr-1"}),"Export JSON"]}),p.jsxs(Ne,{size:"sm",className:"bg-blue-600 hover:bg-blue-700 text-white",onClick:S,children:[p.jsx(o8,{className:"w-4 h-4 mr-1"}),"Save"]})]}),p.jsxs("div",{className:"flex flex-1 min-h-0",children:[p.jsx(woe,{onAddElement:g}),p.jsx(yse,{template:i,selectedId:s,onSelect:u,onUpdateElement:b,onDeleteElement:y,onTemplateChange:w,scale:f,onZoomIn:()=>c(E=>Math.min(Rse,E+lR)),onZoomOut:()=>c(E=>Math.max(kse,E-lR)),onPreview:()=>h(!0)}),p.jsx(na,{open:d,onOpenChange:h,children:p.jsxs(ia,{className:"max-w-[90vw] max-h-[90vh] overflow-auto",children:[p.jsx(aa,{children:p.jsx(oa,{children:"标签预览"})}),p.jsx(xse,{template:i,maxWidth:500})]})}),p.jsx(Cse,{template:i,selectedElement:m,onTemplateChange:w,onElementChange:b,onDeleteElement:y})]})]})}function Dse(){const[e,t]=P.useState(()=>ak()),[r,n]=P.useState("list"),[i,a]=P.useState(null),[s,u]=P.useState(""),[f,c]=P.useState("all"),d=P.useCallback(()=>{t(ak())},[]);P.useEffect(()=>{r==="list"&&d()},[r,d]);const h=e.filter(y=>{const w=!s||y.name.toLowerCase().includes(s.toLowerCase()),S=f==="all"||y.appliedLocation===f;return w&&S}),m=()=>{},g=y=>{a(y),n("editor")},b=()=>{n("list"),a(null)};if(r==="editor"){const y=i?T$(i):null;return p.jsx("div",{className:"h-[calc(100vh-8rem)] min-h-[500px] flex flex-col",children:p.jsx(Ise,{templateId:i,initialTemplate:y,onClose:b,onSaved:d})})}return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500",value:s,onChange:y=>u(y.target.value)}),p.jsxs(tt,{value:f,onValueChange:c,children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"ALL",children:"ALL"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",onClick:m,children:["New Label Template ",p.jsx(Ur,{className:"ml-1 w-4 h-4"})]})]}),p.jsxs("div",{className:"text-red-600 font-bold italic text-sm md:text-base",children:["***One or more templates have incomplete labels attached to them.",p.jsx("br",{}),"Go to Labels view to see which labels are missing fields."]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Label Template"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[120px]",children:"Location"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[150px]",children:"Size"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[100px]",children:"Actions"})]})}),p.jsx(_r,{children:h.length===0?p.jsx(Qe,{children:p.jsx(fe,{colSpan:5,className:"text-center text-gray-500 py-8",children:'No templates yet. Click "New Label Template" to create one.'})}):h.map(y=>p.jsxs(Qe,{className:"hover:bg-gray-50 cursor-pointer",onClick:()=>g(y.id),children:[p.jsx(fe,{className:"font-medium",children:y.name}),p.jsx(fe,{children:y.appliedLocation}),p.jsxs(fe,{className:"text-sm text-gray-600",children:[y.elements.length," element(s)"]}),p.jsxs(fe,{children:[y.width,"×",y.height," ",y.unit]}),p.jsx(fe,{onClick:w=>w.stopPropagation(),children:p.jsxs(Ne,{variant:"outline",size:"sm",onClick:()=>g(y.id),children:[p.jsx(jd,{className:"w-3 h-3 mr-1"}),"Edit"]})})]},y.id))})]})})]})}function Lse(){const e=[{id:1,name:"Prepped By",contents:"A. Smith; B. Doe; C. Borne",lastEdited:"2025.12.03.11:45"},{id:2,name:"Checked By",contents:"D. Manager; E. Supervisor",lastEdited:"2025.12.04.09:30"},{id:3,name:"Allergens",contents:"Peanuts; Dairy; Gluten; Soy",lastEdited:"2025.12.05.14:15"}];return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"bg-white border border-gray-300 rounded-md w-40 shrink-0 placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-gray-300 rounded-md w-[200px] shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-a",children:"Location A"}),p.jsx(Ae,{value:"loc-b",children:"Location B"})]})]}),p.jsxs(Ne,{className:"bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-md h-10 px-6 shrink-0 ml-auto",children:["New Multiple Options ",p.jsx(Ur,{className:"ml-1 h-4 w-4"})]})]}),p.jsx("div",{className:"rounded-md border bg-white shadow-sm",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-50 hover:bg-gray-50",children:[p.jsx(ge,{className:"font-bold text-gray-900 w-[200px]",children:"Multiple Option Name"}),p.jsx(ge,{className:"font-bold text-gray-900",children:"Contents"}),p.jsx(ge,{className:"font-bold text-gray-900 w-[180px]",children:"Last Edited"})]})}),p.jsx(_r,{children:e.map(t=>p.jsxs(Qe,{className:"hover:bg-gray-50",children:[p.jsx(fe,{className:"font-medium",children:t.name}),p.jsx(fe,{className:"text-gray-600",children:t.contents}),p.jsx(fe,{className:"text-gray-500 tabular-nums font-numeric",children:t.lastEdited})]},t.id))})]})})]})}function $se({currentView:e="Labels",onViewChange:t}){const r=["Labels","Label Categories","Label Types","Label Templates","Multiple Options"],n=i=>{t&&t(i)};return p.jsxs("div",{className:"space-y-6",children:[p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto bg-white",children:r.map(i=>p.jsx("div",{onClick:()=>n(i),style:e===i?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px ${e===i?"text-blue-600":"border-b-2 border-b-transparent text-gray-600 hover:text-gray-800"}`,children:i},i))})}),p.jsxs("div",{className:"min-h-[400px]",children:[e==="Labels"&&p.jsx($ae,{}),e==="Label Categories"&&p.jsx(Bae,{}),e==="Label Types"&&p.jsx(zae,{}),e==="Label Templates"&&p.jsx(Dse,{}),e==="Multiple Options"&&p.jsx(Lse,{}),!["Labels","Label Categories","Label Types","Label Templates","Multiple Options"].includes(e)&&p.jsxs("div",{className:"flex items-center justify-center h-64 text-gray-400",children:[e," content coming soon..."]})]})]})}function Bse(){const[e,t]=P.useState([{id:"1",name:"Pop",isOpen:!0,subcategories:[{id:"1-1",name:"2024",isOpen:!0,files:[{id:"f1",name:"uuuuu",date:"10/23/24, 12:21 AM",type:"image"},{id:"f2",name:"664EF167-DFCE-49C1-A417-DC09FEDF78D7.jpg",date:"11/24/25, 8:40 PM",type:"image"}]}]},{id:"2",name:"Training",isOpen:!0,subcategories:[{id:"2-1",name:"BOH",isOpen:!1,files:[]},{id:"2-2",name:"FOH",isOpen:!0,files:[]}]},{id:"3",name:"ww",isOpen:!1,subcategories:[]}]),r=i=>{t(a=>a.map(s=>s.id===i?{...s,isOpen:!s.isOpen}:s))},n=(i,a)=>{t(s=>s.map(u=>u.id!==i?u:{...u,subcategories:u.subcategories.map(f=>f.id===a?{...f,isOpen:!f.isOpen}:f)}))};return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx($e,{className:"bg-white border border-black rounded-md h-10 w-[150px]"}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Search"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"bg-white border border-black rounded-md h-10 w-[100px]",children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"all"}),p.jsx(Ae,{value:"loc-a",children:"Location A"})]})]}),p.jsx("span",{className:"text-sm text-black whitespace-nowrap",children:"Location"})]})]}),p.jsxs("div",{className:"bg-gray-100 p-2 flex justify-between items-center border-b border-gray-200",children:[p.jsx("h1",{className:"text-xl font-medium text-gray-700",children:"Information"}),p.jsxs("div",{className:"flex items-center gap-4 text-gray-600",children:[p.jsx("div",{className:"flex items-center gap-1 bg-gray-700 text-white text-[10px] px-1 py-0.5 rounded-sm font-bold",children:"NEW"}),p.jsx(h8,{className:"h-5 w-5"}),p.jsx("span",{className:"font-medium",children:"55789"})]})]}),p.jsxs("div",{className:"space-y-4",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Category",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsx("div",{className:"space-y-4",children:e.map(i=>p.jsxs("div",{className:"border border-gray-300 rounded-sm overflow-hidden",children:[p.jsxs("div",{className:"bg-gradient-to-b from-gray-50 to-gray-100 border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>r(i.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[i.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),i.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),i.isOpen&&p.jsxs("div",{className:"p-2 space-y-3 bg-white",children:[p.jsxs("button",{className:"w-full bg-[#2c7bb6] hover:bg-[#256b9e] text-white py-2 px-4 flex items-center gap-2 text-sm font-medium rounded-sm",children:[p.jsx(Ur,{className:"h-4 w-4"}),"New Subcategory",p.jsx(cb,{className:"h-4 w-4 opacity-70"})]}),p.jsxs("div",{className:"space-y-3",children:[i.subcategories.map(a=>p.jsxs("div",{className:"border border-gray-200 rounded-sm",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 p-2 flex items-center justify-between",children:[p.jsxs("button",{onClick:()=>n(i.id,a.id),className:"flex items-center gap-2 text-gray-700 font-medium text-sm flex-1 text-left",children:[a.isOpen?p.jsx(cc,{className:"h-4 w-4 text-[#2c7bb6]"}):p.jsx(Cd,{className:"h-4 w-4 text-[#2c7bb6]"}),a.name]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:p.jsx(jd,{className:"h-4 w-4"})}),p.jsx("button",{className:"text-red-400 hover:text-red-600",children:p.jsx(ec,{className:"h-4 w-4"})})]})]}),a.isOpen&&p.jsxs("div",{className:"p-3 bg-gray-50/50",children:[p.jsx("div",{className:"mb-2 text-xs font-bold text-gray-500 uppercase tracking-wide",children:"Files"}),p.jsxs("div",{className:"flex flex-wrap gap-2 mb-3 justify-end",children:[p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Upload Your Own File(s)"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#4CAF50] hover:bg-[#43a047] text-white text-xs border-none rounded-sm",children:"Create A Custom File"}),p.jsx(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm",children:"Edit File Permissions"}),p.jsxs(Ne,{size:"sm",className:"h-8 bg-[#2c7bb6] hover:bg-[#256b9e] text-white text-xs border-none rounded-sm gap-1",children:["Sort (A-Z) ",p.jsx(cB,{className:"h-3 w-3"})]})]}),p.jsx("div",{className:"space-y-1",children:a.files.length>0?a.files.map(s=>p.jsxs("div",{className:"flex items-center bg-gray-200/50 p-2 border border-gray-200 rounded-sm text-sm hover:bg-gray-200 transition-colors",children:[p.jsx("div",{className:"flex-shrink-0 mr-3",children:s.type==="image"?p.jsx(Ia,{className:"h-5 w-5 text-[#2c7bb6]"}):p.jsx(uc,{className:"h-5 w-5 text-[#2c7bb6]"})}),p.jsx("div",{className:"flex-1 min-w-0",children:p.jsx("div",{className:"font-medium text-gray-700 truncate",children:s.name})}),p.jsx("div",{className:"text-xs text-gray-500 mr-4 whitespace-nowrap",children:s.date}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(uc,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-gray-400 hover:text-gray-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(jd,{className:"h-3 w-3"})}),p.jsx("button",{className:"p-1 text-red-400 hover:text-red-600 bg-white border border-gray-300 rounded-sm",children:p.jsx(ec,{className:"h-3 w-3"})})]})]},s.id)):p.jsx("div",{className:"p-4 border-2 border-dashed border-gray-300 rounded-sm text-center text-gray-400 text-sm",children:"No files in this subcategory"})})]})]},a.id)),i.subcategories.length===0&&p.jsx("div",{className:"p-2 text-sm text-gray-400 italic",children:"No subcategories"})]})]})]},i.id))})]})]})}const zse=[{id:1,title:"Coffee - 2 hrs",subtitle:"1 min - Completes at 12:05 PM",totalTime:7200,remainingTime:0,status:"expired",icon:CB},{id:2,title:"Clean Tablet",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:237,status:"running",icon:v8},{id:3,title:"Replace Sanitizer Towels",subtitle:"1 hrs - Completes at 12:37 PM",totalTime:3600,remainingTime:238,status:"running",icon:Aj},{id:4,title:"Take Out Trash",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:Aj},{id:5,title:"Change Utensils",subtitle:"1 hrs - Completes at 01:03 PM",totalTime:3600,remainingTime:58,status:"running",icon:C8},{id:6,title:"Sanitize Surfaces",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2157,status:"running",icon:Uv},{id:7,title:"Check Temperatures",subtitle:"1 hrs - Completes at 02:00 PM",totalTime:3600,remainingTime:2158,status:"running",icon:Uv},{id:8,title:"Ranch 4 hrs",subtitle:"4 hrs - Completes at 04:04 PM",totalTime:14400,remainingTime:2158,status:"running",icon:Uv}];function Fse({timer:e}){const t=(e.totalTime-e.remainingTime)/e.totalTime*100,r=e.remainingTime===0,n=i=>{if(i<=0)return"0s";const a=Math.floor(i/60),s=i%60;return`${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`};return p.jsxs("div",{className:"bg-gray-200 rounded-xl p-4 flex flex-col items-center relative shadow-sm h-[280px]",children:[p.jsxs("div",{className:"text-center mb-2",children:[p.jsx("h3",{className:"text-lg font-medium text-gray-800 leading-tight",children:e.title}),p.jsx("p",{className:"text-xs text-gray-500 mt-1",children:e.subtitle})]}),p.jsxs("div",{className:"relative w-32 h-32 my-auto flex items-center justify-center",children:[p.jsxs("svg",{className:"w-full h-full transform -rotate-90",children:[p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:"white",strokeWidth:"12",fill:"transparent"}),p.jsx("circle",{cx:"64",cy:"64",r:"56",stroke:r?"#ef4444":"#3b82f6",strokeWidth:"12",fill:"transparent",strokeDasharray:351.86,strokeDashoffset:r?0:351.86*(t/100),className:"transition-all duration-1000 ease-linear"})]}),p.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[p.jsx("span",{className:Ie("text-3xl font-bold",r?"text-red-500":"text-gray-800"),children:r?"0s":n(e.remainingTime)}),p.jsx("span",{className:Ie("text-[10px] font-medium uppercase mt-1",r?"text-red-400":"text-gray-400"),children:"Remaining"})]})]}),p.jsxs("div",{className:"w-full flex justify-between items-end mt-2",children:[p.jsx(e8,{className:"w-5 h-5 text-blue-700 fill-current"}),p.jsx("div",{className:"flex flex-col items-center",children:p.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-300 flex items-center justify-center text-gray-400 mb-1",children:p.jsx(e.icon,{className:"w-5 h-5"})})}),p.jsx("div",{className:"flex flex-col items-end",children:p.jsx("span",{className:"text-xs text-blue-600 font-bold mb-2 cursor-pointer",children:"EDIT"})})]}),p.jsx("button",{className:"absolute bottom-12 right-4 bg-blue-600 rounded-full p-1 text-white hover:bg-blue-700 shadow-md",children:p.jsx(ec,{className:"w-4 h-4"})})]})}function qse(){const[e,t]=P.useState(!0);return p.jsxs("div",{className:"h-full flex flex-col bg-gray-50 relative",children:[p.jsxs("div",{className:"bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between shadow-sm z-10",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs("button",{className:"flex items-center text-blue-500 text-lg font-medium",children:[p.jsx(_B,{className:"w-6 h-6"}),"Back"]}),p.jsx(XB,{className:"w-6 h-6 text-gray-500"})]}),p.jsxs("div",{className:"flex flex-col items-center",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"bg-blue-600 p-1.5 rounded-md",children:p.jsx(x8,{className:"w-5 h-5 text-white"})}),p.jsx("h1",{className:"text-xl font-bold text-blue-900",children:"Timers"})]}),p.jsxs("div",{className:"flex items-center gap-1 text-xs text-green-600 font-medium",children:[p.jsx("span",{children:"86016"}),p.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"})]})]}),p.jsxs("div",{className:"flex items-center gap-4 text-blue-500 font-medium",children:[p.jsx(A8,{className:"w-6 h-6 text-gray-400"}),p.jsxs("button",{className:"flex items-center gap-1",children:[p.jsx(Ur,{className:"w-5 h-5"}),"Add Timer"]})]})]}),p.jsxs("div",{className:"bg-gray-700 text-white px-6 py-2 flex items-center justify-between",children:[p.jsx("div",{className:"flex-1"})," ",p.jsx("div",{className:"font-medium",children:"Today, December 15"}),p.jsxs("div",{className:"flex-1 flex justify-end items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(LB,{className:"w-5 h-5 text-gray-300"}),p.jsx(WB,{className:"w-5 h-5 text-gray-500"})]}),p.jsx(nB,{className:"w-5 h-5 text-blue-400"})]})]}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:p.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:zse.map(r=>p.jsx(Fse,{timer:r},r.id))})}),e&&p.jsx("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-black/40 backdrop-blur-[1px]",children:p.jsx("div",{className:"bg-black text-white rounded-xl shadow-2xl w-[600px] max-w-full overflow-hidden border border-gray-800",children:p.jsxs("div",{className:"p-8 text-center space-y-6",children:[p.jsx("h2",{className:"text-3xl font-medium text-blue-500",children:"Coffee - 2 hrs"}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsx("p",{className:"text-2xl font-light",children:"Timer expired at 12:05 PM"}),p.jsx("p",{className:"text-2xl font-light",children:"Please discard the coffee"})]}),p.jsx("div",{className:"flex justify-end",children:p.jsx("span",{className:"bg-gray-200 text-black text-[10px] px-1 rounded-sm opacity-50",children:"TACT_Img_Timer-Notification@2x"})}),p.jsxs("div",{className:"grid grid-cols-3 gap-4 mt-8",children:[p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-700 hover:bg-blue-600 text-white h-14 text-xl font-medium rounded-lg",children:"Mute"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-500 text-white h-14 text-xl font-medium rounded-lg",children:"Restart"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-800 hover:bg-blue-700 text-white h-14 text-xl font-medium rounded-lg",children:"Acknowledge"})]})]})})})]})}var lb="rovingFocusGroup.onEntryFocus",Use={bubbles:!1,cancelable:!0},uu="RovingFocusGroup",[G1,b3,Wse]=xL(uu),[Hse,w3]=gi(uu,[Wse]),[Vse,Gse]=Hse(uu),_3=P.forwardRef((e,t)=>p.jsx(G1.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(G1.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Kse,{...e,ref:t})})}));_3.displayName=uu;var Kse=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:f,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...h}=e,m=P.useRef(null),g=Je(t,m),b=Kh(a),[y,w]=Ha({prop:s,defaultProp:u??null,onChange:f,caller:uu}),[S,O]=P.useState(!1),E=ar(c),C=b3(r),A=P.useRef(!1),[N,T]=P.useState(0);return P.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(lb,E),()=>R.removeEventListener(lb,E)},[E]),p.jsx(Vse,{scope:r,orientation:n,dir:b,loop:i,currentTabStopId:y,onItemFocus:P.useCallback(R=>w(R),[w]),onItemShiftTab:P.useCallback(()=>O(!0),[]),onFocusableItemAdd:P.useCallback(()=>T(R=>R+1),[]),onFocusableItemRemove:P.useCallback(()=>T(R=>R-1),[]),children:p.jsx(We.div,{tabIndex:S||N===0?-1:0,"data-orientation":n,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Fe(e.onMouseDown,()=>{A.current=!0}),onFocus:Fe(e.onFocus,R=>{const I=!A.current;if(R.target===R.currentTarget&&I&&!S){const q=new CustomEvent(lb,Use);if(R.currentTarget.dispatchEvent(q),!q.defaultPrevented){const L=C().filter(K=>K.focusable),D=L.find(K=>K.active),U=L.find(K=>K.id===y),V=[D,U,...L].filter(Boolean).map(K=>K.ref.current);j3(V,d)}}A.current=!1}),onBlur:Fe(e.onBlur,()=>O(!1))})})}),S3="RovingFocusGroupItem",O3=P.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:a,children:s,...u}=e,f=Gi(),c=a||f,d=Gse(S3,r),h=d.currentTabStopId===c,m=b3(r),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:y}=d;return P.useEffect(()=>{if(n)return g(),()=>b()},[n,g,b]),p.jsx(G1.ItemSlot,{scope:r,id:c,focusable:n,active:i,children:p.jsx(We.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...u,ref:t,onMouseDown:Fe(e.onMouseDown,w=>{n?d.onItemFocus(c):w.preventDefault()}),onFocus:Fe(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Fe(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const S=Qse(w,d.orientation,d.dir);if(S!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let E=m().filter(C=>C.focusable).map(C=>C.ref.current);if(S==="last")E.reverse();else if(S==="prev"||S==="next"){S==="prev"&&E.reverse();const C=E.indexOf(w.currentTarget);E=d.loop?Zse(E,C+1):E.slice(C+1)}setTimeout(()=>j3(E))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:y!=null}):s})})});O3.displayName=S3;var Xse={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Yse(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qse(e,t,r){const n=Yse(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Xse[n]}function j3(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Zse(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Jse=_3,ele=O3,Gp="Tabs",[tle]=gi(Gp,[w3]),E3=w3(),[rle,P_]=tle(Gp),A3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:a,orientation:s="horizontal",dir:u,activationMode:f="automatic",...c}=e,d=Kh(u),[h,m]=Ha({prop:n,onChange:i,defaultProp:a??"",caller:Gp});return p.jsx(rle,{scope:r,baseId:Gi(),value:h,onValueChange:m,orientation:s,dir:d,activationMode:f,children:p.jsx(We.div,{dir:d,"data-orientation":s,...c,ref:t})})});A3.displayName=Gp;var P3="TabsList",N3=P.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,a=P_(P3,r),s=E3(r);return p.jsx(Jse,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:p.jsx(We.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});N3.displayName=P3;var C3="TabsTrigger",T3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...a}=e,s=P_(C3,r),u=E3(r),f=M3(s.baseId,n),c=I3(s.baseId,n),d=n===s.value;return p.jsx(ele,{asChild:!0,...u,focusable:!i,active:d,children:p.jsx(We.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...a,ref:t,onMouseDown:Fe(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?s.onValueChange(n):h.preventDefault()}),onKeyDown:Fe(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(n)}),onFocus:Fe(e.onFocus,()=>{const h=s.activationMode!=="manual";!d&&!i&&h&&s.onValueChange(n)})})})});T3.displayName=C3;var k3="TabsContent",R3=P.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:i,children:a,...s}=e,u=P_(k3,r),f=M3(u.baseId,n),c=I3(u.baseId,n),d=n===u.value,h=P.useRef(d);return P.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),p.jsx(Un,{present:i||d,children:({present:m})=>p.jsx(We.div,{"data-state":d?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!m,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});R3.displayName=k3;function M3(e,t){return`${e}-trigger-${t}`}function I3(e,t){return`${e}-content-${t}`}var nle=A3,ile=N3,ale=T3,ole=R3;function D3({className:e,...t}){return p.jsx(nle,{"data-slot":"tabs",className:Ie("flex flex-col gap-2",e),...t})}function L3({className:e,...t}){return p.jsx(ile,{"data-slot":"tabs-list",className:Ie("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",e),...t})}function rs({className:e,...t}){return p.jsx(ale,{"data-slot":"tabs-trigger",className:Ie("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function ns({className:e,...t}){return p.jsx(ole,{"data-slot":"tabs-content",className:Ie("flex-1 outline-none",e),...t})}const sle=[{id:"cat1",name:"Dairy",type:"color",value:"#bfdbfe",status:"active"},{id:"cat2",name:"Meat",type:"image",value:"meat.png",status:"active"},{id:"cat3",name:"Bakery",type:"text",value:"Bakery",status:"active"}],lle=[{id:"prod1",locationId:"12345",categoryId:"cat1",categoryName:"Dairy",name:"Whole Milk",productId:"2222222",barcode:"123456789",barcodeType:"EAN-13",status:"active",appearance:{type:"text",value:"Whole Milk"}},{id:"prod2",locationId:"12345",categoryId:"cat2",categoryName:"Meat",name:"Ground Beef",productId:"3333333",barcode:"113456789",barcodeType:"UPC-A",status:"active",appearance:{type:"color",value:"#ef4444"}},{id:"prod3",locationId:"67890",categoryId:"cat3",categoryName:"Bakery",name:"Croissant",productId:"4444444",barcode:"998877665",barcodeType:"EAN-8",status:"inactive",appearance:{type:"image",value:"croissant.jpg"}}];function cle(){const[e,t]=P.useState("products"),[r,n]=P.useState(lle),[i,a]=P.useState(sle),[s,u]=P.useState(!1),[f,c]=P.useState(!1);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3 flex-wrap",children:[p.jsxs("div",{className:"flex items-center w-40 shrink-0 rounded-md border border-gray-300 bg-white overflow-hidden",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-2.5 pointer-events-none"}),p.jsx($e,{placeholder:"Search...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Location 12345"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs(tt,{children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Category"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Categories"}),i.map(d=>p.jsx(Ae,{value:d.id,children:d.name},d.id))]})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(j8,{className:"w-4 h-4"})," Bulk Import"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Bulk Export"]}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Uo,{className:"w-4 h-4"})," Bulk Edit"]}),e==="products"?p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>u(!0),children:["New Product ",p.jsx(Ur,{className:"w-4 h-4"})]}):p.jsxs(Ne,{className:"h-10 rounded-md bg-blue-600 text-white hover:bg-blue-700 font-medium gap-1 shrink-0",onClick:()=>c(!0),children:["New Category ",p.jsx(Ur,{className:"w-4 h-4"})]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("products"),style:e==="products"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="products"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Products"}),p.jsx("button",{onClick:()=>t("categories"),style:e==="categories"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:`px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2 ${e==="categories"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"}`,children:"Categories"})]})})]}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:e==="products"?p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Barcode"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(d=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric",children:d.locationId}),p.jsx(fe,{className:"border-r text-gray-900 font-medium",children:d.categoryName}),p.jsx(fe,{className:"border-r text-gray-900 font-medium",children:p.jsxs("div",{className:"flex items-center gap-2",children:[d.appearance.type==="color"&&p.jsx("div",{className:"w-4 h-4 rounded-full border border-gray-300 shadow-sm",style:{backgroundColor:d.appearance.value}}),d.appearance.type==="image"&&p.jsx(Ia,{className:"w-4 h-4 text-gray-500"}),d.name]})}),p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:d.productId}),p.jsx(fe,{className:"border-r font-numeric",children:p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-xs text-gray-400",children:d.barcodeType}),p.jsx("span",{children:d.barcode})]})}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4"})})})]},d.id))})]})}):p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Display Type"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Preview"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Status"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(d=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-medium",children:d.name}),p.jsx(fe,{className:"border-r capitalize",children:d.type}),p.jsxs(fe,{className:"border-r",children:[d.type==="color"&&p.jsx("div",{className:"w-8 h-8 rounded-md border border-gray-200 shadow-sm",style:{backgroundColor:d.value}}),d.type==="image"&&p.jsx("div",{className:"w-8 h-8 bg-gray-100 flex items-center justify-center rounded-md border border-gray-200",children:p.jsx(Ia,{className:"w-4 h-4 text-gray-500"})}),d.type==="text"&&p.jsx("div",{className:"w-auto px-2 py-1 bg-gray-100 rounded-md border border-gray-200 text-xs font-medium inline-block",children:d.value})]}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:d.status==="active"?"default":"secondary",className:d.status==="active"?"bg-green-600":"bg-gray-400",children:d.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(Uo,{className:"h-4 w-4"})})})]},d.id))})]})})}),p.jsx(ule,{open:s,onOpenChange:u,categories:i}),p.jsx(fle,{open:f,onOpenChange:c})]})}function ule({open:e,onOpenChange:t,categories:r}){const[n,i]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Product"}),p.jsx(au,{children:"Create a new product. Fill in the details below."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product Category"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Category"})}),p.jsx(st,{children:r.map(a=>p.jsx(Ae,{value:a.id,children:a.name},a.id))})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product Name"}),p.jsx($e,{placeholder:"e.g. Whole Milk"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Product ID"}),p.jsx($e,{placeholder:"Internal ID"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})]}),p.jsxs("div",{className:"space-y-3 p-4 bg-gray-50 rounded-md border border-gray-100",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(dB,{className:"w-4 h-4"})," Barcode Settings"]}),p.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[p.jsx("div",{className:"col-span-1",children:p.jsxs(tt,{defaultValue:"ean13",children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Format"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"ean13",children:"EAN-13"}),p.jsx(Ae,{value:"upc-a",children:"UPC-A"}),p.jsx(Ae,{value:"code128",children:"Code 128"}),p.jsx(Ae,{value:"qr",children:"QR Code"})]})]})}),p.jsx("div",{className:"col-span-2",children:p.jsx($e,{placeholder:"Barcode Value"})})]}),p.jsx(Ne,{variant:"link",className:"px-0 text-xs h-auto",children:"+ Add another barcode standard"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(we,{children:"App Appearance"}),p.jsxs(D3,{value:n,onValueChange:i,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Display Text"}),p.jsx($e,{placeholder:"Text to display on button"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#ef4444","#f97316","#f59e0b","#84cc16","#10b981","#06b6d4","#3b82f6","#6366f1","#a855f7","#ec4899"].map(a=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:a}},a)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Upload Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload or drag and drop"})]})]})]})]}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(we,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"all-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"specific-stores",name:"scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]}),p.jsx("div",{className:"pl-6 pt-2",children:p.jsx(tt,{disabled:!0,children:p.jsx(nt,{className:"h-8 text-sm",children:p.jsx(rt,{placeholder:"Select Locations..."})})})})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Product"})]})]})})}function fle({open:e,onOpenChange:t}){const[r,n]=P.useState("text");return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Category"}),p.jsx(au,{children:"Create a product category to organize your items."})]}),p.jsxs("div",{className:"grid gap-6 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Category Name"}),p.jsx($e,{placeholder:"e.g. Dairy, Meat, Bakery"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsx(we,{children:"Button Appearance"}),p.jsxs(D3,{value:r,onValueChange:n,className:"w-full",children:[p.jsxs(L3,{className:"grid w-full grid-cols-3",children:[p.jsxs(rs,{value:"text",className:"flex items-center gap-2",children:[p.jsx(Z1,{className:"w-3 h-3"})," Text"]}),p.jsxs(rs,{value:"color",className:"flex items-center gap-2",children:[p.jsx(pR,{className:"w-3 h-3"})," Color"]}),p.jsxs(rs,{value:"image",className:"flex items-center gap-2",children:[p.jsx(Ia,{className:"w-3 h-3"})," Image"]})]}),p.jsxs(ns,{value:"text",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Display Text"}),p.jsx($e,{placeholder:"Category Name"})]}),p.jsxs(ns,{value:"color",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Select Color"}),p.jsxs("div",{className:"flex gap-2 flex-wrap",children:[["#bfdbfe","#bbf7d0","#fecaca","#ddd6fe","#fde68a"].map(i=>p.jsx("button",{className:"w-8 h-8 rounded-full border border-gray-200 shadow-sm hover:scale-110 transition-transform",style:{backgroundColor:i}},i)),p.jsx("button",{className:"w-8 h-8 rounded-full border border-dashed border-gray-400 flex items-center justify-center hover:bg-gray-50",children:p.jsx(Ur,{className:"w-4 h-4 text-gray-400"})})]})]}),p.jsxs(ns,{value:"image",className:"mt-4 space-y-2",children:[p.jsx(we,{children:"Upload Icon/Image"}),p.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 flex flex-col items-center justify-center text-gray-500 hover:bg-gray-50 cursor-pointer",children:[p.jsx(Ia,{className:"w-8 h-8 mb-2 opacity-50"}),p.jsx("span",{className:"text-xs",children:"Click to upload"})]})]})]})]}),p.jsx("div",{className:"grid grid-cols-2 gap-4",children:p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Status"}),p.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[p.jsx(no,{defaultChecked:!0}),p.jsx("span",{className:"text-sm text-gray-500",children:"Active"})]})]})}),p.jsxs("div",{className:"space-y-3 pt-2 border-t border-gray-100",children:[p.jsx(we,{children:"Store Availability"}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-all-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500",defaultChecked:!0}),p.jsx("label",{htmlFor:"cat-all-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"All Stores in Group"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx("input",{type:"radio",id:"cat-specific-stores",name:"cat-scope",className:"text-blue-600 focus:ring-blue-500"}),p.jsx("label",{htmlFor:"cat-specific-stores",className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:"Specific Location(s)"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 hover:bg-blue-700 text-white",children:"Create Category"})]})]})})}var Kp="Checkbox",[dle]=gi(Kp),[hle,N_]=dle(Kp);function ple(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:i,disabled:a,form:s,name:u,onCheckedChange:f,required:c,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Ha({prop:r,defaultProp:i??!1,onChange:f,caller:Kp}),[b,y]=P.useState(null),[w,S]=P.useState(null),O=P.useRef(!1),E=b?!!s||!!b.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:b,setControl:y,name:u,form:s,value:d,hasConsumerStoppedPropagationRef:O,required:c,defaultChecked:Ki(i)?!1:i,isFormControl:E,bubbleInput:w,setBubbleInput:S};return p.jsx(hle,{scope:t,...C,children:mle(h)?h(C):n})}var $3="CheckboxTrigger",B3=P.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},i)=>{const{control:a,value:s,disabled:u,checked:f,required:c,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=N_($3,e),y=Je(i,d),w=P.useRef(f);return P.useEffect(()=>{const S=a?.form;if(S){const O=()=>h(w.current);return S.addEventListener("reset",O),()=>S.removeEventListener("reset",O)}},[a,h]),p.jsx(We.button,{type:"button",role:"checkbox","aria-checked":Ki(f)?"mixed":f,"aria-required":c,"data-state":H3(f),"data-disabled":u?"":void 0,disabled:u,value:s,...n,ref:y,onKeyDown:Fe(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Fe(r,S=>{h(O=>Ki(O)?!0:!O),b&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});B3.displayName=$3;var z3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:a,required:s,disabled:u,value:f,onCheckedChange:c,form:d,...h}=e;return p.jsx(ple,{__scopeCheckbox:r,checked:i,defaultChecked:a,disabled:u,required:s,onCheckedChange:c,name:n,form:d,value:f,internal_do_not_use_render:({isFormControl:m})=>p.jsxs(p.Fragment,{children:[p.jsx(B3,{...h,ref:t,__scopeCheckbox:r}),m&&p.jsx(W3,{__scopeCheckbox:r})]})})});z3.displayName=Kp;var F3="CheckboxIndicator",q3=P.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,a=N_(F3,r);return p.jsx(Un,{present:n||Ki(a.checked)||a.checked===!0,children:p.jsx(We.span,{"data-state":H3(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});q3.displayName=F3;var U3="CheckboxBubbleInput",W3=P.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:u,disabled:f,name:c,value:d,form:h,bubbleInput:m,setBubbleInput:g}=N_(U3,e),b=Je(r,g),y=__(a),w=y_(n);P.useEffect(()=>{const O=m;if(!O)return;const E=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(E,"checked").set,N=!i.current;if(y!==a&&A){const T=new Event("click",{bubbles:N});O.indeterminate=Ki(a),A.call(O,Ki(a)?!1:a),O.dispatchEvent(T)}},[m,y,a,i]);const S=P.useRef(Ki(a)?!1:a);return p.jsx(We.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??S.current,required:u,disabled:f,name:c,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});W3.displayName=U3;function mle(e){return typeof e=="function"}function Ki(e){return e==="indeterminate"}function H3(e){return Ki(e)?"indeterminate":e?"checked":"unchecked"}function Jl({className:e,...t}){return p.jsx(z3,{"data-slot":"checkbox",className:Ie("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(q3,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:p.jsx(dR,{className:"size-3.5"})})})}const vle=[{id:"1",name:"Downtown Store (101)"},{id:"2",name:"Uptown Store (102)"},{id:"3",name:"Airport Kiosk (201)"},{id:"4",name:"Mall Outlet (305)"}],gle=[{id:"r1",name:"Partner Admin",permissions:["all"],notifications:["system_updates","billing"]},{id:"r2",name:"Group Admin",permissions:["manage_users","manage_products","view_reports"],notifications:["new_users"]},{id:"r3",name:"Manager",permissions:["manage_store","view_reports","manage_inventory"],notifications:["label_expiry","low_stock"]},{id:"r4",name:"Team Member",permissions:["view_tasks","print_labels"],notifications:["task_assignment"]}],V3=[{id:"p1",name:"Global Foods Inc.",status:"active",contact:"admin@globalfoods.com",phone:"+1 (555) 100-2000"},{id:"p2",name:"Local Eateries Co.",status:"active",contact:"support@localeateries.com",phone:"+1 (555) 200-3000"}],yle=[{id:"g1",name:"West Coast Region",partner:"Global Foods Inc.",status:"active"},{id:"g2",name:"East Coast Region",partner:"Global Foods Inc.",status:"inactive"}],xle=[{id:"m1",name:"Alice Johnson",role:"Manager",locations:["Downtown Store (101)","Uptown Store (102)"],email:"alice@example.com",phone:"+1 (555) 111-2222",status:"active"},{id:"m2",name:"Bob Smith",role:"Team Member",locations:["Airport Kiosk (201)"],email:"bob@example.com",phone:"+1 (555) 222-3333",status:"active"},{id:"m3",name:"Charlie Brown",role:"Team Member",locations:["Downtown Store (101)"],email:"charlie@example.com",phone:"+1 (555) 333-4444",status:"inactive"}];function ble(){const[e,t]=P.useState("Roles"),[r,n]=P.useState(gle),[i,a]=P.useState(V3),[s,u]=P.useState(yle),[f,c]=P.useState(xle),[d,h]=P.useState(!1),[m,g]=P.useState(!1),[b,y]=P.useState(!1),[w,S]=P.useState(!1),O=()=>{alert(`Exporting ${e} list to PDF...`)},E=()=>{switch(e){case"Roles":h(!0);break;case"Partner":g(!0);break;case"Group":y(!0);break;case"Team Member":S(!0);break}},C=()=>{const N=e==="Team Member";return p.jsxs("div",{className:"flex flex-col gap-4 pb-4",children:[p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsx("div",{className:"flex-1"}),N&&p.jsxs(p.Fragment,{children:[p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"})]}),p.jsx(Ne,{variant:"outline",onClick:O,className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export (PDF)"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:E,children:"New+"})]}),p.jsx("div",{className:"w-full border-b border-gray-200",children:p.jsx("div",{className:"flex overflow-x-auto w-fit",children:["Roles","Partner","Group","Team Member"].map(T=>p.jsx("button",{onClick:()=>t(T),style:e===T?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e===T?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:T},T))})})]})},A=()=>{switch(e){case"Roles":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Role Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Access Permissions"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Notifications"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.permissions.map(T=>p.jsx(Rn,{variant:"secondary",className:"text-xs bg-blue-100 text-blue-800 hover:bg-blue-100",children:T},T))})}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-wrap gap-1",children:N.notifications.map(T=>p.jsx(Rn,{variant:"outline",className:"text-xs border-orange-200 text-orange-700 bg-orange-50",children:T},T))})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Partner":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Partner Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Contact"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Phone"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:i.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:N.contact}),p.jsx(fe,{className:"border-r text-gray-600",children:N.phone}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Group":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Group Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Parent Partner"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:s.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r",children:N.partner}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]});case"Team Member":return p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100",children:[p.jsx(ge,{className:"font-bold text-black border-r",children:"Name"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Email"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Phone"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Role"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Assigned Locations"}),p.jsx(ge,{className:"font-bold text-black border-r",children:"Status"}),p.jsx(ge,{className:"font-bold text-black text-center",children:"Actions"})]})}),p.jsx(_r,{children:f.map(N=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium border-r",children:N.name}),p.jsx(fe,{className:"border-r text-gray-600",children:N.email}),p.jsx(fe,{className:"border-r text-gray-600",children:N.phone}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:"outline",className:"font-normal",children:N.role})}),p.jsx(fe,{className:"border-r",children:p.jsx("div",{className:"flex flex-col gap-1",children:N.locations.map(T=>p.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-600",children:[p.jsx(Gh,{className:"w-3 h-3"})," ",T]},T))})}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{className:N.status==="active"?"bg-green-600":"bg-gray-400",children:N.status})}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"sm",children:p.jsx(Uo,{className:"w-4 h-4 text-gray-500"})})})]},N.id))})]})}};return p.jsxs("div",{className:"h-full flex flex-col",children:[C(),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md",children:A()})}),p.jsx(wle,{open:d,onOpenChange:h}),p.jsx(_le,{open:m,onOpenChange:g}),p.jsx(Sle,{open:b,onOpenChange:y}),p.jsx(Ole,{open:w,onOpenChange:S,roles:r})]})}function wle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Create New Role"}),p.jsx(au,{children:"Define permissions and notification settings for this role."})]}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Role Name"}),p.jsx($e,{placeholder:"e.g. Inventory Specialist"})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(u8,{className:"w-4 h-4"})," Access Permissions"]}),p.jsx("div",{className:"grid grid-cols-2 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:["Manage Labels","Manage Products","Manage People","View Reports","Edit Settings","Approve Batches"].map(r=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`perm-${r}`}),p.jsx("label",{htmlFor:`perm-${r}`,className:"text-sm font-medium leading-none cursor-pointer",children:r})]},r))})]}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(pB,{className:"w-4 h-4"})," Notifications (Alerts)"]}),p.jsxs("div",{className:"grid grid-cols-1 gap-2 p-3 bg-gray-50 rounded border border-gray-100",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-expiry",defaultChecked:!0}),p.jsx("label",{htmlFor:"notif-expiry",className:"text-sm font-medium leading-none cursor-pointer",children:"Label Expiry Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-stock"}),p.jsx("label",{htmlFor:"notif-stock",className:"text-sm font-medium leading-none cursor-pointer",children:"Low Stock Alerts"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:"notif-tasks"}),p.jsx("label",{htmlFor:"notif-tasks",className:"text-sm font-medium leading-none cursor-pointer",children:"New Task Assignments"})]})]})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Role"})]})]})})}function _le({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Partner"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Partner Name"}),p.jsx($e,{placeholder:"Company Name"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Contact Email"}),p.jsx($e,{placeholder:"admin@partner.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{type:"tel",placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"partner-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"partner-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Partner"})]})]})})}function Sle({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{children:[p.jsx(aa,{children:p.jsx(oa,{children:"Create New Group"})}),p.jsxs("div",{className:"space-y-4 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Group Name"}),p.jsx($e,{placeholder:"e.g. West Coast Region"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Assign to Partner"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Partner"})}),p.jsx(st,{children:V3.map(r=>p.jsx(Ae,{value:r.id,children:r.name},r.id))})]})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"group-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"group-status",children:"Active"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Save Group"})]})]})})}function Ole({open:e,onOpenChange:t,roles:r}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[500px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add Team Member / Manager"}),p.jsx(au,{children:"Create a user account and assign them to locations."})]}),p.jsxs("div",{className:"space-y-4 py-4 max-h-[60vh] overflow-y-auto pr-1",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Full Name"}),p.jsx($e,{placeholder:"John Doe"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Role"}),p.jsxs(tt,{children:[p.jsx(nt,{children:p.jsx(rt,{placeholder:"Select Role"})}),p.jsx(st,{children:r.map(n=>p.jsx(Ae,{value:n.name,children:n.name},n.id))})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Password"}),p.jsx($e,{type:"password",placeholder:"Enter password",autoComplete:"new-password",className:"w-full"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Email Address"}),p.jsx($e,{type:"email",placeholder:"john@example.com"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{type:"tel",placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(fc,{className:"h-[120px] w-full border rounded-md p-2",children:p.jsx("div",{className:"space-y-2",children:vle.map(n=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(Jl,{id:`loc-${n.id}`}),p.jsx("label",{htmlFor:`loc-${n.id}`,className:"text-sm cursor-pointer w-full hover:bg-gray-50 p-1 rounded",children:n.name})]},n.id))})}),p.jsx("p",{className:"text-xs text-gray-500",children:"* Users must be assigned to at least one location."})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(no,{id:"member-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"member-status",children:"Active Account"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create User"})]})]})})}function jle(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Array(12).fill(0);let K1=1;class Ele{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...i}=t,a=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:K1++,s=this.toasts.find(f=>f.id===a),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(f=>f.id===a?(this.publish({...f,...t,id:a,title:n}),{...f,...t,id:a,dismissible:u,title:n}):f):this.addToast({title:n,...i,dismissible:u,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,s;const u=i.then(async c=>{if(s=["resolve",c],z.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(Ple(c)&&!c.ok){a=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,m=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(c instanceof Error){a=!1;const h=typeof r.error=="function"?await r.error(c):r.error,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:m,...b})}else if(r.success!==void 0){a=!1;const h=typeof r.success=="function"?await r.success(c):r.success,m=typeof r.description=="function"?await r.description(c):r.description,b=typeof h=="object"&&!z.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:m,...b})}}).catch(async c=>{if(s=["reject",c],r.error!==void 0){a=!1;const d=typeof r.error=="function"?await r.error(c):r.error,h=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!z.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:h,...g})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),f=()=>new Promise((c,d)=>u.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof n!="string"&&typeof n!="number"?{unwrap:f}:Object.assign(n,{unwrap:f})},this.custom=(t,r)=>{const n=r?.id||K1++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const en=new Ele,Ale=(e,t)=>{const r=t?.id||K1++;return en.addToast({title:e,...t,id:r}),r},Ple=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Nle=Ale,Cle=()=>en.toasts,Tle=()=>en.getActiveToasts(),kle=Object.assign(Nle,{success:en.success,info:en.info,warning:en.warning,error:en.error,custom:en.custom,message:en.message,promise:en.promise,dismiss:en.dismiss,loading:en.loading},{getHistory:Cle,getToasts:Tle});jle("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Rle=[{id:"1-251201",productName:"Whole Milk",category:"Dairy",template:'2"x2" Basic',printedAt:"2024-03-20 09:30 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-27",status:"Valid"},{id:"2-251201",productName:"Ground Beef",category:"Meat",template:'2"x2" Basic',printedAt:"2024-03-20 10:15 AM",printedBy:"Bob Smith",location:"Uptown Store (102)",expiryDate:"2024-03-23",status:"Valid"},{id:"3-251201",productName:"Croissant",category:"Bakery",template:'2"x2" Basic',printedAt:"2024-03-19 14:00 PM",printedBy:"Charlie Brown",location:"Downtown Store (101)",expiryDate:"2024-03-20",status:"Expired"},{id:"4-251201",productName:"Caesar Salad",category:"Deli",template:`2"x6" G'n'G !!!`,printedAt:"2024-03-18 11:45 AM",printedBy:"Alice Johnson",location:"Downtown Store (101)",expiryDate:"2024-03-21",status:"Expiring Soon"},{id:"5-251201",productName:"Orange Juice",category:"Beverage",template:'2"x2" Basic',printedAt:"2024-03-18 08:20 AM",printedBy:"Bob Smith",location:"Airport Kiosk (201)",expiryDate:"2024-03-25",status:"Valid"}],Mle=[{name:"Dairy",count:450},{name:"Meat",count:320},{name:"Bakery",count:280},{name:"Deli",count:190},{name:"Produce",count:150},{name:"Beverage",count:120}],Ile=[{date:"Mon",count:120},{date:"Tue",count:132},{date:"Wed",count:101},{date:"Thu",count:134},{date:"Fri",count:190},{date:"Sat",count:230},{date:"Sun",count:210}];function Dle(){const[e,t]=P.useState("print-log"),r=n=>{kle.success(`Reprinting label ${n}`,{description:"Watermark 'RePrint' applied."})};return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsxs("div",{className:"pb-4",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"loc-12345",children:[p.jsx(nt,{className:"w-[160px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"loc-12345",children:"Downtown Store"}),p.jsx(Ae,{value:"all",children:"All Locations"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[p.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Period Search:"}),p.jsxs("div",{className:"flex items-center bg-white border border-gray-300 rounded-md h-10 px-2",style:{minHeight:40},children:[p.jsx(vB,{className:"w-4 h-4 text-gray-500 mr-2 shrink-0"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"}),p.jsx("span",{className:"mx-2 text-gray-400",children:"-"}),p.jsx("input",{type:"date",className:"text-sm outline-none w-32 bg-transparent"})]})]}),p.jsxs("div",{className:"flex items-center w-64 rounded-md border border-gray-300 bg-white overflow-hidden shrink-0",style:{height:40},children:[p.jsx(Q1,{className:"h-4 w-4 text-gray-400 shrink-0 ml-3 pointer-events-none"}),p.jsx($e,{placeholder:"Search Product or Category...",className:"flex-1 min-w-0 border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 py-2 px-2 h-full placeholder:text-gray-500"})]}),p.jsx("div",{className:"flex-1 min-w-2"}),p.jsxs(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 bg-white hover:bg-gray-50 gap-2 shrink-0",children:[p.jsx(Y1,{className:"w-4 h-4"})," Export Report"]})]}),p.jsx("div",{className:"w-full border-b border-gray-200 mt-4",children:p.jsxs("div",{className:"flex overflow-x-auto w-fit",children:[p.jsx("button",{onClick:()=>t("print-log"),style:e==="print-log"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="print-log"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Print Log"}),p.jsx("button",{onClick:()=>t("label-report"),style:e==="label-report"?{borderBottomWidth:2,borderBottomStyle:"solid",borderBottomColor:"#2563eb"}:void 0,className:Ie("px-4 py-2.5 text-sm font-medium whitespace-nowrap cursor-pointer transition-colors -mb-px border-b-2",e==="label-report"?"text-blue-600":"border-b-transparent text-gray-600 hover:text-gray-800"),children:"Label Report"})]})})]}),p.jsxs("div",{className:"flex-1 overflow-auto pt-6",children:[e==="print-log"&&p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Label ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Product Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Category"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Template"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed At"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Printed By"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Expiry Date"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Action"})]})}),p.jsx(_r,{children:Rle.map(n=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:n.id}),p.jsx(fe,{className:"border-r font-medium",children:n.productName}),p.jsx(fe,{className:"border-r",children:p.jsx(Rn,{variant:"secondary",className:"bg-blue-50 text-blue-700 hover:bg-blue-50 border-blue-200",children:n.category})}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:(()=>{const i=n.template.endsWith(" !!!"),a=i?n.template.slice(0,-4):n.template,s=a.lastIndexOf(" "),u=a.slice(0,s+1),f=a.slice(s+1);return p.jsxs(p.Fragment,{children:[u,p.jsx("span",{className:"font-bold text-gray-900",children:f}),i&&p.jsx("span",{className:"text-red-600",children:" !!!"})]})})()}),p.jsx(fe,{className:"border-r text-gray-600 text-sm font-numeric",children:n.printedAt}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:n.printedBy}),p.jsx(fe,{className:"border-r text-gray-600 text-sm font-numeric",children:n.location}),p.jsx(fe,{className:"border-r",children:p.jsx("span",{className:Ie("text-sm font-medium font-numeric",n.status==="Expired"?"text-red-600":n.status==="Expiring Soon"?"text-orange-500":"text-green-600"),children:n.expiryDate})}),p.jsx(fe,{className:"text-center",children:p.jsxs(Ne,{size:"sm",variant:"outline",className:"h-8 gap-1 hover:bg-gray-100 border-gray-300",onClick:()=>r(n.id),children:[p.jsx(mR,{className:"w-3 h-3"})," Reprint"]})})]},n.id))})]})}),e==="label-report"&&p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Total Labels Printed"}),p.jsx(uc,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"2,543"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+20.1% from last month"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Most Printed Category"}),p.jsx(yB,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Dairy"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"450 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Top Product"}),p.jsx(fR,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"Whole Milk"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"182 labels generated"})]})]}),p.jsxs(Ir,{children:[p.jsxs(yn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(xn,{className:"text-sm font-medium",children:"Avg. Daily Prints"}),p.jsx(i8,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(tn,{children:[p.jsx("div",{className:"text-2xl font-bold",children:"85"}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"+12% from last week"})]})]})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Labels by Category"}),p.jsx(Id,{children:"Distribution of printed labels across product categories."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(sre,{data:Mle,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"name",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1,tickFormatter:n=>`${n}`}),p.jsx(Dr,{}),p.jsx(to,{dataKey:"count",fill:"#facc15",radius:[4,4,0,0]})]})})})]}),p.jsxs(Ir,{className:"col-span-1",children:[p.jsxs(yn,{children:[p.jsx(xn,{children:"Print Volume Trends"}),p.jsx(Id,{children:"Daily label printing volume for the last 7 days."})]}),p.jsx(tn,{className:"h-[300px]",children:p.jsx(Gd,{width:"100%",height:"100%",children:p.jsxs(yL,{data:Ile,children:[p.jsx(Rh,{strokeDasharray:"3 3",vertical:!1}),p.jsx(qa,{dataKey:"date",fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Ua,{fontSize:12,tickLine:!1,axisLine:!1}),p.jsx(Dr,{}),p.jsx(qs,{type:"monotone",dataKey:"count",stroke:"#dc2626",strokeWidth:2,dot:{r:4},activeDot:{r:6}})]})})})]})]}),p.jsxs(Ir,{children:[p.jsx(yn,{children:p.jsx(xn,{children:"Most Used Products"})}),p.jsx(tn,{children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{children:[p.jsx(ge,{children:"Product Name"}),p.jsx(ge,{children:"Category"}),p.jsx(ge,{className:"text-right",children:"Total Printed"}),p.jsx(ge,{className:"text-right",children:"Usage %"})]})}),p.jsxs(_r,{children:[p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Whole Milk"}),p.jsx(fe,{children:"Dairy"}),p.jsx(fe,{className:"text-right",children:"182"}),p.jsx(fe,{className:"text-right",children:"7.2%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Ground Beef 80/20"}),p.jsx(fe,{children:"Meat"}),p.jsx(fe,{className:"text-right",children:"145"}),p.jsx(fe,{className:"text-right",children:"5.7%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Chicken Breast"}),p.jsx(fe,{children:"Meat"}),p.jsx(fe,{className:"text-right",children:"132"}),p.jsx(fe,{className:"text-right",children:"5.2%"})]}),p.jsxs(Qe,{children:[p.jsx(fe,{className:"font-medium",children:"Sliced Ham"}),p.jsx(fe,{children:"Deli"}),p.jsx(fe,{className:"text-right",children:"98"}),p.jsx(fe,{className:"text-right",children:"3.8%"})]})]})]})})]})]})]})]})}const Lle=[{id:"12345",name:"Downtown Store",street:"123 Main St",city:"New York",state:"NY",country:"USA",zipCode:"10001",phone:"+1 (555) 123-4567",email:"downtown@example.com",gps:"40.7128° N, 74.0060° W",status:"active"},{id:"12335",name:"Uptown Market",street:"456 High St",city:"New York",state:"NY",country:"USA",zipCode:"10002",phone:"+1 (555) 987-6543",email:"uptown@example.com",gps:"40.7580° N, 73.9855° W",status:"active"},{id:"12445",name:"Airport Kiosk",street:"Terminal 4, JFK Airport",city:"Jamaica",state:"NY",country:"USA",zipCode:"11430",phone:"+1 (555) 555-5555",email:"jfk@example.com",gps:"40.6413° N, 73.7781° W",status:"active"},{id:"12555",name:"Suburban Outlet",street:"789 Country Rd",city:"Long Island",state:"NY",country:"USA",zipCode:"11901",phone:"+1 (555) 111-2222",email:"suburb@example.com",gps:"40.8500° N, 73.2000° W",status:"inactive"}];function $le(){const[e,t]=P.useState(!1),[r,n]=P.useState(Lle);return p.jsxs("div",{className:"h-full flex flex-col",children:[p.jsx("div",{className:"pb-4",children:p.jsx("div",{className:"flex flex-col gap-4",children:p.jsxs("div",{className:"flex flex-nowrap items-center gap-3",children:[p.jsx($e,{placeholder:"Search",style:{height:40,boxSizing:"border-box"},className:"border border-gray-300 rounded-md w-40 shrink-0 bg-white placeholder:text-gray-500"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Partner"})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Group"})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]}),p.jsxs(tt,{defaultValue:"all",children:[p.jsx(nt,{className:"w-[140px] h-10 rounded-md border border-gray-300 bg-white font-medium text-gray-900 shrink-0",style:{height:40,boxSizing:"border-box"},children:p.jsx(rt,{placeholder:"Location"})}),p.jsxs(st,{children:[p.jsx(Ae,{value:"all",children:"All Locations"}),p.jsx(Ae,{value:"loc-1",children:"Location 1"})]})]}),p.jsx("div",{className:"flex-1"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Import"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Export"}),p.jsx(Ne,{variant:"outline",className:"h-10 border border-gray-300 rounded-md text-gray-900 px-4 bg-white hover:bg-gray-50 shrink-0",children:"Bulk Edit"}),p.jsx(Ne,{className:"h-10 bg-blue-600 hover:bg-blue-700 text-white rounded-md px-6 font-medium shrink-0",onClick:()=>t(!0),children:"New+"})]})})}),p.jsx("div",{className:"flex-1 overflow-auto pt-6",children:p.jsx("div",{className:"bg-white border border-gray-200 shadow-sm rounded-md overflow-hidden",children:p.jsxs(br,{children:[p.jsx(wr,{children:p.jsxs(Qe,{className:"bg-gray-100 hover:bg-gray-100",children:[p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location ID"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Location Name"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Street"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"City"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"State"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Country"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Zip Code"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Phone"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"Email"}),p.jsx(ge,{className:"text-gray-900 font-bold border-r",children:"GPS"}),p.jsx(ge,{className:"text-gray-900 font-bold text-center",children:"Actions"})]})}),p.jsx(_r,{children:r.map(i=>p.jsxs(Qe,{children:[p.jsx(fe,{className:"border-r font-numeric text-gray-600",children:i.id}),p.jsx(fe,{className:"border-r font-medium text-black",children:i.name}),p.jsx(fe,{className:"border-r text-gray-600 max-w-[140px] truncate",children:i.street}),p.jsx(fe,{className:"border-r text-gray-600",children:i.city}),p.jsx(fe,{className:"border-r text-gray-600",children:i.state}),p.jsx(fe,{className:"border-r text-gray-600",children:i.country}),p.jsx(fe,{className:"border-r text-gray-600 font-numeric",children:i.zipCode}),p.jsx(fe,{className:"border-r text-gray-600 whitespace-nowrap",children:i.phone}),p.jsx(fe,{className:"border-r text-gray-600 text-sm",children:i.email}),p.jsx(fe,{className:"border-r text-gray-500 font-numeric text-xs",children:i.gps}),p.jsx(fe,{className:"text-center",children:p.jsx(Ne,{variant:"ghost",size:"icon",className:"h-8 w-8",children:p.jsx(hR,{className:"h-4 w-4 text-gray-500"})})})]},i.id))})]})})}),p.jsx(Ble,{open:e,onOpenChange:t})]})}function Ble({open:e,onOpenChange:t}){return p.jsx(na,{open:e,onOpenChange:t,children:p.jsxs(ia,{className:"sm:max-w-[600px]",children:[p.jsxs(aa,{children:[p.jsx(oa,{children:"Add New Location"}),p.jsx(au,{children:"Enter the details for the new store location."})]}),p.jsxs("div",{className:"grid gap-4 py-4",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Partner"}),p.jsxs(tt,{defaultValue:"partner-a",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"partner-a",children:"Partner A"})})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Group"}),p.jsxs(tt,{defaultValue:"group-b",children:[p.jsx(nt,{children:p.jsx(rt,{})}),p.jsx(st,{children:p.jsx(Ae,{value:"group-b",children:"Group B"})})]})]})]}),p.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[p.jsxs("div",{className:"space-y-2 col-span-1",children:[p.jsx(we,{children:"Location ID"}),p.jsx($e,{placeholder:"e.g. 12345"})]}),p.jsxs("div",{className:"space-y-2 col-span-2",children:[p.jsx(we,{children:"Location Name"}),p.jsx($e,{placeholder:"e.g. Downtown Store"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Street"}),p.jsx($e,{placeholder:"e.g. 123 Main St"})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"City"}),p.jsx($e,{placeholder:"e.g. New York"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"State"}),p.jsx($e,{placeholder:"e.g. NY"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Country"}),p.jsx($e,{placeholder:"e.g. USA"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Zip Code"}),p.jsx($e,{placeholder:"e.g. 10001"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Phone Number"}),p.jsx($e,{placeholder:"+1 (555) 000-0000"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(we,{children:"Email"}),p.jsx($e,{placeholder:"store@example.com"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs(we,{className:"flex items-center gap-2",children:[p.jsx(Gh,{className:"w-4 h-4"})," GPS Coordinates"]}),p.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[p.jsx($e,{placeholder:"Latitude (e.g. 40.7128)"}),p.jsx($e,{placeholder:"Longitude (e.g. -74.0060)"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[p.jsx(no,{id:"loc-status",defaultChecked:!0}),p.jsx(we,{htmlFor:"loc-status",children:"Active Location"})]})]}),p.jsxs(ro,{children:[p.jsx(Ne,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),p.jsx(Ne,{onClick:()=>t(!1),className:"bg-blue-600 text-white hover:bg-blue-700",children:"Create Location"})]})]})})}function zle(){const[e,t]=P.useState("Dashboard"),r=()=>{switch(e){case"Dashboard":return p.jsx(fre,{});case"Training":return p.jsx(Bse,{});case"Alerts":return p.jsx(qse,{});case"Menu Manager":return p.jsx(cle,{});case"Account Management":return p.jsx(ble,{});case"Reports":return p.jsx(Dle,{});case"Location Manager":return p.jsx($le,{});case"Labels":case"Label Categories":case"Label Types":case"Label Templates":case"Multiple Options":return p.jsx($se,{currentView:e,onViewChange:t});default:return p.jsx(dre,{title:e})}};return p.jsx(Oz,{currentView:e,setCurrentView:t,children:r()})}Q5.createRoot(document.getElementById("root")).render(p.jsx(zle,{})); diff --git a/美国版/Food Labeling Management Platform/build/index.html b/美国版/Food Labeling Management Platform/build/index.html index 010eb70..7b059d5 100644 --- a/美国版/Food Labeling Management Platform/build/index.html +++ b/美国版/Food Labeling Management Platform/build/index.html @@ -5,7 +5,7 @@ Food Labeling Management Platform - + diff --git a/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx b/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx index 75415d6..be8b522 100755 --- a/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx +++ b/美国版/Food Labeling Management Platform/src/components/labels/LabelTemplatesView.tsx @@ -45,8 +45,7 @@ export function LabelTemplatesView() { }); const handleNewTemplate = () => { - setEditingTemplateId(null); - setViewMode('editor'); + // 点击不跳转,仅保留按钮展示 }; const handleEditTemplate = (id: string) => { @@ -97,7 +96,7 @@ export function LabelTemplatesView() {