randmarcomps 1.280.0 → 1.281.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1087,7 +1087,7 @@ $10 with opportunities under $1,000`:t==="D"?"$15 under $1,500":t==="E"?"Full sh
1087
1087
  * LICENSE.md file in the root directory of this source tree.
1088
1088
  *
1089
1089
  * @license MIT
1090
- */function flexRender(t,e){return t?isReactComponent(t)?React__namespace.createElement(t,e):t:null}function isReactComponent(t){return isClassComponent(t)||typeof t=="function"||isExoticComponent(t)}function isClassComponent(t){return typeof t=="function"&&(()=>{const e=Object.getPrototypeOf(t);return e.prototype&&e.prototype.isReactComponent})()}function isExoticComponent(t){return typeof t=="object"&&typeof t.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}function useReactTable(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[n]=React__namespace.useState(()=>({current:createTable(e)})),[o,l]=React__namespace.useState(()=>n.current.initialState);return n.current.setOptions(d=>({...d,...t,state:{...o,...t.state},onStateChange:f=>{l(f),t.onStateChange==null||t.onStateChange(f)}})),n.current}function DataTable({columns:t,data:e,uniqueValues:n}){var E;const[o,l]=React.useState([]),[d,f]=React.useState([]),[g,b]=React.useState({pageIndex:0,pageSize:10}),[_,S]=React.useState(null),R=useReactTable({data:e,columns:t,getCoreRowModel:getCoreRowModel(),onSortingChange:l,getSortedRowModel:getSortedRowModel(),onColumnFiltersChange:f,getFilteredRowModel:getFilteredRowModel(),getPaginationRowModel:getPaginationRowModel(),onPaginationChange:b,state:{sorting:o,columnFilters:d,pagination:g}}),C=(A,I)=>{A.toggleSorting(I),S(null)};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(ScrollArea,{className:"rounded-md border",children:[jsxRuntime.jsxs(Table,{children:[jsxRuntime.jsx(TableHeader,{children:R.getHeaderGroups().map(A=>jsxRuntime.jsx(TableRow,{children:A.headers.map(I=>{var M;return jsxRuntime.jsx(TableHead,{children:I.isPlaceholder?null:I.column.getCanSort()||I.column.getCanFilter()?jsxRuntime.jsxs(Popover,{open:_===I.id,onOpenChange:j=>S(j?I.id:null),children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"ghost",className:"pl-0",children:[flexRender(I.column.columnDef.header,I.getContext()),I.column.getIsFiltered()?jsxRuntime.jsx(Filter,{className:"ml-2 h-4 w-4"}):I.column.getIsSorted()==="asc"?jsxRuntime.jsx(ArrowUp,{className:"ml-2 h-4 w-4"}):I.column.getIsSorted()==="desc"?jsxRuntime.jsx(ArrowDown,{className:"ml-2 h-4 w-4"}):jsxRuntime.jsx(ArrowUpDown,{className:"ml-2 h-4 w-4"})]})}),jsxRuntime.jsx(PopoverContent,{className:"w-56",children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[I.column.getCanSort()&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Button,{variant:"ghost",className:"w-full justify-start",onClick:()=>C(I.column,!1),children:[jsxRuntime.jsx(ArrowUp,{className:"mr-2 h-4 w-4"}),"Sort Ascending"]}),jsxRuntime.jsxs(Button,{variant:"ghost",className:"w-full justify-start",onClick:()=>C(I.column,!0),children:[jsxRuntime.jsx(ArrowDown,{className:"mr-2 h-4 w-4"}),"Sort Descending"]})]}),I.column.getCanFilter()&&jsxRuntime.jsx("div",{className:"px-2 py-1",children:n[I.column.id]?jsxRuntime.jsxs(Select,{onValueChange:j=>I.column.setFilterValue(j==="all"?void 0:[j]),children:[jsxRuntime.jsx(SelectTrigger,{children:jsxRuntime.jsx(SelectValue,{placeholder:`Filter ${I.column.columnDef.header}...`})}),jsxRuntime.jsxs(SelectContent,{children:[jsxRuntime.jsx(SelectItem,{value:"all",children:"All"}),(M=n[I.column.id])==null?void 0:M.map(j=>jsxRuntime.jsx(SelectItem,{value:j||"empty",children:j||"(Empty)"},j))]})]}):jsxRuntime.jsx(Input,{placeholder:`Filter ${I.column.columnDef.header}...`,value:I.column.getFilterValue()??"",onChange:j=>I.column.setFilterValue(j.target.value),className:"w-full"})})]})})]}):jsxRuntime.jsx("div",{className:"py-2 px-4",children:flexRender(I.column.columnDef.header,I.getContext())})},I.id)})},A.id))}),jsxRuntime.jsx(TableBody,{children:(E=R.getRowModel().rows)!=null&&E.length?R.getRowModel().rows.map(A=>jsxRuntime.jsx(TableRow,{"data-state":A.getIsSelected()&&"selected",children:A.getVisibleCells().map(I=>jsxRuntime.jsx(TableCell,{children:flexRender(I.column.columnDef.cell,I.getContext())},I.id))},A.id)):jsxRuntime.jsx(TableRow,{children:jsxRuntime.jsx(TableCell,{colSpan:t.length,className:"h-24 text-center",children:"No results."})})})]}),jsxRuntime.jsx(ScrollBar,{orientation:"horizontal"})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Rows per page"}),jsxRuntime.jsxs(Select,{value:`${R.getState().pagination.pageSize}`,onValueChange:A=>{R.setPageSize(Number(A))},children:[jsxRuntime.jsx(SelectTrigger,{className:"h-8 w-[70px]",children:jsxRuntime.jsx(SelectValue,{asChild:!0,children:jsxRuntime.jsx("span",{children:R.getState().pagination.pageSize})})}),jsxRuntime.jsx(SelectContent,{side:"top",children:[10,20,30,40,50].map(A=>jsxRuntime.jsx(SelectItem,{value:`${A}`,children:jsxRuntime.jsx("span",{children:A})},A))})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs(Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>R.setPageIndex(0),disabled:!R.getCanPreviousPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to first page"}),jsxRuntime.jsx(ChevronsLeft,{className:"h-4 w-4"})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>R.previousPage(),disabled:!R.getCanPreviousPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to previous page"}),jsxRuntime.jsx(ChevronLeft,{className:"h-4 w-4"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Page"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:R.getState().pagination.pageIndex+1}),jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"of"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:R.getPageCount()})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>R.nextPage(),disabled:!R.getCanNextPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to next page"}),jsxRuntime.jsx(ChevronRight,{className:"h-4 w-4"})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>R.setPageIndex(R.getPageCount()-1),disabled:!R.getCanNextPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to last page"}),jsxRuntime.jsx(ChevronsRight,{className:"h-4 w-4"})]})]})]})]})}function ResellerCard({reseller:t,link:e,actions:n,loading:o=!1}){var g,b;if(o||!t)return jsxRuntime.jsxs(Card,{className:"flex flex-col h-full",children:[jsxRuntime.jsx(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-12 w-12 rounded-md"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-24 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-48"})]})]})}),jsxRuntime.jsx(CardContent,{className:"pb-2 flex-grow",children:jsxRuntime.jsx("div",{className:"flex",children:jsxRuntime.jsxs("div",{className:"flex flex-col flex-1 space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-16 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-14 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-40"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-36"})]})]})]})})}),jsxRuntime.jsxs(CardFooter,{className:"flex justify-between pt-2 gap-2 mt-auto",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-40"})]})]});const l=t.ResellerId||"N/A",d=[t.City,t.Province,t.Country].filter(Boolean),f=d.length>0?d.join(", "):"Location not provided";return jsxRuntime.jsxs(Card,{className:"reseller-theme flex flex-col h-full",children:[jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-12 w-12 overflow-hidden rounded-md",children:jsxRuntime.jsx(PartnerLogo,{id:t.ResellerId,width:48,height:48})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-xs text-primary",children:"Reseller"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:"|"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:l})]}),jsxRuntime.jsx("h3",{className:"font-semibold",children:t.PublicName||"N/A"}),t.Name&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:t.Name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:f})]})]}),!!t.OnHold&&t.OnHold!==0&&jsxRuntime.jsx(Badge,{variant:"warning",children:"On Hold"})]}),jsxRuntime.jsx(CardContent,{className:"pb-2 flex-grow",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col flex-1 space-y-2",children:[!!((g=t.Qualification)!=null&&g.QualificationId)&&((b=t.Qualification)==null?void 0:b.QualificationId)!=="Suspended"&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:jsxRuntime.jsx(QualificationBadge,{qualification:t.Qualification??{}})}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[t.Phone&&jsxRuntime.jsxs(reactRouterDom.Link,{to:`tel:${t.Phone}`,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Phone,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.Phone})]}),t.PublicEmail&&jsxRuntime.jsxs(reactRouterDom.Link,{to:`mailto:${t.PublicEmail}`,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Mail,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.PublicEmail})]}),t.Website&&jsxRuntime.jsxs(reactRouterDom.Link,{to:t.Website,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Globe,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.Website})]}),t.CurrencyCode&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(DollarSign,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.CurrencyCode})]})]})]}),(t==null?void 0:t.SalesData)&&jsxRuntime.jsxs("div",{className:"border-l pl-2 ml-2 flex flex-col text-sm",children:[jsxRuntime.jsx("strong",{className:"",children:"YTD"}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesYearToDay?formatMoney(t==null?void 0:t.SalesData.SalesYearToDay):"—"}),jsxRuntime.jsx("strong",{className:"mt-2",children:"3 mo."}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesLast3Months?formatMoney(t==null?void 0:t.SalesData.SalesLast3Months):"—"}),jsxRuntime.jsx("strong",{className:"mt-2",children:"30 days"}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesLast30Days?formatMoney(t==null?void 0:t.SalesData.SalesLast30Days):"—"})]})]})}),(n||e)&&jsxRuntime.jsxs(CardFooter,{className:`flex pt-2 gap-2 mt-auto ${n?"justify-between":"justify-end"}`,children:[n&&n,e&&jsxRuntime.jsx(Button,{className:"flex items-center gap-1",asChild:!0,children:jsxRuntime.jsxs(reactRouterDom.Link,{to:e,target:"_blank",children:[jsxRuntime.jsx(ExternalLink,{className:"h-4 w-4"}),"Go to Reseller"]})})]})]})}const Table=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:n,className:cn("w-full caption-bottom text-sm",t),...e})}));Table.displayName="Table";const TableHeader=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("thead",{ref:n,className:cn("[&_tr]:border-b",t),...e}));TableHeader.displayName="TableHeader";const TableBody=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tbody",{ref:n,className:cn("[&_tr:last-child]:border-0",t),...e}));TableBody.displayName="TableBody";const TableFooter=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tfoot",{ref:n,className:cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));TableFooter.displayName="TableFooter";const TableRow=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tr",{ref:n,className:cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));TableRow.displayName="TableRow";const TableHead=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("th",{ref:n,className:cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e,children:React__namespace.isValidElement(e.children)&&e.children.type==="span"?e.children:jsxRuntime.jsx("span",{children:e.children})}));TableHead.displayName="TableHead";const TableCell=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("td",{ref:n,className:cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e,children:React__namespace.isValidElement(e.children)&&e.children.type==="span"?e.children:jsxRuntime.jsx("span",{children:e.children})}));TableCell.displayName="TableCell";const TableCaption=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("caption",{ref:n,className:cn("mt-4 text-sm text-muted-foreground",t),...e}));TableCaption.displayName="TableCaption";const Topbar=React.forwardRef(({onSignOut:t,handleValidSearch:e,rightMenu:n,searchPlaceholder:o},l)=>{const[d,f]=React.useState(""),g=reactRouterDom.useLocation(),{toast:b}=useToast();React.useEffect(()=>{const C=new URLSearchParams(g.search).get("q");C&&f(C)},[g.search]);const _=()=>{const R=d.trim();if(!R||R.length<2){b({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}e(R)},S=R=>{R.key==="Enter"&&_()};return jsxRuntime.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[jsxRuntime.jsx(SidebarTrigger,{className:"lg:hidden",children:jsxRuntime.jsx(Menu$1,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center gap-4",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-sm",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:_,"aria-label":"Search",children:jsxRuntime.jsx(Search,{className:"h-4 w-4 text-muted-foreground"})}),jsxRuntime.jsx(Input,{placeholder:o??"Search...",className:"w-full pl-8 bg-white text-black",value:d,onChange:R=>f(R.target.value),onKeyDown:S,ref:l},"topbar-search")]})})}),n||jsxRuntime.jsx(jsxRuntime.Fragment,{}),t&&jsxRuntime.jsx("div",{className:"flex items-center gap-4",children:jsxRuntime.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:t,children:[jsxRuntime.jsx(LogOut,{className:"h-4 w-4 text-sidebar-foreground"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});Topbar.displayName="Topbar";function ActiveOrdersCard({orders:t,loading:e=!1}){const n=React.useMemo(()=>{if(!t||t.length===0)return{all:{orders:0,amount:0},processing:{orders:0,amount:0},shipped:{orders:0,amount:0},delayed:{orders:0,amount:0}};const l=t.filter(M=>M.DocumentType==="Order"),d=t.filter(M=>M.DocumentType==="Shipment"),f=l.filter(M=>M.WarehouseCode!=="3PLE"),g=f.reduce((M,j)=>M+(j.Quantity||0),0),b=f.reduce((M,j)=>M+(j.ExtendedPrice||0),0),_=l.filter(M=>M.WarehouseCode==="3PLE"),S=_.reduce((M,j)=>M+(j.Quantity||0),0),R=_.reduce((M,j)=>M+(j.ExtendedPrice||0),0),C=d.length,E=d.reduce((M,j)=>M+(j.ExtendedPrice||0),0),A=g+S+C,I=b+R+E;return{all:{orders:A,amount:I},processing:{orders:g,amount:b},shipped:{orders:C,amount:E},delayed:{orders:S,amount:R}}},[t]),o=[{name:"All",icon:Package,color:"bg-blue-500",textColor:"text-blue-600",orders:n.all.orders,amount:n.all.amount},{name:"Processing",icon:RefreshCcw,color:"bg-yellow-500",textColor:"text-yellow-600",orders:n.processing.orders,amount:n.processing.amount},{name:"Shipped",icon:Truck,color:"bg-green-500",textColor:"text-green-600",orders:n.shipped.orders,amount:n.shipped.amount},{name:"Delayed",icon:CircleAlert,color:"bg-red-500",textColor:"text-red-600",orders:n.delayed.orders,amount:n.delayed.amount}];return e?jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{className:"pb-0",children:jsxRuntime.jsx(CardTitle,{className:"text-lg font-bold",children:"Active Orders"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4",children:[1,2,3,4].map(l=>jsxRuntime.jsxs("div",{className:"overflow-hidden rounded-md border",children:[jsxRuntime.jsx("div",{className:"bg-slate-200 dark:bg-slate-700 h-[3px]"}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-16 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-7 w-12"})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-16 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]})]})]},l))})]}):jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{className:"pb-0",children:jsxRuntime.jsx(CardTitle,{className:"text-lg font-bold",children:"Active Orders"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4",children:o.map(l=>jsxRuntime.jsxs("div",{className:"overflow-hidden rounded-md border",children:[jsxRuntime.jsx("div",{className:`${l.color} bg-opacity-60 h-[3px]`}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-base",children:l.name}),jsxRuntime.jsx("div",{className:`${l.color} bg-opacity-90 p-2 rounded-full`,children:jsxRuntime.jsx(l.icon,{className:"size-4 shrink-0 text-white"})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Orders"}),jsxRuntime.jsx("p",{className:"text-xl font-bold",children:l.orders})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Amount"}),jsxRuntime.jsx("p",{className:"text-base font-semibold",children:formatMoney(l.amount)})]})]})]})]},l.name))})]})}var __create=Object.create,__getProtoOf=Object.getPrototypeOf,__defProp=Object.defineProperty,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__toESM=(t,e,n)=>{n=t!=null?__create(__getProtoOf(t)):{};const o=e||!t||!t.__esModule?__defProp(n,"default",{value:t,enumerable:!0}):n;for(let l of __getOwnPropNames(t))__hasOwnProp.call(o,l)||__defProp(o,l,{get:()=>t[l],enumerable:!0});return o},__commonJS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),require_xhtml=__commonJS((t,e)=>{e.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}}),require_acorn=__commonJS((t,e)=>{(function(n,o){typeof t=="object"&&typeof e<"u"?o(t):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.acorn={}))})(t,function(n){var o=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],l=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],d="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",f="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",g={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},b="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",_={5:b,"5module":b+" export import",6:b+" const class extends export import super"},S=/^in(stanceof)?$/,R=new RegExp("["+f+"]"),C=new RegExp("["+f+d+"]");function E(V,ae){for(var Oe=65536,Le=0;Le<ae.length;Le+=2){if(Oe+=ae[Le],Oe>V)return!1;if(Oe+=ae[Le+1],Oe>=V)return!0}return!1}function A(V,ae){return V<65?V===36:V<91?!0:V<97?V===95:V<123?!0:V<=65535?V>=170&&R.test(String.fromCharCode(V)):ae===!1?!1:E(V,l)}function I(V,ae){return V<48?V===36:V<58?!0:V<65?!1:V<91?!0:V<97?V===95:V<123?!0:V<=65535?V>=170&&C.test(String.fromCharCode(V)):ae===!1?!1:E(V,l)||E(V,o)}var M=function(ae,Oe){Oe===void 0&&(Oe={}),this.label=ae,this.keyword=Oe.keyword,this.beforeExpr=!!Oe.beforeExpr,this.startsExpr=!!Oe.startsExpr,this.isLoop=!!Oe.isLoop,this.isAssign=!!Oe.isAssign,this.prefix=!!Oe.prefix,this.postfix=!!Oe.postfix,this.binop=Oe.binop||null,this.updateContext=null};function j(V,ae){return new M(V,{beforeExpr:!0,binop:ae})}var q={beforeExpr:!0},z={startsExpr:!0},Q={};function F(V,ae){return ae===void 0&&(ae={}),ae.keyword=V,Q[V]=new M(V,ae)}var O={num:new M("num",z),regexp:new M("regexp",z),string:new M("string",z),name:new M("name",z),privateId:new M("privateId",z),eof:new M("eof"),bracketL:new M("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new M("]"),braceL:new M("{",{beforeExpr:!0,startsExpr:!0}),braceR:new M("}"),parenL:new M("(",{beforeExpr:!0,startsExpr:!0}),parenR:new M(")"),comma:new M(",",q),semi:new M(";",q),colon:new M(":",q),dot:new M("."),question:new M("?",q),questionDot:new M("?."),arrow:new M("=>",q),template:new M("template"),invalidTemplate:new M("invalidTemplate"),ellipsis:new M("...",q),backQuote:new M("`",z),dollarBraceL:new M("${",{beforeExpr:!0,startsExpr:!0}),eq:new M("=",{beforeExpr:!0,isAssign:!0}),assign:new M("_=",{beforeExpr:!0,isAssign:!0}),incDec:new M("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new M("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new M("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new M("**",{beforeExpr:!0}),coalesce:j("??",1),_break:F("break"),_case:F("case",q),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",q),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",q),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",z),_if:F("if"),_return:F("return",q),_switch:F("switch"),_throw:F("throw",q),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",z),_super:F("super",z),_class:F("class",z),_extends:F("extends",q),_export:F("export"),_import:F("import",z),_null:F("null",z),_true:F("true",z),_false:F("false",z),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},te=/\r\n?|\n|\u2028|\u2029/,ne=new RegExp(te.source,"g");function se(V){return V===10||V===13||V===8232||V===8233}function ge(V,ae,Oe){Oe===void 0&&(Oe=V.length);for(var Le=ae;Le<Oe;Le++){var Ge=V.charCodeAt(Le);if(se(Ge))return Le<Oe-1&&Ge===13&&V.charCodeAt(Le+1)===10?Le+2:Le+1}return-1}var oe=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ae=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,je=Object.prototype,Ne=je.hasOwnProperty,Ve=je.toString,Fe=Object.hasOwn||function(V,ae){return Ne.call(V,ae)},ze=Array.isArray||function(V){return Ve.call(V)==="[object Array]"},$e=Object.create(null);function Be(V){return $e[V]||($e[V]=new RegExp("^(?:"+V.replace(/ /g,"|")+")$"))}function qe(V){return V<=65535?String.fromCharCode(V):(V-=65536,String.fromCharCode((V>>10)+55296,(V&1023)+56320))}var Ke=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,He=function(ae,Oe){this.line=ae,this.column=Oe};He.prototype.offset=function(ae){return new He(this.line,this.column+ae)};var Xe=function(ae,Oe,Le){this.start=Oe,this.end=Le,ae.sourceFile!==null&&(this.source=ae.sourceFile)};function tt(V,ae){for(var Oe=1,Le=0;;){var Ge=ge(V,Le,ae);if(Ge<0)return new He(Oe,ae-Le);++Oe,Le=Ge}}var Ye={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},rt=!1;function Ze(V){var ae={};for(var Oe in Ye)ae[Oe]=V&&Fe(V,Oe)?V[Oe]:Ye[Oe];if(ae.ecmaVersion==="latest"?ae.ecmaVersion=1e8:ae.ecmaVersion==null?(!rt&&typeof console=="object"&&console.warn&&(rt=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
1090
+ */function flexRender(t,e){return t?isReactComponent(t)?React__namespace.createElement(t,e):t:null}function isReactComponent(t){return isClassComponent(t)||typeof t=="function"||isExoticComponent(t)}function isClassComponent(t){return typeof t=="function"&&(()=>{const e=Object.getPrototypeOf(t);return e.prototype&&e.prototype.isReactComponent})()}function isExoticComponent(t){return typeof t=="object"&&typeof t.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}function useReactTable(t){const e={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[n]=React__namespace.useState(()=>({current:createTable(e)})),[o,l]=React__namespace.useState(()=>n.current.initialState);return n.current.setOptions(d=>({...d,...t,state:{...o,...t.state},onStateChange:f=>{l(f),t.onStateChange==null||t.onStateChange(f)}})),n.current}function DataTable({columns:t,data:e,uniqueValues:n}){var E;const[o,l]=React.useState([]),[d,f]=React.useState([]),[g,b]=React.useState({pageIndex:0,pageSize:10}),[_,S]=React.useState(null),R=useReactTable({data:e,columns:t,getCoreRowModel:getCoreRowModel(),onSortingChange:l,getSortedRowModel:getSortedRowModel(),onColumnFiltersChange:f,getFilteredRowModel:getFilteredRowModel(),getPaginationRowModel:getPaginationRowModel(),onPaginationChange:b,state:{sorting:o,columnFilters:d,pagination:g}}),C=(A,I)=>{A.toggleSorting(I),S(null)};return jsxRuntime.jsxs("div",{className:"space-y-4",children:[jsxRuntime.jsxs(ScrollArea,{className:"rounded-md border",children:[jsxRuntime.jsxs(Table,{children:[jsxRuntime.jsx(TableHeader,{children:R.getHeaderGroups().map(A=>jsxRuntime.jsx(TableRow,{children:A.headers.map(I=>{var M;return jsxRuntime.jsx(TableHead,{children:I.isPlaceholder?null:I.column.getCanSort()||I.column.getCanFilter()?jsxRuntime.jsxs(Popover,{open:_===I.id,onOpenChange:j=>S(j?I.id:null),children:[jsxRuntime.jsx(PopoverTrigger,{asChild:!0,children:jsxRuntime.jsxs(Button,{variant:"ghost",className:"pl-0",children:[flexRender(I.column.columnDef.header,I.getContext()),I.column.getIsFiltered()?jsxRuntime.jsx(Filter,{className:"ml-2 h-4 w-4"}):I.column.getIsSorted()==="asc"?jsxRuntime.jsx(ArrowUp,{className:"ml-2 h-4 w-4"}):I.column.getIsSorted()==="desc"?jsxRuntime.jsx(ArrowDown,{className:"ml-2 h-4 w-4"}):jsxRuntime.jsx(ArrowUpDown,{className:"ml-2 h-4 w-4"})]})}),jsxRuntime.jsx(PopoverContent,{className:"w-56",children:jsxRuntime.jsxs("div",{className:"space-y-2",children:[I.column.getCanSort()&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(Button,{variant:"ghost",className:"w-full justify-start",onClick:()=>C(I.column,!1),children:[jsxRuntime.jsx(ArrowUp,{className:"mr-2 h-4 w-4"}),"Sort Ascending"]}),jsxRuntime.jsxs(Button,{variant:"ghost",className:"w-full justify-start",onClick:()=>C(I.column,!0),children:[jsxRuntime.jsx(ArrowDown,{className:"mr-2 h-4 w-4"}),"Sort Descending"]})]}),I.column.getCanFilter()&&jsxRuntime.jsx("div",{className:"px-2 py-1",children:n[I.column.id]?jsxRuntime.jsxs(Select,{onValueChange:j=>I.column.setFilterValue(j==="all"?void 0:[j]),children:[jsxRuntime.jsx(SelectTrigger,{children:jsxRuntime.jsx(SelectValue,{placeholder:`Filter ${I.column.columnDef.header}...`})}),jsxRuntime.jsxs(SelectContent,{children:[jsxRuntime.jsx(SelectItem,{value:"all",children:"All"}),(M=n[I.column.id])==null?void 0:M.map(j=>jsxRuntime.jsx(SelectItem,{value:j||"empty",children:j||"(Empty)"},j))]})]}):jsxRuntime.jsx(Input,{placeholder:`Filter ${I.column.columnDef.header}...`,value:I.column.getFilterValue()??"",onChange:j=>I.column.setFilterValue(j.target.value),className:"w-full"})})]})})]}):jsxRuntime.jsx("div",{className:"py-2 px-4",children:flexRender(I.column.columnDef.header,I.getContext())})},I.id)})},A.id))}),jsxRuntime.jsx(TableBody,{children:(E=R.getRowModel().rows)!=null&&E.length?R.getRowModel().rows.map(A=>jsxRuntime.jsx(TableRow,{"data-state":A.getIsSelected()&&"selected",children:A.getVisibleCells().map(I=>jsxRuntime.jsx(TableCell,{children:flexRender(I.column.columnDef.cell,I.getContext())},I.id))},A.id)):jsxRuntime.jsx(TableRow,{children:jsxRuntime.jsx(TableCell,{colSpan:t.length,className:"h-24 text-center",children:"No results."})})})]}),jsxRuntime.jsx(ScrollBar,{orientation:"horizontal"})]}),jsxRuntime.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Rows per page"}),jsxRuntime.jsxs(Select,{value:`${R.getState().pagination.pageSize}`,onValueChange:A=>{R.setPageSize(Number(A))},children:[jsxRuntime.jsx(SelectTrigger,{className:"h-8 w-[70px]",children:jsxRuntime.jsx(SelectValue,{asChild:!0,children:jsxRuntime.jsx("span",{children:R.getState().pagination.pageSize})})}),jsxRuntime.jsx(SelectContent,{side:"top",children:[10,20,30,40,50].map(A=>jsxRuntime.jsx(SelectItem,{value:`${A}`,children:jsxRuntime.jsx("span",{children:A})},A))})]})]}),jsxRuntime.jsxs("div",{className:"flex items-center space-x-2",children:[jsxRuntime.jsxs(Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>R.setPageIndex(0),disabled:!R.getCanPreviousPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to first page"}),jsxRuntime.jsx(ChevronsLeft,{className:"h-4 w-4"})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>R.previousPage(),disabled:!R.getCanPreviousPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to previous page"}),jsxRuntime.jsx(ChevronLeft,{className:"h-4 w-4"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"Page"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:R.getState().pagination.pageIndex+1}),jsxRuntime.jsx("p",{className:"text-sm font-medium",children:"of"}),jsxRuntime.jsx("span",{className:"text-sm font-medium",children:R.getPageCount()})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>R.nextPage(),disabled:!R.getCanNextPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to next page"}),jsxRuntime.jsx(ChevronRight,{className:"h-4 w-4"})]}),jsxRuntime.jsxs(Button,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>R.setPageIndex(R.getPageCount()-1),disabled:!R.getCanNextPage(),children:[jsxRuntime.jsx("span",{className:"sr-only",children:"Go to last page"}),jsxRuntime.jsx(ChevronsRight,{className:"h-4 w-4"})]})]})]})]})}function ResellerCard({reseller:t,link:e,linkNewTab:n=!0,actions:o,mainAction:l,loading:d=!1}){var R,C;if(d||!t)return jsxRuntime.jsxs(Card,{className:"flex flex-col h-full",children:[jsxRuntime.jsx(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx(Skeleton,{className:"h-12 w-12 rounded-md"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-24 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-40 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32 mb-1"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-48"})]})]})}),jsxRuntime.jsx(CardContent,{className:"pb-2 flex-grow",children:jsxRuntime.jsx("div",{className:"flex",children:jsxRuntime.jsxs("div",{className:"flex flex-col flex-1 space-y-2",children:[jsxRuntime.jsxs("div",{className:"flex flex-wrap gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-16 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20 rounded-full"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-14 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-32"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-40"})]}),jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx(Skeleton,{className:"h-4 w-4"}),jsxRuntime.jsx(Skeleton,{className:"h-4 w-36"})]})]})]})})}),jsxRuntime.jsxs(CardFooter,{className:"flex justify-between pt-2 gap-2 mt-auto",children:[jsxRuntime.jsx(Skeleton,{className:"h-9 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-9 w-40"})]})]});const f=t.ResellerId||"N/A",g=[t.City,t.Province,t.Country].filter(Boolean),b=g.length>0?g.join(", "):"Location not provided",S=(E=>!E||E.length===0?[]:[...E].sort((A,I)=>(A.Day||0)-(I.Day||0)).map(A=>({date:A.Day||0,amount:A.ExtendedPrice||0})))(t.SalesStatistics);return jsxRuntime.jsxs(Card,{className:"reseller-theme flex flex-col h-full",children:[jsxRuntime.jsx(reactRouterDom.Link,{to:e??"#",target:e&&n?"_blank":"_self",children:jsxRuntime.jsxs(CardHeader,{className:"flex flex-row items-start justify-between space-y-0 pb-2 pt-4",children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntime.jsx("div",{className:"h-12 w-12 overflow-hidden rounded-md",children:jsxRuntime.jsx(PartnerLogo,{id:t.ResellerId,width:48,height:48})}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntime.jsx("span",{className:"text-xs text-primary",children:"Reseller"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:"|"}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:f})]}),jsxRuntime.jsx("h3",{className:"font-semibold",children:t.PublicName||"N/A"}),t.Name&&jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:t.Name}),jsxRuntime.jsx("p",{className:"text-sm text-muted-foreground",children:b})]})]}),jsxRuntime.jsx("div",{className:"flex flex-col items-end gap-2",children:S.length>0&&jsxRuntime.jsx("div",{className:"h-16 w-24",children:jsxRuntime.jsx(AreaChart,{data:S,height:60,size:"mini"})})}),!!t.OnHold&&t.OnHold!==0&&jsxRuntime.jsx(Badge,{variant:"warning",children:"On Hold"})]})}),jsxRuntime.jsx(CardContent,{className:"pb-2 flex-grow",children:jsxRuntime.jsxs("div",{className:"flex",children:[jsxRuntime.jsxs("div",{className:"flex flex-col flex-1 space-y-2",children:[!!((R=t.Qualification)!=null&&R.QualificationId)&&((C=t.Qualification)==null?void 0:C.QualificationId)!=="Suspended"&&jsxRuntime.jsx("div",{className:"flex flex-wrap gap-2",children:jsxRuntime.jsx(QualificationBadge,{qualification:t.Qualification??{}})}),jsxRuntime.jsxs("div",{className:"space-y-1 pt-2",children:[t.Phone&&jsxRuntime.jsxs(reactRouterDom.Link,{to:`tel:${t.Phone}`,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Phone,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.Phone})]}),t.PublicEmail&&jsxRuntime.jsxs(reactRouterDom.Link,{to:`mailto:${t.PublicEmail}`,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Mail,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.PublicEmail})]}),t.Website&&jsxRuntime.jsxs(reactRouterDom.Link,{to:t.Website,target:"_blank",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(Globe,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.Website})]}),t.CurrencyCode&&jsxRuntime.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[jsxRuntime.jsx(DollarSign,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{children:t.CurrencyCode})]})]})]}),(t==null?void 0:t.SalesData)&&jsxRuntime.jsxs("div",{className:"border-l pl-2 ml-2 flex flex-col text-sm",children:[jsxRuntime.jsx("strong",{className:"",children:"YTD"}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesYearToDay?formatMoney(t==null?void 0:t.SalesData.SalesYearToDay):"—"}),jsxRuntime.jsx("strong",{className:"mt-2",children:"3 mo."}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesLast3Months?formatMoney(t==null?void 0:t.SalesData.SalesLast3Months):"—"}),jsxRuntime.jsx("strong",{className:"mt-2",children:"30 days"}),jsxRuntime.jsx("p",{children:t!=null&&t.SalesData.SalesLast30Days?formatMoney(t==null?void 0:t.SalesData.SalesLast30Days):"—"})]})]})}),(o||l)&&jsxRuntime.jsxs(CardFooter,{className:"flex pt-2 gap-2 justify-between mt-auto",children:[jsxRuntime.jsx("div",{className:"flex items-center gap-2",children:o&&o}),l&&jsxRuntime.jsx("div",{children:l})]})]})}const Table=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:n,className:cn("w-full caption-bottom text-sm",t),...e})}));Table.displayName="Table";const TableHeader=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("thead",{ref:n,className:cn("[&_tr]:border-b",t),...e}));TableHeader.displayName="TableHeader";const TableBody=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tbody",{ref:n,className:cn("[&_tr:last-child]:border-0",t),...e}));TableBody.displayName="TableBody";const TableFooter=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tfoot",{ref:n,className:cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));TableFooter.displayName="TableFooter";const TableRow=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("tr",{ref:n,className:cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));TableRow.displayName="TableRow";const TableHead=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("th",{ref:n,className:cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e,children:React__namespace.isValidElement(e.children)&&e.children.type==="span"?e.children:jsxRuntime.jsx("span",{children:e.children})}));TableHead.displayName="TableHead";const TableCell=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("td",{ref:n,className:cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...e,children:React__namespace.isValidElement(e.children)&&e.children.type==="span"?e.children:jsxRuntime.jsx("span",{children:e.children})}));TableCell.displayName="TableCell";const TableCaption=React__namespace.forwardRef(({className:t,...e},n)=>jsxRuntime.jsx("caption",{ref:n,className:cn("mt-4 text-sm text-muted-foreground",t),...e}));TableCaption.displayName="TableCaption";const Topbar=React.forwardRef(({onSignOut:t,handleValidSearch:e,rightMenu:n,searchPlaceholder:o},l)=>{const[d,f]=React.useState(""),g=reactRouterDom.useLocation(),{toast:b}=useToast();React.useEffect(()=>{const C=new URLSearchParams(g.search).get("q");C&&f(C)},[g.search]);const _=()=>{const R=d.trim();if(!R||R.length<2){b({title:"Enter more characters to search",description:"At least 2 characters are needed to search products.",variant:"destructive",duration:5e3});return}e(R)},S=R=>{R.key==="Enter"&&_()};return jsxRuntime.jsxs("header",{className:"flex h-16 items-center gap-4 border-b sidebar-foreground bg-sidebar px-6 fixed top-0 right-0 z-50 lg:left-64 left-0 border-sidebar-border",children:[jsxRuntime.jsx(SidebarTrigger,{className:"lg:hidden",children:jsxRuntime.jsx(Menu$1,{className:"h-6 w-6"})}),jsxRuntime.jsx("div",{className:"flex flex-1 items-center gap-4",children:jsxRuntime.jsx("div",{className:"relative w-full max-w-sm",children:jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("button",{type:"button",className:"absolute left-2 top-1/2 -translate-y-1/2",onClick:_,"aria-label":"Search",children:jsxRuntime.jsx(Search,{className:"h-4 w-4 text-muted-foreground"})}),jsxRuntime.jsx(Input,{placeholder:o??"Search...",className:"w-full pl-8 bg-white text-black",value:d,onChange:R=>f(R.target.value),onKeyDown:S,ref:l},"topbar-search")]})})}),n||jsxRuntime.jsx(jsxRuntime.Fragment,{}),t&&jsxRuntime.jsx("div",{className:"flex items-center gap-4",children:jsxRuntime.jsxs(Button,{variant:"ghost",size:"icon",className:"h-9 w-9",onClick:t,children:[jsxRuntime.jsx(LogOut,{className:"h-4 w-4 text-sidebar-foreground"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Sign out"})]})})]})});Topbar.displayName="Topbar";function ActiveOrdersCard({orders:t,loading:e=!1}){const n=React.useMemo(()=>{if(!t||t.length===0)return{all:{orders:0,amount:0},processing:{orders:0,amount:0},shipped:{orders:0,amount:0},delayed:{orders:0,amount:0}};const l=t.filter(M=>M.DocumentType==="Order"),d=t.filter(M=>M.DocumentType==="Shipment"),f=l.filter(M=>M.WarehouseCode!=="3PLE"),g=f.reduce((M,j)=>M+(j.Quantity||0),0),b=f.reduce((M,j)=>M+(j.ExtendedPrice||0),0),_=l.filter(M=>M.WarehouseCode==="3PLE"),S=_.reduce((M,j)=>M+(j.Quantity||0),0),R=_.reduce((M,j)=>M+(j.ExtendedPrice||0),0),C=d.length,E=d.reduce((M,j)=>M+(j.ExtendedPrice||0),0),A=g+S+C,I=b+R+E;return{all:{orders:A,amount:I},processing:{orders:g,amount:b},shipped:{orders:C,amount:E},delayed:{orders:S,amount:R}}},[t]),o=[{name:"All",icon:Package,color:"bg-blue-500",textColor:"text-blue-600",orders:n.all.orders,amount:n.all.amount},{name:"Processing",icon:RefreshCcw,color:"bg-yellow-500",textColor:"text-yellow-600",orders:n.processing.orders,amount:n.processing.amount},{name:"Shipped",icon:Truck,color:"bg-green-500",textColor:"text-green-600",orders:n.shipped.orders,amount:n.shipped.amount},{name:"Delayed",icon:CircleAlert,color:"bg-red-500",textColor:"text-red-600",orders:n.delayed.orders,amount:n.delayed.amount}];return e?jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{className:"pb-0",children:jsxRuntime.jsx(CardTitle,{className:"text-lg font-bold",children:"Active Orders"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4",children:[1,2,3,4].map(l=>jsxRuntime.jsxs("div",{className:"overflow-hidden rounded-md border",children:[jsxRuntime.jsx("div",{className:"bg-slate-200 dark:bg-slate-700 h-[3px]"}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx(Skeleton,{className:"h-5 w-24"}),jsxRuntime.jsx(Skeleton,{className:"h-8 w-8 rounded-full"})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-16 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-7 w-12"})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx(Skeleton,{className:"h-3 w-16 mb-2"}),jsxRuntime.jsx(Skeleton,{className:"h-5 w-20"})]})]})]})]},l))})]}):jsxRuntime.jsxs(Card,{children:[jsxRuntime.jsx(CardHeader,{className:"pb-0",children:jsxRuntime.jsx(CardTitle,{className:"text-lg font-bold",children:"Active Orders"})}),jsxRuntime.jsx("div",{className:"grid grid-cols-1 @sm:grid-cols-2 gap-4 p-4",children:o.map(l=>jsxRuntime.jsxs("div",{className:"overflow-hidden rounded-md border",children:[jsxRuntime.jsx("div",{className:`${l.color} bg-opacity-60 h-[3px]`}),jsxRuntime.jsxs("div",{className:"p-6 border border-t-0",children:[jsxRuntime.jsxs("div",{className:"flex justify-between items-center mb-4",children:[jsxRuntime.jsx("h3",{className:"font-semibold text-base",children:l.name}),jsxRuntime.jsx("div",{className:`${l.color} bg-opacity-90 p-2 rounded-full`,children:jsxRuntime.jsx(l.icon,{className:"size-4 shrink-0 text-white"})})]}),jsxRuntime.jsxs("div",{className:"flex justify-between items-start",children:[jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Orders"}),jsxRuntime.jsx("p",{className:"text-xl font-bold",children:l.orders})]}),jsxRuntime.jsxs("div",{className:"text-end",children:[jsxRuntime.jsx("p",{className:"text-xs text-muted-foreground",children:"Total Amount"}),jsxRuntime.jsx("p",{className:"text-base font-semibold",children:formatMoney(l.amount)})]})]})]})]},l.name))})]})}var __create=Object.create,__getProtoOf=Object.getPrototypeOf,__defProp=Object.defineProperty,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__toESM=(t,e,n)=>{n=t!=null?__create(__getProtoOf(t)):{};const o=e||!t||!t.__esModule?__defProp(n,"default",{value:t,enumerable:!0}):n;for(let l of __getOwnPropNames(t))__hasOwnProp.call(o,l)||__defProp(o,l,{get:()=>t[l],enumerable:!0});return o},__commonJS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),require_xhtml=__commonJS((t,e)=>{e.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}}),require_acorn=__commonJS((t,e)=>{(function(n,o){typeof t=="object"&&typeof e<"u"?o(t):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.acorn={}))})(t,function(n){var o=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239],l=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],d="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",f="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",g={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},b="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",_={5:b,"5module":b+" export import",6:b+" const class extends export import super"},S=/^in(stanceof)?$/,R=new RegExp("["+f+"]"),C=new RegExp("["+f+d+"]");function E(V,ae){for(var Oe=65536,Le=0;Le<ae.length;Le+=2){if(Oe+=ae[Le],Oe>V)return!1;if(Oe+=ae[Le+1],Oe>=V)return!0}return!1}function A(V,ae){return V<65?V===36:V<91?!0:V<97?V===95:V<123?!0:V<=65535?V>=170&&R.test(String.fromCharCode(V)):ae===!1?!1:E(V,l)}function I(V,ae){return V<48?V===36:V<58?!0:V<65?!1:V<91?!0:V<97?V===95:V<123?!0:V<=65535?V>=170&&C.test(String.fromCharCode(V)):ae===!1?!1:E(V,l)||E(V,o)}var M=function(ae,Oe){Oe===void 0&&(Oe={}),this.label=ae,this.keyword=Oe.keyword,this.beforeExpr=!!Oe.beforeExpr,this.startsExpr=!!Oe.startsExpr,this.isLoop=!!Oe.isLoop,this.isAssign=!!Oe.isAssign,this.prefix=!!Oe.prefix,this.postfix=!!Oe.postfix,this.binop=Oe.binop||null,this.updateContext=null};function j(V,ae){return new M(V,{beforeExpr:!0,binop:ae})}var q={beforeExpr:!0},z={startsExpr:!0},Q={};function F(V,ae){return ae===void 0&&(ae={}),ae.keyword=V,Q[V]=new M(V,ae)}var O={num:new M("num",z),regexp:new M("regexp",z),string:new M("string",z),name:new M("name",z),privateId:new M("privateId",z),eof:new M("eof"),bracketL:new M("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new M("]"),braceL:new M("{",{beforeExpr:!0,startsExpr:!0}),braceR:new M("}"),parenL:new M("(",{beforeExpr:!0,startsExpr:!0}),parenR:new M(")"),comma:new M(",",q),semi:new M(";",q),colon:new M(":",q),dot:new M("."),question:new M("?",q),questionDot:new M("?."),arrow:new M("=>",q),template:new M("template"),invalidTemplate:new M("invalidTemplate"),ellipsis:new M("...",q),backQuote:new M("`",z),dollarBraceL:new M("${",{beforeExpr:!0,startsExpr:!0}),eq:new M("=",{beforeExpr:!0,isAssign:!0}),assign:new M("_=",{beforeExpr:!0,isAssign:!0}),incDec:new M("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new M("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:j("||",1),logicalAND:j("&&",2),bitwiseOR:j("|",3),bitwiseXOR:j("^",4),bitwiseAND:j("&",5),equality:j("==/!=/===/!==",6),relational:j("</>/<=/>=",7),bitShift:j("<</>>/>>>",8),plusMin:new M("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:j("%",10),star:j("*",10),slash:j("/",10),starstar:new M("**",{beforeExpr:!0}),coalesce:j("??",1),_break:F("break"),_case:F("case",q),_catch:F("catch"),_continue:F("continue"),_debugger:F("debugger"),_default:F("default",q),_do:F("do",{isLoop:!0,beforeExpr:!0}),_else:F("else",q),_finally:F("finally"),_for:F("for",{isLoop:!0}),_function:F("function",z),_if:F("if"),_return:F("return",q),_switch:F("switch"),_throw:F("throw",q),_try:F("try"),_var:F("var"),_const:F("const"),_while:F("while",{isLoop:!0}),_with:F("with"),_new:F("new",{beforeExpr:!0,startsExpr:!0}),_this:F("this",z),_super:F("super",z),_class:F("class",z),_extends:F("extends",q),_export:F("export"),_import:F("import",z),_null:F("null",z),_true:F("true",z),_false:F("false",z),_in:F("in",{beforeExpr:!0,binop:7}),_instanceof:F("instanceof",{beforeExpr:!0,binop:7}),_typeof:F("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:F("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:F("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},te=/\r\n?|\n|\u2028|\u2029/,ne=new RegExp(te.source,"g");function se(V){return V===10||V===13||V===8232||V===8233}function ge(V,ae,Oe){Oe===void 0&&(Oe=V.length);for(var Le=ae;Le<Oe;Le++){var Ge=V.charCodeAt(Le);if(se(Ge))return Le<Oe-1&&Ge===13&&V.charCodeAt(Le+1)===10?Le+2:Le+1}return-1}var oe=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ae=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,je=Object.prototype,Ne=je.hasOwnProperty,Ve=je.toString,Fe=Object.hasOwn||function(V,ae){return Ne.call(V,ae)},ze=Array.isArray||function(V){return Ve.call(V)==="[object Array]"},$e=Object.create(null);function Be(V){return $e[V]||($e[V]=new RegExp("^(?:"+V.replace(/ /g,"|")+")$"))}function qe(V){return V<=65535?String.fromCharCode(V):(V-=65536,String.fromCharCode((V>>10)+55296,(V&1023)+56320))}var Ke=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,He=function(ae,Oe){this.line=ae,this.column=Oe};He.prototype.offset=function(ae){return new He(this.line,this.column+ae)};var Xe=function(ae,Oe,Le){this.start=Oe,this.end=Le,ae.sourceFile!==null&&(this.source=ae.sourceFile)};function tt(V,ae){for(var Oe=1,Le=0;;){var Ge=ge(V,Le,ae);if(Ge<0)return new He(Oe,ae-Le);++Oe,Le=Ge}}var Ye={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},rt=!1;function Ze(V){var ae={};for(var Oe in Ye)ae[Oe]=V&&Fe(V,Oe)?V[Oe]:Ye[Oe];if(ae.ecmaVersion==="latest"?ae.ecmaVersion=1e8:ae.ecmaVersion==null?(!rt&&typeof console=="object"&&console.warn&&(rt=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
1091
1091
  Defaulting to 2020, but this will stop working in the future.`)),ae.ecmaVersion=11):ae.ecmaVersion>=2015&&(ae.ecmaVersion-=2009),ae.allowReserved==null&&(ae.allowReserved=ae.ecmaVersion<5),(!V||V.allowHashBang==null)&&(ae.allowHashBang=ae.ecmaVersion>=14),ze(ae.onToken)){var Le=ae.onToken;ae.onToken=function(Ge){return Le.push(Ge)}}return ze(ae.onComment)&&(ae.onComment=at(ae,ae.onComment)),ae}function at(V,ae){return function(Oe,Le,Ge,ot,ut,Rt){var Ct={type:Oe?"Block":"Line",value:Le,start:Ge,end:ot};V.locations&&(Ct.loc=new Xe(this,ut,Rt)),V.ranges&&(Ct.range=[Ge,ot]),ae.push(Ct)}}var Qe=1,it=2,st=4,Ue=8,yt=16,Je=32,pt=64,It=128,$t=256,qt=Qe|it|$t;function Mt(V,ae){return it|(V?st:0)|(ae?Ue:0)}var We=0,nt=1,et=2,ct=3,ft=4,dt=5,mt=function(ae,Oe,Le){this.options=ae=Ze(ae),this.sourceFile=ae.sourceFile,this.keywords=Be(_[ae.ecmaVersion>=6?6:ae.sourceType==="module"?"5module":5]);var Ge="";ae.allowReserved!==!0&&(Ge=g[ae.ecmaVersion>=6?6:ae.ecmaVersion===5?5:3],ae.sourceType==="module"&&(Ge+=" await")),this.reservedWords=Be(Ge);var ot=(Ge?Ge+" ":"")+g.strict;this.reservedWordsStrict=Be(ot),this.reservedWordsStrictBind=Be(ot+" "+g.strictBind),this.input=String(Oe),this.containsEsc=!1,Le?(this.pos=Le,this.lineStart=this.input.lastIndexOf(`
1092
1092
  `,Le-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(te).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=O.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=ae.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&ae.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(Qe),this.regexpState=null,this.privateNameStack=[]},Ft={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};mt.prototype.parse=function(){var ae=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(ae)},Ft.inFunction.get=function(){return(this.currentVarScope().flags&it)>0},Ft.inGenerator.get=function(){return(this.currentVarScope().flags&Ue)>0&&!this.currentVarScope().inClassFieldInit},Ft.inAsync.get=function(){return(this.currentVarScope().flags&st)>0&&!this.currentVarScope().inClassFieldInit},Ft.canAwait.get=function(){for(var V=this.scopeStack.length-1;V>=0;V--){var ae=this.scopeStack[V];if(ae.inClassFieldInit||ae.flags&$t)return!1;if(ae.flags&it)return(ae.flags&st)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},Ft.allowSuper.get=function(){var V=this.currentThisScope(),ae=V.flags,Oe=V.inClassFieldInit;return(ae&pt)>0||Oe||this.options.allowSuperOutsideMethod},Ft.allowDirectSuper.get=function(){return(this.currentThisScope().flags&It)>0},Ft.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},Ft.allowNewDotTarget.get=function(){var V=this.currentThisScope(),ae=V.flags,Oe=V.inClassFieldInit;return(ae&(it|$t))>0||Oe},Ft.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&$t)>0},mt.extend=function(){for(var ae=[],Oe=arguments.length;Oe--;)ae[Oe]=arguments[Oe];for(var Le=this,Ge=0;Ge<ae.length;Ge++)Le=ae[Ge](Le);return Le},mt.parse=function(ae,Oe){return new this(Oe,ae).parse()},mt.parseExpressionAt=function(ae,Oe,Le){var Ge=new this(Le,ae,Oe);return Ge.nextToken(),Ge.parseExpression()},mt.tokenizer=function(ae,Oe){return new this(Oe,ae)},Object.defineProperties(mt.prototype,Ft);var zt=mt.prototype,Ut=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;zt.strictDirective=function(V){if(this.options.ecmaVersion<5)return!1;for(;;){Ae.lastIndex=V,V+=Ae.exec(this.input)[0].length;var ae=Ut.exec(this.input.slice(V));if(!ae)return!1;if((ae[1]||ae[2])==="use strict"){Ae.lastIndex=V+ae[0].length;var Oe=Ae.exec(this.input),Le=Oe.index+Oe[0].length,Ge=this.input.charAt(Le);return Ge===";"||Ge==="}"||te.test(Oe[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(Ge)||Ge==="!"&&this.input.charAt(Le+1)==="=")}V+=ae[0].length,Ae.lastIndex=V,V+=Ae.exec(this.input)[0].length,this.input[V]===";"&&V++}},zt.eat=function(V){return this.type===V?(this.next(),!0):!1},zt.isContextual=function(V){return this.type===O.name&&this.value===V&&!this.containsEsc},zt.eatContextual=function(V){return this.isContextual(V)?(this.next(),!0):!1},zt.expectContextual=function(V){this.eatContextual(V)||this.unexpected()},zt.canInsertSemicolon=function(){return this.type===O.eof||this.type===O.braceR||te.test(this.input.slice(this.lastTokEnd,this.start))},zt.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},zt.semicolon=function(){!this.eat(O.semi)&&!this.insertSemicolon()&&this.unexpected()},zt.afterTrailingComma=function(V,ae){if(this.type===V)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),ae||this.next(),!0},zt.expect=function(V){this.eat(V)||this.unexpected()},zt.unexpected=function(V){this.raise(V??this.start,"Unexpected token")};var sr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};zt.checkPatternErrors=function(V,ae){if(V){V.trailingComma>-1&&this.raiseRecoverable(V.trailingComma,"Comma is not permitted after the rest element");var Oe=ae?V.parenthesizedAssign:V.parenthesizedBind;Oe>-1&&this.raiseRecoverable(Oe,ae?"Assigning to rvalue":"Parenthesized pattern")}},zt.checkExpressionErrors=function(V,ae){if(!V)return!1;var Oe=V.shorthandAssign,Le=V.doubleProto;if(!ae)return Oe>=0||Le>=0;Oe>=0&&this.raise(Oe,"Shorthand property assignments are valid only in destructuring patterns"),Le>=0&&this.raiseRecoverable(Le,"Redefinition of __proto__ property")},zt.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},zt.isSimpleAssignTarget=function(V){return V.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(V.expression):V.type==="Identifier"||V.type==="MemberExpression"};var lt=mt.prototype;lt.parseTopLevel=function(V){var ae=Object.create(null);for(V.body||(V.body=[]);this.type!==O.eof;){var Oe=this.parseStatement(null,!0,ae);V.body.push(Oe)}if(this.inModule)for(var Le=0,Ge=Object.keys(this.undefinedExports);Le<Ge.length;Le+=1){var ot=Ge[Le];this.raiseRecoverable(this.undefinedExports[ot].start,"Export '"+ot+"' is not defined")}return this.adaptDirectivePrologue(V.body),this.next(),V.sourceType=this.options.sourceType,this.finishNode(V,"Program")};var Dt={kind:"loop"},Ht={kind:"switch"};lt.isLet=function(V){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;Ae.lastIndex=this.pos;var ae=Ae.exec(this.input),Oe=this.pos+ae[0].length,Le=this.input.charCodeAt(Oe);if(Le===91||Le===92)return!0;if(V)return!1;if(Le===123||Le>55295&&Le<56320)return!0;if(A(Le,!0)){for(var Ge=Oe+1;I(Le=this.input.charCodeAt(Ge),!0);)++Ge;if(Le===92||Le>55295&&Le<56320)return!0;var ot=this.input.slice(Oe,Ge);if(!S.test(ot))return!0}return!1},lt.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;Ae.lastIndex=this.pos;var V=Ae.exec(this.input),ae=this.pos+V[0].length,Oe;return!te.test(this.input.slice(this.pos,ae))&&this.input.slice(ae,ae+8)==="function"&&(ae+8===this.input.length||!(I(Oe=this.input.charCodeAt(ae+8))||Oe>55295&&Oe<56320))},lt.parseStatement=function(V,ae,Oe){var Le=this.type,Ge=this.startNode(),ot;switch(this.isLet(V)&&(Le=O._var,ot="let"),Le){case O._break:case O._continue:return this.parseBreakContinueStatement(Ge,Le.keyword);case O._debugger:return this.parseDebuggerStatement(Ge);case O._do:return this.parseDoStatement(Ge);case O._for:return this.parseForStatement(Ge);case O._function:return V&&(this.strict||V!=="if"&&V!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(Ge,!1,!V);case O._class:return V&&this.unexpected(),this.parseClass(Ge,!0);case O._if:return this.parseIfStatement(Ge);case O._return:return this.parseReturnStatement(Ge);case O._switch:return this.parseSwitchStatement(Ge);case O._throw:return this.parseThrowStatement(Ge);case O._try:return this.parseTryStatement(Ge);case O._const:case O._var:return ot=ot||this.value,V&&ot!=="var"&&this.unexpected(),this.parseVarStatement(Ge,ot);case O._while:return this.parseWhileStatement(Ge);case O._with:return this.parseWithStatement(Ge);case O.braceL:return this.parseBlock(!0,Ge);case O.semi:return this.parseEmptyStatement(Ge);case O._export:case O._import:if(this.options.ecmaVersion>10&&Le===O._import){Ae.lastIndex=this.pos;var ut=Ae.exec(this.input),Rt=this.pos+ut[0].length,Ct=this.input.charCodeAt(Rt);if(Ct===40||Ct===46)return this.parseExpressionStatement(Ge,this.parseExpression())}return this.options.allowImportExportEverywhere||(ae||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),Le===O._import?this.parseImport(Ge):this.parseExport(Ge,Oe);default:if(this.isAsyncFunction())return V&&this.unexpected(),this.next(),this.parseFunctionStatement(Ge,!0,!V);var Yt=this.value,Kt=this.parseExpression();return Le===O.name&&Kt.type==="Identifier"&&this.eat(O.colon)?this.parseLabeledStatement(Ge,Yt,Kt,V):this.parseExpressionStatement(Ge,Kt)}},lt.parseBreakContinueStatement=function(V,ae){var Oe=ae==="break";this.next(),this.eat(O.semi)||this.insertSemicolon()?V.label=null:this.type!==O.name?this.unexpected():(V.label=this.parseIdent(),this.semicolon());for(var Le=0;Le<this.labels.length;++Le){var Ge=this.labels[Le];if((V.label==null||Ge.name===V.label.name)&&(Ge.kind!=null&&(Oe||Ge.kind==="loop")||V.label&&Oe))break}return Le===this.labels.length&&this.raise(V.start,"Unsyntactic "+ae),this.finishNode(V,Oe?"BreakStatement":"ContinueStatement")},lt.parseDebuggerStatement=function(V){return this.next(),this.semicolon(),this.finishNode(V,"DebuggerStatement")},lt.parseDoStatement=function(V){return this.next(),this.labels.push(Dt),V.body=this.parseStatement("do"),this.labels.pop(),this.expect(O._while),V.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(O.semi):this.semicolon(),this.finishNode(V,"DoWhileStatement")},lt.parseForStatement=function(V){this.next();var ae=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Dt),this.enterScope(0),this.expect(O.parenL),this.type===O.semi)return ae>-1&&this.unexpected(ae),this.parseFor(V,null);var Oe=this.isLet();if(this.type===O._var||this.type===O._const||Oe){var Le=this.startNode(),Ge=Oe?"let":this.value;return this.next(),this.parseVar(Le,!0,Ge),this.finishNode(Le,"VariableDeclaration"),(this.type===O._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&Le.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===O._in?ae>-1&&this.unexpected(ae):V.await=ae>-1),this.parseForIn(V,Le)):(ae>-1&&this.unexpected(ae),this.parseFor(V,Le))}var ot=this.isContextual("let"),ut=!1,Rt=this.containsEsc,Ct=new sr,Yt=this.start,Kt=ae>-1?this.parseExprSubscripts(Ct,"await"):this.parseExpression(!0,Ct);return this.type===O._in||(ut=this.options.ecmaVersion>=6&&this.isContextual("of"))?(ae>-1?(this.type===O._in&&this.unexpected(ae),V.await=!0):ut&&this.options.ecmaVersion>=8&&(Kt.start===Yt&&!Rt&&Kt.type==="Identifier"&&Kt.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(V.await=!1)),ot&&ut&&this.raise(Kt.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(Kt,!1,Ct),this.checkLValPattern(Kt),this.parseForIn(V,Kt)):(this.checkExpressionErrors(Ct,!0),ae>-1&&this.unexpected(ae),this.parseFor(V,Kt))},lt.parseFunctionStatement=function(V,ae,Oe){return this.next(),this.parseFunction(V,nr|(Oe?0:ar),!1,ae)},lt.parseIfStatement=function(V){return this.next(),V.test=this.parseParenExpression(),V.consequent=this.parseStatement("if"),V.alternate=this.eat(O._else)?this.parseStatement("if"):null,this.finishNode(V,"IfStatement")},lt.parseReturnStatement=function(V){return!this.inFunction&&!this.options.allowReturnOutsideFunction&&this.raise(this.start,"'return' outside of function"),this.next(),this.eat(O.semi)||this.insertSemicolon()?V.argument=null:(V.argument=this.parseExpression(),this.semicolon()),this.finishNode(V,"ReturnStatement")},lt.parseSwitchStatement=function(V){this.next(),V.discriminant=this.parseParenExpression(),V.cases=[],this.expect(O.braceL),this.labels.push(Ht),this.enterScope(0);for(var ae,Oe=!1;this.type!==O.braceR;)if(this.type===O._case||this.type===O._default){var Le=this.type===O._case;ae&&this.finishNode(ae,"SwitchCase"),V.cases.push(ae=this.startNode()),ae.consequent=[],this.next(),Le?ae.test=this.parseExpression():(Oe&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),Oe=!0,ae.test=null),this.expect(O.colon)}else ae||this.unexpected(),ae.consequent.push(this.parseStatement(null));return this.exitScope(),ae&&this.finishNode(ae,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(V,"SwitchStatement")},lt.parseThrowStatement=function(V){return this.next(),te.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),V.argument=this.parseExpression(),this.semicolon(),this.finishNode(V,"ThrowStatement")};var Xt=[];lt.parseCatchClauseParam=function(){var V=this.parseBindingAtom(),ae=V.type==="Identifier";return this.enterScope(ae?Je:0),this.checkLValPattern(V,ae?ft:et),this.expect(O.parenR),V},lt.parseTryStatement=function(V){if(this.next(),V.block=this.parseBlock(),V.handler=null,this.type===O._catch){var ae=this.startNode();this.next(),this.eat(O.parenL)?ae.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),ae.param=null,this.enterScope(0)),ae.body=this.parseBlock(!1),this.exitScope(),V.handler=this.finishNode(ae,"CatchClause")}return V.finalizer=this.eat(O._finally)?this.parseBlock():null,!V.handler&&!V.finalizer&&this.raise(V.start,"Missing catch or finally clause"),this.finishNode(V,"TryStatement")},lt.parseVarStatement=function(V,ae,Oe){return this.next(),this.parseVar(V,!1,ae,Oe),this.semicolon(),this.finishNode(V,"VariableDeclaration")},lt.parseWhileStatement=function(V){return this.next(),V.test=this.parseParenExpression(),this.labels.push(Dt),V.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(V,"WhileStatement")},lt.parseWithStatement=function(V){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),V.object=this.parseParenExpression(),V.body=this.parseStatement("with"),this.finishNode(V,"WithStatement")},lt.parseEmptyStatement=function(V){return this.next(),this.finishNode(V,"EmptyStatement")},lt.parseLabeledStatement=function(V,ae,Oe,Le){for(var Ge=0,ot=this.labels;Ge<ot.length;Ge+=1){var ut=ot[Ge];ut.name===ae&&this.raise(Oe.start,"Label '"+ae+"' is already declared")}for(var Rt=this.type.isLoop?"loop":this.type===O._switch?"switch":null,Ct=this.labels.length-1;Ct>=0;Ct--){var Yt=this.labels[Ct];if(Yt.statementStart===V.start)Yt.statementStart=this.start,Yt.kind=Rt;else break}return this.labels.push({name:ae,kind:Rt,statementStart:this.start}),V.body=this.parseStatement(Le?Le.indexOf("label")===-1?Le+"label":Le:"label"),this.labels.pop(),V.label=Oe,this.finishNode(V,"LabeledStatement")},lt.parseExpressionStatement=function(V,ae){return V.expression=ae,this.semicolon(),this.finishNode(V,"ExpressionStatement")},lt.parseBlock=function(V,ae,Oe){for(V===void 0&&(V=!0),ae===void 0&&(ae=this.startNode()),ae.body=[],this.expect(O.braceL),V&&this.enterScope(0);this.type!==O.braceR;){var Le=this.parseStatement(null);ae.body.push(Le)}return Oe&&(this.strict=!1),this.next(),V&&this.exitScope(),this.finishNode(ae,"BlockStatement")},lt.parseFor=function(V,ae){return V.init=ae,this.expect(O.semi),V.test=this.type===O.semi?null:this.parseExpression(),this.expect(O.semi),V.update=this.type===O.parenR?null:this.parseExpression(),this.expect(O.parenR),V.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(V,"ForStatement")},lt.parseForIn=function(V,ae){var Oe=this.type===O._in;return this.next(),ae.type==="VariableDeclaration"&&ae.declarations[0].init!=null&&(!Oe||this.options.ecmaVersion<8||this.strict||ae.kind!=="var"||ae.declarations[0].id.type!=="Identifier")&&this.raise(ae.start,(Oe?"for-in":"for-of")+" loop variable declaration may not have an initializer"),V.left=ae,V.right=Oe?this.parseExpression():this.parseMaybeAssign(),this.expect(O.parenR),V.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(V,Oe?"ForInStatement":"ForOfStatement")},lt.parseVar=function(V,ae,Oe,Le){for(V.declarations=[],V.kind=Oe;;){var Ge=this.startNode();if(this.parseVarId(Ge,Oe),this.eat(O.eq)?Ge.init=this.parseMaybeAssign(ae):!Le&&Oe==="const"&&!(this.type===O._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!Le&&Ge.id.type!=="Identifier"&&!(ae&&(this.type===O._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):Ge.init=null,V.declarations.push(this.finishNode(Ge,"VariableDeclarator")),!this.eat(O.comma))break}return V},lt.parseVarId=function(V,ae){V.id=this.parseBindingAtom(),this.checkLValPattern(V.id,ae==="var"?nt:et,!1)};var nr=1,ar=2,xr=4;lt.parseFunction=function(V,ae,Oe,Le,Ge){this.initFunction(V),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!Le)&&(this.type===O.star&&ae&ar&&this.unexpected(),V.generator=this.eat(O.star)),this.options.ecmaVersion>=8&&(V.async=!!Le),ae&nr&&(V.id=ae&xr&&this.type!==O.name?null:this.parseIdent(),V.id&&!(ae&ar)&&this.checkLValSimple(V.id,this.strict||V.generator||V.async?this.treatFunctionsAsVar?nt:et:ct));var ot=this.yieldPos,ut=this.awaitPos,Rt=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Mt(V.async,V.generator)),ae&nr||(V.id=this.type===O.name?this.parseIdent():null),this.parseFunctionParams(V),this.parseFunctionBody(V,Oe,!1,Ge),this.yieldPos=ot,this.awaitPos=ut,this.awaitIdentPos=Rt,this.finishNode(V,ae&nr?"FunctionDeclaration":"FunctionExpression")},lt.parseFunctionParams=function(V){this.expect(O.parenL),V.params=this.parseBindingList(O.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},lt.parseClass=function(V,ae){this.next();var Oe=this.strict;this.strict=!0,this.parseClassId(V,ae),this.parseClassSuper(V);var Le=this.enterClassBody(),Ge=this.startNode(),ot=!1;for(Ge.body=[],this.expect(O.braceL);this.type!==O.braceR;){var ut=this.parseClassElement(V.superClass!==null);ut&&(Ge.body.push(ut),ut.type==="MethodDefinition"&&ut.kind==="constructor"?(ot&&this.raiseRecoverable(ut.start,"Duplicate constructor in the same class"),ot=!0):ut.key&&ut.key.type==="PrivateIdentifier"&&Nr(Le,ut)&&this.raiseRecoverable(ut.key.start,"Identifier '#"+ut.key.name+"' has already been declared"))}return this.strict=Oe,this.next(),V.body=this.finishNode(Ge,"ClassBody"),this.exitClassBody(),this.finishNode(V,ae?"ClassDeclaration":"ClassExpression")},lt.parseClassElement=function(V){if(this.eat(O.semi))return null;var ae=this.options.ecmaVersion,Oe=this.startNode(),Le="",Ge=!1,ot=!1,ut="method",Rt=!1;if(this.eatContextual("static")){if(ae>=13&&this.eat(O.braceL))return this.parseClassStaticBlock(Oe),Oe;this.isClassElementNameStart()||this.type===O.star?Rt=!0:Le="static"}if(Oe.static=Rt,!Le&&ae>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===O.star)&&!this.canInsertSemicolon()?ot=!0:Le="async"),!Le&&(ae>=9||!ot)&&this.eat(O.star)&&(Ge=!0),!Le&&!ot&&!Ge){var Ct=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?ut=Ct:Le=Ct)}if(Le?(Oe.computed=!1,Oe.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),Oe.key.name=Le,this.finishNode(Oe.key,"Identifier")):this.parseClassElementName(Oe),ae<13||this.type===O.parenL||ut!=="method"||Ge||ot){var Yt=!Oe.static&&Mr(Oe,"constructor"),Kt=Yt&&V;Yt&&ut!=="method"&&this.raise(Oe.key.start,"Constructor can't have get/set modifier"),Oe.kind=Yt?"constructor":ut,this.parseClassMethod(Oe,Ge,ot,Kt)}else this.parseClassField(Oe);return Oe},lt.isClassElementNameStart=function(){return this.type===O.name||this.type===O.privateId||this.type===O.num||this.type===O.string||this.type===O.bracketL||this.type.keyword},lt.parseClassElementName=function(V){this.type===O.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),V.computed=!1,V.key=this.parsePrivateIdent()):this.parsePropertyName(V)},lt.parseClassMethod=function(V,ae,Oe,Le){var Ge=V.key;V.kind==="constructor"?(ae&&this.raise(Ge.start,"Constructor can't be a generator"),Oe&&this.raise(Ge.start,"Constructor can't be an async method")):V.static&&Mr(V,"prototype")&&this.raise(Ge.start,"Classes may not have a static property named prototype");var ot=V.value=this.parseMethod(ae,Oe,Le);return V.kind==="get"&&ot.params.length!==0&&this.raiseRecoverable(ot.start,"getter should have no params"),V.kind==="set"&&ot.params.length!==1&&this.raiseRecoverable(ot.start,"setter should have exactly one param"),V.kind==="set"&&ot.params[0].type==="RestElement"&&this.raiseRecoverable(ot.params[0].start,"Setter cannot use rest params"),this.finishNode(V,"MethodDefinition")},lt.parseClassField=function(V){if(Mr(V,"constructor")?this.raise(V.key.start,"Classes can't have a field named 'constructor'"):V.static&&Mr(V,"prototype")&&this.raise(V.key.start,"Classes can't have a static field named 'prototype'"),this.eat(O.eq)){var ae=this.currentThisScope(),Oe=ae.inClassFieldInit;ae.inClassFieldInit=!0,V.value=this.parseMaybeAssign(),ae.inClassFieldInit=Oe}else V.value=null;return this.semicolon(),this.finishNode(V,"PropertyDefinition")},lt.parseClassStaticBlock=function(V){V.body=[];var ae=this.labels;for(this.labels=[],this.enterScope($t|pt);this.type!==O.braceR;){var Oe=this.parseStatement(null);V.body.push(Oe)}return this.next(),this.exitScope(),this.labels=ae,this.finishNode(V,"StaticBlock")},lt.parseClassId=function(V,ae){this.type===O.name?(V.id=this.parseIdent(),ae&&this.checkLValSimple(V.id,et,!1)):(ae===!0&&this.unexpected(),V.id=null)},lt.parseClassSuper=function(V){V.superClass=this.eat(O._extends)?this.parseExprSubscripts(null,!1):null},lt.enterClassBody=function(){var V={declared:Object.create(null),used:[]};return this.privateNameStack.push(V),V.declared},lt.exitClassBody=function(){var V=this.privateNameStack.pop(),ae=V.declared,Oe=V.used;if(this.options.checkPrivateFields)for(var Le=this.privateNameStack.length,Ge=Le===0?null:this.privateNameStack[Le-1],ot=0;ot<Oe.length;++ot){var ut=Oe[ot];Fe(ae,ut.name)||(Ge?Ge.used.push(ut):this.raiseRecoverable(ut.start,"Private field '#"+ut.name+"' must be declared in an enclosing class"))}};function Nr(V,ae){var Oe=ae.key.name,Le=V[Oe],Ge="true";return ae.type==="MethodDefinition"&&(ae.kind==="get"||ae.kind==="set")&&(Ge=(ae.static?"s":"i")+ae.kind),Le==="iget"&&Ge==="iset"||Le==="iset"&&Ge==="iget"||Le==="sget"&&Ge==="sset"||Le==="sset"&&Ge==="sget"?(V[Oe]="true",!1):Le?!0:(V[Oe]=Ge,!1)}function Mr(V,ae){var Oe=V.computed,Le=V.key;return!Oe&&(Le.type==="Identifier"&&Le.name===ae||Le.type==="Literal"&&Le.value===ae)}lt.parseExportAllDeclaration=function(V,ae){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(V.exported=this.parseModuleExportName(),this.checkExport(ae,V.exported,this.lastTokStart)):V.exported=null),this.expectContextual("from"),this.type!==O.string&&this.unexpected(),V.source=this.parseExprAtom(),this.semicolon(),this.finishNode(V,"ExportAllDeclaration")},lt.parseExport=function(V,ae){if(this.next(),this.eat(O.star))return this.parseExportAllDeclaration(V,ae);if(this.eat(O._default))return this.checkExport(ae,"default",this.lastTokStart),V.declaration=this.parseExportDefaultDeclaration(),this.finishNode(V,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())V.declaration=this.parseExportDeclaration(V),V.declaration.type==="VariableDeclaration"?this.checkVariableExport(ae,V.declaration.declarations):this.checkExport(ae,V.declaration.id,V.declaration.id.start),V.specifiers=[],V.source=null;else{if(V.declaration=null,V.specifiers=this.parseExportSpecifiers(ae),this.eatContextual("from"))this.type!==O.string&&this.unexpected(),V.source=this.parseExprAtom();else{for(var Oe=0,Le=V.specifiers;Oe<Le.length;Oe+=1){var Ge=Le[Oe];this.checkUnreserved(Ge.local),this.checkLocalExport(Ge.local),Ge.local.type==="Literal"&&this.raise(Ge.local.start,"A string literal cannot be used as an exported binding without `from`.")}V.source=null}this.semicolon()}return this.finishNode(V,"ExportNamedDeclaration")},lt.parseExportDeclaration=function(V){return this.parseStatement(null)},lt.parseExportDefaultDeclaration=function(){var V;if(this.type===O._function||(V=this.isAsyncFunction())){var ae=this.startNode();return this.next(),V&&this.next(),this.parseFunction(ae,nr|xr,!1,V)}else if(this.type===O._class){var Oe=this.startNode();return this.parseClass(Oe,"nullableID")}else{var Le=this.parseMaybeAssign();return this.semicolon(),Le}},lt.checkExport=function(V,ae,Oe){V&&(typeof ae!="string"&&(ae=ae.type==="Identifier"?ae.name:ae.value),Fe(V,ae)&&this.raiseRecoverable(Oe,"Duplicate export '"+ae+"'"),V[ae]=!0)},lt.checkPatternExport=function(V,ae){var Oe=ae.type;if(Oe==="Identifier")this.checkExport(V,ae,ae.start);else if(Oe==="ObjectPattern")for(var Le=0,Ge=ae.properties;Le<Ge.length;Le+=1){var ot=Ge[Le];this.checkPatternExport(V,ot)}else if(Oe==="ArrayPattern")for(var ut=0,Rt=ae.elements;ut<Rt.length;ut+=1){var Ct=Rt[ut];Ct&&this.checkPatternExport(V,Ct)}else Oe==="Property"?this.checkPatternExport(V,ae.value):Oe==="AssignmentPattern"?this.checkPatternExport(V,ae.left):Oe==="RestElement"&&this.checkPatternExport(V,ae.argument)},lt.checkVariableExport=function(V,ae){if(V)for(var Oe=0,Le=ae;Oe<Le.length;Oe+=1){var Ge=Le[Oe];this.checkPatternExport(V,Ge.id)}},lt.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()},lt.parseExportSpecifier=function(V){var ae=this.startNode();return ae.local=this.parseModuleExportName(),ae.exported=this.eatContextual("as")?this.parseModuleExportName():ae.local,this.checkExport(V,ae.exported,ae.exported.start),this.finishNode(ae,"ExportSpecifier")},lt.parseExportSpecifiers=function(V){var ae=[],Oe=!0;for(this.expect(O.braceL);!this.eat(O.braceR);){if(Oe)Oe=!1;else if(this.expect(O.comma),this.afterTrailingComma(O.braceR))break;ae.push(this.parseExportSpecifier(V))}return ae},lt.parseImport=function(V){return this.next(),this.type===O.string?(V.specifiers=Xt,V.source=this.parseExprAtom()):(V.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),V.source=this.type===O.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(V,"ImportDeclaration")},lt.parseImportSpecifier=function(){var V=this.startNode();return V.imported=this.parseModuleExportName(),this.eatContextual("as")?V.local=this.parseIdent():(this.checkUnreserved(V.imported),V.local=V.imported),this.checkLValSimple(V.local,et),this.finishNode(V,"ImportSpecifier")},lt.parseImportDefaultSpecifier=function(){var V=this.startNode();return V.local=this.parseIdent(),this.checkLValSimple(V.local,et),this.finishNode(V,"ImportDefaultSpecifier")},lt.parseImportNamespaceSpecifier=function(){var V=this.startNode();return this.next(),this.expectContextual("as"),V.local=this.parseIdent(),this.checkLValSimple(V.local,et),this.finishNode(V,"ImportNamespaceSpecifier")},lt.parseImportSpecifiers=function(){var V=[],ae=!0;if(this.type===O.name&&(V.push(this.parseImportDefaultSpecifier()),!this.eat(O.comma)))return V;if(this.type===O.star)return V.push(this.parseImportNamespaceSpecifier()),V;for(this.expect(O.braceL);!this.eat(O.braceR);){if(ae)ae=!1;else if(this.expect(O.comma),this.afterTrailingComma(O.braceR))break;V.push(this.parseImportSpecifier())}return V},lt.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===O.string){var V=this.parseLiteral(this.value);return Ke.test(V.value)&&this.raise(V.start,"An export name cannot include a lone surrogate."),V}return this.parseIdent(!0)},lt.adaptDirectivePrologue=function(V){for(var ae=0;ae<V.length&&this.isDirectiveCandidate(V[ae]);++ae)V[ae].directive=V[ae].expression.raw.slice(1,-1)},lt.isDirectiveCandidate=function(V){return this.options.ecmaVersion>=5&&V.type==="ExpressionStatement"&&V.expression.type==="Literal"&&typeof V.expression.value=="string"&&(this.input[V.start]==='"'||this.input[V.start]==="'")};var lr=mt.prototype;lr.toAssignable=function(V,ae,Oe){if(this.options.ecmaVersion>=6&&V)switch(V.type){case"Identifier":this.inAsync&&V.name==="await"&&this.raise(V.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":V.type="ObjectPattern",Oe&&this.checkPatternErrors(Oe,!0);for(var Le=0,Ge=V.properties;Le<Ge.length;Le+=1){var ot=Ge[Le];this.toAssignable(ot,ae),ot.type==="RestElement"&&(ot.argument.type==="ArrayPattern"||ot.argument.type==="ObjectPattern")&&this.raise(ot.argument.start,"Unexpected token")}break;case"Property":V.kind!=="init"&&this.raise(V.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(V.value,ae);break;case"ArrayExpression":V.type="ArrayPattern",Oe&&this.checkPatternErrors(Oe,!0),this.toAssignableList(V.elements,ae);break;case"SpreadElement":V.type="RestElement",this.toAssignable(V.argument,ae),V.argument.type==="AssignmentPattern"&&this.raise(V.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":V.operator!=="="&&this.raise(V.left.end,"Only '=' operator can be used for specifying default value."),V.type="AssignmentPattern",delete V.operator,this.toAssignable(V.left,ae);break;case"ParenthesizedExpression":this.toAssignable(V.expression,ae,Oe);break;case"ChainExpression":this.raiseRecoverable(V.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!ae)break;default:this.raise(V.start,"Assigning to rvalue")}else Oe&&this.checkPatternErrors(Oe,!0);return V},lr.toAssignableList=function(V,ae){for(var Oe=V.length,Le=0;Le<Oe;Le++){var Ge=V[Le];Ge&&this.toAssignable(Ge,ae)}if(Oe){var ot=V[Oe-1];this.options.ecmaVersion===6&&ae&&ot&&ot.type==="RestElement"&&ot.argument.type!=="Identifier"&&this.unexpected(ot.argument.start)}return V},lr.parseSpread=function(V){var ae=this.startNode();return this.next(),ae.argument=this.parseMaybeAssign(!1,V),this.finishNode(ae,"SpreadElement")},lr.parseRestBinding=function(){var V=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==O.name&&this.unexpected(),V.argument=this.parseBindingAtom(),this.finishNode(V,"RestElement")},lr.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case O.bracketL:var V=this.startNode();return this.next(),V.elements=this.parseBindingList(O.bracketR,!0,!0),this.finishNode(V,"ArrayPattern");case O.braceL:return this.parseObj(!0)}return this.parseIdent()},lr.parseBindingList=function(V,ae,Oe,Le){for(var Ge=[],ot=!0;!this.eat(V);)if(ot?ot=!1:this.expect(O.comma),ae&&this.type===O.comma)Ge.push(null);else{if(Oe&&this.afterTrailingComma(V))break;if(this.type===O.ellipsis){var ut=this.parseRestBinding();this.parseBindingListItem(ut),Ge.push(ut),this.type===O.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(V);break}else Ge.push(this.parseAssignableListItem(Le))}return Ge},lr.parseAssignableListItem=function(V){var ae=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(ae),ae},lr.parseBindingListItem=function(V){return V},lr.parseMaybeDefault=function(V,ae,Oe){if(Oe=Oe||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(O.eq))return Oe;var Le=this.startNodeAt(V,ae);return Le.left=Oe,Le.right=this.parseMaybeAssign(),this.finishNode(Le,"AssignmentPattern")},lr.checkLValSimple=function(V,ae,Oe){ae===void 0&&(ae=We);var Le=ae!==We;switch(V.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(V.name)&&this.raiseRecoverable(V.start,(Le?"Binding ":"Assigning to ")+V.name+" in strict mode"),Le&&(ae===et&&V.name==="let"&&this.raiseRecoverable(V.start,"let is disallowed as a lexically bound name"),Oe&&(Fe(Oe,V.name)&&this.raiseRecoverable(V.start,"Argument name clash"),Oe[V.name]=!0),ae!==dt&&this.declareName(V.name,ae,V.start));break;case"ChainExpression":this.raiseRecoverable(V.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":Le&&this.raiseRecoverable(V.start,"Binding member expression");break;case"ParenthesizedExpression":return Le&&this.raiseRecoverable(V.start,"Binding parenthesized expression"),this.checkLValSimple(V.expression,ae,Oe);default:this.raise(V.start,(Le?"Binding":"Assigning to")+" rvalue")}},lr.checkLValPattern=function(V,ae,Oe){switch(ae===void 0&&(ae=We),V.type){case"ObjectPattern":for(var Le=0,Ge=V.properties;Le<Ge.length;Le+=1){var ot=Ge[Le];this.checkLValInnerPattern(ot,ae,Oe)}break;case"ArrayPattern":for(var ut=0,Rt=V.elements;ut<Rt.length;ut+=1){var Ct=Rt[ut];Ct&&this.checkLValInnerPattern(Ct,ae,Oe)}break;default:this.checkLValSimple(V,ae,Oe)}},lr.checkLValInnerPattern=function(V,ae,Oe){switch(ae===void 0&&(ae=We),V.type){case"Property":this.checkLValInnerPattern(V.value,ae,Oe);break;case"AssignmentPattern":this.checkLValPattern(V.left,ae,Oe);break;case"RestElement":this.checkLValPattern(V.argument,ae,Oe);break;default:this.checkLValPattern(V,ae,Oe)}};var ur=function(ae,Oe,Le,Ge,ot){this.token=ae,this.isExpr=!!Oe,this.preserveSpace=!!Le,this.override=Ge,this.generator=!!ot},ir={b_stat:new ur("{",!1),b_expr:new ur("{",!0),b_tmpl:new ur("${",!1),p_stat:new ur("(",!1),p_expr:new ur("(",!0),q_tmpl:new ur("`",!0,!0,function(V){return V.tryReadTemplateToken()}),f_stat:new ur("function",!1),f_expr:new ur("function",!0),f_expr_gen:new ur("function",!0,!1,null,!0),f_gen:new ur("function",!1,!1,null,!0)},_r=mt.prototype;_r.initialContext=function(){return[ir.b_stat]},_r.curContext=function(){return this.context[this.context.length-1]},_r.braceIsBlock=function(V){var ae=this.curContext();return ae===ir.f_expr||ae===ir.f_stat?!0:V===O.colon&&(ae===ir.b_stat||ae===ir.b_expr)?!ae.isExpr:V===O._return||V===O.name&&this.exprAllowed?te.test(this.input.slice(this.lastTokEnd,this.start)):V===O._else||V===O.semi||V===O.eof||V===O.parenR||V===O.arrow?!0:V===O.braceL?ae===ir.b_stat:V===O._var||V===O._const||V===O.name?!1:!this.exprAllowed},_r.inGeneratorContext=function(){for(var V=this.context.length-1;V>=1;V--){var ae=this.context[V];if(ae.token==="function")return ae.generator}return!1},_r.updateContext=function(V){var ae,Oe=this.type;Oe.keyword&&V===O.dot?this.exprAllowed=!1:(ae=Oe.updateContext)?ae.call(this,V):this.exprAllowed=Oe.beforeExpr},_r.overrideContext=function(V){this.curContext()!==V&&(this.context[this.context.length-1]=V)},O.parenR.updateContext=O.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var V=this.context.pop();V===ir.b_stat&&this.curContext().token==="function"&&(V=this.context.pop()),this.exprAllowed=!V.isExpr},O.braceL.updateContext=function(V){this.context.push(this.braceIsBlock(V)?ir.b_stat:ir.b_expr),this.exprAllowed=!0},O.dollarBraceL.updateContext=function(){this.context.push(ir.b_tmpl),this.exprAllowed=!0},O.parenL.updateContext=function(V){var ae=V===O._if||V===O._for||V===O._with||V===O._while;this.context.push(ae?ir.p_stat:ir.p_expr),this.exprAllowed=!0},O.incDec.updateContext=function(){},O._function.updateContext=O._class.updateContext=function(V){V.beforeExpr&&V!==O._else&&!(V===O.semi&&this.curContext()!==ir.p_stat)&&!(V===O._return&&te.test(this.input.slice(this.lastTokEnd,this.start)))&&!((V===O.colon||V===O.braceL)&&this.curContext()===ir.b_stat)?this.context.push(ir.f_expr):this.context.push(ir.f_stat),this.exprAllowed=!1},O.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=!0},O.backQuote.updateContext=function(){this.curContext()===ir.q_tmpl?this.context.pop():this.context.push(ir.q_tmpl),this.exprAllowed=!1},O.star.updateContext=function(V){if(V===O._function){var ae=this.context.length-1;this.context[ae]===ir.f_expr?this.context[ae]=ir.f_expr_gen:this.context[ae]=ir.f_gen}this.exprAllowed=!0},O.name.updateContext=function(V){var ae=!1;this.options.ecmaVersion>=6&&V!==O.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(ae=!0),this.exprAllowed=ae};var Wt=mt.prototype;Wt.checkPropClash=function(V,ae,Oe){if(!(this.options.ecmaVersion>=9&&V.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(V.computed||V.method||V.shorthand))){var Le=V.key,Ge;switch(Le.type){case"Identifier":Ge=Le.name;break;case"Literal":Ge=String(Le.value);break;default:return}var ot=V.kind;if(this.options.ecmaVersion>=6){Ge==="__proto__"&&ot==="init"&&(ae.proto&&(Oe?Oe.doubleProto<0&&(Oe.doubleProto=Le.start):this.raiseRecoverable(Le.start,"Redefinition of __proto__ property")),ae.proto=!0);return}Ge="$"+Ge;var ut=ae[Ge];if(ut){var Rt;ot==="init"?Rt=this.strict&&ut.init||ut.get||ut.set:Rt=ut.init||ut[ot],Rt&&this.raiseRecoverable(Le.start,"Redefinition of property")}else ut=ae[Ge]={init:!1,get:!1,set:!1};ut[ot]=!0}},Wt.parseExpression=function(V,ae){var Oe=this.start,Le=this.startLoc,Ge=this.parseMaybeAssign(V,ae);if(this.type===O.comma){var ot=this.startNodeAt(Oe,Le);for(ot.expressions=[Ge];this.eat(O.comma);)ot.expressions.push(this.parseMaybeAssign(V,ae));return this.finishNode(ot,"SequenceExpression")}return Ge},Wt.parseMaybeAssign=function(V,ae,Oe){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(V);this.exprAllowed=!1}var Le=!1,Ge=-1,ot=-1,ut=-1;ae?(Ge=ae.parenthesizedAssign,ot=ae.trailingComma,ut=ae.doubleProto,ae.parenthesizedAssign=ae.trailingComma=-1):(ae=new sr,Le=!0);var Rt=this.start,Ct=this.startLoc;(this.type===O.parenL||this.type===O.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=V==="await");var Yt=this.parseMaybeConditional(V,ae);if(Oe&&(Yt=Oe.call(this,Yt,Rt,Ct)),this.type.isAssign){var Kt=this.startNodeAt(Rt,Ct);return Kt.operator=this.value,this.type===O.eq&&(Yt=this.toAssignable(Yt,!1,ae)),Le||(ae.parenthesizedAssign=ae.trailingComma=ae.doubleProto=-1),ae.shorthandAssign>=Yt.start&&(ae.shorthandAssign=-1),this.type===O.eq?this.checkLValPattern(Yt):this.checkLValSimple(Yt),Kt.left=Yt,this.next(),Kt.right=this.parseMaybeAssign(V),ut>-1&&(ae.doubleProto=ut),this.finishNode(Kt,"AssignmentExpression")}else Le&&this.checkExpressionErrors(ae,!0);return Ge>-1&&(ae.parenthesizedAssign=Ge),ot>-1&&(ae.trailingComma=ot),Yt},Wt.parseMaybeConditional=function(V,ae){var Oe=this.start,Le=this.startLoc,Ge=this.parseExprOps(V,ae);if(this.checkExpressionErrors(ae))return Ge;if(this.eat(O.question)){var ot=this.startNodeAt(Oe,Le);return ot.test=Ge,ot.consequent=this.parseMaybeAssign(),this.expect(O.colon),ot.alternate=this.parseMaybeAssign(V),this.finishNode(ot,"ConditionalExpression")}return Ge},Wt.parseExprOps=function(V,ae){var Oe=this.start,Le=this.startLoc,Ge=this.parseMaybeUnary(ae,!1,!1,V);return this.checkExpressionErrors(ae)||Ge.start===Oe&&Ge.type==="ArrowFunctionExpression"?Ge:this.parseExprOp(Ge,Oe,Le,-1,V)},Wt.parseExprOp=function(V,ae,Oe,Le,Ge){var ot=this.type.binop;if(ot!=null&&(!Ge||this.type!==O._in)&&ot>Le){var ut=this.type===O.logicalOR||this.type===O.logicalAND,Rt=this.type===O.coalesce;Rt&&(ot=O.logicalAND.binop);var Ct=this.value;this.next();var Yt=this.start,Kt=this.startLoc,or=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,Ge),Yt,Kt,ot,Ge),gr=this.buildBinary(ae,Oe,V,or,Ct,ut||Rt);return(ut&&this.type===O.coalesce||Rt&&(this.type===O.logicalOR||this.type===O.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(gr,ae,Oe,Le,Ge)}return V},Wt.buildBinary=function(V,ae,Oe,Le,Ge,ot){Le.type==="PrivateIdentifier"&&this.raise(Le.start,"Private identifier can only be left side of binary expression");var ut=this.startNodeAt(V,ae);return ut.left=Oe,ut.operator=Ge,ut.right=Le,this.finishNode(ut,ot?"LogicalExpression":"BinaryExpression")},Wt.parseMaybeUnary=function(V,ae,Oe,Le){var Ge=this.start,ot=this.startLoc,ut;if(this.isContextual("await")&&this.canAwait)ut=this.parseAwait(Le),ae=!0;else if(this.type.prefix){var Rt=this.startNode(),Ct=this.type===O.incDec;Rt.operator=this.value,Rt.prefix=!0,this.next(),Rt.argument=this.parseMaybeUnary(null,!0,Ct,Le),this.checkExpressionErrors(V,!0),Ct?this.checkLValSimple(Rt.argument):this.strict&&Rt.operator==="delete"&&Wr(Rt.argument)?this.raiseRecoverable(Rt.start,"Deleting local variable in strict mode"):Rt.operator==="delete"&&Br(Rt.argument)?this.raiseRecoverable(Rt.start,"Private fields can not be deleted"):ae=!0,ut=this.finishNode(Rt,Ct?"UpdateExpression":"UnaryExpression")}else if(!ae&&this.type===O.privateId)(Le||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),ut=this.parsePrivateIdent(),this.type!==O._in&&this.unexpected();else{if(ut=this.parseExprSubscripts(V,Le),this.checkExpressionErrors(V))return ut;for(;this.type.postfix&&!this.canInsertSemicolon();){var Yt=this.startNodeAt(Ge,ot);Yt.operator=this.value,Yt.prefix=!1,Yt.argument=ut,this.checkLValSimple(ut),this.next(),ut=this.finishNode(Yt,"UpdateExpression")}}if(!Oe&&this.eat(O.starstar))if(ae)this.unexpected(this.lastTokStart);else return this.buildBinary(Ge,ot,ut,this.parseMaybeUnary(null,!1,!1,Le),"**",!1);else return ut};function Wr(V){return V.type==="Identifier"||V.type==="ParenthesizedExpression"&&Wr(V.expression)}function Br(V){return V.type==="MemberExpression"&&V.property.type==="PrivateIdentifier"||V.type==="ChainExpression"&&Br(V.expression)||V.type==="ParenthesizedExpression"&&Br(V.expression)}Wt.parseExprSubscripts=function(V,ae){var Oe=this.start,Le=this.startLoc,Ge=this.parseExprAtom(V,ae);if(Ge.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return Ge;var ot=this.parseSubscripts(Ge,Oe,Le,!1,ae);return V&&ot.type==="MemberExpression"&&(V.parenthesizedAssign>=ot.start&&(V.parenthesizedAssign=-1),V.parenthesizedBind>=ot.start&&(V.parenthesizedBind=-1),V.trailingComma>=ot.start&&(V.trailingComma=-1)),ot},Wt.parseSubscripts=function(V,ae,Oe,Le,Ge){for(var ot=this.options.ecmaVersion>=8&&V.type==="Identifier"&&V.name==="async"&&this.lastTokEnd===V.end&&!this.canInsertSemicolon()&&V.end-V.start===5&&this.potentialArrowAt===V.start,ut=!1;;){var Rt=this.parseSubscript(V,ae,Oe,Le,ot,ut,Ge);if(Rt.optional&&(ut=!0),Rt===V||Rt.type==="ArrowFunctionExpression"){if(ut){var Ct=this.startNodeAt(ae,Oe);Ct.expression=Rt,Rt=this.finishNode(Ct,"ChainExpression")}return Rt}V=Rt}},Wt.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(O.arrow)},Wt.parseSubscriptAsyncArrow=function(V,ae,Oe,Le){return this.parseArrowExpression(this.startNodeAt(V,ae),Oe,!0,Le)},Wt.parseSubscript=function(V,ae,Oe,Le,Ge,ot,ut){var Rt=this.options.ecmaVersion>=11,Ct=Rt&&this.eat(O.questionDot);Le&&Ct&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Yt=this.eat(O.bracketL);if(Yt||Ct&&this.type!==O.parenL&&this.type!==O.backQuote||this.eat(O.dot)){var Kt=this.startNodeAt(ae,Oe);Kt.object=V,Yt?(Kt.property=this.parseExpression(),this.expect(O.bracketR)):this.type===O.privateId&&V.type!=="Super"?Kt.property=this.parsePrivateIdent():Kt.property=this.parseIdent(this.options.allowReserved!=="never"),Kt.computed=!!Yt,Rt&&(Kt.optional=Ct),V=this.finishNode(Kt,"MemberExpression")}else if(!Le&&this.eat(O.parenL)){var or=new sr,gr=this.yieldPos,Er=this.awaitPos,Sr=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Dr=this.parseExprList(O.parenR,this.options.ecmaVersion>=8,!1,or);if(Ge&&!Ct&&this.shouldParseAsyncArrow())return this.checkPatternErrors(or,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=gr,this.awaitPos=Er,this.awaitIdentPos=Sr,this.parseSubscriptAsyncArrow(ae,Oe,Dr,ut);this.checkExpressionErrors(or,!0),this.yieldPos=gr||this.yieldPos,this.awaitPos=Er||this.awaitPos,this.awaitIdentPos=Sr||this.awaitIdentPos;var Rr=this.startNodeAt(ae,Oe);Rr.callee=V,Rr.arguments=Dr,Rt&&(Rr.optional=Ct),V=this.finishNode(Rr,"CallExpression")}else if(this.type===O.backQuote){(Ct||ot)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Pr=this.startNodeAt(ae,Oe);Pr.tag=V,Pr.quasi=this.parseTemplate({isTagged:!0}),V=this.finishNode(Pr,"TaggedTemplateExpression")}return V},Wt.parseExprAtom=function(V,ae,Oe){this.type===O.slash&&this.readRegexp();var Le,Ge=this.potentialArrowAt===this.start;switch(this.type){case O._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),Le=this.startNode(),this.next(),this.type===O.parenL&&!this.allowDirectSuper&&this.raise(Le.start,"super() call outside constructor of a subclass"),this.type!==O.dot&&this.type!==O.bracketL&&this.type!==O.parenL&&this.unexpected(),this.finishNode(Le,"Super");case O._this:return Le=this.startNode(),this.next(),this.finishNode(Le,"ThisExpression");case O.name:var ot=this.start,ut=this.startLoc,Rt=this.containsEsc,Ct=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!Rt&&Ct.name==="async"&&!this.canInsertSemicolon()&&this.eat(O._function))return this.overrideContext(ir.f_expr),this.parseFunction(this.startNodeAt(ot,ut),0,!1,!0,ae);if(Ge&&!this.canInsertSemicolon()){if(this.eat(O.arrow))return this.parseArrowExpression(this.startNodeAt(ot,ut),[Ct],!1,ae);if(this.options.ecmaVersion>=8&&Ct.name==="async"&&this.type===O.name&&!Rt&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return Ct=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(O.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(ot,ut),[Ct],!0,ae)}return Ct;case O.regexp:var Yt=this.value;return Le=this.parseLiteral(Yt.value),Le.regex={pattern:Yt.pattern,flags:Yt.flags},Le;case O.num:case O.string:return this.parseLiteral(this.value);case O._null:case O._true:case O._false:return Le=this.startNode(),Le.value=this.type===O._null?null:this.type===O._true,Le.raw=this.type.keyword,this.next(),this.finishNode(Le,"Literal");case O.parenL:var Kt=this.start,or=this.parseParenAndDistinguishExpression(Ge,ae);return V&&(V.parenthesizedAssign<0&&!this.isSimpleAssignTarget(or)&&(V.parenthesizedAssign=Kt),V.parenthesizedBind<0&&(V.parenthesizedBind=Kt)),or;case O.bracketL:return Le=this.startNode(),this.next(),Le.elements=this.parseExprList(O.bracketR,!0,!0,V),this.finishNode(Le,"ArrayExpression");case O.braceL:return this.overrideContext(ir.b_expr),this.parseObj(!1,V);case O._function:return Le=this.startNode(),this.next(),this.parseFunction(Le,0);case O._class:return this.parseClass(this.startNode(),!1);case O._new:return this.parseNew();case O.backQuote:return this.parseTemplate();case O._import:return this.options.ecmaVersion>=11?this.parseExprImport(Oe):this.unexpected();default:return this.parseExprAtomDefault()}},Wt.parseExprAtomDefault=function(){this.unexpected()},Wt.parseExprImport=function(V){var ae=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===O.parenL&&!V)return this.parseDynamicImport(ae);if(this.type===O.dot){var Oe=this.startNodeAt(ae.start,ae.loc&&ae.loc.start);return Oe.name="import",ae.meta=this.finishNode(Oe,"Identifier"),this.parseImportMeta(ae)}else this.unexpected()},Wt.parseDynamicImport=function(V){if(this.next(),V.source=this.parseMaybeAssign(),!this.eat(O.parenR)){var ae=this.start;this.eat(O.comma)&&this.eat(O.parenR)?this.raiseRecoverable(ae,"Trailing comma is not allowed in import()"):this.unexpected(ae)}return this.finishNode(V,"ImportExpression")},Wt.parseImportMeta=function(V){this.next();var ae=this.containsEsc;return V.property=this.parseIdent(!0),V.property.name!=="meta"&&this.raiseRecoverable(V.property.start,"The only valid meta property for import is 'import.meta'"),ae&&this.raiseRecoverable(V.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(V.start,"Cannot use 'import.meta' outside a module"),this.finishNode(V,"MetaProperty")},Wt.parseLiteral=function(V){var ae=this.startNode();return ae.value=V,ae.raw=this.input.slice(this.start,this.end),ae.raw.charCodeAt(ae.raw.length-1)===110&&(ae.bigint=ae.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(ae,"Literal")},Wt.parseParenExpression=function(){this.expect(O.parenL);var V=this.parseExpression();return this.expect(O.parenR),V},Wt.shouldParseArrow=function(V){return!this.canInsertSemicolon()},Wt.parseParenAndDistinguishExpression=function(V,ae){var Oe=this.start,Le=this.startLoc,Ge,ot=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ut=this.start,Rt=this.startLoc,Ct=[],Yt=!0,Kt=!1,or=new sr,gr=this.yieldPos,Er=this.awaitPos,Sr;for(this.yieldPos=0,this.awaitPos=0;this.type!==O.parenR;)if(Yt?Yt=!1:this.expect(O.comma),ot&&this.afterTrailingComma(O.parenR,!0)){Kt=!0;break}else if(this.type===O.ellipsis){Sr=this.start,Ct.push(this.parseParenItem(this.parseRestBinding())),this.type===O.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Ct.push(this.parseMaybeAssign(!1,or,this.parseParenItem));var Dr=this.lastTokEnd,Rr=this.lastTokEndLoc;if(this.expect(O.parenR),V&&this.shouldParseArrow(Ct)&&this.eat(O.arrow))return this.checkPatternErrors(or,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=gr,this.awaitPos=Er,this.parseParenArrowList(Oe,Le,Ct,ae);(!Ct.length||Kt)&&this.unexpected(this.lastTokStart),Sr&&this.unexpected(Sr),this.checkExpressionErrors(or,!0),this.yieldPos=gr||this.yieldPos,this.awaitPos=Er||this.awaitPos,Ct.length>1?(Ge=this.startNodeAt(ut,Rt),Ge.expressions=Ct,this.finishNodeAt(Ge,"SequenceExpression",Dr,Rr)):Ge=Ct[0]}else Ge=this.parseParenExpression();if(this.options.preserveParens){var Pr=this.startNodeAt(Oe,Le);return Pr.expression=Ge,this.finishNode(Pr,"ParenthesizedExpression")}else return Ge},Wt.parseParenItem=function(V){return V},Wt.parseParenArrowList=function(V,ae,Oe,Le){return this.parseArrowExpression(this.startNodeAt(V,ae),Oe,!1,Le)};var Rn=[];Wt.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var V=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===O.dot){var ae=this.startNodeAt(V.start,V.loc&&V.loc.start);ae.name="new",V.meta=this.finishNode(ae,"Identifier"),this.next();var Oe=this.containsEsc;return V.property=this.parseIdent(!0),V.property.name!=="target"&&this.raiseRecoverable(V.property.start,"The only valid meta property for new is 'new.target'"),Oe&&this.raiseRecoverable(V.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(V.start,"'new.target' can only be used in functions and class static block"),this.finishNode(V,"MetaProperty")}var Le=this.start,Ge=this.startLoc;return V.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),Le,Ge,!0,!1),this.eat(O.parenL)?V.arguments=this.parseExprList(O.parenR,this.options.ecmaVersion>=8,!1):V.arguments=Rn,this.finishNode(V,"NewExpression")},Wt.parseTemplateElement=function(V){var ae=V.isTagged,Oe=this.startNode();return this.type===O.invalidTemplate?(ae||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),Oe.value={raw:this.value.replace(/\r\n?/g,`
1093
1093
  `),cooked:null}):Oe.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.280.0",
4
+ "version": "1.281.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [