@1d1s/design-system 2.2.6 → 2.3.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/components/CheckList/CheckList.d.ts +7 -1
- package/dist/index.es.js +147 -147
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -73,7 +73,7 @@ return e("nav",{"data-slot":"bottom-nav",className:pn("sticky bottom-0 z-30 grid
|
|
|
73
73
|
return n("button",{type:"button","data-active":a?"true":"false","aria-current":a?"page":void 0,onClick(){o?.(t.id),t.onClick?.()},className:pn("flex flex-col items-center justify-center gap-0.5 py-1 transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",a?"text-brand":"text-gray-400 hover:text-gray-600"),children:[
|
|
74
74
|
/* @__PURE__ */e("span",{className:pn("leading-none",a&&"animate-pop"),children:i}),
|
|
75
75
|
/* @__PURE__ */e("span",{className:"text-3xs font-semibold leading-none",children:t.label})]},t.id)})})}function ar(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...e)=>t.current?.(...e),[])}var ir,lr="dismissableLayer.update",sr=x.createContext({layers:/* @__PURE__ */new Set,layersWithOutsidePointerEventsDisabled:/* @__PURE__ */new Set,branches:/* @__PURE__ */new Set}),cr=x.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:s,...c}=t,d=x.useContext(sr),[u,f]=x.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=x.useState({}),h=W(n,e=>f(e)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(b),y=u?g.indexOf(u):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,C=y>=v,k=((e,t=globalThis?.document)=>{const n=ar(e),r=x.useRef(!1),o=x.useRef(()=>{});return x.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=()=>{ur("dismissableLayer.pointerDownOutside",n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture(){return r.current=!0}}})(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));C&&!n&&(a?.(e),l?.(e),e.defaultPrevented||s?.())},p),N=((e,t=globalThis?.document)=>{const n=ar(e),r=x.useRef(!1);return x.useEffect(()=>{const e=e=>{e.target&&!r.current&&ur("dismissableLayer.focusOutside",n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture(){return r.current=!0},onBlurCapture(){return r.current=!1}}})(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(i?.(e),l?.(e),e.defaultPrevented||s?.())},p);return((e,t=globalThis?.document)=>{const n=ar(e);x.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])})(e=>{y===d.layers.size-1&&(o?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),x.useEffect(()=>{if(u)return r&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(ir=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),dr(),()=>{r&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=ir)}},[u,p,r,d]),x.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),dr())},[u,d]),x.useEffect(()=>{const e=()=>m({});return document.addEventListener(lr,e),()=>document.removeEventListener(lr,e)},[]),/* @__PURE__ */e(U.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...t.style},onFocusCapture:V(t.onFocusCapture,N.onFocusCapture),onBlurCapture:V(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:V(t.onPointerDownCapture,k.onPointerDownCapture)})});function dr(){const e=new CustomEvent(lr);document.dispatchEvent(e)}function ur(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?((e,t)=>{e&&P.flushSync(()=>e.dispatchEvent(t))})(o,a):o.dispatchEvent(a)}cr.displayName="DismissableLayer",x.forwardRef((t,n)=>{const r=x.useContext(sr),o=x.useRef(null),a=W(n,o);return x.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),/* @__PURE__ */e(U.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var fr="focusScope.autoFocusOnMount",pr="focusScope.autoFocusOnUnmount",mr={bubbles:!1,cancelable:!0},hr=x.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=t,[s,c]=x.useState(null),d=ar(a),u=ar(i),f=x.useRef(null),p=W(n,e=>c(e)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(o){let e=e=>{if(m.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:yr(f.current,{select:!0})},t=e=>{if(m.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||yr(f.current,{select:!0}))},n=e=>{if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&yr(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,s,m.paused]),x.useEffect(()=>{if(s){wr.add(m);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(fr,mr);s.addEventListener(fr,d),s.dispatchEvent(t),t.defaultPrevented||(((e,{select:t=!1}={})=>{const n=document.activeElement;for(const r of e)if(yr(r,{select:t}),document.activeElement!==n)return})(gr(s).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&yr(s))}return()=>{s.removeEventListener(fr,d),setTimeout(()=>{const t=new CustomEvent(pr,mr);s.addEventListener(pr,u),s.dispatchEvent(t),t.defaultPrevented||yr(e??document.body,{select:!0}),s.removeEventListener(pr,u),wr.remove(m)},0)}}},[s,d,u,m]);const h=x.useCallback(e=>{if(!r&&!o)return;if(m.paused)return;const t=document.activeElement;if("Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&t){const n=e.currentTarget,[o,a]=(e=>{const t=gr(e);return[br(t,e),br(t.reverse(),e)]})(n);o&&a?e.shiftKey||t!==a?e.shiftKey&&t===o&&(e.preventDefault(),r&&yr(a,{select:!0})):(e.preventDefault(),r&&yr(o,{select:!0})):t===n&&e.preventDefault()}},[r,o,m.paused]);/* @__PURE__ */
|
|
76
|
-
return e(U.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})});function gr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function br(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}}hr.displayName="FocusScope";var wr=(()=>{let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xr(e,t),e.unshift(t)},remove(t){e=xr(e,t),e[0]?.resume()}}})();function xr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Cr=x.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=x.useState(!1);G(()=>i(!0),[]);const l=r||a&&globalThis?.document?.body;return l?D.createPortal(/* @__PURE__ */e(U.div,{...o,ref:n}),l):null});Cr.displayName="Portal";var kr=0;function Nr(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ar()),document.body.insertAdjacentElement("beforeend",e[1]??Ar()),kr++,()=>{1===kr&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kr--}},[])}function Ar(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Sr=function(){return Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Sr.apply(this,arguments)};function Mr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Er="right-scroll-bar-position",Rr="width-before-scroll-bar";function Pr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Dr="undefined"!=typeof window?x.useLayoutEffect:x.useEffect,_r=/* @__PURE__ */new WeakMap;function zr(e){return e}var Lr=e=>{var t=e.sideCar,n=Mr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Sr({},n))};Lr.isSideCarExport=!0;var Or=(e=>{void 0===e&&(e={});var t=((e,t)=>{void 0===t&&(t=zr);var n=[],r=!1;return{read(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium(e){var o=t(e,r);return n.push(o),()=>{n=n.filter(e=>e!==o)}},assignSyncMedium(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:t=>e(t),filter:()=>n}},assignMedium(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=()=>{var n=t;t=[],n.forEach(e)},i=()=>Promise.resolve().then(a);i(),n={push(e){t.push(e),i()},filter:e=>(t=t.filter(e),n)}}}})();return t.options=Sr({async:!0,ssr:!1},e),t})(),Tr=()=>{},Ir=x.forwardRef((e,t)=>{var n=x.useRef(null),r=x.useState({onScrollCapture:Tr,onWheelCapture:Tr,onTouchMoveCapture:Tr}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,v=void 0===b?"div":b,y=e.gapMode,w=Mr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,k=(e=>{var t,n,r=(t=t=>e.forEach(e=>Pr(e,t)),(n=N(()=>({value:null,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}))[0]).callback=t,n.facade);return Dr(()=>{var t=_r.get(r);if(t){var n=new Set(t),o=new Set(e),a=r.current;n.forEach(e=>{o.has(e)||Pr(e,null)}),o.forEach(e=>{n.has(e)||Pr(e,a)})}_r.set(r,e)},[e]),r})([n,t]),A=Sr(Sr({},w),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:Or,removeScrollBar:c,shards:u,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),i?x.cloneElement(x.Children.only(l),Sr(Sr({},A),{ref:k})):x.createElement(v,Sr({},A,{className:s,ref:k}),l))});Ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ir.classNames={fullWidth:Rr,zeroRight:Er};var Wr=()=>{var e,t,n,r=(e=0,t=null,n={add(n){var r,o;0==e&&(t=(()=>{if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=(()=>{if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__})();return t&&e.setAttribute("nonce",t),e})())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),(e=>{(document.head||document.getElementsByTagName("head")[0]).appendChild(e)})(t)),e++},remove(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}},(e,t)=>{x.useEffect(()=>(n.add(e),()=>{n.remove()}),[e&&t])});return e=>(r(e.styles,e.dynamic),null)},Fr={left:0,top:0,right:0,gap:0},Br=e=>parseInt(e||"",10)||0,jr=Wr(),Hr="data-scroll-locked",Yr=(e,t,n,r)=>{var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Hr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Er," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rr," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Hr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},$r=()=>{var e=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(e)?e:0},Vr=e=>{var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;x.useEffect(()=>(document.body.setAttribute(Hr,($r()+1).toString()),()=>{var e=$r()-1;e<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,e.toString())}),[]);var a=x.useMemo(()=>(e=>{if(void 0===e&&(e="margin"),"undefined"==typeof window)return Fr;var t=(e=>{var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Br(t["padding"===e?"paddingLeft":"marginLeft"]),Br(n),Br(r)]})(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}})(o),[o]);return x.createElement(jr,{styles:Yr(a,!t,o,n?"":"!important")})},Gr=!1;if("undefined"!=typeof window)try{var qr=Object.defineProperty({},"passive",{get(){return Gr=!0,!0}});window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch(Dh){Gr=!1}var Qr=!!Gr&&{passive:!1},Ur=(e,t)=>{if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!(e=>"TEXTAREA"===e.tagName)(e)&&"visible"===n[t])},Kr=(e,t)=>{var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Xr(e,r)){var o=Zr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xr=(e,t)=>"v"===e?(e=>Ur(e,"overflowY"))(t):(e=>Ur(e,"overflowX"))(t),Zr=(e,t)=>{return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:(e=>[e.scrollLeft,e.scrollWidth,e.clientWidth])(t);var n},Jr=e=>"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],eo=e=>[e.deltaX,e.deltaY],to=e=>e&&"current"in e?e.current:e,no=e=>"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n"),ro=0,oo=[];function ao(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const io=(Or.useMedium(e=>{var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(ro++)[0],a=x.useState(Wr)[0],i=x.useRef(e);x.useEffect(()=>{i.current=e},[e]),x.useEffect(()=>{if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(to),!0).filter(Boolean);return t.forEach(e=>e.classList.add("allow-interactivity-".concat(o))),()=>{document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(e=>e.classList.remove("allow-interactivity-".concat(o)))}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback((e,t)=>{if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Jr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===d||p.contains(d)))return!1;var m=Kr(u,d);if(!m)return!0;if(m?o=u:(o="v"===u?"h":"v",m=Kr(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var h=r.current||o;return((e,t,n,r)=>{var o=((e,t)=>"h"===e&&"rtl"===t?-1:1)(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,l=t.contains(i),s=!1,c=a>0,d=0,u=0;do{if(!i)break;var f=Zr(e,i),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Xr(e,i)&&(d+=m,u+=p);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(s=!0),s})(h,t,e,"h"===h?s:c)},[]),s=x.useCallback(e=>{var n=e;if(oo.length&&oo[oo.length-1]===a){var r="deltaY"in n?eo(n):Jr(n),o=t.current.filter(e=>{return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(i.current.shards||[]).map(to).filter(Boolean).filter(e=>e.contains(n.target));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=x.useCallback((e,n,r,o)=>{var a={name:e,delta:n,target:r,should:o,shadowParent:ao(r)};t.current.push(a),setTimeout(()=>{t.current=t.current.filter(e=>e!==a)},1)},[]),d=x.useCallback(e=>{n.current=Jr(e),r.current=void 0},[]),u=x.useCallback(t=>{c(t.type,eo(t),t.target,l(t,e.lockRef.current))},[]),f=x.useCallback(t=>{c(t.type,Jr(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(()=>(oo.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",s,Qr),document.addEventListener("touchmove",s,Qr),document.addEventListener("touchstart",d,Qr),()=>{oo=oo.filter(e=>e!==a),document.removeEventListener("wheel",s,Qr),document.removeEventListener("touchmove",s,Qr),document.removeEventListener("touchstart",d,Qr)}),[]);var p=e.removeScrollBar;return x.createElement(x.Fragment,null,e.inert?x.createElement(a,{styles:no(o)}):null,p?x.createElement(Vr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Lr);var lo=x.forwardRef((e,t)=>x.createElement(Ir,Sr({},e,{ref:t,sideCar:io})));lo.classNames=Ir.classNames;var so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={},fo=0,po=e=>e&&(e.host||po(e.parentNode)),mo=(e,t,n)=>{void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=(e=>"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body)(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),((e,t,n,r)=>{var o=((e,t)=>t.map(t=>{if(e.contains(t))return t;var n=po(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(e=>Boolean(e)))(t,Array.isArray(e)?e:[e]);uo[n]||(uo[n]=/* @__PURE__ */new WeakMap);var a=uo[n],i=[],l=/* @__PURE__ */new Set,s=new Set(o),c=e=>{e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var d=e=>{e&&!s.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(l.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(so.get(e)||0)+1,c=(a.get(e)||0)+1;so.set(e,s),a.set(e,c),i.push(e),1===s&&o&&co.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(u){console.error("aria-hidden: cannot operate on ",e,u)}})};return d(t),l.clear(),fo++,()=>{i.forEach(e=>{var t=so.get(e)-1,o=a.get(e)-1;so.set(e,t),a.set(e,o),t||(co.has(e)||e.removeAttribute(r),co.delete(e)),o||e.removeAttribute(n)}),--fo||(so=/* @__PURE__ */new WeakMap,so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={})}})(r,o,n,"aria-hidden")):()=>null},ho="Dialog",[go]=L(ho),[bo,vo]=go(ho),yo=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=t,s=x.useRef(null),c=x.useRef(null),[d,u]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:ho});/* @__PURE__ */
|
|
76
|
+
return e(U.div,{tabIndex:-1,...l,ref:p,onKeyDown:h})});function gr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return e.disabled||e.hidden||"INPUT"===e.tagName&&"hidden"===e.type?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function br(e,t){for(const n of e)if(!vr(n,{upTo:t}))return n}function vr(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function yr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&(e=>e instanceof HTMLInputElement&&"select"in e)(e)&&t&&e.select()}}hr.displayName="FocusScope";var wr=(()=>{let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xr(e,t),e.unshift(t)},remove(t){e=xr(e,t),e[0]?.resume()}}})();function xr(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Cr=x.forwardRef((t,n)=>{const{container:r,...o}=t,[a,i]=x.useState(!1);G(()=>i(!0),[]);const l=r||a&&globalThis?.document?.body;return l?D.createPortal(/* @__PURE__ */e(U.div,{...o,ref:n}),l):null});Cr.displayName="Portal";var kr=0;function Nr(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ar()),document.body.insertAdjacentElement("beforeend",e[1]??Ar()),kr++,()=>{1===kr&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kr--}},[])}function Ar(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Sr=function(){return Sr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Sr.apply(this,arguments)};function Mr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var Er="right-scroll-bar-position",Rr="width-before-scroll-bar";function Pr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Dr="undefined"!=typeof window?x.useLayoutEffect:x.useEffect,_r=/* @__PURE__ */new WeakMap;function zr(e){return e}var Lr=e=>{var t=e.sideCar,n=Mr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Sr({},n))};Lr.isSideCarExport=!0;var Or=(e=>{void 0===e&&(e={});var t=((e,t)=>{void 0===t&&(t=zr);var n=[],r=!1;return{read(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium(e){var o=t(e,r);return n.push(o),()=>{n=n.filter(e=>e!==o)}},assignSyncMedium(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:t=>e(t),filter:()=>n}},assignMedium(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=()=>{var n=t;t=[],n.forEach(e)},i=()=>Promise.resolve().then(a);i(),n={push(e){t.push(e),i()},filter:e=>(t=t.filter(e),n)}}}})();return t.options=Sr({async:!0,ssr:!1},e),t})(),Tr=()=>{},Ir=x.forwardRef((e,t)=>{var n=x.useRef(null),r=x.useState({onScrollCapture:Tr,onWheelCapture:Tr,onTouchMoveCapture:Tr}),o=r[0],a=r[1],i=e.forwardProps,l=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,v=void 0===b?"div":b,y=e.gapMode,w=Mr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,k=(e=>{var t,n,r=(t=t=>e.forEach(e=>Pr(e,t)),(n=N(()=>({value:null,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}))[0]).callback=t,n.facade);return Dr(()=>{var t=_r.get(r);if(t){var n=new Set(t),o=new Set(e),a=r.current;n.forEach(e=>{o.has(e)||Pr(e,null)}),o.forEach(e=>{n.has(e)||Pr(e,a)})}_r.set(r,e)},[e]),r})([n,t]),A=Sr(Sr({},w),o);return x.createElement(x.Fragment,null,d&&x.createElement(C,{sideCar:Or,removeScrollBar:c,shards:u,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),i?x.cloneElement(x.Children.only(l),Sr(Sr({},A),{ref:k})):x.createElement(v,Sr({},A,{className:s,ref:k}),l))});Ir.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ir.classNames={fullWidth:Rr,zeroRight:Er};var Wr=()=>{var e,t,n,r=(e=0,t=null,n={add(n){var r,o;0==e&&(t=(()=>{if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=(()=>{if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__})();return t&&e.setAttribute("nonce",t),e})())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),(e=>{(document.head||document.getElementsByTagName("head")[0]).appendChild(e)})(t)),e++},remove(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}},(e,t)=>{x.useEffect(()=>(n.add(e),()=>{n.remove()}),[e&&t])});return e=>(r(e.styles,e.dynamic),null)},Fr={left:0,top:0,right:0,gap:0},Br=e=>parseInt(e||"",10)||0,jr=Wr(),Hr="data-scroll-locked",Yr=(e,t,n,r)=>{var o=e.left,a=e.top,i=e.right,l=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body[").concat(Hr,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Er," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Rr," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Er," .").concat(Er," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Rr," .").concat(Rr," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Hr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")},$r=()=>{var e=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(e)?e:0},Vr=e=>{var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;x.useEffect(()=>(document.body.setAttribute(Hr,($r()+1).toString()),()=>{var e=$r()-1;e<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,e.toString())}),[]);var a=x.useMemo(()=>(e=>{if(void 0===e&&(e="margin"),"undefined"==typeof window)return Fr;var t=(e=>{var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingTop":"marginTop"],r=t["padding"===e?"paddingRight":"marginRight"];return[Br(t["padding"===e?"paddingLeft":"marginLeft"]),Br(n),Br(r)]})(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}})(o),[o]);return x.createElement(jr,{styles:Yr(a,!t,o,n?"":"!important")})},Gr=!1;if("undefined"!=typeof window)try{var qr=Object.defineProperty({},"passive",{get(){return Gr=!0,!0}});window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch(_h){Gr=!1}var Qr=!!Gr&&{passive:!1},Ur=(e,t)=>{if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!(e=>"TEXTAREA"===e.tagName)(e)&&"visible"===n[t])},Kr=(e,t)=>{var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Xr(e,r)){var o=Zr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xr=(e,t)=>"v"===e?(e=>Ur(e,"overflowY"))(t):(e=>Ur(e,"overflowX"))(t),Zr=(e,t)=>{return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:(e=>[e.scrollLeft,e.scrollWidth,e.clientWidth])(t);var n},Jr=e=>"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],eo=e=>[e.deltaX,e.deltaY],to=e=>e&&"current"in e?e.current:e,no=e=>"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n"),ro=0,oo=[];function ao(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const io=(Or.useMedium(e=>{var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),o=x.useState(ro++)[0],a=x.useState(Wr)[0],i=x.useRef(e);x.useEffect(()=>{i.current=e},[e]),x.useEffect(()=>{if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(to),!0).filter(Boolean);return t.forEach(e=>e.classList.add("allow-interactivity-".concat(o))),()=>{document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(e=>e.classList.remove("allow-interactivity-".concat(o)))}}},[e.inert,e.lockRef.current,e.shards]);var l=x.useCallback((e,t)=>{if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=Jr(e),l=n.current,s="deltaX"in e?e.deltaX:l[0]-a[0],c="deltaY"in e?e.deltaY:l[1]-a[1],d=e.target,u=Math.abs(s)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===u&&"range"===d.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===d||p.contains(d)))return!1;var m=Kr(u,d);if(!m)return!0;if(m?o=u:(o="v"===u?"h":"v",m=Kr(u,d)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||c)&&(r.current=o),!o)return!0;var h=r.current||o;return((e,t,n,r)=>{var o=((e,t)=>"h"===e&&"rtl"===t?-1:1)(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,l=t.contains(i),s=!1,c=a>0,d=0,u=0;do{if(!i)break;var f=Zr(e,i),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&Xr(e,i)&&(d+=m,u+=p);var h=i.parentNode;i=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&Math.abs(d)<1||!c&&Math.abs(u)<1)&&(s=!0),s})(h,t,e,"h"===h?s:c)},[]),s=x.useCallback(e=>{var n=e;if(oo.length&&oo[oo.length-1]===a){var r="deltaY"in n?eo(n):Jr(n),o=t.current.filter(e=>{return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta)[0]===(o=r)[0]&&t[1]===o[1];var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var s=(i.current.shards||[]).map(to).filter(Boolean).filter(e=>e.contains(n.target));(s.length>0?l(n,s[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),c=x.useCallback((e,n,r,o)=>{var a={name:e,delta:n,target:r,should:o,shadowParent:ao(r)};t.current.push(a),setTimeout(()=>{t.current=t.current.filter(e=>e!==a)},1)},[]),d=x.useCallback(e=>{n.current=Jr(e),r.current=void 0},[]),u=x.useCallback(t=>{c(t.type,eo(t),t.target,l(t,e.lockRef.current))},[]),f=x.useCallback(t=>{c(t.type,Jr(t),t.target,l(t,e.lockRef.current))},[]);x.useEffect(()=>(oo.push(a),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",s,Qr),document.addEventListener("touchmove",s,Qr),document.addEventListener("touchstart",d,Qr),()=>{oo=oo.filter(e=>e!==a),document.removeEventListener("wheel",s,Qr),document.removeEventListener("touchmove",s,Qr),document.removeEventListener("touchstart",d,Qr)}),[]);var p=e.removeScrollBar;return x.createElement(x.Fragment,null,e.inert?x.createElement(a,{styles:no(o)}):null,p?x.createElement(Vr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Lr);var lo=x.forwardRef((e,t)=>x.createElement(Ir,Sr({},e,{ref:t,sideCar:io})));lo.classNames=Ir.classNames;var so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={},fo=0,po=e=>e&&(e.host||po(e.parentNode)),mo=(e,t,n)=>{void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=(e=>"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body)(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),((e,t,n,r)=>{var o=((e,t)=>t.map(t=>{if(e.contains(t))return t;var n=po(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(e=>Boolean(e)))(t,Array.isArray(e)?e:[e]);uo[n]||(uo[n]=/* @__PURE__ */new WeakMap);var a=uo[n],i=[],l=/* @__PURE__ */new Set,s=new Set(o),c=e=>{e&&!l.has(e)&&(l.add(e),c(e.parentNode))};o.forEach(c);var d=e=>{e&&!s.has(e)&&Array.prototype.forEach.call(e.children,e=>{if(l.has(e))d(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(so.get(e)||0)+1,c=(a.get(e)||0)+1;so.set(e,s),a.set(e,c),i.push(e),1===s&&o&&co.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(u){console.error("aria-hidden: cannot operate on ",e,u)}})};return d(t),l.clear(),fo++,()=>{i.forEach(e=>{var t=so.get(e)-1,o=a.get(e)-1;so.set(e,t),a.set(e,o),t||(co.has(e)||e.removeAttribute(r),co.delete(e)),o||e.removeAttribute(n)}),--fo||(so=/* @__PURE__ */new WeakMap,so=/* @__PURE__ */new WeakMap,co=/* @__PURE__ */new WeakMap,uo={})}})(r,o,n,"aria-hidden")):()=>null},ho="Dialog",[go]=L(ho),[bo,vo]=go(ho),yo=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!0}=t,s=x.useRef(null),c=x.useRef(null),[d,u]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:ho});/* @__PURE__ */
|
|
77
77
|
return e(bo,{scope:n,triggerRef:s,contentRef:c,contentId:ee(),titleId:ee(),descriptionId:ee(),open:d,onOpenChange:u,onOpenToggle:x.useCallback(()=>u(e=>!e),[u]),modal:l,children:r})};yo.displayName=ho;var wo="DialogTrigger",xo=x.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=vo(wo,r),i=W(n,a.triggerRef);/* @__PURE__ */
|
|
78
78
|
return e(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jo(a.open),...o,ref:i,onClick:V(t.onClick,a.onOpenToggle)})});xo.displayName=wo;var Co="DialogPortal",[ko,No]=go(Co,{forceMount:void 0}),Ao=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:a}=t,i=vo(Co,n);/* @__PURE__ */
|
|
79
79
|
return e(ko,{scope:n,forceMount:r,children:x.Children.map(o,t=>/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:t})}))})};Ao.displayName=Co;var So="DialogOverlay",Mo=x.forwardRef((t,n)=>{const r=No(So,t.__scopeDialog),{forceMount:o=r.forceMount,...a}=t,i=vo(So,t.__scopeDialog);return i.modal?/* @__PURE__ */e(K,{present:o||i.open,children:/* @__PURE__ */e(Ro,{...a,ref:n})}):null});Mo.displayName=So;var Eo=/* @__PURE__ */F("DialogOverlay.RemoveScroll"),Ro=x.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,a=vo(So,r);
|
|
@@ -111,179 +111,179 @@ return e(ss,{__scopeCheckbox:a,checked:l,defaultChecked:s,disabled:d,required:c,
|
|
|
111
111
|
return e(K,{present:o||bs(i.checked)||!0===i.checked,children:/* @__PURE__ */e(U.span,{"data-state":vs(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...t.style}})})});ps.displayName=fs;var ms="CheckboxBubbleInput",hs=x.forwardRef(({__scopeCheckbox:t,...n},r)=>{const{control:o,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:l,required:s,disabled:c,name:d,value:u,form:f,bubbleInput:p,setBubbleInput:m}=ls(ms,t),h=W(r,m),g=ns(i),b=rs(o);x.useEffect(()=>{const e=p;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(g!==i&&n){const t=new Event("click",{bubbles:!a.current});e.indeterminate=bs(i),n.call(e,!bs(i)&&i),e.dispatchEvent(t)}},[p,g,i,a]);const v=x.useRef(!bs(i)&&i);/* @__PURE__ */
|
|
112
112
|
return e(U.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??v.current,required:s,disabled:c,name:d,value:u,form:f,...n,tabIndex:-1,ref:h,style:{...n.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function gs(e){return"function"==typeof e}function bs(e){return"indeterminate"===e}function vs(e){return bs(e)?"indeterminate":e?"checked":"unchecked"}hs.displayName=ms;const ys=x.forwardRef(({className:t,label:r,id:o,readOnly:a,...i},l)=>{const s=x.useId(),c=o||s;/* @__PURE__ */
|
|
113
113
|
return n("div",{className:pn("flex items-center gap-2",a&&"pointer-events-none"),children:[
|
|
114
|
-
/* @__PURE__ */e(us,{ref:l,id:c,className:pn("peer h-[18px] w-[18px] shrink-0 cursor-pointer rounded-1.5 border-[1.5px] border-gray-300 bg-white text-white","transition-[background-color,border-color] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-[0.45]","data-[state=checked]:border-brand data-[state=checked]:bg-brand data-[state=checked]:text-white",t),...i,children:/* @__PURE__ */e(ps,{className:"flex items-center justify-center text-current animate-pop",children:/* @__PURE__ */e(jn,{className:"h-2.5 w-2.5",strokeWidth:8})})}),r?/* @__PURE__ */e("label",{htmlFor:c,className:pn("cursor-pointer select-none text-gray-800 transition-colors","peer-disabled:cursor-not-allowed peer-disabled:opacity-[0.45]","peer-data-[state=checked]:text-gray-500 peer-data-[state=checked]:line-through"),children:/* @__PURE__ */e(On,{size:"caption2",weight:"medium",children:r})}):null]})});ys.displayName=us.displayName;const ws={sm:{list:"gap-0",row:"gap-2.5",checkbox:"h-[18px] w-[18px]",label:"body2"},md:{list:"gap-0.5",row:"gap-3",checkbox:"h-5 w-5",label:"body1"},lg:{list:"gap-1",row:"gap-3",checkbox:"h-6 w-6",label:"body1"}};function
|
|
115
|
-
return e("div",{className:pn("stagger-in flex flex-col",
|
|
116
|
-
return n("label",{htmlFor:
|
|
117
|
-
/* @__PURE__ */e(ys,{id:
|
|
118
|
-
return e("div",{"data-slot":"stripe",className:pn("relative flex w-full items-center justify-center overflow-hidden","font-mono text-3xs tracking-[0.3px] text-black/45",a&&"animate-shimmer",i),style:{height:o,borderRadius:r,background:
|
|
114
|
+
/* @__PURE__ */e(us,{ref:l,id:c,className:pn("peer h-[18px] w-[18px] shrink-0 cursor-pointer rounded-1.5 border-[1.5px] border-gray-300 bg-white text-white","transition-[background-color,border-color] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-[0.45]","data-[state=checked]:border-brand data-[state=checked]:bg-brand data-[state=checked]:text-white",t),...i,children:/* @__PURE__ */e(ps,{className:"flex items-center justify-center text-current animate-pop",children:/* @__PURE__ */e(jn,{className:"h-2.5 w-2.5",strokeWidth:8})})}),r?/* @__PURE__ */e("label",{htmlFor:c,className:pn("cursor-pointer select-none text-gray-800 transition-colors","peer-disabled:cursor-not-allowed peer-disabled:opacity-[0.45]","peer-data-[state=checked]:text-gray-500 peer-data-[state=checked]:line-through"),children:/* @__PURE__ */e(On,{size:"caption2",weight:"medium",children:r})}):null]})});ys.displayName=us.displayName;const ws={sm:{list:"gap-0",row:"gap-2.5",checkbox:"h-[18px] w-[18px]",label:"body2"},md:{list:"gap-0.5",row:"gap-3",checkbox:"h-5 w-5",label:"body1"},lg:{list:"gap-1",row:"gap-3",checkbox:"h-6 w-6",label:"body1"}},xs={sm:{list:"gap-2.5",row:"px-3.5 py-3"},md:{list:"gap-3",row:"px-4 py-3.5"},lg:{list:"gap-3",row:"px-4 py-4"}};function Cs({options:t,value:r,onValueChange:o,size:a="md",variant:i="flat",className:l,readOnly:s=!1,disabled:c=!1}){const d=C.useId(),u=ws[a],f=xs[a],p="card"===i;/* @__PURE__ */
|
|
115
|
+
return e("div",{className:pn("stagger-in flex flex-col",p?f.list:u.list,l),children:t.map(t=>{const a=r.includes(t.id),i=c||t.disabled,l=!i&&s,m=i||l,h=`${d}-${t.id}`;/* @__PURE__ */
|
|
116
|
+
return n("label",{htmlFor:h,"aria-disabled":m,onClick(e){m&&e.preventDefault()},className:pn("flex w-full items-center text-left","transition duration-200 ease-out",p?pn("rounded-3 border border-gray-200 bg-white",f.row):"-mx-2.5 rounded-2 px-2.5 py-1.5",u.row,!m&&"cursor-pointer active:scale-[0.97]",!m&&(p?"hover:bg-gray-50":"hover:bg-gray-100"),i&&"cursor-not-allowed",l&&"cursor-default hover:cursor-not-allowed"),children:[
|
|
117
|
+
/* @__PURE__ */e(ys,{id:h,checked:a,disabled:i,onCheckedChange(e){var n;m||"indeterminate"===e||(n=t.id,o(!0===e?r.includes(n)?r:[...r,n]:r.filter(e=>e!==n)))},className:pn(u.checkbox,"rounded-full","data-[state=checked]:border-green-600 data-[state=checked]:bg-green-600",l&&"cursor-default hover:cursor-not-allowed")}),"string"==typeof t.label||"number"==typeof t.label?/* @__PURE__ */e(On,{size:u.label,weight:a?"bold":"medium",className:pn("flex-1 transition-colors",a?"text-gray-900":"text-gray-500",i&&"text-gray-400"),children:t.label}):/* @__PURE__ */e("span",{className:pn("flex-1",!a&&"text-gray-600",i&&"opacity-60"),children:t.label})]},t.id)})})}const ks={peach:"var(--main-300)",cream:"var(--brand-soft)",mint:"var(--mint-200)",blue:"var(--blue-200)",sky:"var(--blue-300)",rose:"var(--red-300)",gray:"var(--gray-200)"};function Ns(e){return e?e in ks?ks[e]:e:ks.cream}function As(e){return`repeating-linear-gradient(135deg, ${e}, ${e} 8px, color-mix(in srgb, ${e} 98%, black) 8px, color-mix(in srgb, ${e} 98%, black) 16px)`}function Ss({tone:t,label:n,radius:r=0,height:o="100%",animated:a=!1,className:i,style:l,...s}){const c=Ns(t);/* @__PURE__ */
|
|
118
|
+
return e("div",{"data-slot":"stripe",className:pn("relative flex w-full items-center justify-center overflow-hidden","font-mono text-3xs tracking-[0.3px] text-black/45",a&&"animate-shimmer",i),style:{height:o,borderRadius:r,background:As(c),...l},...s,children:void 0!==n&&""!==n?/* @__PURE__ */e("span",{className:"rounded-0.5 bg-white/70 px-1.5 py-0.5",children:n}):null})}const Ms={xs:24,sm:32,md:40,lg:56,xl:76};function Es({size:r="md",tone:o="peach",ring:a=!1,imageUrl:i,fallback:l,alt:s="avatar",className:c}){const d="number"==typeof r?r:Ms[r],u=d>40?3:2,[f,p]=N(!1);A(()=>{p(!1)},[i]);const m="string"==typeof i&&/^(\/|https?:\/\/)/.test(i)&&!f;/* @__PURE__ */
|
|
119
119
|
return e("div",{"data-slot":"circle-avatar",className:pn("relative shrink-0 overflow-hidden rounded-full",c),style:{width:d,height:d,...a?{border:`${u}px solid var(--brand-soft)`}:null},children:m?/* @__PURE__ */e(z,{src:i,alt:s,fill:!0,sizes:"76px",className:"object-cover",onError(){return p(!0)}}):/* @__PURE__ */n(t,{children:[
|
|
120
|
-
/* @__PURE__ */e(
|
|
120
|
+
/* @__PURE__ */e(Ss,{tone:o,className:"absolute inset-0 h-full"}),void 0!==l?/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center text-gray-700",children:l}):null]})})}const Rs={sm:{diameter:48,stroke:5,labelSize:"caption2"},md:{diameter:72,stroke:7,labelSize:"body2"},lg:{diameter:100,stroke:9,labelSize:"body1"},xl:{diameter:140,stroke:12,labelSize:"heading2"}};function Ps({value:t,size:r="md",stroke:o,color:a,trackColor:i,showPercentage:l=!0,centerSlot:s,className:c}){const d="string"==typeof r?Rs[r]:{diameter:r,stroke:o??Math.max(2,Math.round(r/10)),labelSize:"body1"},u=d.diameter,f=o??d.stroke,p=(u-f)/2,m=2*Math.PI*p,h=Math.min(Math.max(t,0),100),g=d.labelSize,[b,v]=N(0);A(()=>{const e=requestAnimationFrame(()=>v(h));return()=>cancelAnimationFrame(e)},[h]);const y=m-m*b/100;/* @__PURE__ */
|
|
121
121
|
return n("div",{"data-slot":"circular-progress",className:pn("relative inline-flex items-center justify-center",c),style:{width:u,height:u},children:[
|
|
122
122
|
/* @__PURE__ */n("svg",{width:u,height:u,style:{transform:"rotate(-90deg)"},children:[
|
|
123
123
|
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:p,fill:"none",strokeWidth:f,className:pn(!i&&"stroke-gray-100"),stroke:i}),
|
|
124
|
-
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:p,fill:"none",strokeWidth:f,strokeLinecap:"round",strokeDasharray:m,strokeDashoffset:y,className:pn(!a&&"stroke-brand"),stroke:a,style:{transition:"stroke-dashoffset 600ms cubic-bezier(0.2, 0.7, 0.1, 1)"}})]}),(s??l)&&/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center",children:s??/* @__PURE__ */e(On,{size:g,weight:"extrabold",className:pn(!a&&"text-brand"),style:a?{color:a}:void 0,children:`${h}%`})})]})}function
|
|
124
|
+
/* @__PURE__ */e("circle",{cx:u/2,cy:u/2,r:p,fill:"none",strokeWidth:f,strokeLinecap:"round",strokeDasharray:m,strokeDashoffset:y,className:pn(!a&&"stroke-brand"),stroke:a,style:{transition:"stroke-dashoffset 600ms cubic-bezier(0.2, 0.7, 0.1, 1)"}})]}),(s??l)&&/* @__PURE__ */e("div",{className:"absolute inset-0 flex items-center justify-center",children:s??/* @__PURE__ */e(On,{size:g,weight:"extrabold",className:pn(!a&&"text-brand"),style:a?{color:a}:void 0,children:`${h}%`})})]})}function Ds({avatar:t,imageUrl:r,author:o,text:a,time:i,divider:l=!0,className:s,...c}){/* @__PURE__ */
|
|
125
125
|
return n("div",{"data-slot":"comment-row",className:pn("flex items-start gap-2.5 py-3 animate-fade-up",l&&"border-b border-gray-100 last:border-b-0",s),...c,children:[
|
|
126
|
-
/* @__PURE__ */e("div",{className:"shrink-0",children:t??/* @__PURE__ */e(
|
|
126
|
+
/* @__PURE__ */e("div",{className:"shrink-0",children:t??/* @__PURE__ */e(Es,{imageUrl:r,size:"sm"})}),
|
|
127
127
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|
|
128
128
|
/* @__PURE__ */n("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
129
129
|
/* @__PURE__ */e("span",{className:"text-base font-bold text-gray-900 truncate",children:o}),i?/* @__PURE__ */e("span",{className:"shrink-0 text-xs text-gray-500",children:i}):null]}),
|
|
130
|
-
/* @__PURE__ */e("div",{className:"mt-1 text-base leading-[1.5] text-gray-700",children:a})]})]})}const Ds=["top","right","bottom","left"],_s=Math.min,zs=Math.max,Ls=Math.round,Os=Math.floor,Ts=e=>({x:e,y:e}),Is={left:"right",right:"left",bottom:"top",top:"bottom"};function Ws(e,t,n){return zs(e,_s(t,n))}function Fs(e,t){return"function"==typeof e?e(t):e}function Bs(e){return e.split("-")[0]}function js(e){return e.split("-")[1]}function Hs(e){return"x"===e?"y":"x"}function Ys(e){return"y"===e?"height":"width"}function $s(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Vs(e){return Hs($s(e))}function Gs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qs=["left","right"],Qs=["right","left"],Us=["top","bottom"],Ks=["bottom","top"];function Xs(e){const t=Bs(e);return Is[t]+e.slice(t.length)}function Zs(e){return"number"!=typeof e?(e=>({top:0,right:0,bottom:0,left:0,...e}))(e):{top:e,right:e,bottom:e,left:e}}function Js(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ec(e,t,n){let{reference:r,floating:o}=e;const a=$s(t),i=Vs(t),l=Ys(i),s=Bs(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(js(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function tc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Fs(t,e),m=Zs(p),h=l[f?"floating"===u?"reference":"floating":u],g=Js(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),b="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=Js(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:s}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function nc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rc(e){return Ds.some(t=>e[t]>=0)}const oc=/* @__PURE__ */new Set(["left","top"]);function ac(){return"undefined"!=typeof window}function ic(e){return cc(e)?(e.nodeName||"").toLowerCase():"#document"}function lc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function sc(e){var t;return null==(t=(cc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function cc(e){return!!ac()&&(e instanceof Node||e instanceof lc(e).Node)}function dc(e){return!!ac()&&(e instanceof Element||e instanceof lc(e).Element)}function uc(e){return!!ac()&&(e instanceof HTMLElement||e instanceof lc(e).HTMLElement)}function fc(e){return!(!ac()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof lc(e).ShadowRoot)}function pc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=kc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function mc(e){return/^(table|td|th)$/.test(ic(e))}function hc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const gc=/transform|translate|scale|rotate|perspective|filter/,bc=/paint|layout|strict|content/,vc=e=>!!e&&"none"!==e;let yc;function wc(e){const t=dc(e)?kc(e):e;return vc(t.transform)||vc(t.translate)||vc(t.scale)||vc(t.rotate)||vc(t.perspective)||!xc()&&(vc(t.backdropFilter)||vc(t.filter))||gc.test(t.willChange||"")||bc.test(t.contain||"")}function xc(){return null==yc&&(yc="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yc}function Cc(e){return/^(html|body|#document)$/.test(ic(e))}function kc(e){return lc(e).getComputedStyle(e)}function Nc(e){return dc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ac(e){if("html"===ic(e))return e;const t=e.assignedSlot||e.parentNode||fc(e)&&e.host||sc(e);return fc(t)?t.host:t}function Sc(e){const t=Ac(e);return Cc(t)?e.ownerDocument?e.ownerDocument.body:e.body:uc(t)&&pc(t)?t:Sc(t)}function Mc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Sc(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=lc(o);if(a){const e=Ec(i);return t.concat(i,i.visualViewport||[],pc(o)?o:[],e&&n?Mc(e):[])}return t.concat(o,Mc(o,[],n))}function Ec(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rc(e){const t=kc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=uc(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Ls(n)!==a||Ls(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Pc(e){return dc(e)?e:e.contextElement}function Dc(e){const t=Pc(e);if(!uc(t))return Ts(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Rc(t);let i=(a?Ls(n.width):n.width)/r,l=(a?Ls(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const _c=/* @__PURE__ */Ts(0);function zc(e){const t=lc(e);return xc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:_c}function Lc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Pc(e);let i=Ts(1);t&&(r?dc(r)&&(i=Dc(r)):i=Dc(e));const l=((e,t,n)=>(void 0===t&&(t=!1),!(!n||t&&n!==lc(e))&&t))(a,n,r)?zc(a):Ts(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=lc(a),t=r&&dc(r)?lc(r):r;let n=e,o=Ec(n);for(;o&&r&&t!==n;){const e=Dc(o),t=o.getBoundingClientRect(),r=kc(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=a,c+=i,n=lc(o),o=Ec(n)}}return Js({width:d,height:u,x:s,y:c})}function Oc(e,t){const n=Nc(e).scrollLeft;return t?t.left+n:Lc(sc(e)).left+n}function Tc(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Oc(e,n),y:n.top+t.scrollTop}}function Ic(e,t,n){let r;if("viewport"===t)r=((e,t)=>{const n=lc(e),r=sc(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=xc();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=Oc(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}})(e,n);else if("document"===t)r=(e=>{const t=sc(e),n=Nc(e),r=e.ownerDocument.body,o=zs(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=zs(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Oc(e);const l=-n.scrollTop;return"rtl"===kc(r).direction&&(i+=zs(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}})(sc(e));else if(dc(t))r=((e,t)=>{const n=Lc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=uc(e)?Dc(e):Ts(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}})(t,n);else{const n=zc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Js(r)}function Wc(e,t){const n=Ac(e);return!(n===t||!dc(n)||Cc(n))&&("fixed"===kc(n).position||Wc(n,t))}function Fc(e,t,n){const r=uc(t),o=sc(t),a="fixed"===n,i=Lc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=Ts(0);function c(){s.x=Oc(o)}if(r||!r&&!a)if(("body"!==ic(t)||pc(o))&&(l=Nc(t)),r){const e=Lc(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?Ts(0):Tc(o,l);return{x:i.left+l.scrollLeft-s.x-d.x,y:i.top+l.scrollTop-s.y-d.y,width:i.width,height:i.height}}function Bc(e){return"static"===kc(e).position}function jc(e,t){if(!uc(e)||"fixed"===kc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return sc(e)===n&&(n=n.ownerDocument.body),n}function Hc(e,t){const n=lc(e);if(hc(e))return n;if(!uc(e)){let t=Ac(e);for(;t&&!Cc(t);){if(dc(t)&&!Bc(t))return t;t=Ac(t)}return n}let r=jc(e,t);for(;r&&mc(r)&&Bc(r);)r=jc(r,t);return r&&Cc(r)&&Bc(r)&&!wc(r)?n:r||(e=>{let t=Ac(e);for(;uc(t)&&!Cc(t);){if(wc(t))return t;if(hc(t))return null;t=Ac(t)}return null})(e)||n}const Yc={convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=sc(r),l=!!t&&hc(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=Ts(1);const d=Ts(0),u=uc(r);if((u||!u&&!a)&&(("body"!==ic(r)||pc(i))&&(s=Nc(r)),u)){const e=Lc(r);c=Dc(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!i||u||a?Ts(0):Tc(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:sc,getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?hc(t)?[]:((e,t)=>{const n=t.get(e);if(n)return n;let r=Mc(e,[],!1).filter(e=>dc(e)&&"body"!==ic(e)),o=null;const a="fixed"===kc(e).position;let i=a?Ac(e):e;for(;dc(i)&&!Cc(i);){const t=kc(i),n=wc(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||pc(i)&&!n&&Wc(e,i))?r=r.filter(e=>e!==i):o=t,i=Ac(i)}return t.set(e,r),r})(t,this._c):[].concat(n),r],i=Ic(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,d=i.left;for(let u=1;u<a.length;u++){const e=Ic(t,a[u],o);l=zs(e.top,l),s=_s(e.right,s),c=_s(e.bottom,c),d=zs(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:Hc,async getElementRects(e){const t=this.getOffsetParent||Hc,n=this.getDimensions,r=await n(e.floating);return{reference:Fc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects(e){return Array.from(e.getClientRects())},getDimensions(e){const{width:t,height:n}=Rc(e);return{width:t,height:n}},getScale:Dc,isElement:dc,isRTL(e){return"rtl"===kc(e).direction}};function $c(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const Vc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Fs(e,t)||{};if(null==c)return{};const u=Zs(d),f={x:n,y:r},p=Vs(o),m=Ys(p),h=await i.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==i.isElement?void 0:i.isElement(C))||(k=l.floating[y]||a.floating[m]);const N=w/2-x/2,A=k/2-h[m]/2-1,S=_s(u[b],A),M=_s(u[v],A),E=S,R=k-h[m]-M,P=k/2-h[m]/2+N,D=Ws(E,P,R),_=!s.arrow&&null!=js(o)&&P!==D&&a.reference[m]/2-(P<E?S:M)-h[m]/2<0,z=_?P<E?P-E:P-R:0;return{[p]:f[p]+z,data:{[p]:D,centerOffset:P-D-z,..._&&{alignmentOffset:z}},reset:_}}}),Gc=e=>(void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Fs(e,t),d={x:n,y:r},u=$s(o),f=Hs(u);let p=d[f],m=d[u];const h=Fs(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var b,v;const e="y"===f?"width":"height",t=oc.has(Bs(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[u]:m}}});var qc="undefined"!=typeof document?E:()=>{};function Qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Qc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Qc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Uc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kc(e,t){const n=Uc(e);return Math.round(t*n)/n}function Xc(e){const t=x.useRef(e);return qc(()=>{t.current=e}),t}const Zc=(e,t)=>{const n=(e=>(void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await(async(e,t)=>{const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Bs(n),l=js(n),s="y"===$s(n),c=oc.has(i)?-1:1,d=a&&s?-1:1,u=Fs(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*d,y:f*c}:{x:f*c,y:p*d}})(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jc=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Fs(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),f=$s(Bs(o)),p=Hs(f);let m=d[p],h=d[f];i&&(m=Ws(m+u["y"===p?"top":"left"],m,m-u["y"===p?"bottom":"right"])),l&&(h=Ws(h+u["y"===f?"top":"left"],h,h-u["y"===f?"bottom":"right"]));const g=s.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[f]:l}}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},ed=(e,t)=>({fn:Gc(e).fn,options:[e,t]}),td=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Fs(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const b=Bs(o),v=$s(l),y=Bs(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(y||!h?[Xs(l)]:(e=>{const t=Xs(e);return[Gs(e),t,Gs(t)]})(l)),C="none"!==m;!f&&C&&x.push(...((e,t,n,r)=>{const o=js(e);let a=((e,t,n)=>{switch(e){case"top":case"bottom":return n?t?Qs:qs:t?qs:Qs;case"left":case"right":return t?Us:Ks;default:return[]}})(Bs(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Gs)))),a})(l,h,m,w));const k=[l,...x],N=await s.detectOverflow(t,g),A=[];let S=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&A.push(N[b]),u){const e=((e,t,n)=>{void 0===n&&(n=!1);const r=js(e),o=Vs(e),a=Ys(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Xs(i)),[i,Xs(i)]})(o,i,w);A.push(N[e[0]],N[e[1]])}if(S=[...S,{placement:o,overflows:A}],!A.every(e=>e<=0)){var M,E;const e=((null==(M=a.flip)?void 0:M.index)||0)+1,t=k[e];if(t&&("alignment"!==u||v===$s(t)||S.every(e=>$s(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(E=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=S.filter(e=>{if(C){const t=$s(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},nd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...c}=Fs(e,t),d=await i.detectOverflow(t,c),u=Bs(o),f=js(o),p="y"===$s(o),{width:m,height:h}=a.floating;let g,b;"top"===u||"bottom"===u?(g=u,b=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g="end"===f?"top":"bottom");const v=h-d.top-d.bottom,y=m-d.left-d.right;let w=_s(h-d[g],v),x=_s(m-d[b],y);if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(x=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(w=v),!t.middlewareData.shift&&!f){const e=zs(d.left,0),t=zs(d.right,0),n=zs(d.top,0),r=zs(d.bottom,0);p?x=m-2*(0!==e||0!==t?e+t:zs(d.left,d.right)):w=h-2*(0!==n||0!==r?n+r:zs(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:w});const C=await i.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},rd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Fs(e,t);switch(o){case"referenceHidden":{const e=nc(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rc(e)}}}case"escaped":{const e=nc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rc(e)}}}default:return{}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},od=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&{}.hasOwnProperty.call(n,"current")?null!=n.current?Vc({element:n.current,padding:r}).fn(t):{}:n?Vc({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var ad=x.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;/* @__PURE__ */
|
|
131
|
-
return e(U.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:/* @__PURE__ */e("polygon",{points:"0,0 30,0 15,10"})})});
|
|
132
|
-
return e(
|
|
130
|
+
/* @__PURE__ */e("div",{className:"mt-1 text-base leading-[1.5] text-gray-700",children:a})]})]})}const _s=["top","right","bottom","left"],zs=Math.min,Ls=Math.max,Os=Math.round,Ts=Math.floor,Is=e=>({x:e,y:e}),Ws={left:"right",right:"left",bottom:"top",top:"bottom"};function Fs(e,t,n){return Ls(e,zs(t,n))}function Bs(e,t){return"function"==typeof e?e(t):e}function js(e){return e.split("-")[0]}function Hs(e){return e.split("-")[1]}function Ys(e){return"x"===e?"y":"x"}function $s(e){return"y"===e?"height":"width"}function Vs(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Gs(e){return Ys(Vs(e))}function qs(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Qs=["left","right"],Us=["right","left"],Ks=["top","bottom"],Xs=["bottom","top"];function Zs(e){const t=js(e);return Ws[t]+e.slice(t.length)}function Js(e){return"number"!=typeof e?(e=>({top:0,right:0,bottom:0,left:0,...e}))(e):{top:e,right:e,bottom:e,left:e}}function ec(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function tc(e,t,n){let{reference:r,floating:o}=e;const a=Vs(t),i=Gs(t),l=$s(i),s=js(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Hs(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function nc(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=Bs(t,e),m=Js(p),h=l[f?"floating"===u?"reference":"floating":u],g=ec(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:d,strategy:s})),b="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},w=ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:b,offsetParent:v,strategy:s}):b);return{top:(g.top-w.top+m.top)/y.y,bottom:(w.bottom-g.bottom+m.bottom)/y.y,left:(g.left-w.left+m.left)/y.x,right:(w.right-g.right+m.right)/y.x}}function rc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oc(e){return _s.some(t=>e[t]>=0)}const ac=/* @__PURE__ */new Set(["left","top"]);function ic(){return"undefined"!=typeof window}function lc(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function sc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function cc(e){var t;return null==(t=(dc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function dc(e){return!!ic()&&(e instanceof Node||e instanceof sc(e).Node)}function uc(e){return!!ic()&&(e instanceof Element||e instanceof sc(e).Element)}function fc(e){return!!ic()&&(e instanceof HTMLElement||e instanceof sc(e).HTMLElement)}function pc(e){return!(!ic()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof sc(e).ShadowRoot)}function mc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Nc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function hc(e){return/^(table|td|th)$/.test(lc(e))}function gc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const bc=/transform|translate|scale|rotate|perspective|filter/,vc=/paint|layout|strict|content/,yc=e=>!!e&&"none"!==e;let wc;function xc(e){const t=uc(e)?Nc(e):e;return yc(t.transform)||yc(t.translate)||yc(t.scale)||yc(t.rotate)||yc(t.perspective)||!Cc()&&(yc(t.backdropFilter)||yc(t.filter))||bc.test(t.willChange||"")||vc.test(t.contain||"")}function Cc(){return null==wc&&(wc="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wc}function kc(e){return/^(html|body|#document)$/.test(lc(e))}function Nc(e){return sc(e).getComputedStyle(e)}function Ac(e){return uc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sc(e){if("html"===lc(e))return e;const t=e.assignedSlot||e.parentNode||pc(e)&&e.host||cc(e);return pc(t)?t.host:t}function Mc(e){const t=Sc(e);return kc(t)?e.ownerDocument?e.ownerDocument.body:e.body:fc(t)&&mc(t)?t:Mc(t)}function Ec(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Mc(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=sc(o);if(a){const e=Rc(i);return t.concat(i,i.visualViewport||[],mc(o)?o:[],e&&n?Ec(e):[])}return t.concat(o,Ec(o,[],n))}function Rc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pc(e){const t=Nc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fc(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Os(n)!==a||Os(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Dc(e){return uc(e)?e:e.contextElement}function _c(e){const t=Dc(e);if(!fc(t))return Is(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Pc(t);let i=(a?Os(n.width):n.width)/r,l=(a?Os(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const zc=/* @__PURE__ */Is(0);function Lc(e){const t=sc(e);return Cc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:zc}function Oc(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Dc(e);let i=Is(1);t&&(r?uc(r)&&(i=_c(r)):i=_c(e));const l=((e,t,n)=>(void 0===t&&(t=!1),!(!n||t&&n!==sc(e))&&t))(a,n,r)?Lc(a):Is(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=sc(a),t=r&&uc(r)?sc(r):r;let n=e,o=Rc(n);for(;o&&r&&t!==n;){const e=_c(o),t=o.getBoundingClientRect(),r=Nc(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,u*=e.y,s+=a,c+=i,n=sc(o),o=Rc(n)}}return ec({width:d,height:u,x:s,y:c})}function Tc(e,t){const n=Ac(e).scrollLeft;return t?t.left+n:Oc(cc(e)).left+n}function Ic(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Tc(e,n),y:n.top+t.scrollTop}}function Wc(e,t,n){let r;if("viewport"===t)r=((e,t)=>{const n=sc(e),r=cc(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;const e=Cc();(!e||e&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}const c=Tc(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:l,y:s}})(e,n);else if("document"===t)r=(e=>{const t=cc(e),n=Ac(e),r=e.ownerDocument.body,o=Ls(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ls(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Tc(e);const l=-n.scrollTop;return"rtl"===Nc(r).direction&&(i+=Ls(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:l}})(cc(e));else if(uc(t))r=((e,t)=>{const n=Oc(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=fc(e)?_c(e):Is(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}})(t,n);else{const n=Lc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ec(r)}function Fc(e,t){const n=Sc(e);return!(n===t||!uc(n)||kc(n))&&("fixed"===Nc(n).position||Fc(n,t))}function Bc(e,t,n){const r=fc(t),o=cc(t),a="fixed"===n,i=Oc(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=Is(0);function c(){s.x=Tc(o)}if(r||!r&&!a)if(("body"!==lc(t)||mc(o))&&(l=Ac(t)),r){const e=Oc(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?Is(0):Ic(o,l);return{x:i.left+l.scrollLeft-s.x-d.x,y:i.top+l.scrollTop-s.y-d.y,width:i.width,height:i.height}}function jc(e){return"static"===Nc(e).position}function Hc(e,t){if(!fc(e)||"fixed"===Nc(e).position)return null;if(t)return t(e);let n=e.offsetParent;return cc(e)===n&&(n=n.ownerDocument.body),n}function Yc(e,t){const n=sc(e);if(gc(e))return n;if(!fc(e)){let t=Sc(e);for(;t&&!kc(t);){if(uc(t)&&!jc(t))return t;t=Sc(t)}return n}let r=Hc(e,t);for(;r&&hc(r)&&jc(r);)r=Hc(r,t);return r&&kc(r)&&jc(r)&&!xc(r)?n:r||(e=>{let t=Sc(e);for(;fc(t)&&!kc(t);){if(xc(t))return t;if(gc(t))return null;t=Sc(t)}return null})(e)||n}const $c={convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=cc(r),l=!!t&&gc(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=Is(1);const d=Is(0),u=fc(r);if((u||!u&&!a)&&(("body"!==lc(r)||mc(i))&&(s=Ac(r)),u)){const e=Oc(r);c=_c(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!i||u||a?Is(0):Ic(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-s.scrollTop*c.y+d.y+f.y}},getDocumentElement:cc,getClippingRect(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?gc(t)?[]:((e,t)=>{const n=t.get(e);if(n)return n;let r=Ec(e,[],!1).filter(e=>uc(e)&&"body"!==lc(e)),o=null;const a="fixed"===Nc(e).position;let i=a?Sc(e):e;for(;uc(i)&&!kc(i);){const t=Nc(i),n=xc(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||mc(i)&&!n&&Fc(e,i))?r=r.filter(e=>e!==i):o=t,i=Sc(i)}return t.set(e,r),r})(t,this._c):[].concat(n),r],i=Wc(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,d=i.left;for(let u=1;u<a.length;u++){const e=Wc(t,a[u],o);l=Ls(e.top,l),s=zs(e.right,s),c=zs(e.bottom,c),d=Ls(e.left,d)}return{width:s-d,height:c-l,x:d,y:l}},getOffsetParent:Yc,async getElementRects(e){const t=this.getOffsetParent||Yc,n=this.getDimensions,r=await n(e.floating);return{reference:Bc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects(e){return Array.from(e.getClientRects())},getDimensions(e){const{width:t,height:n}=Pc(e);return{width:t,height:n}},getScale:_c,isElement:uc,isRTL(e){return"rtl"===Nc(e).direction}};function Vc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}const Gc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:l,middlewareData:s}=t,{element:c,padding:d=0}=Bs(e,t)||{};if(null==c)return{};const u=Js(d),f={x:n,y:r},p=Gs(o),m=$s(p),h=await i.getDimensions(c),g="y"===p,b=g?"top":"left",v=g?"bottom":"right",y=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],C=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let k=C?C[y]:0;k&&await(null==i.isElement?void 0:i.isElement(C))||(k=l.floating[y]||a.floating[m]);const N=w/2-x/2,A=k/2-h[m]/2-1,S=zs(u[b],A),M=zs(u[v],A),E=S,R=k-h[m]-M,P=k/2-h[m]/2+N,D=Fs(E,P,R),_=!s.arrow&&null!=Hs(o)&&P!==D&&a.reference[m]/2-(P<E?S:M)-h[m]/2<0,z=_?P<E?P-E:P-R:0;return{[p]:f[p]+z,data:{[p]:D,centerOffset:P-D-z,..._&&{alignmentOffset:z}},reset:_}}}),qc=e=>(void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:s=!0,crossAxis:c=!0}=Bs(e,t),d={x:n,y:r},u=Vs(o),f=Ys(u);let p=d[f],m=d[u];const h=Bs(l,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var b,v;const e="y"===f?"width":"height",t=ac.has(js(o)),n=a.reference[u]-a.floating[e]+(t&&(null==(b=i.offset)?void 0:b[u])||0)+(t?0:g.crossAxis),r=a.reference[u]+a.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[u])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[u]:m}}});var Qc="undefined"!=typeof document?E:()=>{};function Uc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Uc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Uc(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Kc(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xc(e,t){const n=Kc(e);return Math.round(t*n)/n}function Zc(e){const t=x.useRef(e);return Qc(()=>{t.current=e}),t}const Jc=(e,t)=>{const n=(e=>(void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await(async(e,t)=>{const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=js(n),l=Hs(n),s="y"===Vs(n),c=ac.has(i)?-1:1,d=a&&s?-1:1,u=Bs(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*d,y:f*c}:{x:f*c,y:p*d}})(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},ed=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn(e){let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Bs(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),f=Vs(js(o)),p=Ys(f);let m=d[p],h=d[f];i&&(m=Fs(m+u["y"===p?"top":"left"],m,m-u["y"===p?"bottom":"right"])),l&&(h=Fs(h+u["y"===f?"top":"left"],h,h-u["y"===f?"bottom":"right"]));const g=s.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[f]:l}}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},td=(e,t)=>({fn:qc(e).fn,options:[e,t]}),nd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Bs(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const b=js(o),v=Vs(l),y=js(l)===l,w=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=f||(y||!h?[Zs(l)]:(e=>{const t=Zs(e);return[qs(e),t,qs(t)]})(l)),C="none"!==m;!f&&C&&x.push(...((e,t,n,r)=>{const o=Hs(e);let a=((e,t,n)=>{switch(e){case"top":case"bottom":return n?t?Us:Qs:t?Qs:Us;case"left":case"right":return t?Ks:Xs;default:return[]}})(js(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(qs)))),a})(l,h,m,w));const k=[l,...x],N=await s.detectOverflow(t,g),A=[];let S=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&A.push(N[b]),u){const e=((e,t,n)=>{void 0===n&&(n=!1);const r=Hs(e),o=Gs(e),a=$s(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Zs(i)),[i,Zs(i)]})(o,i,w);A.push(N[e[0]],N[e[1]])}if(S=[...S,{placement:o,overflows:A}],!A.every(e=>e<=0)){var M,E;const e=((null==(M=a.flip)?void 0:M.index)||0)+1,t=k[e];if(t&&("alignment"!==u||v===Vs(t)||S.every(e=>Vs(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(E=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=S.filter(e=>{if(C){const t=Vs(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},rd=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:s=()=>{},...c}=Bs(e,t),d=await i.detectOverflow(t,c),u=js(o),f=Hs(o),p="y"===Vs(o),{width:m,height:h}=a.floating;let g,b;"top"===u||"bottom"===u?(g=u,b=f===(await(null==i.isRTL?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(b=u,g="end"===f?"top":"bottom");const v=h-d.top-d.bottom,y=m-d.left-d.right;let w=zs(h-d[g],v),x=zs(m-d[b],y);if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(x=y),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(w=v),!t.middlewareData.shift&&!f){const e=Ls(d.left,0),t=Ls(d.right,0),n=Ls(d.top,0),r=Ls(d.bottom,0);p?x=m-2*(0!==e||0!==t?e+t:Ls(d.left,d.right)):w=h-2*(0!==n||0!==r?n+r:Ls(d.top,d.bottom))}await s({...t,availableWidth:x,availableHeight:w});const C=await i.getDimensions(l.floating);return m!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},od=(e,t)=>{const n=(e=>(void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...a}=Bs(e,t);switch(o){case"referenceHidden":{const e=rc(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:oc(e)}}}case"escaped":{const e=rc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:oc(e)}}}default:return{}}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},ad=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&{}.hasOwnProperty.call(n,"current")?null!=n.current?Gc({element:n.current,padding:r}).fn(t):{}:n?Gc({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var id=x.forwardRef((t,n)=>{const{children:r,width:o=10,height:a=5,...i}=t;/* @__PURE__ */
|
|
131
|
+
return e(U.svg,{...i,ref:n,width:o,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:/* @__PURE__ */e("polygon",{points:"0,0 30,0 15,10"})})});id.displayName="Arrow";var ld=id,sd="Popper",[cd,dd]=L(sd),[ud,fd]=cd(sd),pd=t=>{const{__scopePopper:n,children:r}=t,[o,a]=x.useState(null);/* @__PURE__ */
|
|
132
|
+
return e(ud,{scope:n,anchor:o,onAnchorChange:a,children:r})};pd.displayName=sd;var md="PopperAnchor",hd=x.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...a}=t,i=fd(md,r),l=x.useRef(null),s=W(n,l),c=x.useRef(null);return x.useEffect(()=>{const e=c.current;c.current=o?.current||l.current,e!==c.current&&i.onAnchorChange(c.current)}),o?null:/* @__PURE__ */e(U.div,{...a,ref:s})});hd.displayName=md;var gd="PopperContent",[bd,vd]=cd(gd),yd=x.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:a=0,align:i="center",alignOffset:l=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:h,...g}=t,b=fd(gd,r),[v,y]=x.useState(null),w=W(n,e=>y(e)),[C,k]=x.useState(null),N=rs(C),A=N?.width??0,S=N?.height??0,M=o+("center"!==i?"-"+i:""),E="number"==typeof u?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(d)?d:[d],D=R.length>0,_={padding:E,boundary:R.filter(kd),altBoundary:D},{refs:z,floatingStyles:L,placement:O,isPositioned:T,middlewareData:I}=(e=>{void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:s,open:c}=e,[d,u]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=x.useState(r);Uc(f,r)||p(r);const[m,h]=x.useState(null),[g,b]=x.useState(null),v=x.useCallback(e=>{e!==k.current&&(k.current=e,h(e))},[]),y=x.useCallback(e=>{e!==N.current&&(N.current=e,b(e))},[]),w=a||m,C=i||g,k=x.useRef(null),N=x.useRef(null),A=x.useRef(d),S=null!=s,M=Zc(s),E=Zc(o),R=Zc(c),D=x.useCallback(()=>{if(!k.current||!N.current)return;const e={placement:t,strategy:n,middleware:f};E.current&&(e.platform=E.current),((e,t,n)=>{const r={platform:$c,...n},o={...r.platform,_c:/* @__PURE__ */new Map};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:nc},s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=tc(c,r,s),f=r,p=0;const m={};for(let h=0;h<a.length;h++){const n=a[h];if(!n)continue;const{name:g,fn:b}=n,{x:v,y:y,data:w,reset:x}=await b({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});d=null!=v?v:d,u=null!=y?y:u,m[g]={...m[g],...w},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:d,y:u}=tc(c,f,s))),h=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:m}})(e,t,{...r,platform:o})})(k.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==R.current};_.current&&!Uc(A.current,t)&&(A.current=t,P.flushSync(()=>{u(t)}))})},[f,t,n,E,R]);Qc(()=>{!1===c&&A.current.isPositioned&&(A.current.isPositioned=!1,u(e=>({...e,isPositioned:!1})))},[c]);const _=x.useRef(!1);Qc(()=>(_.current=!0,()=>{_.current=!1}),[]),Qc(()=>{if(w&&(k.current=w),C&&(N.current=C),w&&C){if(M.current)return M.current(w,C,D);D()}},[w,C,D,M,S]);const z=x.useMemo(()=>({reference:k,floating:N,setReference:v,setFloating:y}),[v,y]),L=x.useMemo(()=>({reference:w,floating:C}),[w,C]),O=x.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Xc(L.floating,d.x),r=Xc(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...Kc(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,L.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:D,refs:z,elements:L,floatingStyles:O}),[d,D,z,L,O])})({strategy:"fixed",placement:M,whileElementsMounted(...e){return((e,t,n,r)=>{void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Dc(e),d=o||a?[...c?Ec(c):[],...t?Ec(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const u=c&&l?((e,t)=>{let n,r=null;const o=cc(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,s){void 0===l&&(l=!1),void 0===s&&(s=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(l||t(),!f||!p)return;const m={rootMargin:-Ts(u)+"px "+-Ts(o.clientWidth-(d+f))+"px "+-Ts(o.clientHeight-(u+p))+"px "+-Ts(d)+"px",threshold:Ls(0,zs(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||Vc(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(b){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a})(c,n):null;let f,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let h=s?Oc(e):null;return s&&function t(){const r=Oc(e);h&&!Vc(h,r)&&n(),h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}})(...e,{animationFrame:"always"===m})},elements:{reference:b.anchor},middleware:[Jc({mainAxis:a+S,alignmentAxis:l}),c&&ed({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?td():void 0,..._}),c&&nd({..._}),rd({..._,apply({elements:e,rects:t,availableWidth:n,availableHeight:r}){const{width:o,height:a}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${o}px`),i.setProperty("--radix-popper-anchor-height",`${a}px`)}}),C&&ad({element:C,padding:s}),Nd({arrowWidth:A,arrowHeight:S}),p&&od({strategy:"referenceHidden",..._})]}),[F,B]=Ad(O),j=ar(h);G(()=>{T&&j?.()},[T,j]);const H=I.arrow?.x,Y=I.arrow?.y,$=0!==I.arrow?.centerOffset,[V,q]=x.useState();return G(()=>{v&&q(window.getComputedStyle(v).zIndex)},[v]),/* @__PURE__ */e("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:T?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:/* @__PURE__ */e(bd,{scope:r,placedSide:F,onArrowChange:k,arrowX:H,arrowY:Y,shouldHideArrow:$,children:/* @__PURE__ */e(U.div,{"data-side":F,"data-align":B,...g,ref:w,style:{...g.style,animation:T?void 0:"none"}})})})});yd.displayName=gd;var wd="PopperArrow",xd={top:"bottom",right:"left",bottom:"top",left:"right"},Cd=x.forwardRef((t,n)=>{const{__scopePopper:r,...o}=t,a=vd(wd,r),i=xd[a.placedSide];
|
|
133
133
|
/* @__PURE__ */
|
|
134
|
-
return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */e(
|
|
135
|
-
return e(
|
|
136
|
-
return e(
|
|
137
|
-
return e(K,{present:o||i.open,children:/* @__PURE__ */e(i.modal?
|
|
138
|
-
return e(
|
|
139
|
-
return e(U.button,{type:"button",...o,ref:n,onClick:V(t.onClick,()=>a.onOpenChange(!1))})}).displayName=
|
|
140
|
-
return e(
|
|
141
|
-
/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"text-gray-700",children:t}),o?/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"text-brand",children:"*"}):null,r?/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:"text-gray-500",children:r}):null]}):null}const
|
|
134
|
+
return e("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:/* @__PURE__ */e(ld,{...o,ref:n,style:{...o.style,display:"block"}})})});function kd(e){return null!==e}Cd.displayName=wd;var Nd=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=0!==o.arrow?.centerOffset,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[s,c]=Ad(n),d={start:"0%",center:"50%",end:"100%"}[c],u=(o.arrow?.x??0)+i/2,f=(o.arrow?.y??0)+l/2;let p="",m="";return"bottom"===s?(p=a?d:`${u}px`,m=-l+"px"):"top"===s?(p=a?d:`${u}px`,m=`${r.floating.height+l}px`):"right"===s?(p=-l+"px",m=a?d:`${f}px`):"left"===s&&(p=`${r.floating.width+l}px`,m=a?d:`${f}px`),{data:{x:p,y:m}}}});function Ad(e){const[t,n="center"]=e.split("-");return[t,n]}var Sd=pd,Md=hd,Ed=yd,Rd=Cd,Pd="Popover",[Dd]=L(Pd,[dd]),_d=dd(),[zd,Ld]=Dd(Pd),Od=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:a,onOpenChange:i,modal:l=!1}=t,s=_d(n),c=x.useRef(null),[d,u]=x.useState(!1),[f,p]=Q({prop:o,defaultProp:a??!1,onChange:i,caller:Pd});/* @__PURE__ */
|
|
135
|
+
return e(Sd,{...s,children:/* @__PURE__ */e(zd,{scope:n,contentId:ee(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:d,onCustomAnchorAdd:x.useCallback(()=>u(!0),[]),onCustomAnchorRemove:x.useCallback(()=>u(!1),[]),modal:l,children:r})})};Od.displayName=Pd;var Td="PopoverAnchor";x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(Td,r),i=_d(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:s}=a;return x.useEffect(()=>(l(),()=>s()),[l,s]),/* @__PURE__ */e(Md,{...i,...o,ref:n})}).displayName=Td;var Id="PopoverTrigger",Wd=x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(Id,r),i=_d(r),l=W(n,a.triggerRef),s=/* @__PURE__ */e(U.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Kd(a.open),...o,ref:l,onClick:V(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:/* @__PURE__ */e(Md,{asChild:!0,...i,children:s})});Wd.displayName=Id;var Fd="PopoverPortal",[Bd,jd]=Dd(Fd,{forceMount:void 0}),Hd=t=>{const{__scopePopover:n,forceMount:r,children:o,container:a}=t,i=Ld(Fd,n);/* @__PURE__ */
|
|
136
|
+
return e(Bd,{scope:n,forceMount:r,children:/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:o})})})};Hd.displayName=Fd;var Yd="PopoverContent",$d=x.forwardRef((t,n)=>{const r=jd(Yd,t.__scopePopover),{forceMount:o=r.forceMount,...a}=t,i=Ld(Yd,t.__scopePopover);/* @__PURE__ */
|
|
137
|
+
return e(K,{present:o||i.open,children:/* @__PURE__ */e(i.modal?Gd:qd,{...a,ref:n})})});$d.displayName=Yd;var Vd=/* @__PURE__ */F("PopoverContent.RemoveScroll"),Gd=x.forwardRef((t,n)=>{const r=Ld(Yd,t.__scopePopover),o=x.useRef(null),a=W(n,o),i=x.useRef(!1);return x.useEffect(()=>{const e=o.current;if(e)return mo(e)},[]),/* @__PURE__ */e(lo,{as:Vd,allowPinchZoom:!0,children:/* @__PURE__ */e(Qd,{...t,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(t.onCloseAutoFocus,e=>{e.preventDefault(),i.current||r.triggerRef.current?.focus()}),onPointerDownOutside:V(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent;i.current=2===t.button||0===t.button&&!0===t.ctrlKey},{checkForDefaultPrevented:!1}),onFocusOutside:V(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),qd=x.forwardRef((t,n)=>{const r=Ld(Yd,t.__scopePopover),o=x.useRef(!1),a=x.useRef(!1);/* @__PURE__ */
|
|
138
|
+
return e(Qd,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus(e){t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,a.current=!1},onInteractOutside(e){t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const n=e.target,i=r.triggerRef.current?.contains(n);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})}),Qd=x.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...f}=t,p=Ld(Yd,r),m=_d(r);return Nr(),/* @__PURE__ */e(hr,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i,children:/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onDismiss(){return p.onOpenChange(!1)},children:/* @__PURE__ */e(Ed,{"data-state":Kd(p.open),role:"dialog",id:p.contentId,...m,...f,ref:n,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ud="PopoverClose";function Kd(e){return e?"open":"closed"}x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=Ld(Ud,r);/* @__PURE__ */
|
|
139
|
+
return e(U.button,{type:"button",...o,ref:n,onClick:V(t.onClick,()=>a.onOpenChange(!1))})}).displayName=Ud,x.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,a=_d(r);/* @__PURE__ */
|
|
140
|
+
return e(Rd,{...a,...o,ref:n})}).displayName="PopoverArrow";var Xd=Od,Zd=Wd,Jd=Hd,eu=$d;const tu=xn(["w-full transition-[border-color,box-shadow,background-color] duration-200 ease-out outline-none","rounded-2.5 border border-gray-200 bg-white text-gray-900","placeholder:text-gray-500","hover:border-gray-400","focus-visible:border-brand focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-gray-200 disabled:bg-gray-100 disabled:text-gray-400","aria-[invalid=true]:border-red-500 aria-[invalid=true]:shadow-focus-error"],{variants:{size:{xs:"h-[26px] text-2xs",sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-[46px] text-base",xl:"h-[54px] text-lg"},hasIconLeft:{true:"",false:""},hasSuffix:{true:"",false:""},multiline:{false:"",true:"h-auto min-h-[80px] resize-y align-top leading-[1.6] rounded-2.5"},state:{default:"",focus:"border-brand ring-2 ring-brand/30 ring-offset-2",filled:"border-gray-300",error:"border-red-500 shadow-focus-error",disabled:"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400"}},compoundVariants:[{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"xs",class:"px-2.5"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"sm",class:"px-3"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"md",class:"px-3.5"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"lg",class:"px-4"},{multiline:!1,hasIconLeft:!1,hasSuffix:!1,size:"xl",class:"px-5"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"xs",class:"pl-9 pr-2.5"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"sm",class:"pl-9 pr-3"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"md",class:"pl-9 pr-3.5"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"lg",class:"pl-9 pr-4"},{multiline:!1,hasIconLeft:!0,hasSuffix:!1,size:"xl",class:"pl-9 pr-5"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"xs",class:"pl-2.5 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"sm",class:"pl-3 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"md",class:"pl-3.5 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"lg",class:"pl-4 pr-9"},{multiline:!1,hasIconLeft:!1,hasSuffix:!0,size:"xl",class:"pl-5 pr-9"},{multiline:!1,hasIconLeft:!0,hasSuffix:!0,class:"pl-9 pr-9"},{multiline:!0,size:"xs",class:"p-2.5"},{multiline:!0,size:"sm",class:"p-3"},{multiline:!0,size:"md",class:"p-3.5"},{multiline:!0,size:"lg",class:"p-4"},{multiline:!0,size:"xl",class:"p-5"}],defaultVariants:{size:"md",hasIconLeft:!1,hasSuffix:!1,multiline:!1,state:"default"}});function nu({label:t,labelHint:r,required:o,htmlFor:a}){return t?/* @__PURE__ */n("label",{htmlFor:a,className:"mb-1.5 inline-flex items-center gap-1.5",children:[
|
|
141
|
+
/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"text-gray-700",children:t}),o?/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"text-brand",children:"*"}):null,r?/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:"text-gray-500",children:r}):null]}):null}const ru=x.forwardRef(({className:t,size:r,state:o,label:a,labelHint:i,helper:l,error:s,type:c,iconLeft:d,iconRight:u,suffix:f,multiline:p=!1,rows:m=8,cols:h,count:g,value:b,defaultValue:v,onChange:y,required:w,disabled:C,id:k,...N},A)=>{const S=Boolean(d)&&!p,M=f??u,E=Boolean(M)&&!p,R=null==f&&null!=u&&!p,P=s?"error":C?"disabled":o,D=Boolean(g)&&p,_=void 0!==b,[z,L]=x.useState("string"==typeof v?v:""),O=(_?String(b??""):z).length,T=e=>{!_&&D&&L(e.currentTarget.value),y?.(e)},I=pn(tu({size:r,hasIconLeft:S,hasSuffix:E,multiline:p,state:P}),D&&"pb-7",t);/* @__PURE__ */
|
|
142
142
|
return n("div",{className:"flex w-full flex-col",children:[
|
|
143
|
-
/* @__PURE__ */e(
|
|
144
|
-
/* @__PURE__ */n("div",{className:"relative w-full",children:[S&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:pn("pointer-events-none absolute top-1/2 left-3 flex -translate-y-1/2 items-center","focus"===P?"text-brand":"text-gray-400"),children:d}),E&&/* @__PURE__ */e("span",{"aria-hidden":!R||void 0,className:pn("absolute top-1/2 right-2 flex -translate-y-1/2 items-center gap-1",R?"":"pointer-events-none right-3 text-gray-500 text-xs font-semibold"),children:M}),p?/* @__PURE__ */e("textarea",{id:k,rows:m,cols:h,required:w,disabled:C,"aria-invalid":!!s||void 0,className:I,ref:A,value:b,defaultValue:v,onChange:T,...N}):/* @__PURE__ */e("input",{id:k,type:c,required:w,disabled:C,"aria-invalid":!!s||void 0,className:I,ref:A,value:b,defaultValue:v,onChange:T,...N}),D&&/* @__PURE__ */n("div",{className:"pointer-events-none absolute right-3 bottom-2.5 text-2xs font-semibold tabular-nums text-gray-500",children:[O,null!=N.maxLength?`/${N.maxLength}`:""]})]}),s||l?/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:pn("mt-1.5",s?"text-red-500":"text-gray-500"),children:s||l}):null]})});
|
|
145
|
-
return n(
|
|
146
|
-
/* @__PURE__ */e(
|
|
143
|
+
/* @__PURE__ */e(nu,{label:a,labelHint:i,required:w,htmlFor:k}),
|
|
144
|
+
/* @__PURE__ */n("div",{className:"relative w-full",children:[S&&/* @__PURE__ */e("span",{"aria-hidden":!0,className:pn("pointer-events-none absolute top-1/2 left-3 flex -translate-y-1/2 items-center","focus"===P?"text-brand":"text-gray-400"),children:d}),E&&/* @__PURE__ */e("span",{"aria-hidden":!R||void 0,className:pn("absolute top-1/2 right-2 flex -translate-y-1/2 items-center gap-1",R?"":"pointer-events-none right-3 text-gray-500 text-xs font-semibold"),children:M}),p?/* @__PURE__ */e("textarea",{id:k,rows:m,cols:h,required:w,disabled:C,"aria-invalid":!!s||void 0,className:I,ref:A,value:b,defaultValue:v,onChange:T,...N}):/* @__PURE__ */e("input",{id:k,type:c,required:w,disabled:C,"aria-invalid":!!s||void 0,className:I,ref:A,value:b,defaultValue:v,onChange:T,...N}),D&&/* @__PURE__ */n("div",{className:"pointer-events-none absolute right-3 bottom-2.5 text-2xs font-semibold tabular-nums text-gray-500",children:[O,null!=N.maxLength?`/${N.maxLength}`:""]})]}),s||l?/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:pn("mt-1.5",s?"text-red-500":"text-gray-500"),children:s||l}):null]})});ru.displayName="TextField";const ou={sm:"min-h-[64px]",md:"min-h-[80px]",lg:"min-h-[96px]"},au=x.forwardRef(({className:t,size:n="md",count:r,max:o,full:a=!0,maxLength:i,...l},s)=>/* @__PURE__ */e("div",{className:a?"w-full":"w-[380px]",children:/* @__PURE__ */e(ru,{ref:s,multiline:!0,size:n,count:r,maxLength:i??o,className:pn(ou[n],t),...l})}));function iu({comment:t,isAuthor:r,onDelete:o,onReport:a}){const[i,l]=C.useState(!1),s=r?[{key:"delete",label:"삭제",onClick(){return o?.(t)},className:"text-red-600"}]:[{key:"report",label:"신고",onClick(){return a?.(t)},className:"text-red-600"}];/* @__PURE__ */
|
|
145
|
+
return n(Xd,{open:i,onOpenChange:l,children:[
|
|
146
|
+
/* @__PURE__ */e(Zd,{asChild:!0,children:/* @__PURE__ */n("button",{type:"button","aria-label":"댓글 더보기 메뉴",onClick(e){return e.stopPropagation()},className:pn("inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-full","text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700"),children:[
|
|
147
147
|
/* @__PURE__ */e("span",{className:"sr-only",children:"더보기"}),
|
|
148
148
|
/* @__PURE__ */n("span",{className:"flex items-center gap-0.5",children:[
|
|
149
149
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"}),
|
|
150
150
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"}),
|
|
151
151
|
/* @__PURE__ */e("span",{className:"h-[3px] w-[3px] rounded-full bg-current"})]})]})}),
|
|
152
|
-
/* @__PURE__ */e(
|
|
153
|
-
/* @__PURE__ */e(
|
|
152
|
+
/* @__PURE__ */e(Jd,{children:/* @__PURE__ */e(eu,{align:"end",sideOffset:6,className:pn("z-50 min-w-[120px] overflow-hidden rounded-3 border border-gray-200 bg-white p-1.5 shadow-sm","data-[state=closed]:animate-out data-[state=open]:animate-in","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95"),children:/* @__PURE__ */e("div",{className:"flex flex-col gap-0.5",children:s.map(t=>/* @__PURE__ */e("button",{type:"button",className:pn("rounded-2 px-3 py-2 text-left transition-colors hover:bg-gray-100",t.className),onClick(){t.onClick(),l(!1)},children:/* @__PURE__ */e(On,{size:"caption1",weight:"medium",children:t.label})},t.key))})})})]})}function lu({open:t,placeholder:r,submitLabel:o,cancelLabel:a,onSubmit:i,onCancel:l}){const[s,c]=C.useState("");return C.useEffect(()=>{t||c("")},[t]),/* @__PURE__ */e("div",{"aria-hidden":!t,className:pn("overflow-hidden transition-all duration-200 ease-out",t?"mt-1 max-h-[260px] opacity-100":"mt-0 max-h-0 opacity-0 pointer-events-none"),onClick(e){return e.stopPropagation()},children:/* @__PURE__ */n("div",{className:"flex items-center gap-1.5 p-1",children:[
|
|
153
|
+
/* @__PURE__ */e(au,{value:s,onChange(e){return c(e.target.value)},placeholder:r,rows:1,className:"min-h-[36px] flex-1 text-sm"}),
|
|
154
154
|
/* @__PURE__ */e("button",{type:"button",className:"rounded-2 px-2 py-1.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick:l,children:/* @__PURE__ */e(On,{size:"caption2",weight:"medium",children:a})}),
|
|
155
|
-
/* @__PURE__ */e("button",{type:"button",className:pn("rounded-2 bg-brand px-2.5 py-1.5 text-white transition-colors hover:bg-main-700",!s.trim()&&"cursor-not-allowed bg-main-400 hover:bg-main-400"),onClick(){return i(s)},disabled:!s.trim(),children:/* @__PURE__ */e(On,{size:"caption2",weight:"bold",children:o})})]})})}function
|
|
155
|
+
/* @__PURE__ */e("button",{type:"button",className:pn("rounded-2 bg-brand px-2.5 py-1.5 text-white transition-colors hover:bg-main-700",!s.trim()&&"cursor-not-allowed bg-main-400 hover:bg-main-400"),onClick(){return i(s)},disabled:!s.trim(),children:/* @__PURE__ */e(On,{size:"caption2",weight:"bold",children:o})})]})})}function su({comment:t,depth:r,isLast:o,currentUserId:a,activeReplyTargetId:i,replyPlaceholder:l,replySubmitLabel:s,replyCancelLabel:c,replyButtonLabel:d,loadMoreRepliesLabel:u,onReplyOpen:f,onReplySubmit:p,onReplyCancel:m,onLoadMoreReplies:h,onDelete:g,onReport:b}){const v="boolean"==typeof t.isAuthor?t.isAuthor:Boolean(a&&t.author.id===a),y=Boolean(t.replies?.length),w=i===t.id,x=Boolean(t.hasMoreReplies),C=t.replies??[],k=0===r?!y:o;/* @__PURE__ */
|
|
156
156
|
return e("li",{children:/* @__PURE__ */n("div",{className:pn("flex items-start gap-2.5 py-3 animate-fade-up",!o&&0===r&&"border-b border-gray-100"),children:[
|
|
157
|
-
/* @__PURE__ */e(
|
|
157
|
+
/* @__PURE__ */e(Es,{imageUrl:t.author.profileImageUrl,size:"sm",className:"shrink-0"}),
|
|
158
158
|
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[
|
|
159
159
|
/* @__PURE__ */n("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
160
160
|
/* @__PURE__ */e(On,{size:"caption1",weight:"bold",className:"truncate text-gray-900",children:t.author.nickname}),
|
|
161
161
|
/* @__PURE__ */n("div",{className:"flex shrink-0 items-center gap-1",children:[
|
|
162
162
|
/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:"text-gray-500",children:t.createdAt}),
|
|
163
|
-
/* @__PURE__ */e(
|
|
164
|
-
/* @__PURE__ */e(On,{as:"p",size:"caption1",weight:"regular",className:"mt-1 leading-[1.5] break-words whitespace-pre-wrap text-gray-700",children:t.content}),y?/* @__PURE__ */e("ul",{className:"mt-2 -ml-5 space-y-0 border-l border-gray-100 pl-3",children:C.map((t,n)=>/* @__PURE__ */e(
|
|
165
|
-
/* @__PURE__ */e(
|
|
163
|
+
/* @__PURE__ */e(iu,{comment:t,isAuthor:v,onDelete:g,onReport:b})]})]}),
|
|
164
|
+
/* @__PURE__ */e(On,{as:"p",size:"caption1",weight:"regular",className:"mt-1 leading-[1.5] break-words whitespace-pre-wrap text-gray-700",children:t.content}),y?/* @__PURE__ */e("ul",{className:"mt-2 -ml-5 space-y-0 border-l border-gray-100 pl-3",children:C.map((t,n)=>/* @__PURE__ */e(su,{comment:t,depth:r+1,isLast:n===C.length-1,currentUserId:a,activeReplyTargetId:i,replyPlaceholder:l,replySubmitLabel:s,replyCancelLabel:c,replyButtonLabel:d,loadMoreRepliesLabel:u,onReplyOpen:f,onReplySubmit:p,onReplyCancel:m,onLoadMoreReplies:h,onDelete:g,onReport:b},t.id))}):null,
|
|
165
|
+
/* @__PURE__ */e(lu,{open:w,placeholder:l,submitLabel:s,cancelLabel:c,onSubmit(e){return p(t,e)},onCancel:m}),k&&!w||x?/* @__PURE__ */n("div",{className:"mt-1.5 flex items-center gap-1",children:[k&&!w?/* @__PURE__ */e("button",{type:"button",className:"inline-flex rounded-2 px-1.5 py-0.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick(){return f(t)},children:/* @__PURE__ */e(On,{size:"caption2",weight:"medium",children:d})}):null,x?/* @__PURE__ */e("button",{type:"button",className:"inline-flex rounded-2 px-1.5 py-0.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700",onClick(){return h?.(t)},disabled:t.isLoadingReplies,children:/* @__PURE__ */e(On,{size:"caption2",weight:"medium",children:t.isLoadingReplies?"불러오는 중...":`${u}${"number"==typeof t.remainingReplyCount?` (${t.remainingReplyCount})`:""}`})}):null]}):null]})]})})}function cu({comments:t,currentUserId:n,className:r,replyPlaceholder:o="댓글을 입력하세요.",replySubmitLabel:a="등록",replyCancelLabel:i="취소",replyButtonLabel:l="답글 달기",loadMoreRepliesLabel:s="대댓글 더보기",onReplySubmit:c,onLoadMoreReplies:d,onDelete:u,onReport:f}){const[p,m]=C.useState(null),h=e=>{m(e.id)},g=()=>{m(null)},b=(e,t)=>{const n=t.trim();n&&(c?.(e,n),m(null))};return t.length?/* @__PURE__ */e("ul",{className:pn("flex flex-col",r),children:t.map((r,c)=>/* @__PURE__ */e(su,{comment:r,depth:0,isLast:c===t.length-1,currentUserId:n,activeReplyTargetId:p,replyPlaceholder:o,replySubmitLabel:a,replyCancelLabel:i,replyButtonLabel:l,loadMoreRepliesLabel:s,onReplyOpen:h,onReplySubmit:b,onReplyCancel:g,onLoadMoreReplies:d,onDelete:u,onReport:f},r.id))}):/* @__PURE__ */e(On,{size:"caption1",weight:"regular",className:pn("block py-2 text-gray-500",r),children:"아직 댓글이 없습니다."})}function du(e){const t=x.useCallback(t=>{if("undefined"==typeof window||!window.matchMedia)return()=>{};const n=window.matchMedia(e);return n.addEventListener("change",t),()=>n.removeEventListener("change",t)},[e]),n=x.useCallback(()=>!("undefined"==typeof window||!window.matchMedia)&&window.matchMedia(e).matches,[e]),r=x.useCallback(()=>!1,[]);return x.useSyncExternalStore(t,n,r)}function uu(e=640){return du(`(max-width: ${e}px)`)}au.displayName="TextArea";const fu=pn("z-50 w-auto text-gray-900 outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"),pu="border-0 p-0 shadow-none",mu=C.forwardRef(({label:t,placeholder:r,className:o,type:a="button",...i},l)=>/* @__PURE__ */n("button",{ref:l,type:a,className:pn("group flex h-10 w-full items-center justify-between gap-3 rounded-3 border border-gray-200 bg-white px-4","outline-none transition-all duration-200","data-[state=open]:border-brand hover:border-gray-400 focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:border-gray-200 disabled:bg-gray-100 disabled:hover:border-gray-200",o),...i,children:[
|
|
166
166
|
/* @__PURE__ */e(On,{size:"body2",weight:"medium",className:pn(t?"text-gray-900":"text-gray-500","group-disabled:text-gray-400"),children:t??r}),
|
|
167
|
-
/* @__PURE__ */e(Fn,{className:"size-4 text-gray-600 group-disabled:text-gray-400",strokeWidth:2.2})]}));function
|
|
168
|
-
return e(ca,{className:"mb-3 text-center",children:t})}function
|
|
169
|
-
/* @__PURE__ */e(na,{asChild:!0,children:/* @__PURE__ */e(
|
|
167
|
+
/* @__PURE__ */e(Fn,{className:"size-4 text-gray-600 group-disabled:text-gray-400",strokeWidth:2.2})]}));function hu(e){return e?{onMouseDownCapture(e){return e.stopPropagation()}}:{}}function gu({children:t}){/* @__PURE__ */
|
|
168
|
+
return e(ca,{className:"mb-3 text-center",children:t})}function bu({value:t,onChange:r,className:o,placeholder:a="YYYY/MM/DD",disabled:i=!1,disableClickPropagation:l=!1,mobileSheet:s=!0,sheetTitle:c,calendarProps:d}){const[u,f]=C.useState(!1),p=uu(),m=s&&p,h=t?fi(t,"yyyy/MM/dd"):void 0,g=/* @__PURE__ */e(ql,{...d,mode:"single",selected:t,onSelect(e){r(e),e&&f(!1)},className:m?pu:void 0,initialFocus:!0});return m?/* @__PURE__ */n(ta,{open:u,onOpenChange:f,children:[
|
|
169
|
+
/* @__PURE__ */e(na,{asChild:!0,children:/* @__PURE__ */e(mu,{label:h,placeholder:a,className:o,disabled:i})}),
|
|
170
170
|
/* @__PURE__ */n(ia,{showHandle:!1,showClose:!0,children:[
|
|
171
|
-
/* @__PURE__ */e(
|
|
172
|
-
/* @__PURE__ */e("div",{className:"flex justify-center",children:g})]})]}):/* @__PURE__ */n(
|
|
173
|
-
/* @__PURE__ */e(
|
|
174
|
-
/* @__PURE__ */e(
|
|
175
|
-
/* @__PURE__ */e(na,{asChild:!0,children:/* @__PURE__ */e(
|
|
171
|
+
/* @__PURE__ */e(gu,{children:c??a}),
|
|
172
|
+
/* @__PURE__ */e("div",{className:"flex justify-center",children:g})]})]}):/* @__PURE__ */n(Xd,{open:u,onOpenChange:f,children:[
|
|
173
|
+
/* @__PURE__ */e(Zd,{asChild:!0,children:/* @__PURE__ */e(mu,{label:h,placeholder:a,className:o,disabled:i})}),
|
|
174
|
+
/* @__PURE__ */e(Jd,{children:/* @__PURE__ */e(eu,{className:fu,align:"start",sideOffset:8,...hu(l),children:g})})]})}function vu({value:t,onChange:r,className:o,placeholder:a="기간을 선택해주세요",disabled:i=!1,disableClickPropagation:l=!1,mobileSheet:s=!0,sheetTitle:c,calendarProps:d}){const[u,f]=C.useState(!1),p=uu(),m=s&&p,h=C.useRef(!1),g=t?.from&&t?.to?`${fi(t.from,"yyyy/MM/dd")} - ${fi(t.to,"yyyy/MM/dd")}`:t?.from?`${fi(t.from,"yyyy/MM/dd")} -`:void 0,b=e=>{f(e),h.current=!!e&&Boolean(t?.from&&t?.to)},v=/* @__PURE__ */e(ql,{...d,mode:"range",selected:t,onSelect(e,t){if(h.current&&t)return r({from:t,to:void 0}),void(h.current=!1);r(e),e?.from&&e?.to&&(f(!1),h.current=!1)},className:m?pu:void 0,initialFocus:!0});return m?/* @__PURE__ */n(ta,{open:u,onOpenChange:b,children:[
|
|
175
|
+
/* @__PURE__ */e(na,{asChild:!0,children:/* @__PURE__ */e(mu,{label:g,placeholder:a,className:o,disabled:i})}),
|
|
176
176
|
/* @__PURE__ */n(ia,{showHandle:!1,showClose:!0,children:[
|
|
177
|
-
/* @__PURE__ */e(
|
|
178
|
-
/* @__PURE__ */e("div",{className:"flex justify-center",children:v})]})]}):/* @__PURE__ */n(
|
|
179
|
-
/* @__PURE__ */e(
|
|
180
|
-
/* @__PURE__ */e(
|
|
181
|
-
return e(Ko,{className:pn("fixed inset-0 z-50 bg-black/45 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...n})}const
|
|
182
|
-
return n(
|
|
183
|
-
/* @__PURE__ */e(
|
|
184
|
-
/* @__PURE__ */n(Xo,{className:pn(
|
|
177
|
+
/* @__PURE__ */e(gu,{children:c??a}),
|
|
178
|
+
/* @__PURE__ */e("div",{className:"flex justify-center",children:v})]})]}):/* @__PURE__ */n(Xd,{open:u,onOpenChange:b,children:[
|
|
179
|
+
/* @__PURE__ */e(Zd,{asChild:!0,children:/* @__PURE__ */e(mu,{label:g,placeholder:a,className:o,disabled:i})}),
|
|
180
|
+
/* @__PURE__ */e(Jd,{children:/* @__PURE__ */e(eu,{className:fu,align:"start",sideOffset:8,...hu(l),children:v})})]})}mu.displayName="PickerTrigger";const yu=qo,wu=Qo,xu=Uo,Cu=ea;function ku({className:t,...n}){/* @__PURE__ */
|
|
181
|
+
return e(Ko,{className:pn("fixed inset-0 z-50 bg-black/45 backdrop-blur-[2px]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...n})}const Nu=xn(pn("fixed top-[50%] left-[50%] z-50 flex flex-col","w-[calc(100%-2rem)] max-w-[92vw] -translate-x-1/2 -translate-y-1/2","rounded-4 bg-white shadow-xl","overflow-hidden","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","duration-200"),{variants:{size:{sm:"sm:w-[360px]",md:"sm:w-[480px]",lg:"sm:w-[600px]",xl:"sm:w-[760px]"}},defaultVariants:{size:"md"}});function Au({className:t,children:r,size:o,showClose:a=!0,...i}){/* @__PURE__ */
|
|
182
|
+
return n(xu,{children:[
|
|
183
|
+
/* @__PURE__ */e(ku,{}),
|
|
184
|
+
/* @__PURE__ */n(Xo,{className:pn(Nu({size:o}),t),...i,children:[r,a&&/* @__PURE__ */n(ea,{className:pn("absolute top-4 right-4 flex h-7 w-7 items-center justify-center","rounded-2 bg-gray-100 text-gray-700 transition-colors","hover:bg-gray-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30"),children:[
|
|
185
185
|
/* @__PURE__ */e(Vn,{width:14,height:14}),
|
|
186
|
-
/* @__PURE__ */e("span",{className:"sr-only",children:"닫기"})]})]})]})}function
|
|
187
|
-
return e("div",{className:pn("flex items-center justify-between px-5 pt-5 pb-3",t),...n})}function
|
|
188
|
-
return e("div",{className:pn("px-5 pt-1 pb-5 text-gray-700",t),...n})}function
|
|
189
|
-
return e("div",{className:pn("flex justify-end gap-2 border-t border-gray-100 bg-gray-50 px-5 py-3.5",t),...n})}function
|
|
190
|
-
return e(Zo,{asChild:!0,...r,children:/* @__PURE__ */e(On,{size:"body2",weight:"extrabold",className:pn("text-black tracking-[-0.3px]",t),children:n})})}function
|
|
191
|
-
return e(Jo,{asChild:!0,...r,children:/* @__PURE__ */e(On,{size:"caption2",weight:"regular",className:pn("text-gray-700 leading-[1.55]",t),children:n})})}const
|
|
192
|
-
return n(
|
|
193
|
-
/* @__PURE__ */n(
|
|
194
|
-
/* @__PURE__ */e(
|
|
186
|
+
/* @__PURE__ */e("span",{className:"sr-only",children:"닫기"})]})]})]})}function Su({className:t,...n}){/* @__PURE__ */
|
|
187
|
+
return e("div",{className:pn("flex items-center justify-between px-5 pt-5 pb-3",t),...n})}function Mu({className:t,...n}){/* @__PURE__ */
|
|
188
|
+
return e("div",{className:pn("px-5 pt-1 pb-5 text-gray-700",t),...n})}function Eu({className:t,...n}){/* @__PURE__ */
|
|
189
|
+
return e("div",{className:pn("flex justify-end gap-2 border-t border-gray-100 bg-gray-50 px-5 py-3.5",t),...n})}function Ru({className:t,children:n,...r}){/* @__PURE__ */
|
|
190
|
+
return e(Zo,{asChild:!0,...r,children:/* @__PURE__ */e(On,{size:"body2",weight:"extrabold",className:pn("text-black tracking-[-0.3px]",t),children:n})})}function Pu({className:t,children:n,...r}){/* @__PURE__ */
|
|
191
|
+
return e(Jo,{asChild:!0,...r,children:/* @__PURE__ */e(On,{size:"caption2",weight:"regular",className:pn("text-gray-700 leading-[1.55]",t),children:n})})}const Du={brand:{iconBg:"bg-brand-soft",iconColor:"text-brand",buttonVariant:"primary"},danger:{iconBg:"bg-red-300/40",iconColor:"text-red-600",buttonVariant:"danger"},mint:{iconBg:"bg-mint-200",iconColor:"text-mint-900",buttonVariant:"primary"}};function _u({open:t,defaultOpen:r,onOpenChange:o,tone:a="brand",icon:i="Flag",title:l,description:s,confirmLabel:c="확인",cancelLabel:d="취소",onConfirm:u,onCancel:f,children:p}){const m=Du[a];/* @__PURE__ */
|
|
192
|
+
return n(yu,{open:t,defaultOpen:r,onOpenChange:o,children:[p&&/* @__PURE__ */e(wu,{asChild:!0,children:p}),
|
|
193
|
+
/* @__PURE__ */n(xu,{children:[
|
|
194
|
+
/* @__PURE__ */e(ku,{}),
|
|
195
195
|
/* @__PURE__ */n(Xo,{className:pn("fixed top-1/2 left-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[360px] max-w-[92vw] rounded-4 bg-white px-5 pt-6 pb-5 text-center","shadow-xl","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","duration-200"),children:[
|
|
196
196
|
/* @__PURE__ */e("div",{className:pn("mx-auto mb-3.5 flex h-14 w-14 items-center justify-center rounded-full",m.iconBg),children:/* @__PURE__ */e(Kn,{name:i,size:26,className:m.iconColor})}),
|
|
197
197
|
/* @__PURE__ */e(Zo,{asChild:!0,children:/* @__PURE__ */e(On,{size:"body2",weight:"extrabold",className:"block text-black tracking-[-0.3px]",children:l})}),s&&/* @__PURE__ */e(Jo,{asChild:!0,children:/* @__PURE__ */e(On,{size:"caption2",weight:"regular",className:"mt-1.5 block whitespace-pre-line text-gray-600 leading-[1.55]",children:s})}),
|
|
198
198
|
/* @__PURE__ */n("div",{className:"mt-5 flex gap-2",children:[
|
|
199
|
-
/* @__PURE__ */e(
|
|
200
|
-
/* @__PURE__ */e(
|
|
199
|
+
/* @__PURE__ */e(Cu,{asChild:!0,children:/* @__PURE__ */e(Wn,{variant:"secondary",className:"h-11 flex-1 rounded-2.5",onClick:f,children:d})}),
|
|
200
|
+
/* @__PURE__ */e(Cu,{asChild:!0,children:/* @__PURE__ */e(Wn,{variant:m.buttonVariant,className:"h-11 flex-1 rounded-2.5",onClick:u,children:c})})]})]})]})]})}const zu=xn(["inline-flex w-full items-center justify-between rounded-2 border bg-white text-gray-900 font-medium","transition-[border-color,box-shadow,background-color] duration-150 ease-out outline-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-400"],{variants:{size:{sm:"h-8 px-3 text-xs",md:"h-[38px] px-3.5 text-sm",lg:"h-[46px] px-4 text-base"},open:{true:"border-brand shadow-focus",false:"border-gray-200 hover:border-gray-300"}},defaultVariants:{size:"md",open:!1}}),Lu=x.forwardRef(({className:t,size:r,open:o,label:a,value:i,placeholder:l="선택",full:s=!1,disabled:c,...d},u)=>{const f=null==i||""===i,p=x.useId();/* @__PURE__ */
|
|
201
201
|
return n("div",{className:pn(s?"w-full":"w-60"),children:[a?/* @__PURE__ */e("label",{htmlFor:p,className:"mb-1.5 inline-block text-2xs font-bold text-gray-700",children:a}):null,
|
|
202
|
-
/* @__PURE__ */n("button",{ref:u,id:p,type:"button",disabled:c,"aria-haspopup":"listbox","aria-expanded":!!o,className:pn(
|
|
202
|
+
/* @__PURE__ */n("button",{ref:u,id:p,type:"button",disabled:c,"aria-haspopup":"listbox","aria-expanded":!!o,className:pn(zu({size:r,open:o}),f&&"text-gray-400 font-normal",t),...d,children:[
|
|
203
203
|
/* @__PURE__ */e("span",{className:"truncate",children:f?l:i}),
|
|
204
|
-
/* @__PURE__ */e(mn,{width:14,height:14,className:pn("ml-2 shrink-0 transition-transform duration-150",o&&"rotate-180",c?"text-gray-400":"text-gray-500"),strokeWidth:2})]})]})});function
|
|
204
|
+
/* @__PURE__ */e(mn,{width:14,height:14,className:pn("ml-2 shrink-0 transition-transform duration-150",o&&"rotate-180",c?"text-gray-400":"text-gray-500"),strokeWidth:2})]})]})});function Ou({items:t,value:r,onSelect:o,width:a=240,open:i,className:l,style:s,...c}){const d=void 0!==i,[u,f]=x.useState(i??!0);return x.useEffect(()=>{i&&f(!0)},[i]),d&&!u?null:/* @__PURE__ */e("div",{"data-slot":"dropdown-menu","data-state":d?i?"open":"closed":"open",role:"listbox",onAnimationEnd(e){e.target===e.currentTarget&&d&&!i&&f(!1)},className:pn("rounded-2.5 border border-gray-200 bg-white p-1.5 shadow-lg","origin-top","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-top-1 data-[state=open]:slide-in-from-top-1","duration-150 ease-out",l),style:{width:a,...s},...c,children:t.map(t=>{const a=t.value===r;/* @__PURE__ */
|
|
205
205
|
return n("div",{role:"option","aria-selected":a,"aria-disabled":t.disabled||void 0,onClick(){return!t.disabled&&o?.(t.value)},className:pn("flex cursor-pointer items-center justify-between rounded-1.5 px-3 py-2 text-sm transition-colors",a?"bg-brand-softer font-bold text-brand":"font-medium text-gray-800 hover:bg-gray-50",t.disabled&&"cursor-not-allowed opacity-50"),children:[
|
|
206
|
-
/* @__PURE__ */e("span",{className:"truncate",children:t.label}),a?/* @__PURE__ */e(jn,{className:"ml-2 h-3 w-3 shrink-0 text-brand",strokeWidth:10}):null]},t.value)})})}function
|
|
206
|
+
/* @__PURE__ */e("span",{className:"truncate",children:t.label}),a?/* @__PURE__ */e(jn,{className:"ml-2 h-3 w-3 shrink-0 text-brand",strokeWidth:10}):null]},t.value)})})}function Tu({selected:t,placeholder:r="추가",onRemove:o,onAddClick:a,className:i,...l}){/* @__PURE__ */
|
|
207
207
|
return n("div",{"data-slot":"multi-select",onClick:a,className:pn("flex min-h-[38px] w-80 flex-wrap items-center gap-1.5 rounded-2 border border-gray-200 bg-white px-3 py-2.5",a&&"cursor-pointer transition-colors hover:border-gray-300",i),...l,children:[t.map(t=>/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1 rounded-1.5 bg-brand-soft px-2 py-0.5 text-2xs font-bold text-brand",children:[t,o?/* @__PURE__ */e("button",{type:"button",onClick(e){e.stopPropagation(),o(t)},"aria-label":`${t} 제거`,className:"ml-0.5 inline-flex h-3 w-3 items-center justify-center rounded-full text-brand transition-colors hover:bg-brand hover:text-white",children:/* @__PURE__ */e("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",children:/* @__PURE__ */e("path",{d:"M2 2l5 5M7 2l-5 5"})})}):null]},t)),
|
|
208
|
-
/* @__PURE__ */e("span",{className:"text-xs text-gray-400",children:r})]})}function
|
|
208
|
+
/* @__PURE__ */e("span",{className:"text-xs text-gray-400",children:r})]})}function Iu({goals:t,defaultGoals:r=[],onGoalsChange:o,placeholder:a="목표를 입력하세요",disabled:i=!1,addOnBlur:l=!1,inputAriaLabel:s="목표 입력",maxGoals:c,className:d,...u}){const f=void 0!==t,[p,m]=C.useState(r),[h,g]=C.useState(""),b=C.useRef(!1),v=f?t:p,y=void 0!==c&&v.length>=c,w=!i&&!y&&h.trim().length>0,x=e=>{f||m(e),o?.(e)},k=()=>{if(i)return;const e=h.trim();e&&(x([...v,e]),g(""))};/* @__PURE__ */
|
|
209
209
|
return n("div",{className:pn("flex w-full flex-col gap-2",d),...u,children:[v.map((t,r)=>/* @__PURE__ */n("div",{className:"flex h-10 w-full items-center justify-between rounded-2 border border-gray-200 bg-white px-5 animate-fade-up",children:[
|
|
210
210
|
/* @__PURE__ */e(On,{size:"caption2",weight:"regular",className:"line-clamp-1 text-gray-900",children:t}),
|
|
211
211
|
/* @__PURE__ */e("button",{type:"button","aria-label":`목표 삭제: ${t}`,disabled:i,onClick(){return(e=>{i||x(v.filter((t,n)=>n!==e))})(r)},className:pn("inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-2 text-gray-500 transition-colors hover:cursor-pointer",!i&&"hover:bg-gray-100 hover:text-gray-700",i&&"cursor-not-allowed text-gray-400"),children:/* @__PURE__ */e(Vn,{className:"h-4 w-4"})})]},`${t}-${r}`)),
|
|
212
|
-
/* @__PURE__ */e(
|
|
213
|
-
return e("div",{"data-slot":"heatmap",role:v?void 0:"img",className:pn("w-full",p),style:{display:"grid",gridTemplateRows:`repeat(${r}, 1fr)`,gridAutoFlow:"column",gridAutoColumns:"1fr",gap:i},...m,children:b.slice(0,g).map((t,n)=>{const r=Math.max(0,Math.min(4,Math.round(t)));return v?/* @__PURE__ */e(
|
|
214
|
-
return n(
|
|
215
|
-
/* @__PURE__ */e(
|
|
216
|
-
/* @__PURE__ */e(
|
|
212
|
+
/* @__PURE__ */e(ru,{value:h,disabled:i||y,"aria-label":s,placeholder:y?`최대 ${c}개까지 입력할 수 있습니다`:a,className:"pr-16",iconRight:/* @__PURE__ */e("button",{type:"button","aria-label":"목표 추가",onMouseDown(e){return e.preventDefault()},onClick:k,disabled:!w,className:pn("inline-flex h-7 items-center rounded-1.5 px-2.5 text-xs font-bold transition-colors",w?"bg-brand text-white hover:brightness-105 hover:cursor-pointer":"cursor-not-allowed bg-gray-100 text-gray-400"),children:"추가"}),onChange(e){return g(e.target.value)},onCompositionStart(){b.current=!0},onCompositionEnd(){b.current=!1},onKeyDown(e){"Enter"===e.key&&(e.nativeEvent.isComposing||b.current||229===e.nativeEvent.keyCode||(e.preventDefault(),k()))},onBlur(){l&&k()}})]})}Lu.displayName="Dropdown";const Wu={main:["var(--gray-100)","var(--main-300)","var(--main-500)","var(--main-700)","var(--brand)"],mint:["var(--gray-100)","var(--mint-300)","var(--mint-500)","var(--mint-700)","var(--mint-900)"],blue:["var(--gray-100)","var(--blue-300)","var(--blue-400)","var(--blue-500)","var(--blue-600)"],green:["var(--gray-100)","var(--green-200)","var(--green-400)","var(--green-500)","var(--green-700)"],gray:["var(--gray-100)","var(--gray-300)","var(--gray-500)","var(--gray-700)","var(--gray-900)"]};function Fu({cells:t,cols:n=20,rows:r=7,tone:o="main",palette:a,gap:i=3,cellRadius:l=3,ariaLabel:s,renderCellTooltip:c,renderCellActions:d,onCellClick:u,onCellHover:f,className:p,...m}){const h=a??Wu[o],g=r*n,b=t??Array.from({length:g},()=>0),v=Boolean(c),[y,w]=C.useState(null);/* @__PURE__ */
|
|
213
|
+
return e("div",{"data-slot":"heatmap",role:v?void 0:"img",className:pn("w-full",p),style:{display:"grid",gridTemplateRows:`repeat(${r}, 1fr)`,gridAutoFlow:"column",gridAutoColumns:"1fr",gap:i},...m,children:b.slice(0,g).map((t,n)=>{const r=Math.max(0,Math.min(4,Math.round(t)));return v?/* @__PURE__ */e(Bu,{index:n,level:r,color:h[r],cellRadius:l,ariaLabel:s?.(n,r),selected:y===n,onSelect:w,renderCellTooltip:c,renderCellActions:d,onCellClick:u,onCellHover:f},n):/* @__PURE__ */e("div",{"aria-label":s?.(n,r),style:{aspectRatio:"1",borderRadius:l,background:h[r]}},n)})})}const Bu=C.memo(({index:t,level:r,color:o,cellRadius:a,ariaLabel:i,selected:l,onSelect:s,renderCellTooltip:c,renderCellActions:d,onCellClick:u,onCellHover:f})=>{const[p,m]=C.useState(!1),h=C.useRef(null),g=C.useRef(!1),b=C.useRef(!1),v={index:t,level:r};C.useEffect(()=>{l||m(!1)},[l]);const y=()=>{null!==h.current&&(clearTimeout(h.current),h.current=null)};/* @__PURE__ */
|
|
214
|
+
return n(Xd,{open:p,onOpenChange(e){if(!e){if(g.current)return void(g.current=!1);m(!1),l&&s(null),b.current=!0,setTimeout(()=>{b.current=!1},200)}},children:[
|
|
215
|
+
/* @__PURE__ */e(Zd,{asChild:!0,children:/* @__PURE__ */e("button",{type:"button","aria-label":i,className:pn("cursor-pointer transition-[box-shadow,transform] duration-150 ease-out","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",l&&"ring-2 ring-gray-800 ring-offset-1"),style:{aspectRatio:"1",borderRadius:a,background:o,border:"none",padding:0},onMouseEnter(){y(),f?.(v),l||b.current||m(!0)},onMouseLeave(){f?.(null),l||(h.current=setTimeout(()=>m(!1),80))},onClick(){y(),l?(s(null),m(!1),b.current=!0,setTimeout(()=>{b.current=!1},200)):(g.current=!0,s(t),m(!0),u?.(v))}})}),
|
|
216
|
+
/* @__PURE__ */e(Jd,{children:/* @__PURE__ */n(eu,{side:"top",sideOffset:4,onOpenAutoFocus(e){return e.preventDefault()},onMouseEnter:y,onMouseLeave(){l||m(!1)},className:pn("z-50 min-w-[120px] rounded-2 bg-gray-900 px-3 py-2 text-xs text-white shadow-default","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[c?/* @__PURE__ */e("div",{className:"whitespace-nowrap text-xs",children:c(v)}):null,l&&d?/* @__PURE__ */e("div",{className:"mt-2",children:d(v)}):null]})})]})});function ju({previewUrl:t,onSelectFile:r,onClear:o,placeholderTitle:a="썸네일 영역을 클릭해 이미지를 선택하세요.",placeholderSubtitle:i="또는 이미지를 드래그해서 놓아주세요.",helperText:l="JPG, PNG, GIF 파일을 업로드할 수 있습니다.",clearLabel:s="선택 해제",dropZoneClassName:c="min-h-[220px] flex-1 lg:min-h-[440px]",className:d}){const u=k(null),[f,p]=N(!1),[m,h]=N(null),g=Boolean(t)&&m!==t,b=Boolean(t),v=()=>{u.current?.click()},y=e=>{e&&e.type.startsWith("image/")&&(h(null),r(e))};/* @__PURE__ */
|
|
217
217
|
return n("div",{className:pn("flex h-full flex-col rounded-4 border border-gray-200 bg-white p-4",d),children:[
|
|
218
218
|
/* @__PURE__ */n("div",{role:"button",tabIndex:0,"aria-label":"썸네일 이미지 선택",className:pn("relative flex w-full cursor-pointer items-center justify-center overflow-hidden rounded-3 border bg-gray-100 transition outline-none","focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2",c,f?"border-main-700 ring-3 ring-main-300":"border-gray-200 hover:border-gray-300"),onClick:v,onKeyDown(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),v())},onDragEnter(e){e.preventDefault(),p(!0)},onDragOver(e){e.preventDefault(),f||p(!0)},onDragLeave(e){e.preventDefault(),p(!1)},onDrop(e){e.preventDefault(),p(!1),y(e.dataTransfer.files?.[0]??null)},children:[g?/* @__PURE__ */e("img",{src:t,alt:"썸네일 미리보기",className:"absolute inset-0 h-full w-full object-cover",onError(){return h(t??null)}}):/* @__PURE__ */n("div",{className:"flex flex-col items-center gap-2 px-4 text-center",children:[
|
|
219
219
|
/* @__PURE__ */e(On,{size:"body2",weight:"medium",className:"text-gray-700",children:a}),
|
|
220
220
|
/* @__PURE__ */e(On,{size:"caption1",weight:"regular",className:"text-gray-500",children:i})]}),
|
|
221
221
|
/* @__PURE__ */e("input",{ref:u,type:"file",accept:"image/*",onChange(e){y(e.target.files?.[0]??null),e.target.value=""},className:"hidden"})]}),
|
|
222
222
|
/* @__PURE__ */n("div",{className:"mt-4 flex items-center justify-between gap-3",children:[
|
|
223
|
-
/* @__PURE__ */e(On,{size:"caption1",weight:"regular",className:"text-gray-500",children:l}),b&&o?/* @__PURE__ */e(Wn,{type:"button",variant:"secondary",size:"sm",className:"shrink-0",onClick:o,children:s}):null]})]})}function
|
|
224
|
-
return e("div",{className:pn("flex items-center justify-center bg-brand-soft",t),children:/* @__PURE__ */e(Gn,{className:pn("text-main-500 animate-float",{sm:"w-4 h-6",md:"w-6 h-10",lg:"w-8 h-14"}[n])})})}function
|
|
223
|
+
/* @__PURE__ */e(On,{size:"caption1",weight:"regular",className:"text-gray-500",children:l}),b&&o?/* @__PURE__ */e(Wn,{type:"button",variant:"secondary",size:"sm",className:"shrink-0",onClick:o,children:s}):null]})]})}function Hu({className:t,logoSize:n="md"}){/* @__PURE__ */
|
|
224
|
+
return e("div",{className:pn("flex items-center justify-center bg-brand-soft",t),children:/* @__PURE__ */e(Gn,{className:pn("text-main-500 animate-float",{sm:"w-4 h-6",md:"w-6 h-10",lg:"w-8 h-14"}[n])})})}function Yu(){/* @__PURE__ */
|
|
225
225
|
return n("div",{className:"flex items-end gap-2",children:[
|
|
226
226
|
/* @__PURE__ */e(Gn,{width:24,height:40,className:"text-gray-300"}),
|
|
227
|
-
/* @__PURE__ */e(On,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const
|
|
227
|
+
/* @__PURE__ */e(On,{size:"body1",weight:"bold",className:"my-2.5 text-gray-300",children:"1D1S"})]})}const $u=xn(["inline-flex shrink-0 items-center justify-center rounded-lg","select-none transition-colors duration-150 ease-out outline-none","focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-40"],{variants:{size:{sm:"size-8 text-xs",md:"size-10 text-sm",lg:"size-12 text-base"},active:{true:"bg-brand text-white font-semibold",false:"text-gray-600 hover:bg-gray-100"}},defaultVariants:{size:"md",active:!1}}),Vu="dots";function Gu({count:t,page:r,defaultPage:o=1,onPageChange:a,siblingCount:i=1,size:l="md",className:s,...c}){const d=void 0!==r,[u,f]=x.useState(o),p=Math.min(Math.max(d?r:u,1),t),m=e=>{const n=Math.min(Math.max(e,1),t);n!==p&&(d||f(n),a?.(n))},h=((e,t,n)=>{if(e<=2*n+5)return Array.from({length:e},(e,t)=>t+1);const r=Math.max(t-n,1),o=Math.min(t+n,e),a=r>2,i=o<e-1,l=[1];a&&l.push(Vu);for(let s=a?r:2;s<=(i?o:e-1);s+=1)l.push(s);return i&&l.push(Vu),l.push(e),l})(t,p,i);/* @__PURE__ */
|
|
228
228
|
return n("nav",{"aria-label":"페이지네이션",className:pn("flex items-center gap-1",s),...c,children:[
|
|
229
|
-
/* @__PURE__ */e("button",{type:"button","aria-label":"이전 페이지",disabled:p<=1,onClick(){return m(p-1)},className:pn(
|
|
230
|
-
/* @__PURE__ */e("button",{type:"button","aria-label":"다음 페이지",disabled:p>=t,onClick(){return m(p+1)},className:pn(
|
|
229
|
+
/* @__PURE__ */e("button",{type:"button","aria-label":"이전 페이지",disabled:p<=1,onClick(){return m(p-1)},className:pn($u({size:l})),children:/* @__PURE__ */e(Kn,{name:"ChevronLeft",className:"size-5"})}),h.map((t,n)=>t===Vu?/* @__PURE__ */e("span",{"aria-hidden":!0,className:pn($u({size:l}),"pointer-events-none"),children:"…"},`dots-${n}`):/* @__PURE__ */e("button",{type:"button","aria-label":`${t} 페이지`,"aria-current":t===p?"page":void 0,onClick(){return m(t)},className:pn($u({size:l,active:t===p})),children:t},t)),
|
|
230
|
+
/* @__PURE__ */e("button",{type:"button","aria-label":"다음 페이지",disabled:p>=t,onClick(){return m(p+1)},className:pn($u({size:l})),children:/* @__PURE__ */e(Kn,{name:"ChevronRight",className:"size-5"})})]})}const qu={xs:4,sm:6,md:8,lg:12};function Qu({value:t,label:r,showLabel:o,showValueText:a=!0,valueText:i,infinite:l=!1,size:s="md",thickness:c,fillColor:d,trackColor:u,className:f,labelClassName:p,valueClassName:m,trackClassName:h,fillClassName:g,...b}){const v=Math.min(Math.max(t,0),100),y=l?"100%":`${v}%`,w=i??(l?"∞":`${v}%`),x=o??void 0!==r,C=c??qu[s];/* @__PURE__ */
|
|
231
231
|
return n("div",{className:pn("w-full",f),...b,children:[(x||a)&&/* @__PURE__ */n("div",{className:"flex items-center justify-between gap-3",children:[x?/* @__PURE__ */e(On,{size:"caption1",weight:"medium",className:pn("line-clamp-1 text-gray-800",p),children:r}):/* @__PURE__ */e("span",{}),a?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:pn("shrink-0 text-gray-600",m),children:w}):null]}),
|
|
232
|
-
/* @__PURE__ */e("div",{className:pn("mt-2 overflow-hidden rounded-full bg-gray-100",h),style:{height:`${C}px`,...u?{backgroundColor:u}:{}},children:/* @__PURE__ */e("div",{className:pn("h-full rounded-full bg-brand transition-[width] duration-300 ease-out",l&&"animate-shimmer",g),style:{width:y,...d?{backgroundColor:d}:{},...l?{backgroundImage:"linear-gradient(90deg, var(--brand) 25%, var(--main-400) 50%, var(--brand) 75%)",backgroundSize:"200% 100%"}:{}}})})]})}const
|
|
232
|
+
/* @__PURE__ */e("div",{className:pn("mt-2 overflow-hidden rounded-full bg-gray-100",h),style:{height:`${C}px`,...u?{backgroundColor:u}:{}},children:/* @__PURE__ */e("div",{className:pn("h-full rounded-full bg-brand transition-[width] duration-300 ease-out",l&&"animate-shimmer",g),style:{width:y,...d?{backgroundColor:d}:{},...l?{backgroundImage:"linear-gradient(90deg, var(--brand) 25%, var(--main-400) 50%, var(--brand) 75%)",backgroundSize:"200% 100%"}:{}}})})]})}const Uu=x.forwardRef(({className:t,label:r,id:o,disabled:a,...i},l)=>{const s=x.useId(),c=o||s;/* @__PURE__ */
|
|
233
233
|
return n("label",{htmlFor:c,className:pn("inline-flex cursor-pointer items-center gap-2 select-none",a&&"cursor-not-allowed opacity-[0.45]",t),children:[
|
|
234
234
|
/* @__PURE__ */n("span",{className:"relative inline-flex h-[18px] w-[18px] shrink-0 items-center justify-center",children:[
|
|
235
235
|
/* @__PURE__ */e("input",{ref:l,id:c,type:"radio",disabled:a,className:"peer absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none rounded-full border-[1.5px] border-gray-300 bg-white outline-none transition-colors focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2 checked:border-brand",...i}),
|
|
236
|
-
/* @__PURE__ */e("span",{className:"pointer-events-none h-[9px] w-[9px] scale-0 rounded-full bg-brand transition-transform duration-150 ease-out peer-checked:scale-100 peer-checked:animate-pop"})]}),r?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});function
|
|
237
|
-
return e("div",{role:"radiogroup",className:pn("flex","vertical"===i?"flex-col gap-2":"flex-row gap-4",l),...s,children:n.map(n=>/* @__PURE__ */e(
|
|
236
|
+
/* @__PURE__ */e("span",{className:"pointer-events-none h-[9px] w-[9px] scale-0 rounded-full bg-brand transition-transform duration-150 ease-out peer-checked:scale-100 peer-checked:animate-pop"})]}),r?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});function Ku({name:t,options:n,value:r,defaultValue:o,onChange:a,direction:i="vertical",className:l,...s}){const c=void 0!==r,[d,u]=x.useState(o),f=c?r:d;/* @__PURE__ */
|
|
237
|
+
return e("div",{role:"radiogroup",className:pn("flex","vertical"===i?"flex-col gap-2":"flex-row gap-4",l),...s,children:n.map(n=>/* @__PURE__ */e(Uu,{name:t,value:n.value,checked:f===n.value,disabled:n.disabled,onChange(e){c||u(n.value),a?.(n.value)},label:n.label},n.value))})}Uu.displayName="Radio";const Xu=["일","월","화","수","목","금","토"];function Zu(e="default"){return"strong"===e?"text-gray-900 font-extrabold":"accent"===e?"text-brand font-extrabold":"muted"===e?"text-gray-400 font-medium":"text-gray-700 font-medium"}function Ju(e="main"){return"soft"===e?"bg-main-600/50":"bg-brand"}function ef({rows:r,weekLabels:o=[...Xu],cellMinHeight:a=140,className:i}){/* @__PURE__ */
|
|
238
238
|
return e("div",{className:pn("w-full overflow-hidden rounded-3 border border-gray-200 bg-white",i),children:/* @__PURE__ */n("table",{className:"w-full table-fixed border-collapse",children:[
|
|
239
239
|
/* @__PURE__ */e("thead",{children:/* @__PURE__ */e("tr",{children:o.map((t,n)=>/* @__PURE__ */e("th",{className:pn("h-8 border-b border-r border-gray-200 bg-gray-50 px-1 text-center align-middle sm:h-11 sm:px-2.5",n===o.length-1&&"border-r-0"),scope:"col",children:/* @__PURE__ */e(On,{size:"caption3",weight:"medium",className:"text-gray-500 sm:text-sm",children:t})},`${t}-${n}`))})}),
|
|
240
240
|
/* @__PURE__ */e("tbody",{children:r.map((r,o)=>/* @__PURE__ */e("tr",{children:r.map((i,l)=>{const s=i.colSpan??1,c=i.id??`r${o}-c${l}`,d=r.slice(0,l+1).reduce((e,t)=>e+(t.colSpan??1),0)>=7;/* @__PURE__ */
|
|
241
|
-
return e("td",{colSpan:s,className:pn("border-r border-b border-gray-200 align-top",d&&"border-r-0"),children:/* @__PURE__ */e("div",{className:pn("flex h-full flex-col gap-1 p-1 transition-colors duration-200 sm:gap-2 sm:p-2",i.muted&&"bg-gray-50",i.highlighted&&"bg-brand-soft/70 ring-1 ring-inset ring-main-400"),style:{minHeight:`${a}px`},children:i.content?i.content:/* @__PURE__ */n(t,{children:[void 0!==i.day?/* @__PURE__ */e(On,{size:"caption3",weight:"medium",className:pn("leading-tight sm:text-base",
|
|
241
|
+
return e("td",{colSpan:s,className:pn("border-r border-b border-gray-200 align-top",d&&"border-r-0"),children:/* @__PURE__ */e("div",{className:pn("flex h-full flex-col gap-1 p-1 transition-colors duration-200 sm:gap-2 sm:p-2",i.muted&&"bg-gray-50",i.highlighted&&"bg-brand-soft/70 ring-1 ring-inset ring-main-400"),style:{minHeight:`${a}px`},children:i.content?i.content:/* @__PURE__ */n(t,{children:[void 0!==i.day?/* @__PURE__ */e(On,{size:"caption3",weight:"medium",className:pn("leading-tight sm:text-base",Zu(i.dayTone)),children:i.day}):null,void 0!==i.title?/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"line-clamp-1 text-gray-900 sm:text-sm",children:i.title}):null,i.bars&&i.bars.length>0?/* @__PURE__ */e("div",{className:"mt-0.5 flex flex-col gap-1",children:i.bars.map((t,n)=>{/* @__PURE__ */return e("span",{className:pn("block h-1 rounded-full transition-all duration-200 sm:h-1.5",Ju(t.tone)),style:{width:(r=t.width,void 0===r?"100%":"number"==typeof r?`${r}%`:r)}},`${c}-bar-${n}`);var r})}):null,void 0!==i.subtitle?/* @__PURE__ */e(On,{size:"caption3",weight:"medium",className:"hidden text-gray-600 sm:block",children:i.subtitle}):null,"number"==typeof i.participantCount&&i.participantCount>=2?/* @__PURE__ */n("div",{className:"mt-auto inline-flex w-fit items-center gap-0.5 rounded-full bg-brand-soft px-1.5 py-0.5 text-brand sm:gap-1 sm:px-2","aria-label":`${i.participantCount}명 작성`,children:[
|
|
242
242
|
/* @__PURE__ */e(Qn,{className:"size-2.5 sm:size-3",strokeWidth:2.4}),
|
|
243
|
-
/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"leading-none tabular-nums",children:i.participantCount})]}):null]})})},c)})},`row-${o}`))})]})})}function
|
|
243
|
+
/* @__PURE__ */e(On,{size:"caption3",weight:"bold",className:"leading-none tabular-nums",children:i.participantCount})]}):null]})})},c)})},`row-${o}`))})]})})}function tf({title:t,subtitle:r,action:o,onActionClick:a,actionLabel:i="전체보기 →",size:l="md",className:s,...c}){const d={sm:"text-sm font-extrabold tracking-[-0.2px]",md:"text-base font-extrabold tracking-[-0.3px]",lg:"text-lg font-extrabold tracking-[-0.4px]"}[l],u={sm:"text-3xs",md:"text-2xs",lg:"text-xs"}[l],f=o??(a?/* @__PURE__ */e("button",{type:"button",onClick:a,className:"text-xs font-bold text-brand transition-opacity hover:opacity-80",children:i}):null);/* @__PURE__ */
|
|
244
244
|
return n("div",{"data-slot":"section-header",className:pn("flex items-baseline justify-between gap-3",s),...c,children:[
|
|
245
245
|
/* @__PURE__ */n("div",{className:"min-w-0",children:[
|
|
246
|
-
/* @__PURE__ */e("h2",{className:pn("text-gray-900",d),children:t}),r?/* @__PURE__ */e("div",{className:pn("mt-0.5 text-gray-500",u),children:r}):null]}),f?/* @__PURE__ */e("div",{className:"shrink-0",children:f}):null]})}const
|
|
247
|
-
return n("div",{role:"radiogroup",onKeyDown(e){"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),g(1)):"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),g(-1))},className:pn(
|
|
246
|
+
/* @__PURE__ */e("h2",{className:pn("text-gray-900",d),children:t}),r?/* @__PURE__ */e("div",{className:pn("mt-0.5 text-gray-500",u),children:r}):null]}),f?/* @__PURE__ */e("div",{className:"shrink-0",children:f}):null]})}const nf=xn(["relative inline-flex items-center rounded-full bg-gray-100 p-1","isolate select-none"],{variants:{size:{sm:"h-8",md:"h-10",lg:"h-[46px]"},fullWidth:{true:"flex w-full",false:"inline-flex w-auto"}},defaultVariants:{size:"md",fullWidth:!0}}),rf=xn(["relative z-10 inline-flex h-full items-center justify-center gap-1.5 rounded-full","whitespace-nowrap transition-colors duration-200 ease-out outline-none","focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50"],{variants:{size:{sm:"px-3.5 text-xs",md:"px-5 text-sm",lg:"px-6 text-base"},fullWidth:{true:"flex-1",false:""},selected:{true:"text-brand",false:"text-gray-500 hover:text-gray-700"}},defaultVariants:{size:"md",fullWidth:!0,selected:!1}}),of={sm:"caption3",md:"caption2",lg:"caption1"};function af({options:t,value:r,defaultValue:o,onValueChange:a,size:i="md",fullWidth:l=!0,className:s,...c}){const d=void 0!==r,[u,f]=x.useState(o??t[0]?.value),p=d?r:u,m=Math.max(0,t.findIndex(e=>e.value===p)),h=e=>{d||f(e),a?.(e)},g=e=>{const n=t.length;for(let r=1;r<=n;r+=1){const o=t[(m+e*r+n*r)%n];if(o&&!o.disabled)return void h(o.value)}};/* @__PURE__ */
|
|
247
|
+
return n("div",{role:"radiogroup",onKeyDown(e){"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),g(1)):"ArrowLeft"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),g(-1))},className:pn(nf({size:i,fullWidth:l}),s),...c,children:[
|
|
248
248
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:pn("absolute top-1 bottom-1 left-1 z-0 rounded-full bg-white shadow-sm","transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)]"),style:{width:`calc((100% - 0.5rem) / ${t.length})`,transform:`translateX(${100*m}%)`}}),t.map(t=>{const r=t.value===p;/* @__PURE__ */
|
|
249
|
-
return n("button",{type:"button",role:"radio","aria-checked":r,disabled:t.disabled,tabIndex:r?0:-1,onClick(){return h(t.value)},className:pn(
|
|
250
|
-
/* @__PURE__ */e(On,{size:
|
|
251
|
-
return e(
|
|
252
|
-
/* @__PURE__ */e(
|
|
253
|
-
return e(
|
|
254
|
-
return e(U.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});
|
|
255
|
-
/* @__PURE__ */e(
|
|
256
|
-
return e(
|
|
257
|
-
return e(
|
|
258
|
-
return e(
|
|
259
|
-
return e(
|
|
249
|
+
return n("button",{type:"button",role:"radio","aria-checked":r,disabled:t.disabled,tabIndex:r?0:-1,onClick(){return h(t.value)},className:pn(rf({size:i,fullWidth:l,selected:r})),children:[t.icon?/* @__PURE__ */e("span",{className:"inline-flex shrink-0 items-center justify-center text-inherit [&>svg]:size-5",children:t.icon}):null,
|
|
250
|
+
/* @__PURE__ */e(On,{size:of[i??"md"],weight:"medium",className:"text-inherit",children:t.label})]},t.value)})]})}function lf(e,[t,n]){return Math.min(n,Math.max(t,e))}var sf=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),cf=x.forwardRef((t,n)=>/* @__PURE__ */e(U.span,{...t,ref:n,style:{...sf,...t.style}}));cf.displayName="VisuallyHidden";var df=cf,uf=[" ","Enter","ArrowUp","ArrowDown"],ff=[" ","Enter"],pf="Select",[mf,hf,gf]=$(pf),[bf]=L(pf,[gf,dd]),vf=dd(),[yf,wf]=bf(pf),[xf,Cf]=bf(pf),kf=t=>{const{__scopeSelect:r,children:o,open:a,defaultOpen:i,onOpenChange:l,value:s,defaultValue:c,onValueChange:d,dir:u,name:f,autoComplete:p,disabled:m,required:h,form:g}=t,b=vf(r),[v,y]=x.useState(null),[w,C]=x.useState(null),[k,N]=x.useState(!1),A=be(u),[S,M]=Q({prop:a,defaultProp:i??!1,onChange:l,caller:pf}),[E,R]=Q({prop:s,defaultProp:c,onChange:d,caller:pf}),P=x.useRef(null),D=!v||g||!!v.closest("form"),[_,z]=x.useState(/* @__PURE__ */new Set),L=Array.from(_).map(e=>e.props.value).join(";");/* @__PURE__ */
|
|
251
|
+
return e(Sd,{...b,children:/* @__PURE__ */n(yf,{required:h,scope:r,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:k,onValueNodeHasChildrenChange:N,contentId:ee(),value:E,onValueChange:R,open:S,onOpenChange:M,dir:A,triggerPointerDownPosRef:P,disabled:m,children:[
|
|
252
|
+
/* @__PURE__ */e(mf.Provider,{scope:r,children:/* @__PURE__ */e(xf,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(e=>{z(t=>new Set(t).add(e))},[]),onNativeOptionRemove:x.useCallback(e=>{z(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:o})}),D?/* @__PURE__ */n(dp,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:p,value:E,onChange(e){return R(e.target.value)},disabled:m,form:g,children:[void 0===E?/* @__PURE__ */e("option",{value:""}):null,Array.from(_)]},L):null]})})};kf.displayName=pf;var Nf="SelectTrigger",Af=x.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...a}=t,i=vf(r),l=wf(Nf,r),s=l.disabled||o,c=W(n,l.onTriggerChange),d=hf(r),u=x.useRef("touch"),[f,p,m]=fp(e=>{const t=d().filter(e=>!e.disabled),n=t.find(e=>e.value===l.value),r=pp(t,e,n);void 0!==r&&l.onValueChange(r.value)}),h=e=>{s||(l.onOpenChange(!0),m()),e&&(l.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};/* @__PURE__ */
|
|
253
|
+
return e(Md,{asChild:!0,...i,children:/* @__PURE__ */e(U.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":up(l.value)?"":void 0,...a,ref:c,onClick:V(a.onClick,e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)}),onPointerDown:V(a.onPointerDown,e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:V(a.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||uf.includes(e.key)&&(h(),e.preventDefault())})})})});Af.displayName=Nf;var Sf="SelectValue",Mf=x.forwardRef((n,r)=>{const{__scopeSelect:o,className:a,style:i,children:l,placeholder:s="",...c}=n,d=wf(Sf,o),{onValueNodeHasChildrenChange:u}=d,f=void 0!==l,p=W(r,d.onValueNodeChange);return G(()=>{u(f)},[u,f]),/* @__PURE__ */e(U.span,{...c,ref:p,style:{pointerEvents:"none"},children:up(d.value)?/* @__PURE__ */e(t,{children:s}):l})});Mf.displayName=Sf;var Ef=x.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...a}=t;/* @__PURE__ */
|
|
254
|
+
return e(U.span,{"aria-hidden":!0,...a,ref:n,children:o||"▼"})});Ef.displayName="SelectIcon";var Rf=t=>/* @__PURE__ */e(Cr,{asChild:!0,...t});Rf.displayName="SelectPortal";var Pf="SelectContent",Df=x.forwardRef((t,n)=>{const r=wf(Pf,t.__scopeSelect),[o,a]=x.useState();if(G(()=>{a(new DocumentFragment)},[]),!r.open){const n=o;return n?P.createPortal(
|
|
255
|
+
/* @__PURE__ */e(zf,{scope:t.__scopeSelect,children:/* @__PURE__ */e(mf.Slot,{scope:t.__scopeSelect,children:/* @__PURE__ */e("div",{children:t.children})})}),n):null}/* @__PURE__ */
|
|
256
|
+
return e(Tf,{...t,ref:n})});Df.displayName=Pf;var _f=10,[zf,Lf]=bf(Pf),Of=/* @__PURE__ */F("SelectContent.RemoveScroll"),Tf=x.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b,...v}=t,y=wf(Pf,r),[w,C]=x.useState(null),[k,N]=x.useState(null),A=W(n,e=>C(e)),[S,M]=x.useState(null),[E,R]=x.useState(null),P=hf(r),[D,_]=x.useState(!1),z=x.useRef(!1);x.useEffect(()=>{if(w)return mo(w)},[w]),Nr();const L=x.useCallback(e=>{const[t,...n]=P().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const a of e){if(a===o)return;if(a?.scrollIntoView({block:"nearest"}),a===t&&k&&(k.scrollTop=0),a===r&&k&&(k.scrollTop=k.scrollHeight),a?.focus(),document.activeElement!==o)return}},[P,k]),O=x.useCallback(()=>L([S,w]),[L,S,w]);x.useEffect(()=>{D&&O()},[D,O]);const{onOpenChange:T,triggerPointerDownPosRef:I}=y;x.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||T(!1),document.removeEventListener("pointermove",t),I.current=null};return null!==I.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,T,I]),x.useEffect(()=>{const e=()=>T(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[T]);const[F,B]=fp(e=>{const t=P().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=pp(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),j=x.useCallback((e,t,n)=>{const r=!z.current&&!n;(void 0!==y.value&&y.value===t||r)&&(M(e),r&&(z.current=!0))},[y.value]),H=x.useCallback(()=>w?.focus(),[w]),Y=x.useCallback((e,t,n)=>{(void 0!==y.value&&y.value===t||!z.current&&!n)&&R(e)},[y.value]),$="popper"===o?Wf:If,G=$===Wf?{side:s,sideOffset:c,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:b}:{};/* @__PURE__ */
|
|
257
|
+
return e(zf,{scope:r,content:w,viewport:k,onViewportChange:N,itemRefCallback:j,selectedItem:S,onItemLeave:H,itemTextRefCallback:Y,focusSelectedItem:O,selectedItemText:E,position:o,isPositioned:D,searchRef:F,children:/* @__PURE__ */e(lo,{as:Of,allowPinchZoom:!0,children:/* @__PURE__ */e(hr,{asChild:!0,trapped:y.open,onMountAutoFocus(e){e.preventDefault()},onUnmountAutoFocus:V(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside(e){return e.preventDefault()},onDismiss(){return y.onOpenChange(!1)},children:/* @__PURE__ */e($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu(e){return e.preventDefault()},...v,...G,onPlaced(){return _(!0)},ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:V(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=P().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=t.indexOf(e.target);t=t.slice(n+1)}setTimeout(()=>L(t)),e.preventDefault()}})})})})})})});Tf.displayName="SelectContentImpl";var If=x.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...a}=t,i=wf(Pf,r),l=Lf(Pf,r),[s,c]=x.useState(null),[d,u]=x.useState(null),f=W(n,e=>u(e)),p=hf(r),m=x.useRef(!1),h=x.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=l,w=x.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&d&&g&&b&&v){const e=i.trigger.getBoundingClientRect(),t=d.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),r=v.getBoundingClientRect();if("rtl"!==i.dir){const o=n.left-(r.left-t.left),a=e.width+(e.left-o),i=Math.max(a,t.width),l=window.innerWidth-_f,c=lf(o,[_f,Math.max(_f,l-i)]);s.style.minWidth=a+"px",s.style.left=c+"px"}else{const o=window.innerWidth-n.right-(t.right-r.right),a=window.innerWidth-e.right-o,i=e.width+a,l=Math.max(i,t.width),c=window.innerWidth-_f,d=lf(o,[_f,Math.max(_f,c-l)]);s.style.minWidth=i+"px",s.style.right=d+"px"}const a=p(),l=window.innerHeight-2*_f,c=g.scrollHeight,u=window.getComputedStyle(d),f=parseInt(u.borderTopWidth,10),h=parseInt(u.paddingTop,10),y=parseInt(u.borderBottomWidth,10),w=f+h+c+parseInt(u.paddingBottom,10)+y,x=Math.min(5*b.offsetHeight,w),C=window.getComputedStyle(g),k=parseInt(C.paddingTop,10),N=parseInt(C.paddingBottom,10),A=e.top+e.height/2-_f,S=l-A,M=b.offsetHeight/2,E=f+h+(b.offsetTop+M),R=w-E;if(E<=A){const e=a.length>0&&b===a[a.length-1].ref.current;s.style.bottom="0px";const t=Math.max(S,M+(e?N:0)+(d.clientHeight-g.offsetTop-g.offsetHeight)+y);s.style.height=E+t+"px"}else{const e=a.length>0&&b===a[0].ref.current;s.style.top="0px";const t=Math.max(A,f+g.offsetTop+(e?k:0)+M);s.style.height=t+R+"px",g.scrollTop=E-A+g.offsetTop}s.style.margin=`${_f}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[p,i.trigger,i.valueNode,s,d,g,b,v,i.dir,o]);G(()=>w(),[w]);const[C,k]=x.useState();G(()=>{d&&k(window.getComputedStyle(d).zIndex)},[d]);const N=x.useCallback(e=>{e&&!0===h.current&&(w(),y?.(),h.current=!1)},[w,y]);/* @__PURE__ */
|
|
258
|
+
return e(Ff,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:/* @__PURE__ */e("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:/* @__PURE__ */e(U.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});If.displayName="SelectItemAlignedPosition";var Wf=x.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:a=_f,...i}=t,l=vf(r);/* @__PURE__ */
|
|
259
|
+
return e(Ed,{...l,...i,ref:n,align:o,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Wf.displayName="SelectPopperPosition";var[Ff,Bf]=bf(Pf,{}),jf="SelectViewport",Hf=x.forwardRef((r,o)=>{const{__scopeSelect:a,nonce:i,...l}=r,s=Lf(jf,a),c=Bf(jf,a),d=W(o,s.onViewportChange),u=x.useRef(0);/* @__PURE__ */
|
|
260
260
|
return n(t,{children:[
|
|
261
261
|
/* @__PURE__ */e("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),
|
|
262
|
-
/* @__PURE__ */e(
|
|
263
|
-
return e(
|
|
264
|
-
return e(U.div,{id:a.id,...o,ref:n})});
|
|
265
|
-
return e(
|
|
266
|
-
/* @__PURE__ */e(U.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?P.createPortal(s.children,c.valueNode):null]})});
|
|
267
|
-
return e(U.div,{"aria-hidden":!0,...o,ref:n})});
|
|
268
|
-
return n(
|
|
262
|
+
/* @__PURE__ */e(mf.Slot,{scope:a,children:/* @__PURE__ */e(U.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:V(l.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){const e=Math.abs(u.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*_f,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),l=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,n.style.justifyContent="flex-end")}}}u.current=t.scrollTop})})})]})});Hf.displayName=jf;var Yf="SelectGroup",[$f,Vf]=bf(Yf),Gf=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=ee();/* @__PURE__ */
|
|
263
|
+
return e($f,{scope:r,id:a,children:/* @__PURE__ */e(U.div,{role:"group","aria-labelledby":a,...o,ref:n})})});Gf.displayName=Yf;var qf="SelectLabel",Qf=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=Vf(qf,r);/* @__PURE__ */
|
|
264
|
+
return e(U.div,{id:a.id,...o,ref:n})});Qf.displayName=qf;var Uf="SelectItem",[Kf,Xf]=bf(Uf),Zf=x.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:a=!1,textValue:i,...l}=t,s=wf(Uf,r),c=Lf(Uf,r),d=s.value===o,[u,f]=x.useState(i??""),[p,m]=x.useState(!1),h=W(n,e=>c.itemRefCallback?.(e,o,a)),g=ee(),b=x.useRef("touch"),v=()=>{a||(s.onValueChange(o),s.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");/* @__PURE__ */
|
|
265
|
+
return e(Kf,{scope:r,value:o,disabled:a,textId:g,isSelected:d,onItemTextChange:x.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:/* @__PURE__ */e(mf.ItemSlot,{scope:r,value:o,disabled:a,textValue:u,children:/* @__PURE__ */e(U.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":d&&p,"data-state":d?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...l,ref:h,onFocus:V(l.onFocus,()=>m(!0)),onBlur:V(l.onBlur,()=>m(!1)),onClick:V(l.onClick,()=>{"mouse"!==b.current&&v()}),onPointerUp:V(l.onPointerUp,()=>{"mouse"===b.current&&v()}),onPointerDown:V(l.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:V(l.onPointerMove,e=>{b.current=e.pointerType,a?c.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(l.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:V(l.onKeyDown,e=>{""!==c.searchRef?.current&&" "===e.key||(ff.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});Zf.displayName=Uf;var Jf="SelectItemText",ep=x.forwardRef((r,o)=>{const{__scopeSelect:a,className:i,style:l,...s}=r,c=wf(Jf,a),d=Lf(Jf,a),u=Xf(Jf,a),f=Cf(Jf,a),[p,m]=x.useState(null),h=W(o,e=>m(e),u.onItemTextChange,e=>d.itemTextRefCallback?.(e,u.value,u.disabled)),g=p?.textContent,b=x.useMemo(()=>/* @__PURE__ */e("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=f;return G(()=>(v(b),()=>y(b)),[v,y,b]),/* @__PURE__ */n(t,{children:[
|
|
266
|
+
/* @__PURE__ */e(U.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?P.createPortal(s.children,c.valueNode):null]})});ep.displayName=Jf;var tp="SelectItemIndicator",np=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return Xf(tp,r).isSelected?/* @__PURE__ */e(U.span,{"aria-hidden":!0,...o,ref:n}):null});np.displayName=tp;var rp="SelectScrollUpButton",op=x.forwardRef((t,n)=>{const r=Lf(rp,t.__scopeSelect),o=Bf(rp,t.__scopeSelect),[a,i]=x.useState(!1),l=W(n,o.onScrollButtonChange);return G(()=>{if(r.viewport&&r.isPositioned){let e=()=>{i(t.scrollTop>0)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?/* @__PURE__ */e(lp,{...t,ref:l,onAutoScroll(){const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});op.displayName=rp;var ap="SelectScrollDownButton",ip=x.forwardRef((t,n)=>{const r=Lf(ap,t.__scopeSelect),o=Bf(ap,t.__scopeSelect),[a,i]=x.useState(!1),l=W(n,o.onScrollButtonChange);return G(()=>{if(r.viewport&&r.isPositioned){let e=()=>{const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),a?/* @__PURE__ */e(lp,{...t,ref:l,onAutoScroll(){const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ip.displayName=ap;var lp=x.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...a}=t,i=Lf("SelectScrollButton",r),l=x.useRef(null),s=hf(r),c=x.useCallback(()=>{null!==l.current&&(window.clearInterval(l.current),l.current=null)},[]);return x.useEffect(()=>()=>c(),[c]),G(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),/* @__PURE__ */e(U.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:V(a.onPointerDown,()=>{null===l.current&&(l.current=window.setInterval(o,50))}),onPointerMove:V(a.onPointerMove,()=>{i.onItemLeave?.(),null===l.current&&(l.current=window.setInterval(o,50))}),onPointerLeave:V(a.onPointerLeave,()=>{c()})})}),sp=x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;/* @__PURE__ */
|
|
267
|
+
return e(U.div,{"aria-hidden":!0,...o,ref:n})});sp.displayName="SelectSeparator";var cp="SelectArrow";x.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,a=vf(r),i=wf(cp,r),l=Lf(cp,r);return i.open&&"popper"===l.position?/* @__PURE__ */e(Rd,{...a,...o,ref:n}):null}).displayName=cp;var dp=x.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const a=x.useRef(null),i=W(o,a),l=ns(n);return x.useEffect(()=>{const e=a.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[l,n]),/* @__PURE__ */e(U.select,{...r,style:{...sf,...r.style},ref:i,defaultValue:n})});function up(e){return""===e||void 0===e}function fp(e){const t=ar(e),n=x.useRef(""),r=x.useRef(0),o=x.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function pp(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=(i=e,l=Math.max(o,0),i.map((e,t)=>i[(l+t)%i.length]));var i,l;1===r.length&&(a=a.filter(e=>e!==n));const s=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return s!==n?s:void 0}dp.displayName="SelectBubbleInput";var mp=Af,hp=Ef,gp=Rf,bp=Df,vp=Hf,yp=Qf,wp=Zf,xp=ep,Cp=np,kp=op,Np=ip,Ap=sp;const Sp=kf,Mp=Gf,Ep=Mf;function Rp({className:t,size:r="default",children:o,...a}){/* @__PURE__ */
|
|
268
|
+
return n(mp,{"data-slot":"select-trigger","data-size":r,className:pn("group flex w-full items-center justify-between whitespace-nowrap border bg-white outline-none transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50","hover:border-gray-400","data-[placeholder]:text-gray-500 focus-visible:border-brand focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","sm"===r?"h-10 min-w-[150px] rounded-2.5 border-gray-200 px-3.5":"h-10 min-w-[150px] rounded-2.5 border-gray-200 px-4",t),...a,children:[
|
|
269
269
|
/* @__PURE__ */e(On,{size:"body2",weight:"medium",className:"line-clamp-1 text-gray-900",children:o}),
|
|
270
|
-
/* @__PURE__ */e(
|
|
271
|
-
return n(
|
|
272
|
-
/* @__PURE__ */e("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:/* @__PURE__ */e(
|
|
273
|
-
/* @__PURE__ */e(
|
|
274
|
-
return e(
|
|
275
|
-
return e(
|
|
276
|
-
return e(
|
|
277
|
-
return e(
|
|
278
|
-
/* @__PURE__ */e(
|
|
279
|
-
/* @__PURE__ */e(
|
|
280
|
-
/* @__PURE__ */e(
|
|
281
|
-
return e(
|
|
270
|
+
/* @__PURE__ */e(hp,{asChild:!0,children:/* @__PURE__ */e(mn,{"data-slot":"select-chevron",className:pn("pointer-events-none shrink-0 text-gray-600 transition-transform duration-200 group-data-[state=open]:rotate-180","h-4 w-4"),strokeWidth:2.8})})]})}function Pp({className:t,children:r,...o}){/* @__PURE__ */
|
|
271
|
+
return n(wp,{"data-slot":"select-item",className:pn("relative flex w-full cursor-pointer items-center gap-3 rounded-2 px-3.5 py-2.5 outline-hidden select-none","text-gray-900 transition-colors focus:bg-gray-100 focus:text-gray-900","data-disabled:pointer-events-none data-disabled:opacity-50",t),...o,children:[
|
|
272
|
+
/* @__PURE__ */e("span",{className:"absolute right-3 flex size-4 items-center justify-center",children:/* @__PURE__ */e(Cp,{children:/* @__PURE__ */e(jn,{className:"size-4 text-brand"})})}),
|
|
273
|
+
/* @__PURE__ */e(xp,{children:/* @__PURE__ */e(On,{size:"body2",weight:"medium",children:r})})]})}function Dp({className:t,...n}){/* @__PURE__ */
|
|
274
|
+
return e(Ap,{"data-slot":"select-separator",className:pn("pointer-events-none my-1 h-px bg-gray-200",t),...n})}function _p({className:t,...n}){/* @__PURE__ */
|
|
275
|
+
return e(kp,{"data-slot":"select-scroll-up-button",className:pn("flex cursor-default items-center justify-center py-1 text-gray-600",t),...n,children:/* @__PURE__ */e($n,{className:"size-4"})})}function zp({className:t,...n}){/* @__PURE__ */
|
|
276
|
+
return e(Np,{"data-slot":"select-scroll-down-button",className:pn("flex cursor-default items-center justify-center py-1 text-gray-600",t),...n,children:/* @__PURE__ */e(mn,{className:"size-4"})})}function Lp({className:t,children:r,position:o="popper",...a}){/* @__PURE__ */
|
|
277
|
+
return e(gp,{children:/* @__PURE__ */n(bp,{"data-slot":"select-content",className:pn("relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===o&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1","rounded-4 border border-gray-200 bg-white",t),position:o,...a,children:[
|
|
278
|
+
/* @__PURE__ */e(_p,{}),
|
|
279
|
+
/* @__PURE__ */e(vp,{className:pn("p-2","popper"===o&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:r}),
|
|
280
|
+
/* @__PURE__ */e(zp,{})]})})}function Op({className:t,...n}){/* @__PURE__ */
|
|
281
|
+
return e(yp,{"data-slot":"select-label",className:pn("px-4 py-2 text-xs font-bold text-gray-500",t),...n})}function Tp({text:t,action:r,onAction:o,className:a,...i}){/* @__PURE__ */
|
|
282
282
|
return n("div",{role:"status","aria-live":"polite",className:pn("inline-flex items-center gap-4 px-4 py-3","rounded-2.5 bg-gray-900 text-white shadow-lg","text-sm font-semibold",a),...i,children:[
|
|
283
|
-
/* @__PURE__ */e("span",{children:t}),r&&/* @__PURE__ */e("button",{type:"button",onClick:o,className:"bg-transparent text-main-500 font-extrabold hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-main-500/40 rounded-1",children:r})]})}const
|
|
284
|
-
/* @__PURE__ */e("div",{className:pn("pointer-events-none fixed left-1/2 z-[1000] flex -translate-x-1/2",
|
|
283
|
+
/* @__PURE__ */e("span",{children:t}),r&&/* @__PURE__ */e("button",{type:"button",onClick:o,className:"bg-transparent text-main-500 font-extrabold hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-main-500/40 rounded-1",children:r})]})}const Ip=x.createContext(null),Wp={top:"top-4",bottom:"bottom-4"};function Fp({children:t,position:r="bottom"}){const[o,a]=x.useState(null),[i,l]=x.useState(!1),s=x.useRef(0),c=x.useRef(0),d=x.useRef(null),u=x.useRef(null),f=x.useCallback(e=>{c.current===e&&(d.current&&(clearTimeout(d.current),d.current=null),u.current||(l(!0),u.current=setTimeout(()=>{a(null),l(!1),u.current=null},220)))},[]),p=x.useCallback(e=>f(e),[f]),m=x.useCallback(e=>{s.current+=1;const t=s.current;c.current=t;const n=e.duration??3e3;return d.current&&clearTimeout(d.current),u.current&&(clearTimeout(u.current),u.current=null),l(!1),a({...e,id:t}),n>0&&(d.current=setTimeout(()=>f(t),n)),t},[f]);x.useEffect(()=>()=>{d.current&&clearTimeout(d.current),u.current&&clearTimeout(u.current)},[]);const h="bottom"===r,g=h?"animate-in fade-in-0 slide-in-from-bottom-2 duration-300":"animate-in fade-in-0 slide-in-from-top-2 duration-300",b=h?"animate-out fade-out-0 slide-out-to-bottom-2 duration-200":"animate-out fade-out-0 slide-out-to-top-2 duration-200",v=x.useMemo(()=>({show:m,dismiss:p}),[m,p]),[y,w]=x.useState(!1);return x.useEffect(()=>w(!0),[]),/* @__PURE__ */n(Ip.Provider,{value:v,children:[t,y&&_(
|
|
284
|
+
/* @__PURE__ */e("div",{className:pn("pointer-events-none fixed left-1/2 z-[1000] flex -translate-x-1/2",Wp[r]),children:o&&/* @__PURE__ */e("div",{className:pn("pointer-events-auto",i?b:g),children:/* @__PURE__ */e(Tp,{text:o.text,action:o.action,onAction(){o.onAction?.(),p(o.id)}})},o.id)}),document.body)]})}function Bp(){const e=x.useContext(Ip);if(!e)throw new Error("useSnackbar must be used within <SnackbarProvider />");return e}const jp=xn("rounded-3 border border-gray-200 shadow-sm",{variants:{tone:{white:"bg-white",brand:"bg-brand-softer border-brand-soft",mint:"bg-mint-200/40 border-mint-200",blue:"bg-blue-200/40 border-blue-200",gray:"bg-gray-50"},size:{sm:"min-w-[120px] p-3",md:"min-w-[140px] p-4",lg:"min-w-[160px] p-5"}},defaultVariants:{tone:"white",size:"md"}}),Hp={sm:"text-lg",md:"text-2xl",lg:"text-3xl"};function Yp({label:t,value:r,helper:o,tone:a,size:i,animateOnChange:l,className:s,...c}){const d=i??"md",[u,f]=C.useState(0),p=C.useRef(r);return C.useEffect(()=>{l&&p.current!==r&&f(e=>e+1),p.current=r},[r,l]),/* @__PURE__ */n("div",{"data-slot":"stat-card",className:pn(jp({tone:a,size:i}),s),...c,children:[
|
|
285
285
|
/* @__PURE__ */e("div",{className:"text-3xs font-semibold text-gray-500",children:t}),
|
|
286
|
-
/* @__PURE__ */e("div",{className:pn("mt-1.5 font-extrabold tracking-[-0.4px] leading-none text-gray-900 tabular-nums",
|
|
286
|
+
/* @__PURE__ */e("div",{className:pn("mt-1.5 font-extrabold tracking-[-0.4px] leading-none text-gray-900 tabular-nums",Hp[d],l&&u>0&&"animate-pop"),children:r},u),o?/* @__PURE__ */e("div",{className:"mt-1.5 text-3xs text-gray-500",children:o}):null]})}const $p={sm:{circle:"h-7 w-7",trackTop:"top-3.5",checkIcon:"h-3 w-3",numberSize:"caption1",labelSize:"body2",labelMargin:"mt-3"},md:{circle:"h-10 w-10",trackTop:"top-5",checkIcon:"h-4 w-4",numberSize:"body1",labelSize:"heading2",labelMargin:"mt-5"},lg:{circle:"h-14 w-14",trackTop:"top-7",checkIcon:"h-5 w-5",numberSize:"body1",labelSize:"heading1",labelMargin:"mt-7"}};function Vp({steps:t,currentStep:r,size:o="md",className:a}){const i=$p[o];if(0===t.length)/* @__PURE__ */
|
|
287
287
|
return e("div",{className:pn("w-full",a)});const l=Math.max(t.length-1,0),s=Math.min(Math.max(r-1,0),l),c=100/(2*t.length)+"%",d=0===l?100:s/l*100;/* @__PURE__ */
|
|
288
288
|
return e("div",{className:pn("w-full",a),children:/* @__PURE__ */n("div",{className:"relative",children:[t.length>1?/* @__PURE__ */n("div",{className:pn("absolute",i.trackTop),style:{left:c,right:c},children:[
|
|
289
289
|
/* @__PURE__ */e("div",{className:"h-0.5 w-full bg-gray-200"}),
|
|
@@ -291,54 +291,54 @@ return e("div",{className:pn("w-full",a),children:/* @__PURE__ */n("div",{classN
|
|
|
291
291
|
/* @__PURE__ */e("ol",{className:"relative z-10 flex items-start",children:t.map((t,r)=>{const o=r<s,a=r===s,l=t.id??`step-${r}`;/* @__PURE__ */
|
|
292
292
|
return n("li",{className:"flex flex-1 flex-col items-center",children:[
|
|
293
293
|
/* @__PURE__ */e("span",{className:pn("flex items-center justify-center rounded-full border-2 bg-white transition-colors duration-200",i.circle,o&&"border-brand bg-brand text-white",a&&"border-brand bg-brand text-white ring-4 ring-main-300",!o&&!a&&"border-gray-300 text-gray-600"),"aria-current":a?"step":void 0,children:o?/* @__PURE__ */e(jn,{className:i.checkIcon,strokeWidth:2.5}):/* @__PURE__ */e(On,{size:i.numberSize,weight:"bold",className:pn(a?"text-white":"text-gray-600"),children:r+1})}),
|
|
294
|
-
/* @__PURE__ */e(On,{size:i.labelSize,weight:a?"bold":"medium",className:pn("text-center leading-tight",i.labelMargin,o&&"text-gray-900",a&&"text-brand",!o&&!a&&"text-gray-600"),children:t.label})]},l)})})]})})}function
|
|
295
|
-
return e("div",{className:pn("w-full overflow-x-auto pb-2",o),children:/* @__PURE__ */e("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${n}px)`,gridAutoColumns:`${n}px`,gap:`${r}px`},children:t.map((r,o)=>/* @__PURE__ */e(
|
|
296
|
-
return n(
|
|
297
|
-
/* @__PURE__ */e(
|
|
298
|
-
/* @__PURE__ */e(
|
|
299
|
-
/* @__PURE__ */n("p",{className:"whitespace-nowrap text-xs",children:[t.date," · ",t.count,"회 활동"]}),a&&s?/* @__PURE__ */e("div",{className:"mt-2",children:s(t)}):null]})})]});var g});function
|
|
294
|
+
/* @__PURE__ */e(On,{size:i.labelSize,weight:a?"bold":"medium",className:pn("text-center leading-tight",i.labelMargin,o&&"text-gray-900",a&&"text-brand",!o&&!a&&"text-gray-600"),children:t.label})]},l)})})]})})}function Gp({data:t=[],size:n=26,gap:r=8,className:o,renderCellActions:a,highlightLast:i=!1}){const[l,s]=C.useState(null);/* @__PURE__ */
|
|
295
|
+
return e("div",{className:pn("w-full overflow-x-auto pb-2",o),children:/* @__PURE__ */e("div",{className:"grid w-max grid-flow-col grid-rows-7",style:{gridTemplateRows:`repeat(7, ${n}px)`,gridAutoColumns:`${n}px`,gap:`${r}px`},children:t.map((r,o)=>/* @__PURE__ */e(qp,{item:r,index:o,size:n,selected:l===o,anySelected:null!==l,onSelect:s,renderCellActions:a,highlight:i&&o===t.length-1},o))})})}const qp=C.memo(({item:t,index:r,size:o,selected:a,anySelected:i,onSelect:l,renderCellActions:s,highlight:c})=>{const[d,u]=C.useState(!1),f=C.useRef(null),p=C.useRef(!1),m=C.useRef(!1);C.useEffect(()=>{a||u(!1)},[a]);const h=()=>{null!==f.current&&(clearTimeout(f.current),f.current=null)};/* @__PURE__ */
|
|
296
|
+
return n(Xd,{open:d,onOpenChange(e){if(!e){if(p.current)return void(p.current=!1);u(!1),a&&l(null),m.current=!0,setTimeout(()=>{m.current=!1},200)}},children:[
|
|
297
|
+
/* @__PURE__ */e(Zd,{asChild:!0,children:/* @__PURE__ */e("button",{type:"button","aria-label":`${t.date} · ${t.count}회 활동`,className:pn("cursor-pointer transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-800 focus-visible:ring-offset-1",(g=t.count,g<=0?"bg-gray-100":1===g?"bg-main-300":2===g?"bg-main-500":3===g?"bg-main-700":"bg-brand"),a&&"ring-2 ring-gray-800 ring-offset-1",c&&"animate-pulse-ring"),style:{width:o,height:o,borderRadius:`${Math.max(4,Math.round(.23*o))}px`},onMouseEnter(){h(),i||m.current||u(!0)},onMouseLeave(){i||(f.current=setTimeout(()=>u(!1),80))},onClick(){h(),a?(l(null),u(!1),m.current=!0,setTimeout(()=>{m.current=!1},200)):(p.current=!0,l(r),u(!0))}})}),
|
|
298
|
+
/* @__PURE__ */e(Jd,{children:/* @__PURE__ */n(eu,{side:"top",sideOffset:4,onOpenAutoFocus(e){return e.preventDefault()},onMouseEnter:h,onMouseLeave(){i||u(!1)},className:pn("z-50 min-w-[120px] rounded-2 bg-gray-900 px-3 py-2 text-xs text-white shadow-default","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-in-from-top-2"),children:[
|
|
299
|
+
/* @__PURE__ */n("p",{className:"whitespace-nowrap text-xs",children:[t.date," · ",t.count,"회 활동"]}),a&&s?/* @__PURE__ */e("div",{className:"mt-2",children:s(t)}):null]})})]});var g});function Qp({days:t,icon:r="🔥",unit:o,className:a,...i}){/* @__PURE__ */
|
|
300
300
|
return n("span",{"data-slot":"streak-chip",className:pn("inline-flex items-center gap-1 rounded-full border border-brand-soft bg-brand-softer","px-3 py-1.5 text-sm font-extrabold text-brand tabular-nums",a),...i,children:[
|
|
301
301
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"leading-none",children:r}),
|
|
302
|
-
/* @__PURE__ */n("span",{children:[t,o?/* @__PURE__ */e("span",{className:"ml-0.5",children:o}):null]})]})}function
|
|
302
|
+
/* @__PURE__ */n("span",{children:[t,o?/* @__PURE__ */e("span",{className:"ml-0.5",children:o}):null]})]})}function Up({days:t,label:r="현재 스트릭",unit:o="일째",icon:a="🔥",meta:i,className:l,...s}){/* @__PURE__ */
|
|
303
303
|
return n("div",{"data-slot":"streak-hero",className:pn("min-w-[200px] rounded-4 border border-brand-soft p-4 shadow-warm","bg-[linear-gradient(135deg,var(--main-100),var(--main-300))]",l),...s,children:[
|
|
304
304
|
/* @__PURE__ */n("div",{className:"mb-2 flex items-center justify-between",children:[
|
|
305
305
|
/* @__PURE__ */e("span",{className:"text-2xs font-bold text-gray-600",children:r}),
|
|
306
306
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"text-lg animate-flame-flicker leading-none",children:a})]}),
|
|
307
307
|
/* @__PURE__ */n("div",{className:"flex items-baseline gap-1",children:[
|
|
308
308
|
/* @__PURE__ */e("span",{className:"text-5xl font-extrabold leading-none tracking-[-0.6px] text-brand tabular-nums",children:t}),
|
|
309
|
-
/* @__PURE__ */e("span",{className:"text-sm font-bold text-gray-700",children:o})]}),i?/* @__PURE__ */e("div",{className:"mt-1.5 text-3xs text-gray-600",children:i}):null]})}function
|
|
309
|
+
/* @__PURE__ */e("span",{className:"text-sm font-bold text-gray-700",children:o})]}),i?/* @__PURE__ */e("div",{className:"mt-1.5 text-3xs text-gray-600",children:i}):null]})}function Kp({items:t,activeId:r,onChange:o,fullWidth:a=!1,size:i="md",className:l,...s}){const c={sm:"px-4 py-2 text-xs",md:"px-5 py-2.5 text-sm",lg:"px-6 py-3 text-base"}[i];/* @__PURE__ */
|
|
310
310
|
return e("div",{"data-slot":"tabs",role:"tablist",className:pn("flex border-b border-gray-200",a?"":"gap-1",l),...s,children:t.map(t=>{const i=r===t.id;/* @__PURE__ */
|
|
311
311
|
return n("button",{type:"button",role:"tab","aria-selected":i,"aria-current":i?"page":void 0,onClick(){o?.(t.id),t.onClick?.()},className:pn("relative -mb-px inline-flex items-center justify-center gap-1.5 border-b-2 font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",a&&"flex-1",c,i?"border-brand text-brand":"border-transparent text-gray-500 hover:text-gray-700"),children:[
|
|
312
|
-
/* @__PURE__ */e("span",{children:t.label}),void 0!==t.badge?/* @__PURE__ */e("span",{className:pn("text-2xs font-semibold tabular-nums",i?"text-brand/70":"text-gray-400"),children:t.badge}):null]},t.id)})})}const
|
|
313
|
-
return n("span",{"data-slot":"tag",className:pn(
|
|
314
|
-
return n("button",{"data-slot":"filter-chip",type:i,"data-active":r?"true":"false","aria-pressed":r??!1,className:pn(
|
|
312
|
+
/* @__PURE__ */e("span",{children:t.label}),void 0!==t.badge?/* @__PURE__ */e("span",{className:pn("text-2xs font-semibold tabular-nums",i?"text-brand/70":"text-gray-400"),children:t.badge}):null]},t.id)})})}const Xp=xn("inline-flex items-center justify-center font-bold whitespace-nowrap",{variants:{tone:{gray:"bg-gray-100 text-gray-700",brand:"bg-brand-soft text-brand",mint:"bg-mint-200 text-mint-900",blue:"bg-blue-200 text-blue-600",red:"bg-red-300 text-red-700",green:"bg-green-200 text-green-700"},size:{xs:"text-3xs py-0.5 px-1.5 gap-0.5",sm:"text-3xs py-0.5 px-2 gap-1",md:"text-2xs py-1 px-2.5 gap-1",lg:"text-xs py-1.5 px-3 gap-1"},pill:{true:"rounded-full",false:"rounded-1"}},defaultVariants:{tone:"brand",size:"md",pill:!0}});function Zp({className:e,tone:t,size:r,pill:o,icon:a,children:i,...l}){/* @__PURE__ */
|
|
313
|
+
return n("span",{"data-slot":"tag",className:pn(Xp({tone:t,size:r,pill:o,className:e})),...l,children:[a,i]})}const Jp=xn("inline-flex items-center justify-center rounded-full border font-bold whitespace-nowrap transition-[background-color,border-color,color] duration-150 ease-out active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-[0.45] disabled:active:scale-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2",{variants:{size:{sm:"text-2xs py-1.5 px-3 gap-1",md:"text-xs py-2 px-3.5 gap-1",lg:"text-sm py-2 px-4 gap-1.5"},active:{true:"bg-brand text-white border-brand animate-pop",false:"bg-white text-gray-700 border-gray-200 hover:bg-gray-50 hover:border-gray-300"}},defaultVariants:{size:"md",active:!1}});function em({className:e,size:t,active:r,icon:o,children:a,type:i="button",...l}){/* @__PURE__ */
|
|
314
|
+
return n("button",{"data-slot":"filter-chip",type:i,"data-active":r?"true":"false","aria-pressed":r??!1,className:pn(Jp({size:t,active:r,className:e})),...l,children:[o,a]})}function tm({children:t,icon:r,size:o="md",className:a,...i}){const l="sm"===o?10:11;/* @__PURE__ */
|
|
315
315
|
return n("span",{"data-slot":"challenge-tag",className:pn("inline-flex items-center rounded-full border border-brand-soft bg-brand-softer font-bold text-brand",{sm:"text-3xs px-2 py-1 gap-1",md:"text-2xs px-2.5 py-1.5 gap-1.5"}[o],a),...i,children:[
|
|
316
316
|
/* @__PURE__ */e("span",{"aria-hidden":!0,className:"flex items-center",children:r??/* @__PURE__ */e(Bn,{width:l,height:l})}),
|
|
317
|
-
/* @__PURE__ */e("span",{children:t})]})}const
|
|
318
|
-
return n("div",{role:"status","aria-live":"polite",className:pn(
|
|
319
|
-
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[o&&/* @__PURE__ */e(On,{size:"caption2",weight:"extrabold",className:"block tracking-[-0.2px] text-black",children:o}),a&&/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:"mt-0.5 block text-gray-600",children:a})]}),i&&/* @__PURE__ */e("button",{type:"button",onClick:l,className:"shrink-0 bg-transparent px-1 text-xs font-bold text-brand hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",children:i})]})}const
|
|
320
|
-
return n(
|
|
321
|
-
/* @__PURE__ */e("div",{"aria-live":"polite","aria-atomic":"true",className:pn("pointer-events-none fixed z-[1000] flex max-w-[calc(100%-32px)] flex-col gap-2",
|
|
317
|
+
/* @__PURE__ */e("span",{children:t})]})}const nm={brand:{bg:"bg-brand-soft",color:"text-brand"},success:{bg:"bg-mint-200",color:"text-mint-900"},danger:{bg:"bg-red-300",color:"text-red-700"},info:{bg:"bg-blue-200",color:"text-blue-600"}},rm=xn(pn("flex items-center gap-3 px-3.5 py-3 bg-white","rounded-3 border border-gray-200 shadow-lg","min-w-[280px] max-w-[360px]"));function om({tone:t="brand",icon:r,title:o,body:a,action:i,onAction:l,className:s,...c}){const d=nm[t];/* @__PURE__ */
|
|
318
|
+
return n("div",{role:"status","aria-live":"polite",className:pn(rm(),s),...c,children:[r&&/* @__PURE__ */e("div",{className:pn("flex h-8 w-8 shrink-0 items-center justify-center rounded-full",d.bg),children:/* @__PURE__ */e(Kn,{name:r,size:16,className:d.color})}),
|
|
319
|
+
/* @__PURE__ */n("div",{className:"min-w-0 flex-1",children:[o&&/* @__PURE__ */e(On,{size:"caption2",weight:"extrabold",className:"block tracking-[-0.2px] text-black",children:o}),a&&/* @__PURE__ */e(On,{size:"caption3",weight:"regular",className:"mt-0.5 block text-gray-600",children:a})]}),i&&/* @__PURE__ */e("button",{type:"button",onClick:l,className:"shrink-0 bg-transparent px-1 text-xs font-bold text-brand hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",children:i})]})}const am=x.createContext(null),im={top:"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start",bottom:"bottom-4 left-1/2 -translate-x-1/2 items-center","bottom-right":"bottom-4 right-4 items-end","bottom-left":"bottom-4 left-4 items-start"};function lm({children:t,position:r="top-right",max:o=5}){const[a,i]=x.useState([]),[l,s]=x.useState(/* @__PURE__ */new Set),c=x.useRef(0),d=x.useRef(/* @__PURE__ */new Map),u=x.useCallback(e=>{d.current.delete(e),i(t=>t.filter(t=>t.id!==e)),s(t=>{if(!t.has(e))return t;const n=new Set(t);return n.delete(e),n})},[]),f=x.useCallback(e=>{const t=d.current.get(e);t&&clearTimeout(t),s(t=>t.has(e)?t:new Set(t).add(e)),d.current.set(e,setTimeout(()=>u(e),220))},[u]),p=x.useCallback(e=>{c.current+=1;const t=c.current,n=e.duration??4e3;if(i(n=>{const r=[...n,{...e,id:t}];return r.length>o?r.slice(r.length-o):r}),n>0){const e=setTimeout(()=>f(t),n);d.current.set(t,e)}return t},[f,o]);x.useEffect(()=>{const e=d.current;return()=>{e.forEach(e=>clearTimeout(e)),e.clear()}},[]);const m=x.useMemo(()=>({show:p,dismiss:f}),[p,f]),[h,g]=x.useState(!1);x.useEffect(()=>g(!0),[]);const b=r.startsWith("bottom"),v=b?"animate-in fade-in-0 slide-in-from-bottom-2 duration-300":"animate-in fade-in-0 slide-in-from-top-2 duration-300",y=b?"animate-out fade-out-0 slide-out-to-bottom-2 duration-200":"animate-out fade-out-0 slide-out-to-top-2 duration-200";/* @__PURE__ */
|
|
320
|
+
return n(am.Provider,{value:m,children:[t,h&&_(
|
|
321
|
+
/* @__PURE__ */e("div",{"aria-live":"polite","aria-atomic":"true",className:pn("pointer-events-none fixed z-[1000] flex max-w-[calc(100%-32px)] flex-col gap-2",im[r]),children:a.map(t=>/* @__PURE__ */e("div",{className:pn("pointer-events-auto",l.has(t.id)?y:v),children:/* @__PURE__ */e(om,{tone:t.tone,icon:t.icon,title:t.title,body:t.body,action:t.action,onAction(){t.onAction?.(),f(t.id)}})},t.id))}),document.body)]})}function sm(){const e=x.useContext(am);if(!e)throw new Error("useToast must be used within <ToastProvider />");return e}const cm=x.forwardRef(({className:t,label:r,labelPosition:o="right",id:a,disabled:i,...l},s)=>{const c=x.useId(),d=a||c,u=/* @__PURE__ */n("span",{className:"relative inline-flex h-[22px] w-[38px] shrink-0 items-center",children:[
|
|
322
322
|
/* @__PURE__ */e("input",{ref:s,id:d,type:"checkbox",disabled:i,className:"peer absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none rounded-full bg-gray-300 outline-none transition-colors duration-150 focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2 checked:bg-brand disabled:cursor-not-allowed",...l}),
|
|
323
323
|
/* @__PURE__ */e("span",{className:"pointer-events-none absolute top-[2px] left-[2px] h-[18px] w-[18px] rounded-full bg-white shadow-knob transition-transform duration-150 ease-out peer-checked:translate-x-4"})]});/* @__PURE__ */
|
|
324
|
-
return n("label",{htmlFor:d,className:pn("inline-flex cursor-pointer items-center gap-2 select-none",i&&"cursor-not-allowed opacity-[0.45]",t),children:[r&&"left"===o?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null,u,r&&"right"===o?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});
|
|
325
|
-
return e(U.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:V(t.onClick,()=>{t.disabled||s(!l)})})});
|
|
326
|
-
return e(
|
|
327
|
-
return e(
|
|
328
|
-
return e(
|
|
329
|
-
return e(
|
|
330
|
-
return e(
|
|
331
|
-
return e(
|
|
332
|
-
return e(
|
|
333
|
-
return n(
|
|
334
|
-
/* @__PURE__ */e(On,{size:
|
|
335
|
-
return e(
|
|
336
|
-
return e(K,{present:o||l.open,children:/* @__PURE__ */e(l.disableHoverableContent?
|
|
337
|
-
/* @__PURE__ */e(
|
|
338
|
-
/* @__PURE__ */e(
|
|
339
|
-
return e(
|
|
340
|
-
return e(
|
|
324
|
+
return n("label",{htmlFor:d,className:pn("inline-flex cursor-pointer items-center gap-2 select-none",i&&"cursor-not-allowed opacity-[0.45]",t),children:[r&&"left"===o?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null,u,r&&"right"===o?/* @__PURE__ */e(On,{size:"caption2",weight:"medium",className:"text-gray-800",children:r}):null]})});cm.displayName="Toggle";var dm="rovingFocusGroup.onEntryFocus",um={bubbles:!1,cancelable:!0},fm="RovingFocusGroup",[pm,mm,hm]=$(fm),[gm,bm]=L(fm,[hm]),[vm,ym]=gm(fm),wm=x.forwardRef((t,n)=>/* @__PURE__ */e(pm.Provider,{scope:t.__scopeRovingFocusGroup,children:/* @__PURE__ */e(pm.Slot,{scope:t.__scopeRovingFocusGroup,children:/* @__PURE__ */e(xm,{...t,ref:n})})}));wm.displayName=fm;var xm=x.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:u=!1,...f}=t,p=x.useRef(null),m=W(n,p),h=be(i),[g,b]=Q({prop:l,defaultProp:s??null,onChange:c,caller:fm}),[v,y]=x.useState(!1),w=ar(d),C=mm(r),k=x.useRef(!1),[N,A]=x.useState(0);return x.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(dm,w),()=>e.removeEventListener(dm,w)},[w]),/* @__PURE__ */e(vm,{scope:r,orientation:o,dir:h,loop:a,currentTabStopId:g,onItemFocus:x.useCallback(e=>b(e),[b]),onItemShiftTab:x.useCallback(()=>y(!0),[]),onFocusableItemAdd:x.useCallback(()=>A(e=>e+1),[]),onFocusableItemRemove:x.useCallback(()=>A(e=>e-1),[]),children:/* @__PURE__ */e(U.div,{tabIndex:v||0===N?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:V(t.onMouseDown,()=>{k.current=!0}),onFocus:V(t.onFocus,e=>{if(e.target===e.currentTarget&&!k.current&&!v){const t=new CustomEvent(dm,um);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=C().filter(e=>e.focusable);Am([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),u)}}k.current=!1}),onBlur:V(t.onBlur,()=>y(!1))})})}),Cm="RovingFocusGroupItem",km=x.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:i,children:l,...s}=t,c=ee(),d=i||c,u=ym(Cm,r),f=u.currentTabStopId===d,p=mm(r),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:g}=u;return x.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),/* @__PURE__ */e(pm.ItemSlot,{scope:r,id:d,focusable:o,active:a,children:/* @__PURE__ */e(U.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...s,ref:n,onMouseDown:V(t.onMouseDown,e=>{o?u.onItemFocus(d):e.preventDefault()}),onFocus:V(t.onFocus,()=>u.onItemFocus(d)),onKeyDown:V(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=((e,t,n)=>{const r=((e,t)=>"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e)(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Nm[r]})(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const a=o.indexOf(e.currentTarget);o=u.loop?(r=a+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(a+1)}setTimeout(()=>Am(o))}var n,r}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=g}):l})})});km.displayName=Cm;var Nm={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Am(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Sm=wm,Mm=km,Em="Toggle",Rm=x.forwardRef((t,n)=>{const{pressed:r,defaultPressed:o,onPressedChange:a,...i}=t,[l,s]=Q({prop:r,onChange:a,defaultProp:o??!1,caller:Em});/* @__PURE__ */
|
|
325
|
+
return e(U.button,{type:"button","aria-pressed":l,"data-state":l?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:n,onClick:V(t.onClick,()=>{t.disabled||s(!l)})})});Rm.displayName=Em;var Pm="ToggleGroup",[Dm]=L(Pm,[bm]),_m=bm(),zm=C.forwardRef((t,n)=>{const{type:r,...o}=t;if("single"===r)/* @__PURE__ */
|
|
326
|
+
return e(Tm,{...o,ref:n});if("multiple"===r)/* @__PURE__ */
|
|
327
|
+
return e(Im,{...o,ref:n});throw new Error(`Missing prop \`type\` expected on \`${Pm}\``)});zm.displayName=Pm;var[Lm,Om]=Dm(Pm),Tm=C.forwardRef((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...i}=t,[l,s]=Q({prop:r,defaultProp:o??"",onChange:a,caller:Pm});/* @__PURE__ */
|
|
328
|
+
return e(Lm,{scope:t.__scopeToggleGroup,type:"single",value:C.useMemo(()=>l?[l]:[],[l]),onItemActivate:s,onItemDeactivate:C.useCallback(()=>s(""),[s]),children:/* @__PURE__ */e(Bm,{...i,ref:n})})}),Im=C.forwardRef((t,n)=>{const{value:r,defaultValue:o,onValueChange:a=()=>{},...i}=t,[l,s]=Q({prop:r,defaultProp:o??[],onChange:a,caller:Pm}),c=C.useCallback(e=>s((t=[])=>[...t,e]),[s]),d=C.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);/* @__PURE__ */
|
|
329
|
+
return e(Lm,{scope:t.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:c,onItemDeactivate:d,children:/* @__PURE__ */e(Bm,{...i,ref:n})})});zm.displayName=Pm;var[Wm,Fm]=Dm(Pm),Bm=C.forwardRef((t,n)=>{const{__scopeToggleGroup:r,disabled:o=!1,rovingFocus:a=!0,orientation:i,dir:l,loop:s=!0,...c}=t,d=_m(r),u=be(l),f={role:"group",dir:u,...c};/* @__PURE__ */
|
|
330
|
+
return e(Wm,{scope:r,rovingFocus:a,disabled:o,children:a?/* @__PURE__ */e(Sm,{asChild:!0,...d,orientation:i,dir:u,loop:s,children:/* @__PURE__ */e(U.div,{...f,ref:n})}):/* @__PURE__ */e(U.div,{...f,ref:n})})}),jm="ToggleGroupItem",Hm=C.forwardRef((t,n)=>{const r=Om(jm,t.__scopeToggleGroup),o=Fm(jm,t.__scopeToggleGroup),a=_m(t.__scopeToggleGroup),i=r.value.includes(t.value),l=o.disabled||t.disabled,s={...t,pressed:i,disabled:l},c=C.useRef(null);return o.rovingFocus?/* @__PURE__ */e(Mm,{asChild:!0,...a,focusable:!l,active:i,ref:c,children:/* @__PURE__ */e(Ym,{...s,ref:n})}):/* @__PURE__ */e(Ym,{...s,ref:n})});Hm.displayName=jm;var Ym=C.forwardRef((t,n)=>{const{__scopeToggleGroup:r,value:o,...a}=t,i=Om(jm,r);/* @__PURE__ */
|
|
331
|
+
return e(Rm,{..."single"===i.type?{role:"radio","aria-checked":t.pressed,"aria-pressed":void 0}:void 0,...a,ref:n,onPressedChange(e){e?i.onItemActivate(o):i.onItemDeactivate(o)}})}),$m=zm,Vm=Hm;const Gm=xn(["inline-flex w-fit items-center justify-center border bg-white whitespace-nowrap","text-gray-700 transition-all duration-200 ease-out active:scale-95","cursor-pointer disabled:pointer-events-none disabled:opacity-50 disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30 focus-visible:ring-offset-2","hover:border-gray-400 hover:bg-gray-100","data-[state=on]:border-brand data-[state=on]:bg-brand data-[state=on]:text-white","data-[state=on]:hover:bg-main-600 data-[state=on]:hover:border-main-600","data-[state=on]:shadow-brand-glow","data-[state=on]:animate-pop"],{variants:{shape:{rounded:"rounded-full",square:"rounded-3"},size:{sm:"h-8",md:"h-10",lg:"h-[46px]"}},compoundVariants:[{shape:"rounded",size:"sm",class:"px-3.5 gap-1.5"},{shape:"rounded",size:"md",class:"px-5 gap-2"},{shape:"rounded",size:"lg",class:"px-6 gap-2.5"},{shape:"square",size:"sm",class:"px-3 gap-1.5"},{shape:"square",size:"md",class:"px-4 gap-2"},{shape:"square",size:"lg",class:"px-5 gap-2.5"}],defaultVariants:{shape:"rounded",size:"md"}}),qm={sm:"caption3",md:"caption2",lg:"caption1"},Qm={sm:"text-[16px] [&>svg]:size-4",md:"text-[18px] [&>svg]:size-5",lg:"text-[20px] [&>svg]:size-5"};function Um({children:t,className:n,...r}){/* @__PURE__ */
|
|
332
|
+
return e($m,{"data-slot":"toggle-group",className:pn("flex flex-wrap gap-4 rounded-none",n),...r,children:t})}function Km({icon:t,shape:r="rounded",size:o="md",children:a,className:i,...l}){/* @__PURE__ */
|
|
333
|
+
return n(Vm,{"data-slot":"toggle-group-item",className:pn(Gm({shape:r,size:o}),i),...l,children:[t?/* @__PURE__ */e("span",{className:pn("inline-flex items-center justify-center leading-none text-inherit",Qm[o??"md"]),children:t}):null,
|
|
334
|
+
/* @__PURE__ */e(On,{size:qm[o??"md"],weight:"medium",className:"text-inherit",children:a})]})}var[Xm]=L("Tooltip",[dd]),Zm=dd(),Jm="TooltipProvider",eh=700,th="tooltip.open",[nh,rh]=Xm(Jm),oh=t=>{const{__scopeTooltip:n,delayDuration:r=eh,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:i}=t,l=x.useRef(!0),s=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const e=c.current;return()=>window.clearTimeout(e)},[]),/* @__PURE__ */e(nh,{scope:n,isOpenDelayedRef:l,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:x.useCallback(e=>{s.current=e},[]),disableHoverableContent:a,children:i})};oh.displayName=Jm;var ah="Tooltip",[ih,lh]=Xm(ah),sh=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:a,onOpenChange:i,disableHoverableContent:l,delayDuration:s}=t,c=rh(ah,t.__scopeTooltip),d=Zm(n),[u,f]=x.useState(null),p=ee(),m=x.useRef(0),h=l??c.disableHoverableContent,g=s??c.delayDuration,b=x.useRef(!1),[v,y]=Q({prop:o,defaultProp:a??!1,onChange(e){e?(c.onOpen(),document.dispatchEvent(new CustomEvent(th))):c.onClose(),i?.(e)},caller:ah}),w=x.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),C=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,y(!0)},[y]),k=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),N=x.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,y(!0),m.current=0},g)},[g,y]);return x.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),/* @__PURE__ */e(Sd,{...d,children:/* @__PURE__ */e(ih,{scope:n,contentId:p,open:v,stateAttribute:w,trigger:u,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?N():C()},[c.isOpenDelayedRef,N,C]),onTriggerLeave:x.useCallback(()=>{h?k():(window.clearTimeout(m.current),m.current=0)},[k,h]),onOpen:C,onClose:k,disableHoverableContent:h,children:r})})};sh.displayName=ah;var ch="TooltipTrigger",dh=x.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=lh(ch,r),i=rh(ch,r),l=Zm(r),s=W(n,x.useRef(null),a.onTriggerChange),c=x.useRef(!1),d=x.useRef(!1),u=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),/* @__PURE__ */e(Md,{asChild:!0,...l,children:/* @__PURE__ */e(U.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...o,ref:s,onPointerMove:V(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||i.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:V(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:V(t.onPointerDown,()=>{a.open&&a.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:V(t.onFocus,()=>{c.current||a.onOpen()}),onBlur:V(t.onBlur,a.onClose),onClick:V(t.onClick,a.onClose)})})});dh.displayName=ch;var uh="TooltipPortal",[fh,ph]=Xm(uh,{forceMount:void 0}),mh=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:a}=t,i=lh(uh,n);/* @__PURE__ */
|
|
335
|
+
return e(fh,{scope:n,forceMount:r,children:/* @__PURE__ */e(K,{present:r||i.open,children:/* @__PURE__ */e(Cr,{asChild:!0,container:a,children:o})})})};mh.displayName=uh;var hh="TooltipContent",gh=x.forwardRef((t,n)=>{const r=ph(hh,t.__scopeTooltip),{forceMount:o=r.forceMount,side:a="top",...i}=t,l=lh(hh,t.__scopeTooltip);/* @__PURE__ */
|
|
336
|
+
return e(K,{present:o||l.open,children:/* @__PURE__ */e(l.disableHoverableContent?xh:bh,{side:a,...i,ref:n})})}),bh=x.forwardRef((t,n)=>{const r=lh(hh,t.__scopeTooltip),o=rh(hh,t.__scopeTooltip),a=x.useRef(null),i=W(n,a),[l,s]=x.useState(null),{trigger:c,onClose:d}=r,u=a.current,{onPointerInTransitChange:f}=o,p=x.useCallback(()=>{s(null),f(!1)},[f]),m=x.useCallback((e,t)=>{const n={x:e.clientX,y:e.clientY},r=((e,t,n=5)=>{const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r})(n,((e,t)=>{const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}})(n,e.currentTarget.getBoundingClientRect())),o=(e=>{const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),(e=>{if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)})(t)})([...r,...(e=>{const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]})(t.getBoundingClientRect())]);s(o),f(!0)},[f]);return x.useEffect(()=>()=>p(),[p]),x.useEffect(()=>{if(c&&u){const e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}},[c,u,m,p]),x.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),o=!((e,t)=>{const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const e=t[a],l=t[i],s=e.x,c=e.y,d=l.y;c>r!=d>r&&n<(l.x-s)*(r-c)/(d-c)+s&&(o=!o)}return o})(n,l);r?p():o&&(p(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,u,l,d,p]),/* @__PURE__ */e(xh,{...t,ref:i})}),[vh,yh]=Xm(ah,{isInside:!1}),wh=/* @__PURE__ */H("TooltipContent"),xh=x.forwardRef((t,r)=>{const{__scopeTooltip:o,children:a,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:s,...c}=t,d=lh(hh,o),u=Zm(o),{onClose:f}=d;return x.useEffect(()=>(document.addEventListener(th,f),()=>document.removeEventListener(th,f)),[f]),x.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&f()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,f]),/* @__PURE__ */e(cr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:s,onFocusOutside(e){return e.preventDefault()},onDismiss:f,children:/* @__PURE__ */n(Ed,{"data-state":d.stateAttribute,...u,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[
|
|
337
|
+
/* @__PURE__ */e(wh,{children:a}),
|
|
338
|
+
/* @__PURE__ */e(vh,{scope:o,isInside:!0,children:/* @__PURE__ */e(df,{id:d.contentId,role:"tooltip",children:i||a})})]})})});gh.displayName=hh;var Ch="TooltipArrow";x.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,a=Zm(r);return yh(Ch,r).isInside?null:/* @__PURE__ */e(Rd,{...a,...o,ref:n})}).displayName=Ch;var kh=oh,Nh=mh,Ah=gh;function Sh({delayDuration:t=200,...n}){/* @__PURE__ */
|
|
339
|
+
return e(kh,{delayDuration:t,...n})}const Mh=sh,Eh=dh;function Rh({className:t,sideOffset:n=4,...r}){/* @__PURE__ */
|
|
340
|
+
return e(Nh,{children:/* @__PURE__ */e(Ah,{sideOffset:n,className:pn("z-50 overflow-hidden rounded-2 bg-gray-900 px-3 py-2 text-xs text-white shadow-default animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})})}function Ph({brand:t,items:r,activeId:o,onChange:a,end:i,compact:l=!1,className:s,...c}){/* @__PURE__ */
|
|
341
341
|
return n("header",{"data-slot":"top-nav",className:pn("sticky top-0 z-30 flex w-full items-center border-b border-gray-200 bg-white",l?"h-14 gap-4 px-4":"h-[62px] gap-6 px-7",s),...c,children:[t?/* @__PURE__ */e("div",{className:"flex shrink-0 items-center",children:t}):null,r&&r.length>0?/* @__PURE__ */e("nav",{className:pn("flex items-center gap-1",l?"ml-2":"ml-4"),children:r.map(t=>{const n=o===t.id;/* @__PURE__ */
|
|
342
|
-
return e("button",{type:"button","aria-current":n?"page":void 0,onClick(){a?.(t.id),t.onClick?.()},className:pn("rounded-2 px-3.5 py-2 text-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",n?"bg-brand-softer font-bold text-brand":"font-medium text-gray-700 hover:bg-gray-100",l&&"px-2.5 py-1.5"),children:t.label},t.id)})}):null,i?/* @__PURE__ */e("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:i}):null]})}function
|
|
342
|
+
return e("button",{type:"button","aria-current":n?"page":void 0,onClick(){a?.(t.id),t.onClick?.()},className:pn("rounded-2 px-3.5 py-2 text-sm transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30",n?"bg-brand-softer font-bold text-brand":"font-medium text-gray-700 hover:bg-gray-100",l&&"px-2.5 py-1.5"),children:t.label},t.id)})}):null,i?/* @__PURE__ */e("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:i}):null]})}function Dh({letters:t,name:r,onLogoClick:o,className:a,...i}){/* @__PURE__ */
|
|
343
343
|
return n("div",{"data-slot":"top-nav-brand",className:pn("flex items-center gap-2.5",a),...i,children:[
|
|
344
|
-
/* @__PURE__ */e("div",{onClick:o,className:pn("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-2","bg-[linear-gradient(135deg,var(--main-700),var(--main-800))] text-xs font-extrabold text-white","shadow-warm",o&&"cursor-pointer"),children:t}),r?/* @__PURE__ */e("div",{className:"text-lg font-extrabold tracking-[-0.3px] text-gray-900",children:r}):null]})}
|
|
344
|
+
/* @__PURE__ */e("div",{onClick:o,className:pn("flex h-[30px] w-[30px] shrink-0 items-center justify-center rounded-2","bg-[linear-gradient(135deg,var(--main-700),var(--main-800))] text-xs font-extrabold text-white","shadow-warm",o&&"cursor-pointer"),children:t}),r?/* @__PURE__ */e("div",{className:"text-lg font-extrabold tracking-[-0.3px] text-gray-900",children:r}):null]})}Ph.Brand=Dh;export{hn as Accordion,vn as AccordionContent,gn as AccordionItem,bn as AccordionTrigger,An as AchievementBadge,Xn as AvatarImagePicker,nr as Banner,rr as BannerCarousel,or as BottomNav,ta as BottomSheet,oa as BottomSheetClose,ia as BottomSheetContent,da as BottomSheetDescription,sa as BottomSheetFooter,la as BottomSheetHeader,aa as BottomSheetOverlay,ra as BottomSheetPortal,ca as BottomSheetTitle,na as BottomSheetTrigger,Wn as Button,ql as Calendar,Ul as Card,Xl as CardBody,Jl as CardMeta,es as CardOverlay,Kl as CardThumb,Zl as CardTitle,tm as ChallengeTag,ts as CheckContainer,Cs as CheckList,ys as Checkbox,Es as CircleAvatar,Ps as CircularProgress,Ds as CommentRow,cu as CommentThread,_u as ConfirmDialog,bu as DatePicker,yu as Dialog,Mu as DialogBody,Cu as DialogClose,Au as DialogContent,Pu as DialogDescription,Eu as DialogFooter,Su as DialogHeader,ku as DialogOverlay,xu as DialogPortal,Ru as DialogTitle,wu as DialogTrigger,Lu as Dropdown,Ou as DropdownMenu,em as FilterChip,Iu as GoalAddList,Fu as Heatmap,Kn as Icon,ju as ImagePicker,Hu as ImagePlaceholder,Tu as MultiSelect,Yu as PageWatermark,Gu as Pagination,Qu as ProgressBar,Uu as Radio,Ku as RadioGroup,vu as RangeDatePicker,ef as ScheduleCalendar,tf as SectionHeader,af as SegmentedControl,Sp as Select,Lp as SelectContent,Mp as SelectGroup,Pp as SelectItem,Op as SelectLabel,zp as SelectScrollDownButton,_p as SelectScrollUpButton,Dp as SelectSeparator,Rp as SelectTrigger,Ep as SelectValue,Tp as Snackbar,Fp as SnackbarProvider,Yp as StatCard,er as StatusBadge,Vp as StepIndicator,Gp as Streak,Qp as StreakChip,Up as StreakHero,Ss as Stripe,Kp as Tabs,Zp as Tag,On as Text,au as TextArea,ru as TextField,om as Toast,lm as ToastProvider,cm as Toggle,Um as ToggleGroup,Km as ToggleGroupItem,Mh as Tooltip,Rh as TooltipContent,Sh as TooltipProvider,Eh as TooltipTrigger,Ph as TopNav,Dh as TopNavBrand,pn as cn,Ns as resolveStripeTone,As as stripeBackground,Ln as textVariants,uu as useIsMobile,du as useMediaQuery,Bp as useSnackbar,sm as useToast};
|