@overmap-ai/blocks 0.0.9-alpha.6 → 0.0.10-alpha.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.
- package/dist/Breadcrumb/Breadcrumb.d.ts +27 -0
- package/dist/Breadcrumb/context.d.ts +10 -0
- package/dist/Breadcrumb/index.d.ts +2 -0
- package/dist/Dialogs/AlertDialog/typings.d.ts +2 -2
- package/dist/Dialogs/Dialog/typings.d.ts +17 -13
- package/dist/DropdownMenu/typings.d.ts +1 -0
- package/dist/DropdownSelect/DropdownSelect.d.ts +58 -0
- package/dist/DropdownSelect/index.d.ts +2 -0
- package/dist/Popover/typings.d.ts +7 -5
- package/dist/blocks.js +1016 -876
- package/dist/blocks.js.map +1 -1
- package/dist/blocks.umd.cjs +2 -2
- package/dist/blocks.umd.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/style.css +1 -1
- package/dist/utils.d.ts +6 -0
- package/package.json +2 -1
package/dist/blocks.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(p,
|
|
1
|
+
(function(p,Y){typeof exports=="object"&&typeof module<"u"?Y(exports,require("@radix-ui/themes/styles.css"),require("@radix-ui/colors"),require("@radix-ui/react-icons"),require("@radix-ui/themes"),require("react/jsx-runtime"),require("react"),require("react-responsive"),require("@radix-ui/react-dialog"),require("re-resizable"),require("@radix-ui/react-dismissable-layer"),require("react-transition-group"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toolbar"),require("@radix-ui/react-toast"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","@radix-ui/themes/styles.css","@radix-ui/colors","@radix-ui/react-icons","@radix-ui/themes","react/jsx-runtime","react","react-responsive","@radix-ui/react-dialog","re-resizable","@radix-ui/react-dismissable-layer","react-transition-group","@radix-ui/react-toggle-group","@radix-ui/react-toolbar","@radix-ui/react-toast","react-dom"],Y):(p=typeof globalThis<"u"?globalThis:p||self,Y(p.blocks={},null,p.colors,p.reactIcons,p.themes,p.jsxRuntime,p.React,p.reactResponsive,p.RadixDialogPrimitive,p.reResizable,p.reactDismissableLayer,p.reactTransitionGroup,p.reactToggleGroup,p.reactToolbar,p.RadixToast,p.reactDom))})(this,function(p,Y,me,D,a,i,e,V,Je,Z,Re,le,ye,en,se,nn){"use strict";function _e(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(r,o,t.get?t:{enumerable:!0,get:()=>n[o]})}}return r.default=n,Object.freeze(r)}const J=_e(Je),K=_e(se);function tn(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var we={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
5
|
-
*/(function(e){(function(){var r={}.hasOwnProperty;function o(){for(var t=[],l=0;l<arguments.length;l++){var i=arguments[l];if(i){var a=typeof i;if(a==="string"||a==="number")t.push(i);else if(Array.isArray(i)){if(i.length){var c=o.apply(null,i);c&&t.push(c)}}else if(a==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){t.push(i.toString());continue}for(var f in i)r.call(i,f)&&i[f]&&t.push(f)}}}return t.join(" ")}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(ye);var nn=ye.exports;const w=en(nn);function z(e,r){return n.useMemo(()=>{if(e!==void 0)if(typeof e=="object"){if(!("initial"in e))throw new Error("Expected initial property to be set in Responsive object");return Object.fromEntries(Object.entries(e).map(([o,t])=>[o,r[t]]))}else return r[e]},[r,e])}const tn={success:"green",danger:"red",info:"gray"},P=e=>{const r=u.useThemeContext();if(e)return e==="primary"?r.accentColor:tn[e]},on=()=>{const[e,r]=n.useState("initial"),[o,t]=n.useState("initial"),l=V.useMediaQuery({minWidth:"520px"}),i=V.useMediaQuery({minWidth:"768px"}),a=V.useMediaQuery({minWidth:"1024px"}),c=V.useMediaQuery({minWidth:"1280px"}),f=V.useMediaQuery({minWidth:"1640px"});return n.useLayoutEffect(()=>{t(d=>(r(d),f?"xl":c?"lg":a?"md":i?"sm":l?"xs":"initial"))},[c,a,i,f,l]),{size:o,prevSize:e,xs:l,sm:i,md:a,lg:c,xl:f}},_e=(e,r,o)=>{const[t,l]=n.useState([]),[i,a]=n.useState(!0),c=n.useCallback(g=>{const{repeat:h,key:v}=g;a(!0),!(h||t.includes(v))&&l(C=>[...C,v])},[t]),f=n.useCallback(g=>{const{key:h}=g;a(!1),t.includes(h)&&l(v=>{const C=[...v];return C.splice(v.indexOf(h),1),C})},[t]);n.useEffect(()=>(r||document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0)}),[r,c]),n.useEffect(()=>(r||document.addEventListener("keyup",f,!0),()=>{document.removeEventListener("keyup",f,!0)}),[r,f]);const d=n.useMemo(()=>!r&&i&&t.length===e.length&&t.every(g=>e.includes(g)),[r,i,t,e]);return n.useEffect(()=>{d&&o()},[d,o]),d},rn=n.forwardRef(function({className:r,severity:o="primary",color:t,children:l,...i},a){const c=P(o);return s.jsx(u.Badge,{className:w("overmap-badge",r),ref:a,color:t||c,...i,children:l})}),sn=n.memo(rn),U={fluid:"_fluid_r73gr_1",hoverSpin90Clockwise:"_hoverSpin90Clockwise_r73gr_15",hoverSpin180Clockwise:"_hoverSpin180Clockwise_r73gr_25",hoverSpin360Clockwise:"_hoverSpin360Clockwise_r73gr_35"},we={spin90Clockwise:U.hoverSpin90Clockwise,spin180Clockwise:U.hoverSpin180Clockwise,spin360Clockwise:U.hoverSpin360Clockwise},ln={role:"button",tabIndex:0,onKeyDown:e=>{(e.key==="Enter"||e.key===" ")&&e.currentTarget.click()}},j={small:"1",medium:"2",large:"3"},Se=n.createContext({}),le=()=>n.useContext(Se),cn=n.forwardRef(function(r,o){const t=le(),{className:l,type:i="button",fluid:a=t.fluid??!1,size:c=t.size??"medium",severity:f=t.severity??"primary",hoverEffects:d=t.hoverEffects??[],variant:g=t.variant,shortcut:h={keys:[],action:()=>{},disabled:!1},...v}=r,C=P(f),b=d.map(y=>we[y]);return _e(h.keys,h.disabled||h.keys.length===0,h.action),s.jsx(u.Button,{ref:o,type:i,className:w(l,b,{[U.fluid]:a}),color:C,size:z(c,j),variant:g,...v})}),K=n.memo(cn),an=n.forwardRef(function(r,o){const t=le(),{className:l,children:i,type:a="button",fluid:c=t.fluid??!1,size:f=t.size??"medium",severity:d=t.severity??"primary",hoverEffects:g=t.hoverEffects??[],variant:h=t.variant,shortcut:v={keys:[],action:()=>{},disabled:!1},...C}=r,b=P(d),y=(g==null?void 0:g.map(m=>we[m]))||[];return _e(v.keys,v.disabled||v.keys.length===0,v.action),s.jsx(u.IconButton,{className:w(l,y,{[U.fluid]:c}),ref:o,color:b,size:z(f,j),variant:h,type:a,...C,children:i})}),ce=n.memo(an),un={merged:"_merged_wdgxo_1"},dn={row:{small:"4",medium:"4",large:"5"},column:{small:"2",medium:"3",large:"4"}},fn=n.forwardRef(function({className:r,merged:o=!1,children:t,gap:l,direction:i="row",severity:a,size:c="medium",variant:f,hoverEffects:d,fluid:g,...h},v){const C=z(c,dn[i]),b=f==="ghost"?C:"0";return s.jsx(u.Flex,{className:w("overmap-button-group",r,{[un.merged]:o}),ref:v,gap:o?l??b:l??"2",direction:i,"data-direction":i,...h,children:s.jsx(Se.Provider,{value:{size:c,severity:a,variant:f,hoverEffects:d,fluid:g},children:t})})}),ae=n.memo(fn),pn={separators:"_separators_1f7v1_1"},hn=n.memo(n.forwardRef((e,r)=>{const{children:o,border:t,before:l,after:i,size:a}=e,c=t?"surface":"ghost",f=z(a,j),d=l&&i?s.jsx(u.Inset,{side:"x",pt:"current",pb:"current",children:o}):l?s.jsx(u.Inset,{side:"bottom",pt:"current",children:o}):i?s.jsx(u.Inset,{side:"top",pb:"current",children:o}):s.jsx(u.Inset,{children:o}),g=s.jsxs(u.Card,{ref:r,size:f,variant:c,children:[l,d,i]});return c==="ghost"?s.jsx(u.Box,{p:"3",children:g}):g})),gn=n.memo(n.forwardRef((e,r)=>{const{children:o,variant:t="outline",size:l,className:i,...a}=e,c=t==="outline"||t==="surface",f=t==="outline"?"ghost":t==="surface"?"soft":t;return s.jsx(hn,{...a,border:c,size:l,children:s.jsx(ae,{size:l,severity:"info",variant:f,className:w(i,pn.separators),merged:!0,gap:"0",direction:"column",ref:r,children:o})})})),bn=n.memo(n.forwardRef((e,r)=>{const{variant:o}=le(),t=s.jsx(K,{ref:r,...e,radius:"large",variant:o});return o==="ghost"?s.jsx(u.Box,{asChild:!0,my:"1",mx:"2",children:t}):t})),Cn={Root:gn,Item:bn},vn=n.memo(function(r){const{title:o,description:t,content:l,closeDialog:i}=r;return s.jsxs(u.Flex,{direction:"column",gap:"2",children:[s.jsxs(u.Flex,{direction:"column",gap:"1",children:[s.jsxs(u.Flex,{justify:"between",children:[s.jsx(u.Dialog.Title,{mb:"0",children:o}),s.jsx(u.Dialog.Close,{children:s.jsx(u.IconButton,{color:"gray",variant:"ghost","aria-label":"Close",children:s.jsx(D.Cross1Icon,{})})})]}),t&&s.jsx(u.Dialog.Description,{children:t})]}),l(i)]})}),mn=n.memo(n.forwardRef((e,r)=>{const{children:o,content:t,title:l,description:i,onOpen:a,defaultOpen:c,onCloseInterrupt:f,open:d,onOpenChange:g,...h}=e,[v,C]=n.useState(c??!1),b=d??v;if((f||a)&&g)throw new Error("Neither the `onCloseInterrupt` nor `onOpen` props can be used with `onOpenChange`.");if(d!==void 0&&g===void 0)throw new Error("The `open` prop requires the `onOpenChange` prop.");const y=n.useCallback(_=>{if(g)return g(_);if(_&&a)a();else if(!_&&f)return f(()=>C(!1));C(_)},[g,a,f]),m=n.useCallback(_=>{if(_!=null&&_.force)return C(!1);y(!1)},[y]);return s.jsxs(u.Dialog.Root,{open:b,onOpenChange:y,children:[s.jsx(u.Dialog.Trigger,{children:o}),s.jsx(u.Dialog.Content,{ref:r,...h,children:s.jsx(vn,{closeDialog:m,content:t,title:l,description:i})})]})})),xe=e=>s.jsx(u.AlertDialog.Title,{mb:"0",...e}),yn=e=>{const{title:r,description:o,actionText:t="Confirm",cancelText:l="Cancel",onAction:i,onCancel:a,severity:c}=e;return s.jsxs(u.Flex,{direction:"column",gap:"2",children:[s.jsxs(u.Flex,{direction:"column",gap:"1",children:[s.jsx(xe,{children:r}),s.jsx(u.AlertDialog.Description,{children:o})]}),s.jsxs(u.Flex,{gap:"3",mt:"4",justify:"end",children:[s.jsx(u.AlertDialog.Cancel,{children:s.jsx(K,{variant:"soft",severity:"info",onClick:a,children:l})}),s.jsx(u.AlertDialog.Action,{children:s.jsx(K,{variant:"solid",severity:c,onClick:i,children:t})})]})]})},$e=n.memo(function(r){const{open:o,setOpen:t,children:l,...i}=r,a=n.useMemo(()=>({close:()=>t(!1),Title:xe,Description:u.AlertDialog.Description}),[t]);return s.jsxs(u.AlertDialog.Root,{open:o,onOpenChange:t,children:[s.jsx(u.AlertDialog.Content,{children:"content"in i?i.content(a):s.jsx(yn,{...i})}),l]})}),ue=n.createContext(()=>{throw new Error("No AlertDialogProvider found")}),_n={content:()=>null},wn=n.memo(function({children:r}){const[o,t]=n.useState(!1),[l,i]=n.useState(_n),a=n.useCallback(c=>{if(o)throw new Error("AlertDialog is already open");i(c),t(!0)},[o]);return s.jsx($e,{open:o,setOpen:t,...l,children:s.jsx(ue.Provider,{value:a,children:r})})}),Pe=()=>n.useContext(ue),Sn=()=>{const e=Pe();return n.useCallback(r=>e({title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",actionText:"Discard",severity:"danger",onAction:r.onDiscard,onCancel:r.onCancel}),[e])},de={zeroMinWidth:"_zeroMinWidth_curjh_1",zeroMinHeight:"_zeroMinHeight_curjh_5",radius:"_radius_curjh_9"},Z=n.memo(n.forwardRef(({className:e,radius:r=!1,children:o,zeroMinWidth:t=!1,zeroMinHeight:l=!1,...i},a)=>s.jsx(u.Flex,{className:w(e,{[de.radius]:r,[de.zeroMinWidth]:t,[de.zeroMinHeight]:l}),ref:a,...i,children:o}))),xn=n.memo(function({severity:r,itemContent:o,closeOnSelect:t=!0,onSelect:l,...i}){const a=P(r),c=n.useCallback(f=>{t||f.preventDefault(),l&&l(f)},[t,l]);return s.jsx(u.DropdownMenu.Item,{onSelect:c,color:a,...i,children:o})}),$n=n.memo(function({defaultOpen:r,open:o,onOpenChange:t,modal:l,trigger:i,label:a,severity:c="info",children:f,...d}){const g=P(c);return s.jsxs(u.DropdownMenu.Root,{defaultOpen:r,open:o,onOpenChange:t,modal:l,children:[s.jsx(u.DropdownMenu.Trigger,{children:i}),s.jsxs(u.DropdownMenu.Content,{color:g,...d,children:[a&&s.jsx(u.DropdownMenu.Label,{children:a}),f]})]})}),Pn=n.memo(function({separatorBelow:r=!1,separatorAbove:o=!1,children:t,...l}){return s.jsxs(s.Fragment,{children:[o&&s.jsx(u.DropdownMenu.Separator,{}),s.jsx(u.DropdownMenu.Group,{...l,children:t}),r&&s.jsx(u.DropdownMenu.Separator,{})]})}),kn=n.memo(function({defaultOpen:r,open:o,onOpenChange:t,trigger:l,children:i,...a}){return s.jsxs(u.DropdownMenu.Sub,{defaultOpen:r,open:o,onOpenChange:t,children:[s.jsx(u.DropdownMenu.SubTrigger,{children:l}),s.jsx(u.DropdownMenu.SubContent,{...a,children:i})]})}),On={Root:$n,ItemGroup:Pn,Item:xn,SubMenu:kn},ke=n.memo(function({children:r}){const[o,t]=n.useState(!1),l=n.useCallback(()=>{t(!0)},[]),i=n.useCallback(()=>{t(!1)},[]);return r({isHovered:o,onPointerEnter:l,onPointerLeave:i})}),Oe={fluid:"_fluid_7n1wr_1"},Tn=n.forwardRef(function({className:r,fluid:o,size:t="medium",variant:l="surface",severity:i="primary",itemSeverity:a="info",placeholder:c="Select",side:f,items:d=[],value:g,id:h,...v},C){const b=z(t,j),y=P(i),m=P(a);return n.createElement(u.Select.Root,{size:b,...v,key:g===void 0?1:0,value:g},s.jsx(u.Select.Trigger,{className:w(r,{[Oe.fluid]:o}),id:h,ref:C,variant:l,placeholder:c,color:y}),s.jsx(u.Select.Content,{side:f,className:Oe.contentDefault,position:"popper",variant:l!=="surface"?"soft":"solid",color:m,children:d.map(({itemContent:_,value:S,...x})=>s.jsx(u.Select.Item,{className:"overmap-select-item",value:S,...x,children:_},S))}))}),Dn=n.memo(Tn),Te=n.memo(n.forwardRef((e,r)=>{const{checked:o,label:t,value:l,size:i="2"}=e;return s.jsx(u.Box,{asChild:!0,px:i,children:s.jsx(u.Select.Item,{value:l,ref:r,children:s.jsxs(u.Flex,{gap:i,align:"center",children:[s.jsx(u.Checkbox,{checked:o}),t]})})})})),J="__select_all__",Nn=n.memo(n.forwardRef((e,r)=>{const[o,t]=n.useState(!1),{placeholder:l,value:i,onValueChange:a,options:c,disabled:f,name:d,...g}=e,h=z(e.size,j),v=P(e.severity),C=n.useMemo(()=>new Map(c.map(S=>[S.value,S.label])),[c]),b=i.length>4?`${i.length} options selected`:s.jsx("span",{children:i.flatMap(S=>[C.get(S),", "]).slice(0,-1)}),y=n.useCallback(()=>t(!1),[]),m=n.useCallback(S=>{S&&t(!0)},[]),_=n.useCallback(S=>{let x;S===J?x=i.length===c.length?[]:c.map(q=>q.value):x=i.includes(S)?i.filter(k=>k!==S):[...i,S],a(x)},[a,c,i]);return n.useEffect(()=>{if(c.some(({value:S})=>S===J))throw new Error(`Cannot have an option with the value "${J}"`)},[c]),s.jsxs(u.Select.Root,{open:o,value:"",onOpenChange:m,onValueChange:_,disabled:f,size:h,name:d,autoComplete:"off",children:[s.jsx(u.Select.Trigger,{ref:r,color:v,placeholder:i.length>0?b:l,"data-placeholder":i.length>0?void 0:!0,...g}),s.jsxs(u.Select.Content,{color:"gray",variant:"soft",position:"popper",onEscapeKeyDown:y,onPointerDownOutside:y,children:[s.jsx(Te,{value:J,label:"Select all",checked:i.length===c.length,size:h}),c.map(S=>s.jsx(Te,{...S,checked:i.includes(S.value),size:h},S.value))]})]})})),En={default:"_default_u936h_1"},An=n.forwardRef(function({className:r,severity:o="primary",icon:t,defaultChecked:l=!1,onCheckedChange:i,...a},c){const f=n.useRef(null),[d,g]=n.useState(a.checked?a.checked:l),[h,v]=n.useState(),C=P(o);n.useLayoutEffect(()=>{var _;const m=c||f;"current"in m&&m.current&&v((_=m.current)==null?void 0:_.querySelector("span.rt-SwitchThumb"))},[c]);const b=n.useCallback(m=>{g(m),i&&i(m)},[i]),y=a.checked?a.checked:d;return s.jsxs(s.Fragment,{children:[s.jsx(u.Switch,{className:w("overmap-switch",r,En.default),ref:c||f,color:C,radius:"full",defaultChecked:l,onCheckedChange:b,...a}),s.jsx(u.Portal,{container:h,asChild:!0,children:t&&"checked"in t?y?t.checked:t.unchecked:t})]})}),zn=n.memo(An),L={sidebarContent:"_sidebarContent_1onyo_1",right:"_right_1onyo_7",resizeHandle:"_resizeHandle_1onyo_10",left:"_left_1onyo_13",overlay:"_overlay_1onyo_33"},Mn={width:"auto",height:"100%"},In=n.forwardRef(function({side:r="left",modal:o=!0,children:t,open:l,containerSelector:i,overlay:a=!0,resizable:c=!0,minWidth:f="300px",maxWidth:d="500px",...g},h){const v=r==="right",C=r==="left",[b,y]=n.useState();return n.useEffect(()=>{const m=i??'[data-is-root-theme="true"]',_=document.querySelector(m);if(_===void 0)throw new Error(`Could not find a container element using the following selector ${m}`);y(_)},[i]),s.jsx(Y.Root,{open:l,modal:o,children:s.jsxs(Y.Portal,{container:b,children:[a&&s.jsx(Y.Overlay,{className:w(L.overlay)}),s.jsx(Y.Content,{className:w("overmap-sidebar","rt-DialogContent",L.sidebarContent,{[L.left]:C,[L.right]:v}),ref:h,asChild:!0,...g,children:s.jsx(u.Box,{width:"auto",children:s.jsx(Q.Resizable,{minWidth:f,maxWidth:d,defaultSize:Mn,enable:{right:c&&C,left:c&&v},handleClasses:{left:L.resizeHandle,right:L.resizeHandle},handleComponent:{right:s.jsx(D.DragHandleDots2Icon,{}),left:s.jsx(D.DragHandleDots2Icon,{})},children:t})})})]})})}),Bn=n.memo(In),E={outerContent:"_outerContent_1iy9c_1",enter:"_enter_1iy9c_4",right:"_right_1iy9c_4",left:"_left_1iy9c_8",enterActive:"_enterActive_1iy9c_12",exitActive:"_exitActive_1iy9c_22",exitDone:"_exitDone_1iy9c_32",resizable:"_resizable_1iy9c_41",slideOutOverlay:"_slideOutOverlay_1iy9c_47"},jn=200,Ln=n.memo(function({className:r,open:o,side:t="left",children:l,minWidth:i,maxWidth:a,resizable:c=!0,overlay:f=!1,modal:d=!1,resizeHandle:g,position:h="absolute",...v}){const C=n.useRef(null),[b,y]=n.useState(i),m=t==="left",_=t==="right",S=n.useCallback((x,k,q,Ue)=>{y(q.clientWidth),C.current&&(C.current.style.width=`${q.clientWidth}px`)},[]);return s.jsx(ie.CSSTransition,{in:o,classNames:{enter:E.enter,enterActive:E.enterActive,exitActive:E.exitActive,exitDone:E.exitDone},timeout:jn,nodeRef:C,unmountOnExit:!0,mountOnEnter:!0,children:s.jsxs(s.Fragment,{children:[f&&s.jsx("div",{className:w("overamp-slide-out-overlay",E.slideOutOverlay)}),s.jsx(Ze.DismissableLayer,{disableOutsidePointerEvents:d,asChild:!0,...v,children:s.jsx(u.Flex,{className:w("overmap-slide-out",r,E.outerContent,{[E.left]:m,[E.right]:_}),style:{"--slide-out-width":`${b}px`},height:"100%",width:"auto",position:h,top:"0",bottom:"0",left:m?"0":void 0,right:_?"0":void 0,ref:C,children:s.jsx(Q.Resizable,{className:E.resizable,defaultSize:{width:b,height:"100%"},onResize:S,enable:{right:c&&m,left:c&&_},handleComponent:{left:g,right:g},minWidth:i,maxWidth:a,children:l})})})]})})}),F={accommodateCharCount:"_accommodateCharCount_sr18k_1",wrapper:"_wrapper_sr18k_5",default:"_default_sr18k_9",noLeftIcon:"_noLeftIcon_sr18k_13",noRightIcon:"_noRightIcon_sr18k_17",charCount:"_charCount_sr18k_21"},Fn=n.forwardRef(function({className:r,leftSlot:o,rightSlot:t,size:l="medium",showInputLength:i,value:a,variant:c,severity:f="primary",...d},g){const h=z(l,j),v=P(f),C=i||i===void 0&&d.maxLength!==void 0,b=a!==void 0?a.toString():void 0;return s.jsxs(u.TextField.Root,{className:w(F.wrapper,{[F.accommodateCharCount]:C}),size:h,variant:c,color:v,children:[o&&s.jsx(u.TextField.Slot,{children:o}),s.jsx(u.TextField.Input,{className:w(F.default,r,{[F.noLeftIcon]:!o,[F.noRightIcon]:!t}),ref:g,size:h,variant:c,color:v,...d}),t&&s.jsx(u.TextField.Slot,{children:t}),C&&s.jsx(u.Text,{as:"p",className:F.charCount,size:"1",color:"gray",children:d.maxLength!==void 0?`${b==null?void 0:b.length}/${d.maxLength}`:`${b==null?void 0:b.length}`})]})}),Hn=n.memo(Fn),Wn={wrapper:"_wrapper_tmtz0_1"},qn=n.forwardRef(function({className:r,defaultOpen:o=!1,modal:t=!1,content:l,children:i,...a},c){return s.jsxs(u.Popover.Root,{defaultOpen:o,modal:t,children:[s.jsx(u.Popover.Trigger,{children:i}),s.jsx(u.Popover.Content,{ref:c,className:w("overmap-popover",r,Wn.wrapper),...a,children:l(u.Popover.Close)})]})}),De=n.memo(qn),O={wrapper:"_wrapper_1ssf2_1",panelContent:"_panelContent_1ssf2_6",left:"_left_1ssf2_14",right:"_right_1ssf2_18",resizable:"_resizable_1ssf2_23",resizeHandle:"_resizeHandle_1ssf2_28",panelMainContent:"_panelMainContent_1ssf2_48"},Ne=200,M=150,Vn=n.memo(function({children:r,showLeft:o,leftPanel:t,leftMinWidth:l=Ne,showRight:i,rightPanel:a,rightMinWidth:c=Ne,resizeable:f}){const d=n.useRef(null),g=n.useRef(null),[h,v]=n.useState(0),[C,b]=n.useState(),y=n.useRef(null),[m,_]=n.useState(0),[S,x]=n.useState(),k=n.useCallback(($,T,N)=>(A,Xe,Qe,be)=>{if(!d.current)return;const te=$+be.width;N(d.current.clientWidth-te),T(()=>te)},[]),q=n.useCallback(($,T,N,A)=>k(h,v,x)($,T,N,A),[k,h]),Ue=n.useCallback(($,T,N,A)=>k(m,_,b)($,T,N,A),[k,m]),ee=n.useCallback(($,T,N,A,Xe,Qe,be,te)=>{if(!d.current)return;let oe=$;if(oe===0&&(oe=T,N(oe)),Qe){const re=d.current.clientWidth-oe;te(re),Xe>re&&(be(re),A(d.current.clientWidth-re))}},[]),jt=n.useCallback(()=>ee(m,c,_,x,h,o,v,b),[ee,h,c,m,o]),Lt=n.useCallback(()=>ee(h,l,v,b,m,i,_,x),[ee,l,h,m,i]),ne=n.useCallback(($,T)=>{d.current&&$&&T(d.current.clientWidth)},[]),Ft=n.useCallback(()=>ne(o,b),[ne,o]),Ht=n.useCallback(()=>ne(i,x),[ne,i]),Ke=n.useCallback(()=>{var $,T,N,A;d.current&&(b(d.current.clientWidth-((($=y.current)==null?void 0:$.clientWidth)||0)),x(d.current.clientWidth-(((T=g.current)==null?void 0:T.clientWidth)||0)),v(((N=g.current)==null?void 0:N.clientWidth)||0),_(((A=y.current)==null?void 0:A.clientWidth)||0))},[]);n.useEffect(()=>{if(!d.current)return;const $=new ResizeObserver(Ke);return $.observe(d.current),()=>{$.disconnect()}},[Ke]);const Wt=n.useMemo(()=>({entering:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginRight:0,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[h]),qt=n.useMemo(()=>({entering:{transform:`translateX(${m}px)`,marginLeft:`${-m}px`,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginLeft:0,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(${m}px)`,marginLeft:`${-m}px`,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[m]);return s.jsxs(u.Flex,{className:O.wrapper,style:{minWidth:`${l+c}px`},ref:d,width:"100%",height:"100%",justify:"center",m:"0",p:"0",children:[s.jsx(ie.Transition,{nodeRef:g,timeout:o?0:M,in:o,unmountOnExit:!0,onEntering:Lt,onExited:Ht,children:$=>s.jsx(u.Box,{ref:g,className:w(O.panelContent,O.left),style:Wt[$],width:"auto",height:"100%",m:"0",p:"0",children:s.jsx(Q.Resizable,{className:O.resizable,size:{width:h,height:"100%"},onResizeStop:q,enable:{right:(f==null?void 0:f.left)!==void 0?f.left:!0},minWidth:l,maxWidth:C,handleClasses:{right:w(O.resizeHandle,O.left)},handleComponent:{right:s.jsx(D.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:t})})}),s.jsx("div",{className:O.panelMainContent,children:r}),s.jsx(ie.Transition,{nodeRef:y,timeout:i?0:M,in:i,unmountOnExit:!0,onEntering:jt,onExited:Ft,children:$=>s.jsx(u.Box,{ref:y,className:w(O.panelContent,O.right),style:qt[$],width:"auto",height:"100%",m:"0",p:"0",children:s.jsx(Q.Resizable,{className:O.resizable,size:{width:m,height:"100%"},onResizeStop:Ue,enable:{left:(f==null?void 0:f.right)!==void 0?f.right:!0},minWidth:c,maxWidth:S,handleClasses:{left:w(O.resizeHandle,O.right)},handleComponent:{left:s.jsx(D.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:a})})})]})}),H={multiPagePopover:"_multiPagePopover_1w3ey_1",light:"_light_1w3ey_15",dark:"_dark_1w3ey_20",pageTitle:"_pageTitle_1w3ey_28",buttonContainer:"_buttonContainer_1w3ey_33",optionsButtonContainer:"_optionsButtonContainer_1w3ey_38",optionsButton:"_optionsButton_1w3ey_38"};function Ee(e,r,o,t=0){if(!e.options)return e.content||s.jsx(s.Fragment,{});const l=e.options.map((i,a)=>s.jsx(K,{className:w(H.optionsButton,i.buttonClassName),variant:"ghost",radius:"large",style:{width:o==="vertical"?"100%":"auto"},onClick:i.onClick||(()=>r(Ee(i.page||{},r,o,t+1))),children:i.label},`${i.value}-page-${t}-button-${a}`));return s.jsxs(s.Fragment,{children:[e.title&&s.jsx("div",{className:H.pageTitle,children:e.title}),e.content,s.jsx("div",{className:w(H.optionsButtonContainer,e.buttonsContainerClassName),style:{flexDirection:o==="vertical"?"column":"row"},children:l})]})}const Gn=n.forwardRef(function({page:r,className:o,direction:t="vertical",color:l="light",...i},a){const[c,f]=n.useState(void 0),d=n.useCallback(()=>{f(Ee(r,f,t,0))},[t,r]);n.useEffect(()=>{d()},[d]);const g=n.useCallback(h=>c,[c]);return s.jsx(De,{className:w(H.multiPagePopover,l==="light"?H.light:H.dark,o),content:g,ref:a,...i,onCloseAutoFocus:d})}),Un=n.memo(Gn),Kn={charCount:"_charCount_17uut_1"},Xn=n.forwardRef(function({className:r,showInputLength:o,inputLengthTemplate:t,value:l,severity:i="primary",resize:a,...c},f){const d=P(i),g=P("info"),h=o||o===void 0&&(c.maxLength!==void 0||c.minLength!==void 0),v=l!==void 0?l.toString():"",C=n.useMemo(()=>{if(t){let b=t.replace("{current}",v.length.toString());return c.minLength!==void 0&&(b=b.replace("{min}",c.minLength.toString())),c.maxLength!==void 0&&(b=b.replace("{max}",c.maxLength.toString())),b}return v.length},[t,c.maxLength,c.minLength,v.length]);return s.jsxs(s.Fragment,{children:[s.jsx(u.TextArea,{className:w("overmap-textarea",r),style:{resize:a},ref:f,value:l,color:d,...c}),h&&s.jsx(u.Text,{as:"p",className:Kn.charCount,color:g,align:"right",children:C})]})}),Qn=n.memo(Xn),Yn=n.forwardRef(function({loop:r,type:o,rovingFocus:t,value:l,onValueChange:i,defaultValue:a,disabled:c,items:f,className:d,direction:g="row",...h},v){return s.jsx(ve.Root,{type:o,className:w("overmap-toggle-group",d),ref:v,value:l,onValueChange:i,disabled:c,orientation:g==="column"?"vertical":"horizontal",loop:r,rovingFocus:t,defaultValue:a,asChild:!0,children:s.jsx(ae,{direction:g,...h,children:f.map(({children:C,...b})=>n.createElement(ve.Item,{asChild:!0,...b,key:b.value},s.jsx(ce,{className:w("overmap-toggle-group-button"),"aria-label":b.value,variant:b.value===l?"solid":"soft",children:C})))})})}),Zn=n.memo(Yn),Jn={default:"_default_xqvoc_1"},Ae=n.memo(n.forwardRef(({className:e,minContentGap:r="2",children:o,...t},l)=>s.jsx(Je.Root,{className:w(e,"overmap-toolbar",Jn.default),ref:l,asChild:!0,...t,children:s.jsx(Z,{grow:"1",width:"100%",height:"max-content",align:"center",gap:r,wrap:"nowrap",children:o})}))),Rn=n.memo(n.forwardRef(({children:e,gap:r="2"},o)=>s.jsx(Z,{ref:o,grow:"1",width:"max-content",height:"100%",align:"center",gap:r,children:e}))),et=n.memo(n.forwardRef(({children:e,gap:r},o)=>s.jsx(Z,{ref:o,grow:"1",width:"max-content",direction:"row-reverse",height:"100%",align:"center",gap:r||"2",children:e}))),nt={Root:Ae,LeftContent:Rn,RightContent:et},fe={ToastViewport:"_ToastViewport_1i6bp_1",actionButton:"_actionButton_1i6bp_20",ToastRoot:"_ToastRoot_1i6bp_24",slideIn:"_slideIn_1i6bp_1",swipeOut:"_swipeOut_1i6bp_1"},tt=n.forwardRef(function({title:r,description:o,icon:t,severity:l="primary",size:i,onClose:a,sensitivity:c,action:f,...d},g){const[h,v]=n.useState(!0),C=P(l),b=n.useCallback(y=>{!y&&a&&a(),v(y)},[a]);return s.jsx(G.Root,{asChild:!0,ref:g,...d,open:h,type:c,onOpenChange:b,children:s.jsx(u.Callout.Root,{className:fe.ToastRoot,variant:"surface",color:C,size:i,children:s.jsxs(u.Flex,{width:"100%",align:"center",gap:"4",justify:"between",children:[s.jsxs(u.Flex,{align:"center",gap:"3",children:[s.jsx(u.Callout.Icon,{children:t}),s.jsxs(u.Flex,{direction:"column",gap:"2",children:[s.jsxs(u.Flex,{direction:"column",gap:"0",children:[s.jsx(G.Title,{asChild:!0,children:s.jsx(u.Callout.Text,{size:"3",weight:"medium",children:r})}),s.jsx(G.Description,{asChild:!0,children:s.jsx(u.Callout.Text,{children:o})})]}),f&&s.jsx(G.Action,{className:fe.actionButton,altText:f.altText,asChild:!0,children:f.content})]})]}),s.jsx(G.Close,{asChild:!0,children:s.jsx(ce,{"aria-label":"Close",variant:"ghost",severity:l,children:s.jsx(D.Cross2Icon,{})})})]})})})}),ze=n.memo(tt),pe=n.createContext({}),ot=()=>{const e=n.useContext(pe);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},rt=240/60,Me=5e3,it=e=>{if(e.duration&&e.duration>=Me)return e.duration;const r=e.severity==="danger"?1.5:1,o=e.description.split(" ").length+e.title.split(" ").length;return(Me+o/rt)*r};p.unsafeShowToast=void 0;const st=n.memo(function({children:r,className:o,hotkey:t,...l}){const[i,a]=n.useState([]),c=n.useCallback((d,g,h)=>{a(v=>{const C=v.find(b=>b.id===d);return C&&g===0&&clearTimeout(C.timeout),v.filter(b=>b.id!==d)}),h&&h()},[]),f=n.useMemo(()=>{let d=0;const g=y=>{const m=it(y),_=d.toString();d+=1;const S=setTimeout(()=>c(_,1,y.onClose),m);a(x=>[...x,{...y,timeout:S,duration:m,id:_}])},h=y=>g({...y,severity:"primary"}),v=y=>g({...y,severity:"success"}),C=y=>g({...y,severity:"danger"}),b=y=>g({...y,severity:"info"});return p.unsafeShowToast=g,{showToast:g,showPrimary:h,showSuccess:v,showError:C,showInfo:b}},[c]);return n.useEffect(()=>()=>{for(const{timeout:d}of i)clearTimeout(d)},[]),s.jsx(pe.Provider,{value:f,children:s.jsxs(se.ToastProvider,{...l,children:[r,s.jsx(se.ToastViewport,{className:w(o,fe.ToastViewport),hotkey:t}),i.map(({id:d,onClose:g,...h})=>s.jsx(ze,{...h,onClose:()=>c(d,0,g)},d))]})})}),lt={default:"_default_1odpt_1"},ct=n.memo(n.forwardRef(({className:e,children:r,content:o,...t},l)=>s.jsx(u.Tooltip,{className:w("overmap-tooltip",e,lt.default),ref:l,content:s.jsx(u.Flex,{align:"center",gap:"1",width:"max-content",height:"max-content",justify:"center",children:o}),...t,children:r}))),at={noWrap:"_noWrap_1wpa5_1"},ut=n.memo(n.forwardRef(({className:e,noWrap:r,severity:o,as:t,...l},i)=>{const a=P(o);return s.jsx(u.Text,{ref:i,as:t,className:w(e,{[at.noWrap]:r}),color:a,...l})})),qo="",dt=n.memo(n.forwardRef((e,r)=>{const{panelBackground:o="solid",radius:t="full",...l}=e;return s.jsx(u.Theme,{panelBackground:o,radius:t,ref:r,...l})})),ft={1:"max-content",2:"max-content",3:"max-content",4:"100%"},pt=n.forwardRef(function({severity:r="info",weight:o="light",gap:t="1",text:l,orientation:i="horizontal",size:a,...c},f){const d=z(a,ft),g=P(r);return s.jsxs(u.Flex,{ref:f,width:i==="horizontal"?d:"max-content",height:i==="vertical"?d:"max-content",direction:i==="vertical"?"column":"row",align:"center",gap:t,children:[s.jsx(u.Separator,{size:a,orientation:i,color:g,...c}),l&&s.jsxs(s.Fragment,{children:[s.jsx(u.Text,{as:"span",size:"1",weight:o,color:g,children:l}),s.jsx(u.Separator,{size:a,orientation:i,color:g,...c})]})]})}),ht=n.memo(pt);function I(){return I=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t])}return e},I.apply(this,arguments)}function gt(e,r){typeof e=="function"?e(r):e!=null&&(e.current=r)}function Ie(...e){return r=>e.forEach(o=>gt(o,r))}function Be(...e){return n.useCallback(Ie(...e),e)}function bt(e,r=[]){let o=[];function t(i,a){const c=n.createContext(a),f=o.length;o=[...o,a];function d(h){const{scope:v,children:C,...b}=h,y=(v==null?void 0:v[e][f])||c,m=n.useMemo(()=>b,Object.values(b));return n.createElement(y.Provider,{value:m},C)}function g(h,v){const C=(v==null?void 0:v[e][f])||c,b=n.useContext(C);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${i}\``)}return d.displayName=i+"Provider",[d,g]}const l=()=>{const i=o.map(a=>n.createContext(a));return function(c){const f=(c==null?void 0:c[e])||i;return n.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return l.scopeName=e,[t,Ct(l,...r)]}function Ct(...e){const r=e[0];if(e.length===1)return r;const o=()=>{const t=e.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(i){const a=t.reduce((c,{useScope:f,scopeName:d})=>{const h=f(i)[`__scope${d}`];return{...c,...h}},{});return n.useMemo(()=>({[`__scope${r.scopeName}`]:a}),[a])}};return o.scopeName=r.scopeName,o}function je(e,r,{checkForDefaultPrevented:o=!0}={}){return function(l){if(e==null||e(l),o===!1||!l.defaultPrevented)return r==null?void 0:r(l)}}function Le(e){const r=n.useRef(e);return n.useEffect(()=>{r.current=e}),n.useMemo(()=>(...o)=>{var t;return(t=r.current)===null||t===void 0?void 0:t.call(r,...o)},[])}function vt({prop:e,defaultProp:r,onChange:o=()=>{}}){const[t,l]=mt({defaultProp:r,onChange:o}),i=e!==void 0,a=i?e:t,c=Le(o),f=n.useCallback(d=>{if(i){const h=typeof d=="function"?d(e):d;h!==e&&c(h)}else l(d)},[i,e,l,c]);return[a,f]}function mt({defaultProp:e,onChange:r}){const o=n.useState(e),[t]=o,l=n.useRef(t),i=Le(r);return n.useEffect(()=>{l.current!==t&&(i(t),l.current=t)},[t,l,i]),o}function yt(e){const r=n.useRef({value:e,previous:e});return n.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}const he=globalThis!=null&&globalThis.document?n.useLayoutEffect:()=>{};function _t(e){const[r,o]=n.useState(void 0);return he(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const i=l[0];let a,c;if("borderBoxSize"in i){const f=i.borderBoxSize,d=Array.isArray(f)?f[0]:f;a=d.inlineSize,c=d.blockSize}else a=e.offsetWidth,c=e.offsetHeight;o({width:a,height:c})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}else o(void 0)},[e]),r}function wt(e,r){return n.useReducer((o,t)=>{const l=r[o][t];return l??o},e)}const Fe=e=>{const{present:r,children:o}=e,t=St(r),l=typeof o=="function"?o({present:t.isPresent}):n.Children.only(o),i=Be(t.ref,l.ref);return typeof o=="function"||t.isPresent?n.cloneElement(l,{ref:i}):null};Fe.displayName="Presence";function St(e){const[r,o]=n.useState(),t=n.useRef({}),l=n.useRef(e),i=n.useRef("none"),a=e?"mounted":"unmounted",[c,f]=wt(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect(()=>{const d=R(t.current);i.current=c==="mounted"?d:"none"},[c]),he(()=>{const d=t.current,g=l.current;if(g!==e){const v=i.current,C=R(d);e?f("MOUNT"):C==="none"||(d==null?void 0:d.display)==="none"?f("UNMOUNT"):f(g&&v!==C?"ANIMATION_OUT":"UNMOUNT"),l.current=e}},[e,f]),he(()=>{if(r){const d=h=>{const C=R(t.current).includes(h.animationName);h.target===r&&C&&Re.flushSync(()=>f("ANIMATION_END"))},g=h=>{h.target===r&&(i.current=R(t.current))};return r.addEventListener("animationstart",g),r.addEventListener("animationcancel",d),r.addEventListener("animationend",d),()=>{r.removeEventListener("animationstart",g),r.removeEventListener("animationcancel",d),r.removeEventListener("animationend",d)}}else f("ANIMATION_END")},[r,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:n.useCallback(d=>{d&&(t.current=getComputedStyle(d)),o(d)},[])}}function R(e){return(e==null?void 0:e.animationName)||"none"}const He=n.forwardRef((e,r)=>{const{children:o,...t}=e,l=n.Children.toArray(o),i=l.find($t);if(i){const a=i.props.children,c=l.map(f=>f===i?n.Children.count(a)>1?n.Children.only(null):n.isValidElement(a)?a.props.children:null:f);return n.createElement(ge,I({},t,{ref:r}),n.isValidElement(a)?n.cloneElement(a,void 0,c):null)}return n.createElement(ge,I({},t,{ref:r}),o)});He.displayName="Slot";const ge=n.forwardRef((e,r)=>{const{children:o,...t}=e;return n.isValidElement(o)?n.cloneElement(o,{...Pt(t,o.props),ref:r?Ie(r,o.ref):o.ref}):n.Children.count(o)>1?n.Children.only(null):null});ge.displayName="SlotClone";const xt=({children:e})=>n.createElement(n.Fragment,null,e);function $t(e){return n.isValidElement(e)&&e.type===xt}function Pt(e,r){const o={...r};for(const t in r){const l=e[t],i=r[t];/^on[A-Z]/.test(t)?l&&i?o[t]=(...c)=>{i(...c),l(...c)}:l&&(o[t]=l):t==="style"?o[t]={...l,...i}:t==="className"&&(o[t]=[l,i].filter(Boolean).join(" "))}return{...e,...o}}const We=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>{const o=n.forwardRef((t,l)=>{const{asChild:i,...a}=t,c=i?He:r;return n.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),n.createElement(c,I({},a,{ref:l}))});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),qe="Checkbox",[kt,Go]=bt(qe),[Ot,Tt]=kt(qe),Dt=n.forwardRef((e,r)=>{const{__scopeCheckbox:o,name:t,checked:l,defaultChecked:i,required:a,disabled:c,value:f="on",onCheckedChange:d,...g}=e,[h,v]=n.useState(null),C=Be(r,x=>v(x)),b=n.useRef(!1),y=h?!!h.closest("form"):!0,[m=!1,_]=vt({prop:l,defaultProp:i,onChange:d}),S=n.useRef(m);return n.useEffect(()=>{const x=h==null?void 0:h.form;if(x){const k=()=>_(S.current);return x.addEventListener("reset",k),()=>x.removeEventListener("reset",k)}},[h,_]),n.createElement(Ot,{scope:o,state:m,disabled:c},n.createElement(We.button,I({type:"button",role:"checkbox","aria-checked":B(m)?"mixed":m,"aria-required":a,"data-state":Ve(m),"data-disabled":c?"":void 0,disabled:c,value:f},g,{ref:C,onKeyDown:je(e.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:je(e.onClick,x=>{_(k=>B(k)?!0:!k),y&&(b.current=x.isPropagationStopped(),b.current||x.stopPropagation())})})),y&&n.createElement(At,{control:h,bubbles:!b.current,name:t,value:f,checked:m,required:a,disabled:c,style:{transform:"translateX(-100%)"}}))}),Nt="CheckboxIndicator",Et=n.forwardRef((e,r)=>{const{__scopeCheckbox:o,forceMount:t,...l}=e,i=Tt(Nt,o);return n.createElement(Fe,{present:t||B(i.state)||i.state===!0},n.createElement(We.span,I({"data-state":Ve(i.state),"data-disabled":i.disabled?"":void 0},l,{ref:r,style:{pointerEvents:"none",...e.style}})))}),At=e=>{const{control:r,checked:o,bubbles:t=!0,...l}=e,i=n.useRef(null),a=yt(o),c=_t(r);return n.useEffect(()=>{const f=i.current,d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(a!==o&&h){const v=new Event("click",{bubbles:t});f.indeterminate=B(o),h.call(f,B(o)?!1:o),f.dispatchEvent(v)}},[a,o,t]),n.createElement("input",I({type:"checkbox","aria-hidden":!0,defaultChecked:B(o)?!1:o},l,{tabIndex:-1,ref:i,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function B(e){return e==="indeterminate"}function Ve(e){return B(e)?"indeterminate":e?"checked":"unchecked"}const zt=Dt,Mt=Et,W={checkboxContainer:"_checkboxContainer_pb9za_5",checkbox:"_checkbox_pb9za_5",checkboxIndicator:"_checkboxIndicator_pb9za_27",checkboxLabel:"_checkboxLabel_pb9za_38",noTextHighlight:"_noTextHighlight_pb9za_42",checkboxHidden:"_checkboxHidden_pb9za_51"},It=n.forwardRef(function({className:r,labelClassName:o,label:t,checked:l,onCheckedChange:i,...a},c){const f=`c-${t}-${new Date}`;return s.jsx(ke,{children:({isHovered:d,...g})=>s.jsxs(u.Flex,{className:W.checkboxContainer,...g,children:[s.jsx(zt,{id:f,className:w(W.checkbox,!d&&!l&&W.checkboxHidden,r),checked:l,onCheckedChange:h=>{i&&i(h)},ref:c,...a,children:s.jsx(Mt,{className:W.checkboxIndicator,children:l==="indeterminate"?s.jsx(D.DividerHorizontalIcon,{width:"13px"}):s.jsx(D.CheckIcon,{})})}),t&&s.jsx("label",{className:w(W.checkboxLabel,o,W.noTextHighlight),htmlFor:f,children:t})]})})}),Ge=n.memo(It);Ge.displayName="Checkbox";const Bt=n.memo(function({className:r,labelClassName:o,label:t,onCheckedChange:l,children:i,...a}){const[c,f]=n.useState(!1),[d,g]=n.useState(Array(i.length).fill(!1)),h=C=>{const b=c==="indeterminate"||!C;g(d.map(y=>!b)),l&&l(C)};n.useEffect(()=>{const C=d.filter(b=>b).length;C===0?f(!1):C===i.length?f(!0):f("indeterminate")},[i,d]);const v=n.Children.map(i,(C,b)=>n.cloneElement(C,{...C.props,checked:!!C.props.checked||d[b],onCheckedChange:y=>{const m=[...d];m[b]=y,g(m),C.props.onCheckedChange&&C.props.onCheckedChange(y)}}));return s.jsxs(s.Fragment,{children:[s.jsx(Ge,{className:r,labelClassName:o,label:t,checked:c,onCheckedChange:h,...a}),v]})});Object.defineProperty(p,"AccessibleIcon",{enumerable:!0,get:()=>u.AccessibleIcon}),Object.defineProperty(p,"AspectRatio",{enumerable:!0,get:()=>u.AspectRatio}),Object.defineProperty(p,"Avatar",{enumerable:!0,get:()=>u.Avatar}),Object.defineProperty(p,"Blockquote",{enumerable:!0,get:()=>u.Blockquote}),Object.defineProperty(p,"Box",{enumerable:!0,get:()=>u.Box}),Object.defineProperty(p,"Callout",{enumerable:!0,get:()=>u.Callout}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>u.Card}),Object.defineProperty(p,"Checkbox",{enumerable:!0,get:()=>u.Checkbox}),Object.defineProperty(p,"Code",{enumerable:!0,get:()=>u.Code}),Object.defineProperty(p,"Container",{enumerable:!0,get:()=>u.Container}),Object.defineProperty(p,"ContextMenu",{enumerable:!0,get:()=>u.ContextMenu}),Object.defineProperty(p,"Em",{enumerable:!0,get:()=>u.Em}),Object.defineProperty(p,"Grid",{enumerable:!0,get:()=>u.Grid}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>u.Heading}),Object.defineProperty(p,"HoverCard",{enumerable:!0,get:()=>u.HoverCard}),Object.defineProperty(p,"Inset",{enumerable:!0,get:()=>u.Inset}),Object.defineProperty(p,"Kbd",{enumerable:!0,get:()=>u.Kbd}),Object.defineProperty(p,"Link",{enumerable:!0,get:()=>u.Link}),Object.defineProperty(p,"Portal",{enumerable:!0,get:()=>u.Portal}),Object.defineProperty(p,"Quote",{enumerable:!0,get:()=>u.Quote}),Object.defineProperty(p,"RadioGroup",{enumerable:!0,get:()=>u.RadioGroup}),Object.defineProperty(p,"ScrollArea",{enumerable:!0,get:()=>u.ScrollArea}),Object.defineProperty(p,"Section",{enumerable:!0,get:()=>u.Section}),Object.defineProperty(p,"Slider",{enumerable:!0,get:()=>u.Slider}),Object.defineProperty(p,"Slot",{enumerable:!0,get:()=>u.Slot}),Object.defineProperty(p,"Strong",{enumerable:!0,get:()=>u.Strong}),Object.defineProperty(p,"Table",{enumerable:!0,get:()=>u.Table}),Object.defineProperty(p,"Tabs",{enumerable:!0,get:()=>u.Tabs}),Object.defineProperty(p,"TextField",{enumerable:!0,get:()=>u.TextField}),Object.defineProperty(p,"Theme",{enumerable:!0,get:()=>u.Theme}),Object.defineProperty(p,"VisuallyHidden",{enumerable:!0,get:()=>u.VisuallyHidden}),Object.defineProperty(p,"updateThemeAppearanceClass",{enumerable:!0,get:()=>u.updateThemeAppearanceClass}),Object.defineProperty(p,"useThemeContext",{enumerable:!0,get:()=>u.useThemeContext}),p.AlertDialog=$e,p.AlertDialogContent=ue,p.AlertDialogProvider=wn,p.Badge=sn,p.Button=K,p.ButtonGroup=ae,p.ButtonList=Cn,p.DefaultTheme=dt,p.Dialog=mn,p.DropdownMenu=On,p.Flex=Z,p.HoverUtility=ke,p.IconButton=ce,p.Input=Hn,p.LeftAndRightPanels=Vn,p.MultiPagePopover=Un,p.MultiSelect=Nn,p.Popover=De,p.Root=Ae,p.Select=Dn,p.SelectAllCheckbox=Bt,p.Separator=ht,p.Sidebar=Bn,p.SlideOut=Ln,p.Switch=zn,p.Text=ut,p.TextArea=Qn,p.Toast=ze,p.ToastContext=pe,p.ToastProvider=st,p.ToggleGroup=Zn,p.Toolbar=nt,p.Tooltip=ct,p.divButtonProps=ln,p.useAlertDialog=Pe,p.useDiscardAlertDialog=Sn,p.useSeverityColor=P,p.useToast=ot,p.useViewportSize=on,Object.keys(Ce).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(p,e)&&Object.defineProperty(p,e,{enumerable:!0,get:()=>Ce[e]})}),Object.keys(D).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(p,e)&&Object.defineProperty(p,e,{enumerable:!0,get:()=>D[e]})}),Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
5
|
+
*/(function(n){(function(){var r={}.hasOwnProperty;function o(){for(var t=[],s=0;s<arguments.length;s++){var l=arguments[s];if(l){var d=typeof l;if(d==="string"||d==="number")t.push(l);else if(Array.isArray(l)){if(l.length){var c=o.apply(null,l);c&&t.push(c)}}else if(d==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){t.push(l.toString());continue}for(var f in l)r.call(l,f)&&l[f]&&t.push(f)}}}return t.join(" ")}n.exports?(o.default=o,n.exports=o):window.classNames=o})()})(we);var on=we.exports;const w=tn(on);function z(n,r){return e.useMemo(()=>{if(n!==void 0)if(typeof n=="object"){if(!("initial"in n))throw new Error("Expected initial property to be set in Responsive object");return Object.fromEntries(Object.entries(n).map(([o,t])=>[o,r[t]]))}else return r[n]},[r,n])}const rn={success:"green",danger:"red",info:"gray"},$=n=>{const r=a.useThemeContext();if(n)return n==="primary"?r.accentColor:rn[n]},ln=()=>{const[n,r]=e.useState("initial"),[o,t]=e.useState("initial"),s=V.useMediaQuery({minWidth:"520px"}),l=V.useMediaQuery({minWidth:"768px"}),d=V.useMediaQuery({minWidth:"1024px"}),c=V.useMediaQuery({minWidth:"1280px"}),f=V.useMediaQuery({minWidth:"1640px"});return e.useLayoutEffect(()=>{t(u=>(r(u),f?"xl":c?"lg":d?"md":l?"sm":s?"xs":"initial"))},[c,d,l,f,s]),{size:o,prevSize:n,xs:s,sm:l,md:d,lg:c,xl:f}},Se=(n,r,o)=>{const[t,s]=e.useState([]),[l,d]=e.useState(!0),c=e.useCallback(g=>{const{repeat:h,key:v}=g;d(!0),!(h||t.includes(v))&&s(b=>[...b,v])},[t]),f=e.useCallback(g=>{const{key:h}=g;d(!1),t.includes(h)&&s(v=>{const b=[...v];return b.splice(v.indexOf(h),1),b})},[t]);e.useEffect(()=>(r||document.addEventListener("keydown",c,!0),()=>{document.removeEventListener("keydown",c,!0)}),[r,c]),e.useEffect(()=>(r||document.addEventListener("keyup",f,!0),()=>{document.removeEventListener("keyup",f,!0)}),[r,f]);const u=e.useMemo(()=>!r&&l&&t.length===n.length&&t.every(g=>n.includes(g)),[r,l,t,n]);return e.useEffect(()=>{u&&o()},[u,o]),u},sn=n=>{const r=[];for(const o of e.Children.toArray(n))e.isValidElement(o)&&r.push(o);return r},cn=e.forwardRef(function({className:r,severity:o="primary",color:t,children:s,...l},d){const c=$(o);return i.jsx(a.Badge,{className:w("overmap-badge",r),ref:d,color:t||c,...l,children:s})}),an=e.memo(cn),ce={zeroMinWidth:"_zeroMinWidth_curjh_1",zeroMinHeight:"_zeroMinHeight_curjh_5",radius:"_radius_curjh_9"},N=e.memo(e.forwardRef(({className:n,radius:r=!1,children:o,zeroMinWidth:t=!1,zeroMinHeight:s=!1,...l},d)=>i.jsx(a.Flex,{className:w(n,{[ce.radius]:r,[ce.zeroMinWidth]:t,[ce.zeroMinHeight]:s}),ref:d,...l,children:o}))),xe=e.createContext({}),dn=()=>e.useContext(xe),un=e.memo(e.forwardRef(({className:n,children:r,...o},t)=>{const{size:s,severity:l}=dn(),d=$(l);return i.jsx(a.Box,{className:w("overmap-breadcrumb-item",n),height:"max-content",width:"max-content",children:i.jsx(a.Link,{ref:t,size:s,color:d,...o,children:i.jsx(N,{height:"100%",width:"100%",align:"center",gap:"1",children:r})})})})),fn={Group:e.memo(e.forwardRef(({className:n,children:r,separator:o,severity:t="info",size:s,gap:l="2",...d},c)=>{const f=$(t),u=sn(r);return i.jsx(xe.Provider,{value:{size:s,severity:t},children:i.jsx(N,{className:w("overmap-breadcrumb-group",n),ref:c,gap:l,role:"breadcrumb",height:"max-content",width:"max-content",...d,children:u.map((g,h)=>i.jsxs(i.Fragment,{children:[e.cloneElement(g,{key:h}),u.length-1!==h&&i.jsx(a.Text,{color:f,children:i.jsx(N,{height:"100%",width:"100%",align:"center",children:o})})]}))})})})),Item:un},X={fluid:"_fluid_r73gr_1",hoverSpin90Clockwise:"_hoverSpin90Clockwise_r73gr_15",hoverSpin180Clockwise:"_hoverSpin180Clockwise_r73gr_25",hoverSpin360Clockwise:"_hoverSpin360Clockwise_r73gr_35"},$e={spin90Clockwise:X.hoverSpin90Clockwise,spin180Clockwise:X.hoverSpin180Clockwise,spin360Clockwise:X.hoverSpin360Clockwise},pn={role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&n.currentTarget.click()}},j={small:"1",medium:"2",large:"3"},Pe=e.createContext({}),ae=()=>e.useContext(Pe),hn=e.forwardRef(function(r,o){const t=ae(),{className:s,type:l="button",fluid:d=t.fluid??!1,size:c=t.size??"medium",severity:f=t.severity??"primary",hoverEffects:u=t.hoverEffects??[],variant:g=t.variant,shortcut:h={keys:[],action:()=>{},disabled:!1},...v}=r,b=$(f),C=u.map(y=>$e[y]);return Se(h.keys,h.disabled||h.keys.length===0,h.action),i.jsx(a.Button,{ref:o,type:l,className:w(s,C,{[X.fluid]:d}),color:b,size:z(c,j),variant:g,...v})}),Q=e.memo(hn),gn=e.forwardRef(function(r,o){const t=ae(),{className:s,children:l,type:d="button",fluid:c=t.fluid??!1,size:f=t.size??"medium",severity:u=t.severity??"primary",hoverEffects:g=t.hoverEffects??[],variant:h=t.variant,shortcut:v={keys:[],action:()=>{},disabled:!1},...b}=r,C=$(u),y=(g==null?void 0:g.map(m=>$e[m]))||[];return Se(v.keys,v.disabled||v.keys.length===0,v.action),i.jsx(a.IconButton,{className:w(s,y,{[X.fluid]:c}),ref:o,color:C,size:z(f,j),variant:h,type:d,...b,children:l})}),de=e.memo(gn),bn={merged:"_merged_wdgxo_1"},Cn={row:{small:"4",medium:"4",large:"5"},column:{small:"2",medium:"3",large:"4"}},vn=e.forwardRef(function({className:r,merged:o=!1,children:t,gap:s,direction:l="row",severity:d,size:c="medium",variant:f,hoverEffects:u,fluid:g,...h},v){const b=z(c,Cn[l]),C=f==="ghost"?b:"0";return i.jsx(a.Flex,{className:w("overmap-button-group",r,{[bn.merged]:o}),ref:v,gap:o?s??C:s??"2",direction:l,"data-direction":l,...h,children:i.jsx(Pe.Provider,{value:{size:c,severity:d,variant:f,hoverEffects:u,fluid:g},children:t})})}),ue=e.memo(vn),mn={separators:"_separators_1f7v1_1"},yn=e.memo(e.forwardRef((n,r)=>{const{children:o,border:t,before:s,after:l,size:d}=n,c=t?"surface":"ghost",f=z(d,j),u=s&&l?i.jsx(a.Inset,{side:"x",pt:"current",pb:"current",children:o}):s?i.jsx(a.Inset,{side:"bottom",pt:"current",children:o}):l?i.jsx(a.Inset,{side:"top",pb:"current",children:o}):i.jsx(a.Inset,{children:o}),g=i.jsxs(a.Card,{ref:r,size:f,variant:c,children:[s,u,l]});return c==="ghost"?i.jsx(a.Box,{p:"3",children:g}):g})),_n=e.memo(e.forwardRef((n,r)=>{const{children:o,variant:t="outline",size:s,className:l,...d}=n,c=t==="outline"||t==="surface",f=t==="outline"?"ghost":t==="surface"?"soft":t;return i.jsx(yn,{...d,border:c,size:s,children:i.jsx(ue,{size:s,severity:"info",variant:f,className:w(l,mn.separators),merged:!0,gap:"0",direction:"column",ref:r,children:o})})})),wn=e.memo(e.forwardRef((n,r)=>{const{variant:o}=ae(),t=i.jsx(Q,{ref:r,...n,radius:"large",variant:o});return o==="ghost"?i.jsx(a.Box,{asChild:!0,my:"1",mx:"2",children:t}):t})),Sn={Root:_n,Item:wn},xn=e.memo(function(r){const{title:o,description:t,content:s,closeDialog:l}=r;return i.jsxs(a.Flex,{direction:"column",gap:"2",children:[i.jsxs(a.Flex,{direction:"column",gap:"1",children:[i.jsxs(a.Flex,{justify:"between",children:[i.jsx(a.Dialog.Title,{mb:"0",children:o}),i.jsx(a.Dialog.Close,{children:i.jsx(a.IconButton,{color:"gray",variant:"ghost","aria-label":"Close",children:i.jsx(D.Cross1Icon,{})})})]}),t&&i.jsx(a.Dialog.Description,{children:t})]}),s(l)]})}),$n=e.memo(e.forwardRef((n,r)=>{const{children:o,content:t,title:s,description:l,onOpen:d,onClose:c,defaultOpen:f,onCloseInterrupt:u,open:g,onOpenChange:h,...v}=n,[b,C]=e.useState(f??!1),y=g??b;if((u||d)&&h)throw new Error("Neither the `onCloseInterrupt` nor `onOpen` props can be used with `onOpenChange`.");if(g!==void 0&&h===void 0)throw new Error("The `open` prop requires the `onOpenChange` prop.");if(!o&&g===void 0)throw new Error("Either the `children` or `open` prop must be defined.");if(o&&g!==void 0)throw new Error("The `children` and `open` props cannot be used together.");const m=e.useCallback(_=>{if(h)return h(_);if(_&&d)d();else{if(!_&&u)return u(()=>{C(!1),c&&c()});!_&&c&&c()}C(_)},[h,d,c,u]),S=e.useCallback(_=>{if(_!=null&&_.force)return C(!1);m(!1)},[m]);return i.jsxs(a.Dialog.Root,{open:y,onOpenChange:m,children:[i.jsx(a.Dialog.Trigger,{children:o}),i.jsx(a.Dialog.Content,{ref:r,...v,children:i.jsx(xn,{closeDialog:S,content:t,title:s,description:l})})]})})),ke=n=>i.jsx(a.AlertDialog.Title,{mb:"0",...n}),Pn=n=>{const{title:r,description:o,actionText:t="Confirm",cancelText:s="Cancel",onAction:l,onCancel:d,severity:c}=n;return i.jsxs(a.Flex,{direction:"column",gap:"2",children:[i.jsxs(a.Flex,{direction:"column",gap:"1",children:[i.jsx(ke,{children:r}),i.jsx(a.AlertDialog.Description,{children:o})]}),i.jsxs(a.Flex,{gap:"3",mt:"4",justify:"end",children:[i.jsx(a.AlertDialog.Cancel,{children:i.jsx(Q,{variant:"soft",severity:"info",onClick:d,children:s})}),i.jsx(a.AlertDialog.Action,{children:i.jsx(Q,{variant:"solid",severity:c,onClick:l,children:t})})]})]})},Te=e.memo(function(r){const{open:o,setOpen:t,children:s,...l}=r,d=e.useMemo(()=>({close:()=>t(!1),Title:ke,Description:a.AlertDialog.Description}),[t]);return i.jsxs(a.AlertDialog.Root,{open:o,onOpenChange:t,children:[i.jsx(a.AlertDialog.Content,{children:"content"in l?l.content(d):i.jsx(Pn,{...l})}),s]})}),fe=e.createContext(()=>{throw new Error("No AlertDialogProvider found")}),kn={content:()=>null},Tn=e.memo(function({children:r}){const[o,t]=e.useState(!1),[s,l]=e.useState(kn),d=e.useCallback(c=>{if(o)throw new Error("AlertDialog is already open");l(c),t(!0)},[o]);return i.jsx(Te,{open:o,setOpen:t,...s,children:i.jsx(fe.Provider,{value:d,children:r})})}),Oe=()=>e.useContext(fe),On=()=>{const n=Oe();return e.useCallback(r=>n({title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",actionText:"Discard",severity:"danger",onAction:r.onDiscard,onCancel:r.onCancel}),[n])},Dn=e.memo(function({severity:r,itemContent:o,closeOnSelect:t=!0,onSelect:s,...l}){const d=$(r),c=e.useCallback(f=>{t||f.preventDefault(),s&&s(f)},[t,s]);return i.jsx(a.DropdownMenu.Item,{onSelect:c,color:d,...l,children:o})}),Nn=e.memo(function({defaultOpen:r,open:o,onOpenChange:t,modal:s,trigger:l,label:d,severity:c="info",disabled:f=!1,children:u,...g}){const h=$(c);return i.jsxs(a.DropdownMenu.Root,{defaultOpen:r,open:o,onOpenChange:t,modal:s,children:[i.jsx(a.DropdownMenu.Trigger,{disabled:f,children:l}),i.jsxs(a.DropdownMenu.Content,{color:h,...g,children:[d&&i.jsx(a.DropdownMenu.Label,{children:d}),u]})]})}),In=e.memo(function({separatorBelow:r=!1,separatorAbove:o=!1,children:t,...s}){return i.jsxs(i.Fragment,{children:[o&&i.jsx(a.DropdownMenu.Separator,{}),i.jsx(a.DropdownMenu.Group,{...s,children:t}),r&&i.jsx(a.DropdownMenu.Separator,{})]})}),En=e.memo(function({defaultOpen:r,open:o,onOpenChange:t,trigger:s,children:l,...d}){return i.jsxs(a.DropdownMenu.Sub,{defaultOpen:r,open:o,onOpenChange:t,children:[i.jsx(a.DropdownMenu.SubTrigger,{children:s}),i.jsx(a.DropdownMenu.SubContent,{...d,children:l})]})}),An={Root:Nn,ItemGroup:In,Item:Dn,SubMenu:En},W={DropdownSelect:"_DropdownSelect_k517z_1",BorderBottom:"_BorderBottom_k517z_8",DropdownSelectInputWrapper:"_DropdownSelectInputWrapper_k517z_12",DropdownSelectInput:"_DropdownSelectInput_k517z_12",DropdownSelectItem:"_DropdownSelectItem_k517z_27"},zn=150,Mn=e.memo(e.forwardRef(({trigger:n,items:r,disabled:o=!1,value:t,onValueChange:s,placeholder:l,filterValue:d,onFilterValueChange:c,closeOnSelect:f=!0,icons:u,severity:g="info"},h)=>{const v=$(g),b=e.useCallback(m=>S=>{s(t!==m?m:void 0),f||S.preventDefault()},[t,f,s]),C=e.useCallback(m=>{c&&c(m.target.value)},[c]),y=e.useCallback(m=>{!m&&c&&setTimeout(()=>{c("")},zn)},[c]);return i.jsxs(a.DropdownMenu.Root,{onOpenChange:y,children:[i.jsx(a.DropdownMenu.Trigger,{disabled:o,children:n}),i.jsx(a.DropdownMenu.Content,{ref:h,variant:"soft",color:v,className:W.Test,children:i.jsxs(N,{className:W.DropdownSelect,direction:"column",children:[d!==void 0&&!!c&&i.jsx(a.Box,{px:"1",className:w({[W.BorderBottom]:r.length!==0}),children:i.jsxs(a.TextField.Root,{className:W.DropdownSelectInputWrapper,size:"2",variant:"soft",children:[!!u&&!!u.leftInputIcon&&i.jsx(a.TextField.Slot,{children:u.leftInputIcon}),i.jsx(a.TextField.Input,{className:W.DropdownSelectInput,value:d,placeholder:l,onChange:C}),!!u&&!!u.rightInputIcon&&i.jsx(a.TextField.Slot,{children:u.rightInputIcon})]})}),i.jsx(a.Box,{p:r.length!==0?"1":"0",children:i.jsx(N,{direction:"column",children:r.map(({content:m,value:S},_)=>i.jsx(a.DropdownMenu.Item,{className:W.DropdownSelectItem,onSelect:b(S),textValue:"",asChild:!0,children:i.jsxs(N,{align:"center",height:"max-content",width:"100%",gap:"5",children:[i.jsx(a.Box,{grow:"1",children:m}),i.jsx(N,{justify:"center",align:"center",height:"max-content",width:"4",children:t===S&&(u&&(u!=null&&u.selectedItemIcon)?u.selectedItemIcon:i.jsx(D.CheckIcon,{}))})]})},_))})})]})})]})})),De=e.memo(function({children:r}){const[o,t]=e.useState(!1),s=e.useCallback(()=>{t(!0)},[]),l=e.useCallback(()=>{t(!1)},[]);return r({isHovered:o,onPointerEnter:s,onPointerLeave:l})}),Ne={fluid:"_fluid_7n1wr_1"},Bn=e.forwardRef(function({className:r,fluid:o,size:t="medium",variant:s="surface",severity:l="primary",itemSeverity:d="info",placeholder:c="Select",side:f,items:u=[],value:g,id:h,...v},b){const C=z(t,j),y=$(l),m=$(d);return e.createElement(a.Select.Root,{size:C,...v,key:g===void 0?1:0,value:g},i.jsx(a.Select.Trigger,{className:w(r,{[Ne.fluid]:o}),id:h,ref:b,variant:s,placeholder:c,color:y}),i.jsx(a.Select.Content,{side:f,className:Ne.contentDefault,position:"popper",variant:s!=="surface"?"soft":"solid",color:m,children:u.map(({itemContent:S,value:_,...x})=>i.jsx(a.Select.Item,{className:"overmap-select-item",value:_,...x,children:S},_))}))}),Ln=e.memo(Bn),Ie=e.memo(e.forwardRef((n,r)=>{const{checked:o,label:t,value:s,size:l="2"}=n;return i.jsx(a.Box,{asChild:!0,px:l,children:i.jsx(a.Select.Item,{value:s,ref:r,children:i.jsxs(a.Flex,{gap:l,align:"center",children:[i.jsx(a.Checkbox,{checked:o}),t]})})})})),R="__select_all__",jn=e.memo(e.forwardRef((n,r)=>{const[o,t]=e.useState(!1),{placeholder:s,value:l,onValueChange:d,options:c,disabled:f,name:u,...g}=n,h=z(n.size,j),v=$(n.severity),b=e.useMemo(()=>new Map(c.map(_=>[_.value,_.label])),[c]),C=l.length>4?`${l.length} options selected`:i.jsx("span",{children:l.flatMap(_=>[b.get(_),", "]).slice(0,-1)}),y=e.useCallback(()=>t(!1),[]),m=e.useCallback(_=>{_&&t(!0)},[]),S=e.useCallback(_=>{let x;_===R?x=l.length===c.length?[]:c.map(U=>U.value):x=l.includes(_)?l.filter(k=>k!==_):[...l,_],d(x)},[d,c,l]);return e.useEffect(()=>{if(c.some(({value:_})=>_===R))throw new Error(`Cannot have an option with the value "${R}"`)},[c]),i.jsxs(a.Select.Root,{open:o,value:"",onOpenChange:m,onValueChange:S,disabled:f,size:h,name:u,autoComplete:"off",children:[i.jsx(a.Select.Trigger,{ref:r,color:v,placeholder:l.length>0?C:s,"data-placeholder":l.length>0?void 0:!0,...g}),i.jsxs(a.Select.Content,{color:"gray",variant:"soft",position:"popper",onEscapeKeyDown:y,onPointerDownOutside:y,children:[i.jsx(Ie,{value:R,label:"Select all",checked:l.length===c.length,size:h}),c.map(_=>i.jsx(Ie,{..._,checked:l.includes(_.value),size:h},_.value))]})]})})),Wn={default:"_default_u936h_1"},Fn=e.forwardRef(function({className:r,severity:o="primary",icon:t,defaultChecked:s=!1,onCheckedChange:l,...d},c){const f=e.useRef(null),[u,g]=e.useState(d.checked?d.checked:s),[h,v]=e.useState(),b=$(o);e.useLayoutEffect(()=>{var S;const m=c||f;"current"in m&&m.current&&v((S=m.current)==null?void 0:S.querySelector("span.rt-SwitchThumb"))},[c]);const C=e.useCallback(m=>{g(m),l&&l(m)},[l]),y=d.checked?d.checked:u;return i.jsxs(i.Fragment,{children:[i.jsx(a.Switch,{className:w("overmap-switch",r,Wn.default),ref:c||f,color:b,radius:"full",defaultChecked:s,onCheckedChange:C,...d}),i.jsx(a.Portal,{container:h,asChild:!0,children:t&&"checked"in t?y?t.checked:t.unchecked:t})]})}),Hn=e.memo(Fn),F={sidebarContent:"_sidebarContent_1onyo_1",right:"_right_1onyo_7",resizeHandle:"_resizeHandle_1onyo_10",left:"_left_1onyo_13",overlay:"_overlay_1onyo_33"},qn={width:"auto",height:"100%"},Gn=e.forwardRef(function({side:r="left",modal:o=!0,children:t,open:s,containerSelector:l,overlay:d=!0,resizable:c=!0,minWidth:f="300px",maxWidth:u="500px",...g},h){const v=r==="right",b=r==="left",[C,y]=e.useState();return e.useEffect(()=>{const m=l??'[data-is-root-theme="true"]',S=document.querySelector(m);if(S===void 0)throw new Error(`Could not find a container element using the following selector ${m}`);y(S)},[l]),i.jsx(J.Root,{open:s,modal:o,children:i.jsxs(J.Portal,{container:C,children:[d&&i.jsx(J.Overlay,{className:w(F.overlay)}),i.jsx(J.Content,{className:w("overmap-sidebar","rt-DialogContent",F.sidebarContent,{[F.left]:b,[F.right]:v}),ref:h,asChild:!0,...g,children:i.jsx(a.Box,{width:"auto",children:i.jsx(Z.Resizable,{minWidth:f,maxWidth:u,defaultSize:qn,enable:{right:c&&b,left:c&&v},handleClasses:{left:F.resizeHandle,right:F.resizeHandle},handleComponent:{right:i.jsx(D.DragHandleDots2Icon,{}),left:i.jsx(D.DragHandleDots2Icon,{})},children:t})})})]})})}),Un=e.memo(Gn),E={outerContent:"_outerContent_1iy9c_1",enter:"_enter_1iy9c_4",right:"_right_1iy9c_4",left:"_left_1iy9c_8",enterActive:"_enterActive_1iy9c_12",exitActive:"_exitActive_1iy9c_22",exitDone:"_exitDone_1iy9c_32",resizable:"_resizable_1iy9c_41",slideOutOverlay:"_slideOutOverlay_1iy9c_47"},Vn=200,Kn=e.memo(function({className:r,open:o,side:t="left",children:s,minWidth:l,maxWidth:d,resizable:c=!0,overlay:f=!1,modal:u=!1,resizeHandle:g,position:h="absolute",...v}){const b=e.useRef(null),[C,y]=e.useState(l),m=t==="left",S=t==="right",_=e.useCallback((x,k,U,Xe)=>{y(U.clientWidth),b.current&&(b.current.style.width=`${U.clientWidth}px`)},[]);return i.jsx(le.CSSTransition,{in:o,classNames:{enter:E.enter,enterActive:E.enterActive,exitActive:E.exitActive,exitDone:E.exitDone},timeout:Vn,nodeRef:b,unmountOnExit:!0,mountOnEnter:!0,children:i.jsxs(i.Fragment,{children:[f&&i.jsx("div",{className:w("overamp-slide-out-overlay",E.slideOutOverlay)}),i.jsx(Re.DismissableLayer,{disableOutsidePointerEvents:u,asChild:!0,...v,children:i.jsx(a.Flex,{className:w("overmap-slide-out",r,E.outerContent,{[E.left]:m,[E.right]:S}),style:{"--slide-out-width":`${C}px`},height:"100%",width:"auto",position:h,top:"0",bottom:"0",left:m?"0":void 0,right:S?"0":void 0,ref:b,children:i.jsx(Z.Resizable,{className:E.resizable,defaultSize:{width:C,height:"100%"},onResize:_,enable:{right:c&&m,left:c&&S},handleComponent:{left:g,right:g},minWidth:l,maxWidth:d,children:s})})})]})})}),H={accommodateCharCount:"_accommodateCharCount_yobgh_1",wrapper:"_wrapper_yobgh_5",default:"_default_yobgh_10",noLeftIcon:"_noLeftIcon_yobgh_14",noRightIcon:"_noRightIcon_yobgh_18",charCount:"_charCount_yobgh_22"},Xn=e.forwardRef(function({className:r,leftSlot:o,rightSlot:t,size:s="medium",showInputLength:l,value:d,variant:c,severity:f="primary",...u},g){const h=z(s,j),v=$(f),b=l||l===void 0&&u.maxLength!==void 0,C=d!==void 0?d.toString():void 0;return i.jsxs(a.TextField.Root,{className:w(H.wrapper,r,{[H.accommodateCharCount]:b}),size:h,variant:c,color:v,children:[o&&i.jsx(a.TextField.Slot,{children:o}),i.jsx(a.TextField.Input,{className:w(H.default,{[H.noLeftIcon]:!o,[H.noRightIcon]:!t}),ref:g,value:d,size:h,variant:c,color:v,...u}),t&&i.jsx(a.TextField.Slot,{children:t}),b&&i.jsx(a.Text,{as:"p",className:H.charCount,size:"1",color:"gray",children:u.maxLength!==void 0?`${C==null?void 0:C.length}/${u.maxLength}`:`${C==null?void 0:C.length}`})]})}),Qn=e.memo(Xn),Yn={wrapper:"_wrapper_tmtz0_1"},Zn=e.forwardRef(function({className:r,trigger:o,open:t,onOpenChange:s,defaultOpen:l=!1,modal:d=!1,children:c,...f},u){return i.jsxs(a.Popover.Root,{defaultOpen:l,modal:d,open:t,onOpenChange:s,children:[i.jsx(a.Popover.Trigger,{children:o}),i.jsx(a.Popover.Content,{ref:u,className:w("overmap-popover",r,Yn.wrapper),...f,children:c(a.Popover.Close)})]})}),Ee=e.memo(Zn),T={wrapper:"_wrapper_1ssf2_1",panelContent:"_panelContent_1ssf2_6",left:"_left_1ssf2_14",right:"_right_1ssf2_18",resizable:"_resizable_1ssf2_23",resizeHandle:"_resizeHandle_1ssf2_28",panelMainContent:"_panelMainContent_1ssf2_48"},Ae=200,M=150,Jn=e.memo(function({children:r,showLeft:o,leftPanel:t,leftMinWidth:s=Ae,showRight:l,rightPanel:d,rightMinWidth:c=Ae,resizeable:f}){const u=e.useRef(null),g=e.useRef(null),[h,v]=e.useState(0),[b,C]=e.useState(),y=e.useRef(null),[m,S]=e.useState(0),[_,x]=e.useState(),k=e.useCallback((P,O,I)=>(A,Ye,Ze,ve)=>{if(!u.current)return;const oe=P+ve.width;I(u.current.clientWidth-oe),O(()=>oe)},[]),U=e.useCallback((P,O,I,A)=>k(h,v,x)(P,O,I,A),[k,h]),Xe=e.useCallback((P,O,I,A)=>k(m,S,C)(P,O,I,A),[k,m]),ne=e.useCallback((P,O,I,A,Ye,Ze,ve,oe)=>{if(!u.current)return;let re=P;if(re===0&&(re=O,I(re)),Ze){const ie=u.current.clientWidth-re;oe(ie),Ye>ie&&(ve(ie),A(u.current.clientWidth-ie))}},[]),Vt=e.useCallback(()=>ne(m,c,S,x,h,o,v,C),[ne,h,c,m,o]),Kt=e.useCallback(()=>ne(h,s,v,C,m,l,S,x),[ne,s,h,m,l]),te=e.useCallback((P,O)=>{u.current&&P&&O(u.current.clientWidth)},[]),Xt=e.useCallback(()=>te(o,C),[te,o]),Qt=e.useCallback(()=>te(l,x),[te,l]),Qe=e.useCallback(()=>{var P,O,I,A;u.current&&(C(u.current.clientWidth-(((P=y.current)==null?void 0:P.clientWidth)||0)),x(u.current.clientWidth-(((O=g.current)==null?void 0:O.clientWidth)||0)),v(((I=g.current)==null?void 0:I.clientWidth)||0),S(((A=y.current)==null?void 0:A.clientWidth)||0))},[]);e.useEffect(()=>{if(!u.current)return;const P=new ResizeObserver(Qe);return P.observe(u.current),()=>{P.disconnect()}},[Qe]);const Yt=e.useMemo(()=>({entering:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginRight:0,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(-${h}px)`,marginRight:`-${h}px`,transitionProperty:"transform, margin-right",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[h]),Zt=e.useMemo(()=>({entering:{transform:`translateX(${m}px)`,marginLeft:`${-m}px`,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginLeft:0,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(${m}px)`,marginLeft:`${-m}px`,transitionProperty:"transform, margin-left",transitionDuration:`${M}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[m]);return i.jsxs(a.Flex,{className:T.wrapper,style:{minWidth:`${s+c}px`},ref:u,width:"100%",height:"100%",justify:"center",m:"0",p:"0",children:[i.jsx(le.Transition,{nodeRef:g,timeout:o?0:M,in:o,unmountOnExit:!0,onEntering:Kt,onExited:Qt,children:P=>i.jsx(a.Box,{ref:g,className:w(T.panelContent,T.left),style:Yt[P],width:"auto",height:"100%",m:"0",p:"0",children:i.jsx(Z.Resizable,{className:T.resizable,size:{width:h,height:"100%"},onResizeStop:U,enable:{right:(f==null?void 0:f.left)!==void 0?f.left:!0},minWidth:s,maxWidth:b,handleClasses:{right:w(T.resizeHandle,T.left)},handleComponent:{right:i.jsx(D.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:t})})}),i.jsx("div",{className:T.panelMainContent,children:r}),i.jsx(le.Transition,{nodeRef:y,timeout:l?0:M,in:l,unmountOnExit:!0,onEntering:Vt,onExited:Xt,children:P=>i.jsx(a.Box,{ref:y,className:w(T.panelContent,T.right),style:Zt[P],width:"auto",height:"100%",m:"0",p:"0",children:i.jsx(Z.Resizable,{className:T.resizable,size:{width:m,height:"100%"},onResizeStop:Xe,enable:{left:(f==null?void 0:f.right)!==void 0?f.right:!0},minWidth:c,maxWidth:_,handleClasses:{left:w(T.resizeHandle,T.right)},handleComponent:{left:i.jsx(D.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:d})})})]})}),q={multiPagePopover:"_multiPagePopover_1w3ey_1",light:"_light_1w3ey_15",dark:"_dark_1w3ey_20",pageTitle:"_pageTitle_1w3ey_28",buttonContainer:"_buttonContainer_1w3ey_33",optionsButtonContainer:"_optionsButtonContainer_1w3ey_38",optionsButton:"_optionsButton_1w3ey_38"};function ze(n,r,o,t=0){if(!n.options)return n.content||i.jsx(i.Fragment,{});const s=n.options.map((l,d)=>i.jsx(Q,{className:w(q.optionsButton,l.buttonClassName),variant:"ghost",radius:"large",style:{width:o==="vertical"?"100%":"auto"},onClick:l.onClick||(()=>r(ze(l.page||{},r,o,t+1))),children:l.label},`${l.value}-page-${t}-button-${d}`));return i.jsxs(i.Fragment,{children:[n.title&&i.jsx("div",{className:q.pageTitle,children:n.title}),n.content,i.jsx("div",{className:w(q.optionsButtonContainer,n.buttonsContainerClassName),style:{flexDirection:o==="vertical"?"column":"row"},children:s})]})}const Rn=e.forwardRef(function({page:r,className:o,direction:t="vertical",color:s="light",...l},d){const[c,f]=e.useState(void 0),u=e.useCallback(()=>{f(ze(r,f,t,0))},[t,r]),g=e.useCallback(h=>c,[c]);return i.jsx(Ee,{className:w(q.multiPagePopover,s==="light"?q.light:q.dark,o),ref:d,onOpenAutoFocus:u,onCloseAutoFocus:u,...l,children:h=>g(h)})}),et=e.memo(Rn),nt={charCount:"_charCount_17uut_1"},tt=e.forwardRef(function({className:r,showInputLength:o,inputLengthTemplate:t,value:s,severity:l="primary",resize:d,...c},f){const u=$(l),g=$("info"),h=o||o===void 0&&(c.maxLength!==void 0||c.minLength!==void 0),v=s!==void 0?s.toString():"",b=e.useMemo(()=>{if(t){let C=t.replace("{current}",v.length.toString());return c.minLength!==void 0&&(C=C.replace("{min}",c.minLength.toString())),c.maxLength!==void 0&&(C=C.replace("{max}",c.maxLength.toString())),C}return v.length},[t,c.maxLength,c.minLength,v.length]);return i.jsxs(i.Fragment,{children:[i.jsx(a.TextArea,{className:w("overmap-textarea",r),style:{resize:d},ref:f,value:s,color:u,...c}),h&&i.jsx(a.Text,{as:"p",className:nt.charCount,color:g,align:"right",children:b})]})}),ot=e.memo(tt),rt=e.forwardRef(function({loop:r,type:o,rovingFocus:t,value:s,onValueChange:l,defaultValue:d,disabled:c,items:f,className:u,direction:g="row",...h},v){return i.jsx(ye.Root,{type:o,className:w("overmap-toggle-group",u),ref:v,value:s,onValueChange:l,disabled:c,orientation:g==="column"?"vertical":"horizontal",loop:r,rovingFocus:t,defaultValue:d,asChild:!0,children:i.jsx(ue,{direction:g,...h,children:f.map(({children:b,...C})=>e.createElement(ye.Item,{asChild:!0,...C,key:C.value},i.jsx(de,{className:w("overmap-toggle-group-button"),"aria-label":C.value,variant:C.value===s?"solid":"soft",children:b})))})})}),it=e.memo(rt),lt={default:"_default_xqvoc_1"},Me=e.memo(e.forwardRef(({className:n,minContentGap:r="2",children:o,...t},s)=>i.jsx(en.Root,{className:w(n,"overmap-toolbar",lt.default),ref:s,asChild:!0,...t,children:i.jsx(N,{grow:"1",width:"100%",height:"max-content",align:"center",gap:r,wrap:"nowrap",children:o})}))),st=e.memo(e.forwardRef(({children:n,gap:r="2"},o)=>i.jsx(N,{ref:o,grow:"1",width:"max-content",height:"100%",align:"center",gap:r,children:n}))),ct=e.memo(e.forwardRef(({children:n,gap:r},o)=>i.jsx(N,{ref:o,grow:"1",width:"max-content",direction:"row-reverse",height:"100%",align:"center",gap:r||"2",children:n}))),at={Root:Me,LeftContent:st,RightContent:ct},pe={ToastViewport:"_ToastViewport_1i6bp_1",actionButton:"_actionButton_1i6bp_20",ToastRoot:"_ToastRoot_1i6bp_24",slideIn:"_slideIn_1i6bp_1",swipeOut:"_swipeOut_1i6bp_1"},dt=e.forwardRef(function({title:r,description:o,icon:t,severity:s="primary",size:l,onClose:d,sensitivity:c,action:f,...u},g){const[h,v]=e.useState(!0),b=$(s),C=e.useCallback(y=>{!y&&d&&d(),v(y)},[d]);return i.jsx(K.Root,{asChild:!0,ref:g,...u,open:h,type:c,onOpenChange:C,children:i.jsx(a.Callout.Root,{className:pe.ToastRoot,variant:"surface",color:b,size:l,children:i.jsxs(a.Flex,{width:"100%",align:"center",gap:"4",justify:"between",children:[i.jsxs(a.Flex,{align:"center",gap:"3",children:[i.jsx(a.Callout.Icon,{children:t}),i.jsxs(a.Flex,{direction:"column",gap:"2",children:[i.jsxs(a.Flex,{direction:"column",gap:"0",children:[i.jsx(K.Title,{asChild:!0,children:i.jsx(a.Callout.Text,{size:"3",weight:"medium",children:r})}),i.jsx(K.Description,{asChild:!0,children:i.jsx(a.Callout.Text,{children:o})})]}),f&&i.jsx(K.Action,{className:pe.actionButton,altText:f.altText,asChild:!0,children:f.content})]})]}),i.jsx(K.Close,{asChild:!0,children:i.jsx(de,{"aria-label":"Close",variant:"ghost",severity:s,children:i.jsx(D.Cross2Icon,{})})})]})})})}),Be=e.memo(dt),he=e.createContext({}),ut=()=>{const n=e.useContext(he);if(!n)throw new Error("useToast must be used within a ToastProvider");return n},ft=240/60,Le=5e3,pt=n=>{if(n.duration&&n.duration>=Le)return n.duration;const r=n.severity==="danger"?1.5:1,o=n.description.split(" ").length+n.title.split(" ").length;return(Le+o/ft)*r};p.unsafeShowToast=void 0;const ht=e.memo(function({children:r,className:o,hotkey:t,...s}){const[l,d]=e.useState([]),c=e.useCallback((u,g,h)=>{d(v=>{const b=v.find(C=>C.id===u);return b&&g===0&&clearTimeout(b.timeout),v.filter(C=>C.id!==u)}),h&&h()},[]),f=e.useMemo(()=>{let u=0;const g=y=>{const m=pt(y),S=u.toString();u+=1;const _=setTimeout(()=>c(S,1,y.onClose),m);d(x=>[...x,{...y,timeout:_,duration:m,id:S}])},h=y=>g({...y,severity:"primary"}),v=y=>g({...y,severity:"success"}),b=y=>g({...y,severity:"danger"}),C=y=>g({...y,severity:"info"});return p.unsafeShowToast=g,{showToast:g,showPrimary:h,showSuccess:v,showError:b,showInfo:C}},[c]);return e.useEffect(()=>()=>{for(const{timeout:u}of l)clearTimeout(u)},[]),i.jsx(he.Provider,{value:f,children:i.jsxs(se.ToastProvider,{...s,children:[r,i.jsx(se.ToastViewport,{className:w(o,pe.ToastViewport),hotkey:t}),l.map(({id:u,onClose:g,...h})=>i.jsx(Be,{...h,onClose:()=>c(u,0,g)},u))]})})}),gt={default:"_default_1odpt_1"},bt=e.memo(e.forwardRef(({className:n,children:r,content:o,...t},s)=>i.jsx(a.Tooltip,{className:w("overmap-tooltip",n,gt.default),ref:s,content:i.jsx(a.Flex,{align:"center",gap:"1",width:"max-content",height:"max-content",justify:"center",children:o}),...t,children:r}))),Ct={noWrap:"_noWrap_1wpa5_1"},vt=e.memo(e.forwardRef(({className:n,noWrap:r,severity:o,as:t,...s},l)=>{const d=$(o);return i.jsx(a.Text,{ref:l,as:t,className:w(n,{[Ct.noWrap]:r}),color:d,...s})})),or="",mt=e.memo(e.forwardRef((n,r)=>{const{panelBackground:o="solid",radius:t="full",...s}=n;return i.jsx(a.Theme,{panelBackground:o,radius:t,ref:r,...s})})),yt={1:"max-content",2:"max-content",3:"max-content",4:"100%"},_t=e.forwardRef(function({severity:r="info",weight:o="light",gap:t="1",text:s,orientation:l="horizontal",size:d,...c},f){const u=z(d,yt),g=$(r);return i.jsxs(a.Flex,{ref:f,width:l==="horizontal"?u:"max-content",height:l==="vertical"?u:"max-content",direction:l==="vertical"?"column":"row",align:"center",gap:t,children:[i.jsx(a.Separator,{size:d,orientation:l,color:g,...c}),s&&i.jsxs(i.Fragment,{children:[i.jsx(a.Text,{as:"span",size:"1",weight:o,color:g,children:s}),i.jsx(a.Separator,{size:d,orientation:l,color:g,...c})]})]})}),wt=e.memo(_t);function B(){return B=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(n[t]=o[t])}return n},B.apply(this,arguments)}function St(n,r){typeof n=="function"?n(r):n!=null&&(n.current=r)}function je(...n){return r=>n.forEach(o=>St(o,r))}function We(...n){return e.useCallback(je(...n),n)}function xt(n,r=[]){let o=[];function t(l,d){const c=e.createContext(d),f=o.length;o=[...o,d];function u(h){const{scope:v,children:b,...C}=h,y=(v==null?void 0:v[n][f])||c,m=e.useMemo(()=>C,Object.values(C));return e.createElement(y.Provider,{value:m},b)}function g(h,v){const b=(v==null?void 0:v[n][f])||c,C=e.useContext(b);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${l}\``)}return u.displayName=l+"Provider",[u,g]}const s=()=>{const l=o.map(d=>e.createContext(d));return function(c){const f=(c==null?void 0:c[n])||l;return e.useMemo(()=>({[`__scope${n}`]:{...c,[n]:f}}),[c,f])}};return s.scopeName=n,[t,$t(s,...r)]}function $t(...n){const r=n[0];if(n.length===1)return r;const o=()=>{const t=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const d=t.reduce((c,{useScope:f,scopeName:u})=>{const h=f(l)[`__scope${u}`];return{...c,...h}},{});return e.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}function Fe(n,r,{checkForDefaultPrevented:o=!0}={}){return function(s){if(n==null||n(s),o===!1||!s.defaultPrevented)return r==null?void 0:r(s)}}function He(n){const r=e.useRef(n);return e.useEffect(()=>{r.current=n}),e.useMemo(()=>(...o)=>{var t;return(t=r.current)===null||t===void 0?void 0:t.call(r,...o)},[])}function Pt({prop:n,defaultProp:r,onChange:o=()=>{}}){const[t,s]=kt({defaultProp:r,onChange:o}),l=n!==void 0,d=l?n:t,c=He(o),f=e.useCallback(u=>{if(l){const h=typeof u=="function"?u(n):u;h!==n&&c(h)}else s(u)},[l,n,s,c]);return[d,f]}function kt({defaultProp:n,onChange:r}){const o=e.useState(n),[t]=o,s=e.useRef(t),l=He(r);return e.useEffect(()=>{s.current!==t&&(l(t),s.current=t)},[t,s,l]),o}function Tt(n){const r=e.useRef({value:n,previous:n});return e.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}const ge=globalThis!=null&&globalThis.document?e.useLayoutEffect:()=>{};function Ot(n){const[r,o]=e.useState(void 0);return ge(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const t=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let d,c;if("borderBoxSize"in l){const f=l.borderBoxSize,u=Array.isArray(f)?f[0]:f;d=u.inlineSize,c=u.blockSize}else d=n.offsetWidth,c=n.offsetHeight;o({width:d,height:c})});return t.observe(n,{box:"border-box"}),()=>t.unobserve(n)}else o(void 0)},[n]),r}function Dt(n,r){return e.useReducer((o,t)=>{const s=r[o][t];return s??o},n)}const qe=n=>{const{present:r,children:o}=n,t=Nt(r),s=typeof o=="function"?o({present:t.isPresent}):e.Children.only(o),l=We(t.ref,s.ref);return typeof o=="function"||t.isPresent?e.cloneElement(s,{ref:l}):null};qe.displayName="Presence";function Nt(n){const[r,o]=e.useState(),t=e.useRef({}),s=e.useRef(n),l=e.useRef("none"),d=n?"mounted":"unmounted",[c,f]=Dt(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const u=ee(t.current);l.current=c==="mounted"?u:"none"},[c]),ge(()=>{const u=t.current,g=s.current;if(g!==n){const v=l.current,b=ee(u);n?f("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?f("UNMOUNT"):f(g&&v!==b?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,f]),ge(()=>{if(r){const u=h=>{const b=ee(t.current).includes(h.animationName);h.target===r&&b&&nn.flushSync(()=>f("ANIMATION_END"))},g=h=>{h.target===r&&(l.current=ee(t.current))};return r.addEventListener("animationstart",g),r.addEventListener("animationcancel",u),r.addEventListener("animationend",u),()=>{r.removeEventListener("animationstart",g),r.removeEventListener("animationcancel",u),r.removeEventListener("animationend",u)}}else f("ANIMATION_END")},[r,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback(u=>{u&&(t.current=getComputedStyle(u)),o(u)},[])}}function ee(n){return(n==null?void 0:n.animationName)||"none"}const Ge=e.forwardRef((n,r)=>{const{children:o,...t}=n,s=e.Children.toArray(o),l=s.find(Et);if(l){const d=l.props.children,c=s.map(f=>f===l?e.Children.count(d)>1?e.Children.only(null):e.isValidElement(d)?d.props.children:null:f);return e.createElement(be,B({},t,{ref:r}),e.isValidElement(d)?e.cloneElement(d,void 0,c):null)}return e.createElement(be,B({},t,{ref:r}),o)});Ge.displayName="Slot";const be=e.forwardRef((n,r)=>{const{children:o,...t}=n;return e.isValidElement(o)?e.cloneElement(o,{...At(t,o.props),ref:r?je(r,o.ref):o.ref}):e.Children.count(o)>1?e.Children.only(null):null});be.displayName="SlotClone";const It=({children:n})=>e.createElement(e.Fragment,null,n);function Et(n){return e.isValidElement(n)&&n.type===It}function At(n,r){const o={...r};for(const t in r){const s=n[t],l=r[t];/^on[A-Z]/.test(t)?s&&l?o[t]=(...c)=>{l(...c),s(...c)}:s&&(o[t]=s):t==="style"?o[t]={...s,...l}:t==="className"&&(o[t]=[s,l].filter(Boolean).join(" "))}return{...n,...o}}const Ue=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((n,r)=>{const o=e.forwardRef((t,s)=>{const{asChild:l,...d}=t,c=l?Ge:r;return e.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),e.createElement(c,B({},d,{ref:s}))});return o.displayName=`Primitive.${r}`,{...n,[r]:o}},{}),Ve="Checkbox",[zt,ir]=xt(Ve),[Mt,Bt]=zt(Ve),Lt=e.forwardRef((n,r)=>{const{__scopeCheckbox:o,name:t,checked:s,defaultChecked:l,required:d,disabled:c,value:f="on",onCheckedChange:u,...g}=n,[h,v]=e.useState(null),b=We(r,x=>v(x)),C=e.useRef(!1),y=h?!!h.closest("form"):!0,[m=!1,S]=Pt({prop:s,defaultProp:l,onChange:u}),_=e.useRef(m);return e.useEffect(()=>{const x=h==null?void 0:h.form;if(x){const k=()=>S(_.current);return x.addEventListener("reset",k),()=>x.removeEventListener("reset",k)}},[h,S]),e.createElement(Mt,{scope:o,state:m,disabled:c},e.createElement(Ue.button,B({type:"button",role:"checkbox","aria-checked":L(m)?"mixed":m,"aria-required":d,"data-state":Ke(m),"data-disabled":c?"":void 0,disabled:c,value:f},g,{ref:b,onKeyDown:Fe(n.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Fe(n.onClick,x=>{S(k=>L(k)?!0:!k),y&&(C.current=x.isPropagationStopped(),C.current||x.stopPropagation())})})),y&&e.createElement(Ft,{control:h,bubbles:!C.current,name:t,value:f,checked:m,required:d,disabled:c,style:{transform:"translateX(-100%)"}}))}),jt="CheckboxIndicator",Wt=e.forwardRef((n,r)=>{const{__scopeCheckbox:o,forceMount:t,...s}=n,l=Bt(jt,o);return e.createElement(qe,{present:t||L(l.state)||l.state===!0},e.createElement(Ue.span,B({"data-state":Ke(l.state),"data-disabled":l.disabled?"":void 0},s,{ref:r,style:{pointerEvents:"none",...n.style}})))}),Ft=n=>{const{control:r,checked:o,bubbles:t=!0,...s}=n,l=e.useRef(null),d=Tt(o),c=Ot(r);return e.useEffect(()=>{const f=l.current,u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(d!==o&&h){const v=new Event("click",{bubbles:t});f.indeterminate=L(o),h.call(f,L(o)?!1:o),f.dispatchEvent(v)}},[d,o,t]),e.createElement("input",B({type:"checkbox","aria-hidden":!0,defaultChecked:L(o)?!1:o},s,{tabIndex:-1,ref:l,style:{...n.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function L(n){return n==="indeterminate"}function Ke(n){return L(n)?"indeterminate":n?"checked":"unchecked"}const Ht=Lt,qt=Wt,G={checkboxContainer:"_checkboxContainer_pb9za_5",checkbox:"_checkbox_pb9za_5",checkboxIndicator:"_checkboxIndicator_pb9za_27",checkboxLabel:"_checkboxLabel_pb9za_38",noTextHighlight:"_noTextHighlight_pb9za_42",checkboxHidden:"_checkboxHidden_pb9za_51"},Gt=e.forwardRef(function({className:r,labelClassName:o,label:t,checked:s,onCheckedChange:l,...d},c){return i.jsx(De,{children:({isHovered:f,...u})=>i.jsxs(a.Flex,{className:G.checkboxContainer,...u,children:[i.jsx(Ht,{className:w(G.checkbox,!f&&!s&&G.checkboxHidden,r),checked:s,onCheckedChange:g=>{l&&l(g)},ref:c,...d,children:i.jsx(qt,{className:G.checkboxIndicator,children:s==="indeterminate"?i.jsx(D.DividerHorizontalIcon,{width:"13px"}):i.jsx(D.CheckIcon,{})})}),t&&i.jsx("div",{className:w(G.checkboxLabel,o,G.noTextHighlight),onClick:()=>{l&&l(!s)},children:t})]})})}),Ce=e.memo(Gt);Ce.displayName="Checkbox";const Ut=e.memo(function({className:r,labelClassName:o,label:t,onCheckedChange:s,children:l,...d}){const[c,f]=e.useState(e.Children.toArray(l).every(b=>e.isValidElement(b)&&b.props.checked)?!0:e.Children.toArray(l).some(b=>e.isValidElement(b)&&b.props.checked)?"indeterminate":!1),[u,g]=e.useState(e.Children.map(l,b=>b.props.checked)),h=b=>{const C=c==="indeterminate"||!b;c==="indeterminate"&&(b=!1),g(u.map(y=>!C)),s&&s(b)};e.useEffect(()=>{const b=u.filter(C=>C).length;b===0?f(!1):b===l.length?f(!0):f("indeterminate")},[l,u]);const v=e.Children.map(l,(b,C)=>e.cloneElement(b,{...b.props,checked:u[C],onCheckedChange:y=>{const m=[...u];m[C]=y,g(m),b.props.onCheckedChange&&b.props.onCheckedChange(y)}}));return i.jsxs(i.Fragment,{children:[i.jsx(Ce,{className:r,labelClassName:o,label:t,checked:c,onCheckedChange:h,...d}),v]})});Object.defineProperty(p,"AccessibleIcon",{enumerable:!0,get:()=>a.AccessibleIcon}),Object.defineProperty(p,"AspectRatio",{enumerable:!0,get:()=>a.AspectRatio}),Object.defineProperty(p,"Avatar",{enumerable:!0,get:()=>a.Avatar}),Object.defineProperty(p,"Blockquote",{enumerable:!0,get:()=>a.Blockquote}),Object.defineProperty(p,"Box",{enumerable:!0,get:()=>a.Box}),Object.defineProperty(p,"Callout",{enumerable:!0,get:()=>a.Callout}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>a.Card}),Object.defineProperty(p,"Code",{enumerable:!0,get:()=>a.Code}),Object.defineProperty(p,"Container",{enumerable:!0,get:()=>a.Container}),Object.defineProperty(p,"ContextMenu",{enumerable:!0,get:()=>a.ContextMenu}),Object.defineProperty(p,"Em",{enumerable:!0,get:()=>a.Em}),Object.defineProperty(p,"Grid",{enumerable:!0,get:()=>a.Grid}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>a.Heading}),Object.defineProperty(p,"HoverCard",{enumerable:!0,get:()=>a.HoverCard}),Object.defineProperty(p,"Inset",{enumerable:!0,get:()=>a.Inset}),Object.defineProperty(p,"Kbd",{enumerable:!0,get:()=>a.Kbd}),Object.defineProperty(p,"Link",{enumerable:!0,get:()=>a.Link}),Object.defineProperty(p,"Portal",{enumerable:!0,get:()=>a.Portal}),Object.defineProperty(p,"Quote",{enumerable:!0,get:()=>a.Quote}),Object.defineProperty(p,"RadioGroup",{enumerable:!0,get:()=>a.RadioGroup}),Object.defineProperty(p,"ScrollArea",{enumerable:!0,get:()=>a.ScrollArea}),Object.defineProperty(p,"Section",{enumerable:!0,get:()=>a.Section}),Object.defineProperty(p,"Slider",{enumerable:!0,get:()=>a.Slider}),Object.defineProperty(p,"Slot",{enumerable:!0,get:()=>a.Slot}),Object.defineProperty(p,"Strong",{enumerable:!0,get:()=>a.Strong}),Object.defineProperty(p,"Table",{enumerable:!0,get:()=>a.Table}),Object.defineProperty(p,"Tabs",{enumerable:!0,get:()=>a.Tabs}),Object.defineProperty(p,"TextField",{enumerable:!0,get:()=>a.TextField}),Object.defineProperty(p,"Theme",{enumerable:!0,get:()=>a.Theme}),Object.defineProperty(p,"VisuallyHidden",{enumerable:!0,get:()=>a.VisuallyHidden}),Object.defineProperty(p,"updateThemeAppearanceClass",{enumerable:!0,get:()=>a.updateThemeAppearanceClass}),Object.defineProperty(p,"useThemeContext",{enumerable:!0,get:()=>a.useThemeContext}),p.AlertDialog=Te,p.AlertDialogContent=fe,p.AlertDialogProvider=Tn,p.Badge=an,p.Breadcrumb=fn,p.Button=Q,p.ButtonGroup=ue,p.ButtonList=Sn,p.Checkbox=Ce,p.DefaultTheme=mt,p.Dialog=$n,p.DropdownMenu=An,p.DropdownSelect=Mn,p.Flex=N,p.HoverUtility=De,p.IconButton=de,p.Input=Qn,p.LeftAndRightPanels=Jn,p.MultiPagePopover=et,p.MultiSelect=jn,p.Popover=Ee,p.Root=Me,p.Select=Ln,p.SelectAllCheckbox=Ut,p.Separator=wt,p.Sidebar=Un,p.SlideOut=Kn,p.Switch=Hn,p.Text=vt,p.TextArea=ot,p.Toast=Be,p.ToastContext=he,p.ToastProvider=ht,p.ToggleGroup=it,p.Toolbar=at,p.Tooltip=bt,p.divButtonProps=pn,p.useAlertDialog=Oe,p.useDiscardAlertDialog=On,p.useSeverityColor=$,p.useToast=ut,p.useViewportSize=ln,Object.keys(me).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(p,n)&&Object.defineProperty(p,n,{enumerable:!0,get:()=>me[n]})}),Object.keys(D).forEach(n=>{n!=="default"&&!Object.prototype.hasOwnProperty.call(p,n)&&Object.defineProperty(p,n,{enumerable:!0,get:()=>D[n]})}),Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
6
6
|
//# sourceMappingURL=blocks.umd.cjs.map
|