@athosws/react-components
Version:
This is a set of useful ReactJS components developed by Athos.\n Email:ladiesman217.as@gmail.com
1 lines • 187 kB
JavaScript
import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{createContext as o,useState as i,useContext as a,useEffect as s,useRef as l,useMemo as c,useCallback as d,useDebugValue as u,createElement as p,memo as h}from"react";import{motion as m,AnimatePresence as C,animate as f}from"motion/react";import g from"chroma-js";import{v4 as b}from"uuid";import{createPortal as y}from"react-dom";import{defaultDropAnimationSideEffects as v,DragOverlay as w,MeasuringStrategy as x,useSensors as N,useSensor as S,PointerSensor as k,KeyboardSensor as $,DndContext as T}from"@dnd-kit/core";import{useSortable as O,defaultAnimateLayoutChanges as R,sortableKeyboardCoordinates as A,SortableContext as z}from"@dnd-kit/sortable";import{CSS as M}from"@dnd-kit/utilities";import{useSelector as D,useDispatch as I,Provider as P}from"react-redux";import{createSlice as E,configureStore as L}from"@reduxjs/toolkit";import{createRoot as B}from"react-dom/client";!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('@import "tailwindcss";@plugin "daisyui";@custom-variant dark (&:where(.dark, .dark *));input[type=password]::-ms-clear,input[type=password]::-ms-reveal{display:none}');var j={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},F=n.createContext&&n.createContext(j),Z=["attr","size","title"];function H(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W.apply(this,arguments)}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(t){q(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function q(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G(e){return e&&e.map((e,t)=>n.createElement(e.tag,V({key:t},e.attr),G(e.child)))}function Y(e){return t=>n.createElement(X,W({attr:V({},e.attr)},t),G(e.child))}function X(e){var t=t=>{var r,{attr:o,size:i,title:a}=e,s=H(e,Z),l=i||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",W({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,o,s,{className:r,style:V(V({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&n.createElement("title",null,a),e.children)};return void 0!==F?n.createElement(F.Consumer,null,e=>t(e)):t(j)}function U(e){return Y({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}const J=o(void 0),K=o({}),Q=({children:t,props:r})=>e(K.Provider,{value:r,children:t}),ee=()=>{const e=a(K);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function te(e){return Y({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"},child:[]}]})(e)}function re(e){return Y({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"},child:[]}]})(e)}function ne(e){return Y({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M135.2 17.7L128 32 32 32C14.3 32 0 46.3 0 64S14.3 96 32 96l384 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0-7.2-14.3C307.4 6.8 296.3 0 284.2 0L163.8 0c-12.1 0-23.2 6.8-28.6 17.7zM416 128L32 128 53.2 467c1.6 25.3 22.6 45 47.9 45l245.8 0c25.3 0 46.3-19.7 47.9-45L416 128z"},child:[]}]})(e)}function oe(e){return Y({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"},child:[]}]})(e)}const ie=e=>{const{callback:t}=e;let r=[];r="refs"in e?e.refs:e.ids.map(e=>({current:document.getElementById(e)}));const n=e=>{r.some(t=>t.current?.contains(e.target))||t()};s(()=>(document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)),[])},ae={duration:.35,ease:"circInOut"},se={topandbottom:{initial:{height:0},animate:{height:"auto"},exit:{height:0}},topandbottomWithFade:{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}},leftandright:{initial:{width:0},animate:{width:"auto"},exit:{width:0}},leftandrightWithFade:{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0}}},le=({children:r,collpasedComponent:n,spacing:o,position:a="bottom",onToggle:c,initialOpen:d,collapsedClassName:u,wrapperClassName:p,buttonClassName:h,toggleOnWrapperClick:C,fade:f,hideOnClickOutside:g,extraButton:b,open:y,buttonContainerClassName:v,autoOpen:w=!0,disableClick:x})=>{const[N,S]=i(d||!1),k=l(null),$=l(null),T=l(null),O="top"===a?"flex-col-reverse":"bottom"===a?"flex-col":"left"===a?"flex-row-reverse":"flex-row";g&&ie({callback:()=>{S(!1),c&&c(void 0)},refs:[$,$,k]});return s(()=>()=>{S(!1)},[]),s(()=>{void 0!==y&&S(y)},[y]),t(m.div,{ref:k,animate:{gap:N?`${o}px`:0},onClick:()=>{x||w&&C&&(S(!N),c&&c(!N))},className:`flex ${O} ${p}`,children:[t("div",{ref:$,className:v,children:[e("div",{className:h,onClick:()=>{x||w&&(C||(S(!N),c&&c(!N)))},children:r}),b]}),e(m.div,{ref:T,initial:"initial",animate:N?"animate":"initial",variants:"top"===a||"bottom"===a?f?se.topandbottomWithFade:se.topandbottom:f?se.leftandrightWithFade:se.leftandright,style:"top"===a||"bottom"===a?{minWidth:"fit-content"}:{minHeight:"fit-content"},className:"flex overflow-hidden",transition:ae,children:e("div",{className:`min-w-max min-h-max ${u}`,children:n})})]})},ce=({index:e})=>{const{styles:t,levelIndicator:r}=ee(),n=0+e/10*4;return{bgColor:c(()=>{if(t?.selected?.bgcolorIndex)return t.selected.bgcolorIndex(n);const e=g(t?.selected?.bgColor||"#d6b2d1");return"brighten"===r?e.brighten(n).hex():e.darken(n).hex()},[n,t]),color:c(()=>{if(t?.selected?.colorIndex)return t.selected.colorIndex(n);const e=g(t?.selected?.color||"#5c126b");return"brighten"===r?e.brighten(n).hex():e.darken(n).hex()},[n,t])}},de=({index:r,parentId:n})=>{const[o,a]=i(),[s,l]=i(!1),[d,u]=i(!1),{onAdd:p,selected:h}=ee(),{color:m}=ce({index:r}),C=c(()=>h?.some(e=>e===n),[h,n]);return t("div",{className:"flex items-center gap-2",children:[e("input",{style:{marginLeft:10*r+"px",color:C?m:"inherit"},type:"text",value:o,placeholder:"Adicionar",onChange:e=>{a(e.target.value),e.target.value&&l(!0)},className:"cursor-pointer py-1 px-2 outline-none focus:outline-none rounded-md text-zinc-400",onFocus:()=>{o&&l(!0)},onBlur:()=>{o||(l(!1),u(!1))}}),e(le,{wrapperClassName:"items-center flex",spacing:6,position:"left",open:d,onToggle:e=>u(!!e),collpasedComponent:e("p",{onClick:()=>{o&&(p(o,n),a(""),l(!1),u(!1))},className:"text-green-600 select-none cursor-pointer",children:"Confirmar"}),children:e("div",{className:`p-1 ${d?"bg-black":"bg-green-500"} rounded-full flex items-center gap-1 w-fit ${s?"":"hidden pointer-events-none"}`,children:d?e(oe,{className:"cursor-pointer text-white text-xs",onClick:()=>{o&&(a(""),l(!1),u(!1))}}):e(te,{className:"cursor-pointer text-white text-xs"})})})]})},ue=o(void 0),pe=()=>{const e=a(ue);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e};function he(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function me(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(e)}function Ce(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M296 136c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0 240c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40zm0-120c0-22.002-17.998-40-40-40s-40 17.998-40 40 17.998 40 40 40 40-17.998 40-40z"},child:[]}]})(e)}function fe(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 256l-96-96v64h-96v-96h64l-96-96-96 96h64v96h-96v-64l-96 96 96 96v-64h96v96h-64l96 96 96-96h-64v-96h96v64z"},child:[]}]})(e)}function ge(e){return Y({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M5 3a2 2 0 0 0-2 2"},child:[]},{tag:"path",attr:{d:"M19 3a2 2 0 0 1 2 2"},child:[]},{tag:"path",attr:{d:"M21 19a2 2 0 0 1-2 2"},child:[]},{tag:"path",attr:{d:"M5 21a2 2 0 0 1-2-2"},child:[]},{tag:"path",attr:{d:"M9 3h1"},child:[]},{tag:"path",attr:{d:"M9 21h1"},child:[]},{tag:"path",attr:{d:"M14 3h1"},child:[]},{tag:"path",attr:{d:"M14 21h1"},child:[]},{tag:"path",attr:{d:"M3 9v1"},child:[]},{tag:"path",attr:{d:"M21 9v1"},child:[]},{tag:"path",attr:{d:"M3 14v1"},child:[]},{tag:"path",attr:{d:"M21 14v1"},child:[]}]})(e)}const be=o(void 0),ye=({isMoving:r,isMovingThisTree:n,tree:o,index:s})=>{const{onDelete:l,onMove:d,onAdd:u,levelIndicator:p}=ee(),{setFuncOpenId:h,funcOpenId:m}=(()=>{const e=a(be);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})(),{setMovingId:C,movingId:f}=pe(),[b,y]=i(!1),v=c(()=>m===o.id,[m,o.id]),{color:w}=ce({index:s});return c(()=>!u&&!d&&!l,[u,d,l])?null:n?e(fe,{className:"opacity-60 hover:opacity-100 hover:text-red-400 transition-all duration-200 cursor-pointer",onClick:()=>{f===o.id?C(null):C(o.id)}}):e(le,r&&f?{spacing:6,wrapperClassName:"items-center",position:"left",open:b,collpasedComponent:e("p",{children:"Confirmar"}),children:e(ge,{onClick:()=>{d?.(f,o.id),C(null),y(!1)},className:"cursor-pointer",onMouseOver:()=>y(!0),onMouseOut:()=>y(!1)})}:{open:v,onToggle:e=>{h(e?o.id:null)},spacing:6,position:"right",wrapperClassName:"text-sm",collapsedClassName:"flex items-center",collpasedComponent:t("div",{style:{borderLeftColor:g(w).alpha(.3).hex()},className:"cursor-pointer border-l-1 px-1 flex gap-1 transition-opacity duration-200",children:[u&&e(re,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>u(o.name,o.id)}),d&&e(fe,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>{f===o.id?C(null):C(o.id)}}),l&&e(ne,{className:"opacity-60 hover:opacity-100 transition-opacity duration-200",onClick:()=>l(o.id)})]}),children:e(Ce,{className:"cursor-pointer rounded-full text-xl transition-colors duration-200 "+(v?"brighten"===p?"bg-white/5":"bg-black/5":"")})})},ve=({tree:r,id:n,index:o})=>{const{fillWidth:a,onSelect:l}=ee(),{movingId:u}=pe(),[p,h]=i(!1),m=c(()=>!!r.sub&&Object.keys(r.sub).length>0,[r.sub]),{hasSelectedSubcategory:C,isSelected:f}=(({tree:e,id:t})=>{const{selected:r}=ee(),n=d((e,t)=>!!r?.some(t=>t===e.id)||!!e.sub&&Object.values(e.sub).some(e=>n(e,t)),[r]),o=c(()=>n(e,t),[e,n,t]);return{isSelected:c(()=>r?.some(t=>t===e.id)||o,[r,e.id,o]),hasSelectedSubcategory:o}})({tree:r,id:n}),{bgColor:g,color:b}=ce({index:o}),y=`rounded-md ${m?"pb-2 ":""} py-1 px-2 gap-2 transition-colors duration-200 flex justify-between ${a?"":"w-fit"}`;s(()=>h(C),[C]);const v=c(()=>u===r.id,[u,r.id]),w=c(()=>null!==u,[u]);return e("div",{style:{marginLeft:10*o+"px",backgroundColor:f?g:"transparent",color:f?b:"inherit",borderColor:v?b:"transparent"},className:`border border-dashed ${y} transition-[border] `,children:r.sub&&Object.keys(r.sub).length>0?t(le,{open:C,onToggle:e=>h(!!e),collapsedClassName:`flex flex-col ${a?"w-full":""} gap-1`,wrapperClassName:""+(a?"w-full":""),spacing:6,collpasedComponent:e(we,{data:r.sub,index:o+1,parentId:r.id}),buttonClassName:"cursor-pointer flex items-center gap-2 w-full",buttonContainerClassName:"w-full flex items-center justify-between",extraButton:e(ye,{index:o,isMoving:w,isMovingThisTree:v,tree:r}),children:[p?"-":"+"," ",r.icon," ",r.component||r.name]}):t("span",{className:(w?"":"cursor-pointer")+" w-full flex items-center justify-between gap-2",children:[t("div",{className:"flex items-center gap-2 w-full",onClick:()=>{w||(l?.(r.id),r.onClick?.(r.id))},children:[r.icon," ",r.component||r.name]}),e(ye,{index:o,isMoving:w,isMovingThisTree:v,tree:r})]})},n)},we=({data:r,index:n=0,parentId:o})=>{const{onAdd:i,isLoading:s}=ee(),{addingToParent:l}=(()=>{const e=a(J);if(!e)throw new Error("useATHOSTreeview must be used within a ATHOSTreeviewProvider");return e})();return t("div",{className:""+(s&&0===n?"blur-[2px]":""),children:[r.map(t=>e(ve,{tree:t,id:t.id,index:n})),i&&l===o&&e(de,{index:n,parentId:o})]})},xe=[({children:t})=>{const[r,n]=i(null);return e(J.Provider,{value:{addingToParent:r,setAddingToParent:n},children:t})},({children:t})=>{const[r,n]=i(null);return e(ue.Provider,{value:{movingId:r,setMovingId:n},children:t})},({children:t})=>{const[r,n]=i(null);return e(be.Provider,{value:{funcOpenId:r,setFuncOpenId:n},children:t})}];function Ne(r){return r.data.length>0&&e(Q,{props:r,children:xe.reduce((t,r)=>e(r,{children:t}),t("div",{className:`relative flex flex-col gap-1 text-black ${r.styles?.generalClassName||"w-full"}`,children:[e(we,{data:r.data}),r.isLoading&&e("div",{style:{color:r.styles?.selected?.color||"#000"},className:"w-full h-full absolute flex items-center justify-center ",children:e(U,{className:"animate-spin text-5xl"})})]}))})}const Se=({position:e="top",onClickOutside:t,spacing:r=6,onToggle:n,id:o})=>{const a=c(()=>o||b(),[o]),[d,u]=i(!1),p="top"===e?"dropdown-top dropdown-center":"top-left"===e?"dropdown-top":"top-right"===e?"dropdown-top dropdown-end":"bottom"===e?"dropdown-bottom dropdown-center":"bottom-left"===e?"dropdown-bottom":"bottom-right"===e?"dropdown-bottom dropdown-end":"left"===e?"dropdown-left dropdown-center":"left-top"===e?"dropdown-left":"left-bottom"===e?"dropdown-left dropdown-end":"right"===e?"dropdown-right dropdown-center":"right-top"===e?"dropdown-right":"right-bottom"===e?"dropdown-right dropdown-end":"dropdown-top dropdown-center",h=c(()=>e.startsWith("top")?{marginBottom:`${r}px`}:e.startsWith("bottom")?{marginTop:`${r}px`}:e.startsWith("left")?{marginRight:`${r}px`}:{marginLeft:`${r}px`},[r,e]),m=l(null),C=l(null);return ie({callback:()=>{u(!1),console.log("Popup closed"),t&&t()},refs:[m,C]}),s(()=>{n&&n(d)},[d]),{id:a,pos:p,gap:h,childRef:m,contentRef:C,setIsOpened:u,isOpened:d}},ke=o(null),$e=t=>{const{multiSelect:r=!1,onToggle:n,position:o,spacing:a,matchLabelWidth:l,multiSelectLabelClassName:d}=t,u=Se({onToggle:n,position:o,spacing:a}),[p,h]=i(!1),[m,C]=i(""),[f,g]=i([]),[b,y]=i(),v=c(()=>(e=>"labels"in e&&Array.isArray(e.labels))(t)?t.labels:null,[t]),w=c(()=>(e=>"cols"in e&&Array.isArray(e.cols))(t)?t.cols:null,[t]);s(()=>(t.selected&&g(Array.isArray(t.selected)?t.selected:void 0!==t.selected&&null!==t.selected?[t.selected]:[]),()=>{g([]),y(void 0)}),[t.selected]);const x=c(()=>v?.filter(e=>e.label?e.label.toString().toLowerCase().includes(m.toLowerCase()):e.value.toString().toLowerCase().includes(m.toLowerCase()))||null,[v,m]),N=c(()=>w?.map(e=>e.filter(e=>e.label?e.label.toString().toLowerCase().includes(m.toLowerCase()):e.value.toString().toLowerCase().includes(m.toLowerCase())))||null,[w,m]);return e(ke.Provider,{value:{props:t,selectedItems:f,select:function(e){if(p)return;const n=(()=>{const t=f;return r?t.includes(e)?t.filter(t=>t!==e):[...t,e]:t.includes(e)?t.filter(t=>t!==e):[e]})();if(g(n),t.onChange){const e=t.onChange(n);e&&"function"==typeof e.then?(h(!0),e.then(()=>{h(!1)}).catch(()=>{h(!1)})):h(!1)}},labels:x,cols:N,updating:p,setLastSelected:y,lastSelected:b,multiSelectLabelClassName:d,searchValue:m,setSearchValue:C,...u,originalCols:w,originalLabels:v},children:t.children})},Te=()=>{const e=a(ke);if(!e)throw new Error("useATHOSSelectContext must be used within a ATHOSSelectProvider");return e};function Oe(e){return Y({attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M13.917 7A6.002 6.002 0 0 0 2.083 7H1.071a7.002 7.002 0 0 1 13.858 0h-1.012z"},child:[]}]})(e)}const Re=({option:r,onClick:n,isOpened:o,isLastSelected:i,className:a,style:s,selectedClassName:l,selectedStyle:c,isSelected:d})=>{const{updating:u}=Te();return t(m.li,{animate:{opacity:o?1:0},style:{...s,...r.style,...d?c:{}},onClick:n,className:`flex pr-3 justify-between items-center transform-gpu cursor-pointer select-none ${a} ${r.className} ${d?l:""}`,children:[r.component||r.label,e(C,{children:d?u&&i?e(Oe,{className:"animate-spin"}):e(m.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},children:e(te,{size:12})}):null})]})},Ae=t=>{const{colClassName:n,optionClassName:o,labelsStyle:i}=t,{cols:a,select:s,selectedItems:l,isOpened:c,lastSelected:d}=Te();return e(r,{children:a?.map((r,a)=>e("div",{className:`flex ${n}`,style:t.colStyle,children:r.map(r=>e(Re,{isLastSelected:d===r.value,isOpened:c,selectedClassName:t.selectedLabelClassName,selectedStyle:t.selectedLabelStyle,style:i,className:o,option:r,onClick:()=>s(r.value),isSelected:l.includes(r.value)},r.value))},a))})};function ze(e){return Y({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9A7.902 7.902 0 0 1 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1A7.902 7.902 0 0 1 20 12c0 4.42-3.58 8-8 8z"},child:[]}]})(e)}function Me(e){return Y({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M12 192h424c6.6 0 12 5.4 12 12v260c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V204c0-6.6 5.4-12 12-12zm436-44v-36c0-26.5-21.5-48-48-48h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v36c0 6.6 5.4 12 12 12h424c6.6 0 12-5.4 12-12z"},child:[]}]})(e)}function De(e){return Y({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"},child:[]}]})(e)}function Ie(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64V160h160v256zm224 0H288V160h160v256z"},child:[]}]})(e)}function Pe(e){return Y({attr:{viewBox:"0 0 288 512"},child:[{tag:"path",attr:{d:"M209.2 233.4l-108-31.6C88.7 198.2 80 186.5 80 173.5c0-16.3 13.2-29.5 29.5-29.5h66.3c12.2 0 24.2 3.7 34.2 10.5 6.1 4.1 14.3 3.1 19.5-2l34.8-34c7.1-6.9 6.1-18.4-1.8-24.5C238 74.8 207.4 64.1 176 64V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48h-2.5C45.8 64-5.4 118.7.5 183.6c4.2 46.1 39.4 83.6 83.8 96.6l102.5 30c12.5 3.7 21.2 15.3 21.2 28.3 0 16.3-13.2 29.5-29.5 29.5h-66.3C100 368 88 364.3 78 357.5c-6.1-4.1-14.3-3.1-19.5 2l-34.8 34c-7.1 6.9-6.1 18.4 1.8 24.5 24.5 19.2 55.1 29.9 86.5 30v48c0 8.8 7.2 16 16 16h32c8.8 0 16-7.2 16-16v-48.2c46.6-.9 90.3-28.6 105.7-72.7 21.5-61.6-14.6-124.8-72.5-141.7z"},child:[]}]})(e)}function Ee(e){return Y({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"},child:[]}]})(e)}function Le(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function Be(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M12.41 148.02l232.94 105.67c6.8 3.09 14.49 3.09 21.29 0l232.94-105.67c16.55-7.51 16.55-32.52 0-40.03L266.65 2.31a25.607 25.607 0 0 0-21.29 0L12.41 107.98c-16.55 7.51-16.55 32.53 0 40.04zm487.18 88.28l-58.09-26.33-161.64 73.27c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.51 209.97l-58.1 26.33c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 276.3c16.55-7.5 16.55-32.5 0-40zm0 127.8l-57.87-26.23-161.86 73.37c-7.56 3.43-15.59 5.17-23.86 5.17s-16.29-1.74-23.86-5.17L70.29 337.87 12.41 364.1c-16.55 7.5-16.55 32.5 0 40l232.94 105.59c6.8 3.08 14.49 3.08 21.29 0L499.59 404.1c16.55-7.5 16.55-32.5 0-40z"},child:[]}]})(e)}function je(e){return Y({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}var Fe=function(){return Fe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Fe.apply(this,arguments)};function Ze(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function He(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}"function"==typeof SuppressedError&&SuppressedError;var We=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_e=He(function(e){return We.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Ve="-ms-",qe="-moz-",Ge="-webkit-",Ye="comm",Xe="rule",Ue="decl",Je="@keyframes",Ke=Math.abs,Qe=String.fromCharCode,et=Object.assign;function tt(e){return e.trim()}function rt(e,t){return(e=t.exec(e))?e[0]:e}function nt(e,t,r){return e.replace(t,r)}function ot(e,t,r){return e.indexOf(t,r)}function it(e,t){return 0|e.charCodeAt(t)}function at(e,t,r){return e.slice(t,r)}function st(e){return e.length}function lt(e){return e.length}function ct(e,t){return t.push(e),e}function dt(e,t){return e.filter(function(e){return!rt(e,t)})}var ut=1,pt=1,ht=0,mt=0,Ct=0,ft="";function gt(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:ut,column:pt,length:a,return:"",siblings:s}}function bt(e,t){return et(gt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function yt(e){for(;e.root;)e=bt(e.root,{children:[e]});ct(e,e.siblings)}function vt(){return Ct=mt>0?it(ft,--mt):0,pt--,10===Ct&&(pt=1,ut--),Ct}function wt(){return Ct=mt<ht?it(ft,mt++):0,pt++,10===Ct&&(pt=1,ut++),Ct}function xt(){return it(ft,mt)}function Nt(){return mt}function St(e,t){return at(ft,e,t)}function kt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $t(e){return tt(St(mt-1,Rt(91===e?e+2:40===e?e+1:e)))}function Tt(e){for(;(Ct=xt())&&Ct<33;)wt();return kt(e)>2||kt(Ct)>3?"":" "}function Ot(e,t){for(;--t&&wt()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return St(e,Nt()+(t<6&&32==xt()&&32==wt()))}function Rt(e){for(;wt();)switch(Ct){case e:return mt;case 34:case 39:34!==e&&39!==e&&Rt(Ct);break;case 40:41===e&&Rt(e);break;case 92:wt()}return mt}function At(e,t){for(;wt()&&e+Ct!==57&&(e+Ct!==84||47!==xt()););return"/*"+St(t,mt-1)+"*"+Qe(47===e?e:wt())}function zt(e){for(;!kt(xt());)wt();return St(e,mt)}function Mt(e){return function(e){return ft="",e}(Dt("",null,null,null,[""],e=function(e){return ut=pt=1,ht=st(ft=e),mt=0,[]}(e),0,[0],e))}function Dt(e,t,r,n,o,i,a,s,l){for(var c=0,d=0,u=a,p=0,h=0,m=0,C=1,f=1,g=1,b=0,y="",v=o,w=i,x=n,N=y;f;)switch(m=b,b=wt()){case 40:if(108!=m&&58==it(N,u-1)){-1!=ot(N+=nt($t(b),"&","&\f"),"&\f",Ke(c?s[c-1]:0))&&(g=-1);break}case 34:case 39:case 91:N+=$t(b);break;case 9:case 10:case 13:case 32:N+=Tt(m);break;case 92:N+=Ot(Nt()-1,7);continue;case 47:switch(xt()){case 42:case 47:ct(Pt(At(wt(),Nt()),t,r,l),l);break;default:N+="/"}break;case 123*C:s[c++]=st(N)*g;case 125*C:case 59:case 0:switch(b){case 0:case 125:f=0;case 59+d:-1==g&&(N=nt(N,/\f/g,"")),h>0&&st(N)-u&&ct(h>32?Et(N+";",n,r,u-1,l):Et(nt(N," ","")+";",n,r,u-2,l),l);break;case 59:N+=";";default:if(ct(x=It(N,t,r,c,d,o,s,y,v=[],w=[],u,i),i),123===b)if(0===d)Dt(N,t,x,x,v,i,u,s,w);else switch(99===p&&110===it(N,3)?100:p){case 100:case 108:case 109:case 115:Dt(e,x,x,n&&ct(It(e,x,x,0,0,o,s,y,o,v=[],u,w),w),o,w,u,s,n?v:w);break;default:Dt(N,x,x,x,[""],w,0,s,w)}}c=d=h=0,C=g=1,y=N="",u=a;break;case 58:u=1+st(N),h=m;default:if(C<1)if(123==b)--C;else if(125==b&&0==C++&&125==vt())continue;switch(N+=Qe(b),b*C){case 38:g=d>0?1:(N+="\f",-1);break;case 44:s[c++]=(st(N)-1)*g,g=1;break;case 64:45===xt()&&(N+=$t(wt())),p=xt(),d=u=st(y=N+=zt(Nt())),b++;break;case 45:45===m&&2==st(N)&&(C=0)}}return i}function It(e,t,r,n,o,i,a,s,l,c,d,u){for(var p=o-1,h=0===o?i:[""],m=lt(h),C=0,f=0,g=0;C<n;++C)for(var b=0,y=at(e,p+1,p=Ke(f=a[C])),v=e;b<m;++b)(v=tt(f>0?h[b]+" "+y:nt(y,/&\f/g,h[b])))&&(l[g++]=v);return gt(e,t,r,0===o?Xe:s,l,c,d,u)}function Pt(e,t,r,n){return gt(e,t,r,Ye,Qe(Ct),at(e,2,-2),0,n)}function Et(e,t,r,n,o){return gt(e,t,r,Ue,at(e,0,n),at(e,n+1,-1),n,o)}function Lt(e,t,r){switch(function(e,t){return 45^it(e,0)?(((t<<2^it(e,0))<<2^it(e,1))<<2^it(e,2))<<2^it(e,3):0}(e,t)){case 5103:return Ge+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ge+e+e;case 4789:return qe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ge+e+qe+e+Ve+e+e;case 5936:switch(it(e,t+11)){case 114:return Ge+e+Ve+nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ge+e+Ve+nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ge+e+Ve+nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ge+e+Ve+e+e;case 6165:return Ge+e+Ve+"flex-"+e+e;case 5187:return Ge+e+nt(e,/(\w+).+(:[^]+)/,Ge+"box-$1$2"+Ve+"flex-$1$2")+e;case 5443:return Ge+e+Ve+"flex-item-"+nt(e,/flex-|-self/g,"")+(rt(e,/flex-|baseline/)?"":Ve+"grid-row-"+nt(e,/flex-|-self/g,""))+e;case 4675:return Ge+e+Ve+"flex-line-pack"+nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ge+e+Ve+nt(e,"shrink","negative")+e;case 5292:return Ge+e+Ve+nt(e,"basis","preferred-size")+e;case 6060:return Ge+"box-"+nt(e,"-grow","")+Ge+e+Ve+nt(e,"grow","positive")+e;case 4554:return Ge+nt(e,/([^-])(transform)/g,"$1"+Ge+"$2")+e;case 6187:return nt(nt(nt(e,/(zoom-|grab)/,Ge+"$1"),/(image-set)/,Ge+"$1"),e,"")+e;case 5495:case 3959:return nt(e,/(image-set\([^]*)/,Ge+"$1$`$1");case 4968:return nt(nt(e,/(.+:)(flex-)?(.*)/,Ge+"box-pack:$3"+Ve+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ge+e+e;case 4200:if(!rt(e,/flex-|baseline/))return Ve+"grid-column-align"+at(e,t)+e;break;case 2592:case 3360:return Ve+nt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,rt(e.props,/grid-\w+-end/)})?~ot(e+(r=r[t].value),"span",0)?e:Ve+nt(e,"-start","")+e+Ve+"grid-row-span:"+(~ot(r,"span",0)?rt(r,/\d+/):+rt(r,/\d+/)-+rt(e,/\d+/))+";":Ve+nt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return rt(e.props,/grid-\w+-start/)})?e:Ve+nt(nt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return nt(e,/(.+)-inline(.+)/,Ge+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(st(e)-1-t>6)switch(it(e,t+1)){case 109:if(45!==it(e,t+4))break;case 102:return nt(e,/(.+:)(.+)-([^]+)/,"$1"+Ge+"$2-$3$1"+qe+(108==it(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ot(e,"stretch",0)?Lt(nt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,o,i,a,s){return Ve+r+":"+n+s+(o?Ve+r+"-span:"+(i?a:+a-+n)+s:"")+e});case 4949:if(121===it(e,t+6))return nt(e,":",":"+Ge)+e;break;case 6444:switch(it(e,45===it(e,14)?18:11)){case 120:return nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ge+(45===it(e,14)?"inline-":"")+"box$3$1"+Ge+"$2$3$1"+Ve+"$2box$3")+e;case 100:return nt(e,":",":"+Ve)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return nt(e,"scroll-","scroll-snap-")+e}return e}function Bt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function jt(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Ue:return e.return=e.return||e.value;case Ye:return"";case Je:return e.return=e.value+"{"+Bt(e.children,n)+"}";case Xe:if(!st(e.value=e.props.join(",")))return""}return st(r=Bt(e.children,n))?e.return=e.value+"{"+r+"}":""}function Ft(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ue:return void(e.return=Lt(e.value,e.length,r));case Je:return Bt([bt(e,{value:nt(e.value,"@","@"+Ge)})],n);case Xe:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(rt(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":yt(bt(e,{props:[nt(t,/:(read-\w+)/,":-moz-$1")]})),yt(bt(e,{props:[t]})),et(e,{props:dt(r,n)});break;case"::placeholder":yt(bt(e,{props:[nt(t,/:(plac\w+)/,":"+Ge+"input-$1")]})),yt(bt(e,{props:[nt(t,/:(plac\w+)/,":-moz-$1")]})),yt(bt(e,{props:[nt(t,/:(plac\w+)/,Ve+"input-$1")]})),yt(bt(e,{props:[t]})),et(e,{props:dt(r,n)})}return""})}}var Zt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ht="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Wt="active",_t="data-styled-version",Vt="6.1.18",qt="/*!sc*/\n",Gt="undefined"!=typeof window&&"undefined"!=typeof document,Yt=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),Xt=/invalid hook call/i,Ut=new Set,Jt=function(e,t){if("production"!==process.env.NODE_ENV){var r=t?' with the id of "'.concat(t,'"'):"",n="The component ".concat(e).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.\nSee https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.\n",o=console.error;try{var i=!0;console.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];Xt.test(e)?(i=!1,Ut.delete(n)):o.apply(void 0,Ze([e],t,!1))},l(),i&&!Ut.has(n)&&(console.warn(n),Ut.add(n))}catch(e){Xt.test(e.message)&&Ut.delete(n)}finally{console.error=o}}},Kt=Object.freeze([]),Qt=Object.freeze({});var er=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),tr=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,rr=/(^-|-$)/g;function nr(e){return e.replace(tr,"-").replace(rr,"")}var or=/(a)(d)/gi,ir=function(e){return String.fromCharCode(e+(e>25?39:97))};function ar(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=ir(t%52)+r;return(ir(t%52)+r).replace(or,"$1-$2")}var sr,lr=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},cr=function(e){return lr(5381,e)};function dr(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function ur(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var pr="function"==typeof Symbol&&Symbol.for,hr=pr?Symbol.for("react.memo"):60115,mr=pr?Symbol.for("react.forward_ref"):60112,Cr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},fr={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},br=((sr={})[mr]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},sr[hr]=gr,sr);function yr(e){return("type"in(t=e)&&t.type.$$typeof)===hr?gr:"$$typeof"in e?br[e.$$typeof]:Cr;var t}var vr=Object.defineProperty,wr=Object.getOwnPropertyNames,xr=Object.getOwnPropertySymbols,Nr=Object.getOwnPropertyDescriptor,Sr=Object.getPrototypeOf,kr=Object.prototype;function $r(e,t,r){if("string"!=typeof t){if(kr){var n=Sr(t);n&&n!==kr&&$r(e,n,r)}var o=wr(t);xr&&(o=o.concat(xr(t)));for(var i=yr(e),a=yr(t),s=0;s<o.length;++s){var l=o[s];if(!(l in fr||r&&r[l]||a&&l in a||i&&l in i)){var c=Nr(t,l);try{vr(e,l,c)}catch(e){}}}}return e}function Tr(e){return"function"==typeof e}function Or(e){return"object"==typeof e&&"styledComponentId"in e}function Rr(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Ar(e,t){if(0===e.length)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function zr(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Mr(e,t,r){if(void 0===r&&(r=!1),!r&&!zr(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Mr(e[n],t[n]);else if(zr(t))for(var n in t)e[n]=Mr(e[n],t[n]);return e}function Dr(e,t){Object.defineProperty(e,"toString",{value:t})}var Ir="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function Pr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=e[0],n=[],o=1,i=e.length;o<i;o+=1)n.push(e[o]);return n.forEach(function(e){r=r.replace(/%[a-z]/,e)}),r}function Er(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return"production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):"")):new Error(Pr.apply(void 0,Ze([Ir[e]],t,!1)).trim())}var Lr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r<e;r++)t+=this.groupSizes[r];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,o=n;e>=o;)if((o<<=1)<0)throw Er(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var i=n;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=(i=0,t.length);i<s;i++)this.tag.insertRule(a,t[i])&&(this.groupSizes[e]++,a++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var o=r;o<n;o++)this.tag.deleteRule(r)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),o=n+r,i=n;i<o;i++)t+="".concat(this.tag.getRule(i)).concat(qt);return t},e}(),Br=1<<30,jr=new Map,Fr=new Map,Zr=1,Hr=function(e){if(jr.has(e))return jr.get(e);for(;Fr.has(Zr);)Zr++;var t=Zr++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>Br))throw Er(16,"".concat(t));return jr.set(e,t),Fr.set(t,e),t},Wr=function(e,t){Zr=t+1,jr.set(e,t),Fr.set(t,e)},_r="style[".concat(Ht,"][").concat(_t,'="').concat(Vt,'"]'),Vr=new RegExp("^".concat(Ht,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),qr=function(e,t,r){for(var n,o=r.split(","),i=0,a=o.length;i<a;i++)(n=o[i])&&e.registerName(t,n)},Gr=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(qt),o=[],i=0,a=n.length;i<a;i++){var s=n[i].trim();if(s){var l=s.match(Vr);if(l){var c=0|parseInt(l[1],10),d=l[2];0!==c&&(Wr(d,c),qr(e,d,l[3]),e.getTag().insertRules(c,o)),o.length=0}else o.push(s)}}},Yr=function(e){for(var t=document.querySelectorAll(_r),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(Ht)!==Wt&&(Gr(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var Xr=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Ht,"]")));return t[t.length-1]}(r),i=void 0!==o?o.nextSibling:null;n.setAttribute(Ht,Wt),n.setAttribute(_t,Vt);var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,i),n},Ur=function(){function e(e){this.element=Xr(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,r=0,n=t.length;r<n;r++){var o=t[r];if(o.ownerNode===e)return o}throw Er(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Jr=function(){function e(e){this.element=Xr(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Kr=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Qr=Gt,en={isServer:!Gt,useCSSOMInjection:!Yt},tn=function(){function e(e,t,r){void 0===e&&(e=Qt),void 0===t&&(t={});var n=this;this.options=Fe(Fe({},en),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&Gt&&Qr&&(Qr=!1,Yr(this)),Dr(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",o=function(r){var o=function(e){return Fr.get(e)}(r);if(void 0===o)return"continue";var i=e.names.get(o),a=t.getGroup(r);if(void 0===i||!i.size||0===a.length)return"continue";var s="".concat(Ht,".g").concat(r,'[id="').concat(o,'"]'),l="";void 0!==i&&i.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),n+="".concat(a).concat(s,'{content:"').concat(l,'"}').concat(qt)},i=0;i<r;i++)o(i);return n}(n)})}return e.registerId=function(e){return Hr(e)},e.prototype.rehydrate=function(){!this.server&&Gt&&Yr(this)},e.prototype.reconstructWithOptions=function(t,r){return void 0===r&&(r=!0),new e(Fe(Fe({},this.options),t