oink-ui 1.0.1 → 1.0.2
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/README.md +16 -10
- package/dist/oink-ui.cjs +1 -1
- package/dist/oink-ui.css +1 -1
- package/dist/oink-ui.js +2116 -2113
- package/dist/popups/Tooltip.d.ts +7 -1
- package/dist/styles/tooltip.css +1 -1
- package/package.json +1 -1
package/dist/oink-ui.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),l=require("react"),Ss=require("react-dom"),Xr=require("react-dom/client");function L(...t){const e=[],s=r=>{if(!(!r&&r!==0)){if(typeof r=="string"||typeof r=="number")e.push(String(r));else if(Array.isArray(r))r.forEach(s);else if(typeof r=="object")for(const a in r)r[a]&&e.push(a)}};return t.forEach(s),e.join(" ")}const ye=(t,e,s)=>Math.min(s,Math.max(e,t)),Ae=typeof window<"u"&&typeof document<"u",Kr='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function St(t){return Array.from(t.querySelectorAll(Kr)).filter(e=>{if(e.closest('[inert], [aria-hidden="true"]'))return!1;const s=getComputedStyle(e);return s.display!=="none"&&s.visibility!=="hidden"})}function It(...t){return e=>{for(const s of t)if(s==null||s(e),e.defaultPrevented)break}}function Fe(){if(!Ae)return 1;const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--ok-ms"));return Number.isFinite(t)?t:1}const Zr=t=>new Promise(e=>setTimeout(e,t*Fe()));function Jr(t,e,s){const r=Math.sqrt(t/s),a=e/(2*Math.sqrt(t*s));if(a<1){const d=r*Math.sqrt(1-a*a);return u=>1-Math.exp(-a*r*u)*(Math.cos(d*u)+a*r/d*Math.sin(d*u))}if(a===1)return d=>1-Math.exp(-r*d)*(1+r*d);const o=Math.sqrt(a*a-1),i=-r*(a-o),c=-r*(a+o);return d=>1-(c*Math.exp(i*d)-i*Math.exp(c*d))/(c-i)}function Sn(t={}){const e=t.stiffness||260,s=t.damping||24,r=t.mass||1,a=Jr(e,s,r);let o=.1;for(let u=3;u>0;u-=1/240)if(Math.abs(a(u)-1)>(t.precision||.004)){o=u+1/240;break}const i=ye(Math.round(o*70),18,48),c=[];let d=1;for(let u=0;u<=i;u++){const p=u===i?1:a(o*u/i);p>d&&(d=p),c.push(+p.toFixed(3))}return{stiffness:e,damping:s,mass:r,duration:Math.round(o*1e3),easing:"linear("+c.join(", ")+")",overshoot:d-1,at:u=>a(u*o)}}var Ms;const Cs=Ae&&typeof CSS<"u"&&!!((Ms=CSS.supports)!=null&&Ms.call(CSS,"transition-timing-function","linear(0, 1)")),De={out:"cubic-bezier(.22, 1, .36, 1)",in:"cubic-bezier(.55, 0, 1, .45)",inOut:"cubic-bezier(.65, 0, .35, 1)",standard:"cubic-bezier(.2, 0, 0, 1)"},Es={in:303,fade:100,out:160},un={soft:{stiffness:170,damping:26,fallback:"cubic-bezier(.22, 1, .36, 1)"},spring:{stiffness:260,damping:24,fallback:"cubic-bezier(.3, 1.3, .5, 1)"},snappy:{stiffness:520,damping:34,fallback:"cubic-bezier(.3, 1.25, .45, 1)"},bouncy:{stiffness:300,damping:18,fallback:"cubic-bezier(.3, 1.7, .5, 1)"},wobbly:{stiffness:180,damping:9,fallback:"cubic-bezier(.3, 2.3, .5, 1)"}},Cn=Object.fromEntries(Object.keys(un).map(t=>[t,{...Sn(un[t]),fallback:un[t].fallback}]));function Ne(t,e,s={}){if(!t||typeof t.animate!="function")return null;const{spring:r,...a}=s,o={duration:240,easing:De.out,...a};if(r){const c=typeof r=="string"?Cn[r]:Sn(r);o.duration=c.duration,o.easing=Cs?c.easing:c.fallback||De.out}const i=Fe();return o.duration=Math.max(0,o.duration*i),o.delay&&(o.delay*=i,o.fill||(o.fill="backwards")),t.animate(e,o)}function Qr(t,e,s){const r=t.filter(Boolean),a=new Map(r.map(o=>[o,o.getBoundingClientRect()]));e(),Yt(a,s)}function Yt(t,e){t.forEach((s,r)=>{if(!r.isConnected)return;const a=r.getBoundingClientRect(),o=s.left-a.left,i=s.top-a.top;Math.abs(o)<.5&&Math.abs(i)<.5||Ne(r,[{transform:`translate(${o}px, ${i}px)`},{transform:"none"}],{spring:"spring",...e})})}const ge=Ae?l.useLayoutEffect:l.useEffect;function ke(t){const e=l.useRef(t);return ge(()=>{e.current=t}),l.useCallback((...s)=>{var r;return(r=e.current)==null?void 0:r.call(e,...s)},[])}function le(t,e,s){const[r,a]=l.useState(e),o=t!==void 0,i=o?t:r,c=ke(s),d=l.useRef(i),u=l.useRef(o),p=l.useRef(null);ge(()=>{d.current=i,u.current=o,p.current=null});const m=l.useCallback(f=>{const h=p.current?p.current.value:d.current,v=typeof f=="function"?f:null,b=v?v(h):f;if(Object.is(b,h))return;const g={value:b};p.current=g,Promise.resolve().then(()=>{p.current===g&&(p.current=null)}),u.current||a(v?N=>v(N):()=>b),c(b)},[c]);return[i,m]}function xe(...t){return e=>{t.forEach(s=>{typeof s=="function"?s(e):s&&(s.current=e)})}}function Xt(t,e=!1){const s=l.useCallback(r=>{if(!Ae)return()=>{};const a=window.matchMedia(t);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[t]);return l.useSyncExternalStore(s,()=>window.matchMedia(t).matches,()=>e)}const Kt={sm:520,md:768,lg:1024,xl:1280};function at(t,e=!0){return Xt(`(min-width: ${Kt[t]}px)`,e)}function Pt(t,e=400){const[s,r]=l.useState(t),[a,o]=l.useState("closed"),i=l.useRef(null);return ge(()=>{t&&r(!0)},[t]),l.useEffect(()=>{if(!s)return;if(t){let f=0,h=0;const v=()=>{const g=i.current;if(!g&&h++<10){f=requestAnimationFrame(v);return}g==null||g.offsetWidth,o("open")};v();const b=setTimeout(()=>{cancelAnimationFrame(f),v()},100);return()=>{cancelAnimationFrame(f),clearTimeout(b)}}o("closed");const c=i.current;let d=!1;const u=()=>{d||(d=!0,r(!1))},p=f=>{f.target===c&&u()};c==null||c.addEventListener("transitionend",p);const m=setTimeout(u,e*Fe());return()=>{c==null||c.removeEventListener("transitionend",p),clearTimeout(m)}},[t,s,e]),{mounted:s,state:t?a:"closed",ref:i}}let ls=0,_t=null;function As(t){l.useEffect(()=>{if(!(!t||!Ae)){if(ls++===0){const e=document.documentElement,s=e.style.overflow,r=e.style.paddingRight,a=window.innerWidth-e.clientWidth;e.style.overflow="hidden",a>0&&(e.style.paddingRight=a+"px"),_t=()=>{e.style.overflow=s,e.style.paddingRight=r}}return()=>{--ls===0&&(_t==null||_t(),_t=null)}}},[t])}const jt=[];function Lt(t,e){const s=ke(e);l.useEffect(()=>{if(!t||!Ae)return;jt.push(s);const r=a=>{a.key!=="Escape"||a.defaultPrevented||jt[jt.length-1]===s&&(a.preventDefault(),s())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r);const a=jt.lastIndexOf(s);a>=0&&jt.splice(a,1)}},[t,s])}function ea(t,e,s){const r=ke(s),a=l.useRef(e);a.current=e,l.useEffect(()=>{if(!t||!Ae)return;const o=i=>{const c=i.target;a.current.some(d=>d.current&&d.current.contains(c))||r(i)};return document.addEventListener("pointerdown",o,!0),()=>document.removeEventListener("pointerdown",o,!0)},[t,r])}const Bt=new Map,ta='[data-ok-layer], .ok-popup, .ok-toasts, .ok-tooltip, [role="tooltip"], [data-ok-confirmer], [aria-live], script, style, link, template, noscript';function Ts(t,e){l.useEffect(()=>{if(!t||!Ae)return;const s=e.current,r="inert"in HTMLElement.prototype,a=[];return Array.from(document.body.children).forEach(o=>{if(o.matches(ta)||s&&o.contains(s))return;let i=Bt.get(o);i||(i={count:0,inert:o.hasAttribute("inert"),ariaHidden:o.getAttribute("aria-hidden"),viaInert:r},Bt.set(o,i),r?o.setAttribute("inert",""):o.setAttribute("aria-hidden","true")),i.count++,a.push(o)}),()=>{a.forEach(o=>{const i=Bt.get(o);!i||--i.count>0||(Bt.delete(o),i.viaInert?i.inert||o.removeAttribute("inert"):i.ariaHidden===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i.ariaHidden))})}},[t,e])}function it({children:t,container:e,disabled:s}){const[r,a]=l.useState(null);return l.useEffect(()=>{a(e??document.body)},[e]),s?n.jsx(n.Fragment,{children:t}):r?Ss.createPortal(t,r):null}const na='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex], [contenteditable="true"]';function En(t){const e=t instanceof HTMLElement&&t!==document.body&&t!==document.documentElement?t:null,s=[];for(let r=(e==null?void 0:e.parentElement)??null;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement)s.push(r);return{target:e,ancestors:s}}const Is=t=>!!t.closest('[inert], [aria-hidden="true"]'),is=t=>t.isConnected&&!Is(t);function An(t){var a,o;if(!t||!t.target)return null;const e={preventScroll:!0};if(t.target.isConnected)return Is(t.target)?null:(t.target.focus(e),t.target);const s=t.ancestors.find(i=>is(i)&&i.matches(na));if(s)return s.focus(e),s;const r=document.querySelector('main, [role="main"]');return r&&is(r)?(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus(e),r):((o=(a=document.activeElement)==null?void 0:a.blur)==null||o.call(a),document.body)}function Ps({children:t,trap:e=!0,autoFocus:s=!0,restoreFocus:r=!0,initialFocus:a,scopeRef:o}){const i=l.useRef(null),c=l.useRef(r);return c.current=r,l.useEffect(()=>{const d=o.current;if(d)return(!i.current||!d.contains(document.activeElement))&&(i.current=En(document.activeElement)),s&&!d.contains(document.activeElement)&&((a==null?void 0:a.current)??d.querySelector("[data-autofocus]")??d).focus({preventScroll:!0}),()=>{c.current&&An(i.current)}},[]),l.useEffect(()=>{const d=o.current;if(!e||!d)return;const u=m=>{if(m.key!=="Tab")return;const f=St(d);if(!f.length){m.preventDefault(),d.focus();return}const h=f[0],v=f[f.length-1],b=document.activeElement;m.shiftKey&&(b===h||b===d)?(m.preventDefault(),v.focus()):!m.shiftKey&&b===v&&(m.preventDefault(),h.focus())},p=m=>{var h;const f=m.target;d.contains(f)||((h=f.closest)==null?void 0:h.call(f,"[data-ok-layer]"))!==d.closest("[data-ok-layer]")||(St(d)[0]??d).focus()};return d.addEventListener("keydown",u),document.addEventListener("focusin",p),()=>{d.removeEventListener("keydown",u),document.removeEventListener("focusin",p)}},[e,o]),n.jsx(n.Fragment,{children:t})}const Tn={search:'<circle cx="9" cy="9" r="5.5"/><path d="M13.2 13.2L17 17"/>',check:'<path d="M4.500 10.500l3.500 3.500 7.500-8"/>',x:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',plus:'<path d="M10 4.500v11M4.500 10h11"/>',minus:'<path d="M4.500 10h11"/>',"chevron-right":'<path d="M7.500 4.500L13 10l-5.500 5.500"/>',"chevron-down":'<path d="M4.500 7.500L10 13l5.500-5.500"/>',sun:'<circle cx="10" cy="10" r="3.300"/><path d="M10 2.500v1.800M10 15.700v1.800M2.500 10h1.800M15.700 10h1.800M4.700 4.700L6 6M14 14l1.300 1.300M4.700 15.300L6 14M14 6l1.300-1.300"/>',moon:'<path d="M16.500 11.800A7 7 0 1 1 8.200 3.500a5.500 5.500 0 0 0 8.300 8.300z"/>',monitor:'<rect x="3" y="4" width="14" height="9.500" rx="2.200"/><path d="M7.500 16.500h5M10 13.500v3"/>',copy:'<rect x="7" y="7" width="9.500" height="9.500" rx="2.500"/><path d="M13 7V5.500A2 2 0 0 0 11 3.500H5.500a2 2 0 0 0-2 2V11a2 2 0 0 0 2 2H7"/>',play:'<path d="M7 4.600v10.800a.7.700 0 0 0 1.100.600l8-5.400a.7.700 0 0 0 0-1.200l-8-5.400A.7.700 0 0 0 7 4.600z" fill="currentColor" stroke="none"/>',replay:'<path d="M4.300 10a5.700 5.700 0 1 0 1.900-4.200M4 3.500v3h3"/>',info:'<circle cx="10" cy="10" r="7"/><path d="M10 9.300v4.200M10 6.500v.1"/>',alert:'<path d="M10 3.500l7 12.500H3l7-12.500zM10 8.500v3.200M10 14v.1"/>',bell:'<path d="M5.500 8.500a4.500 4.500 0 0 1 9 0c0 4 1.500 5 1.500 5H4s1.500-1 1.500-5zM8.300 16.200a1.800 1.800 0 0 0 3.400 0"/>',trash:'<path d="M4.500 6h11M8 6V4.500h4V6M6 6l.7 8.800a1.600 1.600 0 0 0 1.600 1.500h3.400a1.600 1.600 0 0 0 1.600-1.500L14 6"/>',more:'<path d="M5 10v.1M10 10v.1M15 10v.1" stroke-width="2.600"/>',download:'<path d="M10 3.500v9M6.500 9.500L10 13l3.500-3.500M4.500 16.500h11"/>',upload:'<path d="M10 13V4M6.500 7.500L10 4l3.500 3.500M4.500 16.500h11"/>',edit:'<path d="M4 16l.8-3.300L13.400 4a1.700 1.700 0 0 1 2.400 0l.2.2a1.700 1.700 0 0 1 0 2.400L7.300 15.200 4 16z"/>',share:'<path d="M10 12.500V3.500M6.800 6.500L10 3.500l3.200 3M5 10v5a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15v-5"/>',mail:'<rect x="3" y="4.800" width="14" height="10.500" rx="2.500"/><path d="M3.800 7l6.200 4.300L16.200 7"/>',sparkle:'<path d="M10 3.500l1.700 4.800 4.800 1.700-4.800 1.700L10 16.500l-1.700-4.800L3.500 10l4.800-1.700z"/>',shuffle:'<path d="M3.500 6h2.300c1.400 0 2.600.7 3.300 1.900l1.800 4.200c.7 1.200 1.900 1.900 3.300 1.900h2.300M14.500 4l2 2-2 2M14.500 12l2 2-2 2M3.500 14h2.300c.9 0 1.700-.3 2.300-.8M16.500 6h-2.300c-.9 0-1.700.3-2.300.8"/>',sliders:'<path d="M3.500 6.500h6M13.500 6.500h3M3.500 13.500h3M10.500 13.500h6"/><circle cx="11.500" cy="6.500" r="2"/><circle cx="8.500" cy="13.500" r="2"/>',home:'<path d="M3.5 9.2L10 3.5l6.5 5.7V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9.2z"/><path d="M8 16.5V12h4v4.5"/>',user:'<circle cx="10" cy="7" r="3.2"/><path d="M4 16.5c.7-2.8 3-4.3 6-4.3s5.3 1.5 6 4.3"/>',users:'<circle cx="7.5" cy="7.2" r="2.8"/><path d="M2.5 16c.6-2.5 2.5-3.800 5-3.800s4.400 1.300 5 3.800M12.800 4.600a2.800 2.800 0 0 1 0 5.200M14.800 12.500c1.400.5 2.300 1.700 2.700 3.500"/>',settings:'<path d="M8.600 3h2.800l.5 2 1.800 1 2-.6 1.400 2.400-1.500 1.500v1.400l1.500 1.500-1.400 2.400-2-.6-1.800 1-.5 2H8.600l-.5-2-1.800-1-2 .6-1.400-2.400 1.500-1.500V9.300L2.900 7.800l1.400-2.400 2 .6 1.800-1z"/><circle cx="10" cy="10" r="2.500"/>',heart:'<path d="M10 16.500S3.500 12.700 3.500 8.200A3.700 3.700 0 0 1 10 5.900a3.700 3.700 0 0 1 6.500 2.300c0 4.500-6.500 8.300-6.500 8.300z"/>',star:'<path d="M10 3.500l1.800 4.500 4.900.4-3.700 3.100 1.100 4.700L10 13.600l-4.100 2.600 1.100-4.700-3.700-3.100 4.900-.4z"/>',cart:'<path d="M2.500 3.500h2l1.800 8.500h8.200l1.500-6H5"/><circle cx="7.500" cy="15.500" r="1.200"/><circle cx="13.500" cy="15.500" r="1.200"/>',bag:'<path d="M4.500 7h11l-.7 8.100a1.500 1.500 0 0 1-1.500 1.400H6.700a1.500 1.500 0 0 1-1.500-1.400L4.500 7z"/><path d="M7.500 9V6.500a2.500 2.500 0 0 1 5 0V9"/>',grid:'<rect x="3.500" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="3.500" y="11" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="11" width="5.500" height="5.500" rx="1.500"/>',list:'<path d="M7.500 5.500h9M7.500 10h9M7.500 14.500h9"/><path d="M3.800 5.500v.1M3.800 10v.1M3.800 14.500v.1" stroke-width="2.400"/>',filter:'<path d="M3.500 4.500h13l-5 6V15l-3 1.500v-6l-5-6z"/>',calendar:'<rect x="3.500" y="4.500" width="13" height="12" rx="2.500"/><path d="M3.500 8.500h13M7 3v3M13 3v3"/>',clock:'<circle cx="10" cy="10" r="7"/><path d="M10 6v4l2.500 1.500"/>',inbox:'<path d="M3.500 11l2-6a1.500 1.500 0 0 1 1.400-1h6.200a1.500 1.500 0 0 1 1.400 1l2 6v3.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V11z"/><path d="M3.500 11H7l1 2h4l1-2h3.500"/>',send:'<path d="M16.500 3.500L3.500 8.700l5.300 2.500 2.500 5.300 5.200-13zM8.800 11.200L12 8"/>',archive:'<rect x="3" y="4" width="14" height="4" rx="1.200"/><path d="M4.500 8v6.500A1.500 1.500 0 0 0 6 16h8a1.500 1.500 0 0 0 1.500-1.500V8M8.300 11.200h3.400"/>',reply:'<path d="M8 5.500L3.500 10 8 14.500M3.500 10h8a5 5 0 0 1 5 5v.5"/>',forward:'<path d="M12 5.500l4.500 4.500-4.500 4.500M16.500 10h-8a5 5 0 0 0-5 5v.5"/>',paperclip:'<path d="M15.500 9.500l-5.700 5.700a3.540 3.540 0 0 1-5-5l6-6a2.340 2.340 0 0 1 3.300 3.300l-5.900 5.900a1.200 1.200 0 0 1-1.700-1.700l5.300-5.300"/>',folder:'<path d="M3.500 6A1.500 1.500 0 0 1 5 4.500h3l1.800 2H15A1.500 1.500 0 0 1 16.500 8v6.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V6z"/>',file:'<path d="M11.500 3.500h-5A1.500 1.500 0 0 0 5 5v10a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15V7l-3.500-3.500z"/><path d="M11.500 3.500V7H15"/>',image:'<rect x="3.500" y="4" width="13" height="12" rx="2.500"/><circle cx="7.500" cy="8" r="1.300"/><path d="M4.200 13.800l3.300-3.300 3 3 2-2 3.300 3.300"/>',link:'<path d="M8.500 11.500a3.200 3.200 0 0 0 4.500 0L15.500 9A3.200 3.200 0 0 0 11 4.500l-.8.8"/><path d="M11.500 8.500a3.200 3.200 0 0 0-4.500 0L4.500 11A3.200 3.200 0 0 0 9 15.500l.8-.8"/>',external:'<path d="M11.500 4H16v4.500M16 4l-7 7M14 11.500V15a1.500 1.500 0 0 1-1.500 1.500H5A1.500 1.500 0 0 1 3.500 15V7.500A1.500 1.500 0 0 1 5 6h3.500"/>',eye:'<path d="M2.500 10S5.200 5 10 5s7.500 5 7.500 5-2.700 5-7.500 5-7.500-5-7.500-5z"/><circle cx="10" cy="10" r="2.300"/>',"eye-off":'<path d="M8.300 5.200A7 7 0 0 1 10 5c4.800 0 7.500 5 7.500 5a12.500 12.500 0 0 1-1.900 2.500M12.900 14.300A6.500 6.500 0 0 1 10 15c-4.800 0-7.500-5-7.500-5a12.300 12.300 0 0 1 3.300-3.700M3.500 3.500l13 13M8.400 8.400a2.300 2.300 0 0 0 3.200 3.200"/>',lock:'<rect x="4.500" y="9" width="11" height="7.500" rx="2"/><path d="M7 9V6.500a3 3 0 0 1 6 0V9"/>',tag:'<path d="M3.500 4.500v5.200a1.500 1.500 0 0 0 .4 1l5.700 5.700a1.500 1.500 0 0 0 2.100 0l4.700-4.700a1.500 1.500 0 0 0 0-2.100l-5.700-5.700a1.500 1.500 0 0 0-1-.4H4.500a1 1 0 0 0-1 1z"/><path d="M7 7v.1" stroke-width="2.400"/>',bookmark:'<path d="M5.500 4.500A1.500 1.500 0 0 1 7 3h6a1.500 1.500 0 0 1 1.500 1.500v12L10 13.500l-4.500 3v-12z"/>',"chevron-left":'<path d="M12.500 4.500L7 10l5.500 5.500"/>',"chevron-up":'<path d="M4.500 12.500L10 7l5.500 5.500"/>',"arrow-left":'<path d="M16 10H4M8.500 5.500L4 10l4.500 4.500"/>',"arrow-right":'<path d="M4 10h12M11.500 5.500L16 10l-4.500 4.500"/>',"arrow-up":'<path d="M10 16V4M5.500 8.500L10 4l4.500 4.500"/>',"arrow-down":'<path d="M10 4v12M5.500 11.500L10 16l4.500-4.500"/>',refresh:'<path d="M16 10a6 6 0 0 1-10.600 3.800M4 10a6 6 0 0 1 10.600-3.800M14.500 3v3.200h-3.200M5.500 17v-3.200h3.200"/>',menu:'<path d="M3.500 6h13M3.500 10h13M3.500 14h13"/>',close:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',"check-circle":'<circle cx="10" cy="10" r="7"/><path d="M6.800 10.300l2.200 2.200 4.200-4.600"/>',"x-circle":'<circle cx="10" cy="10" r="7"/><path d="M7.500 7.500l5 5M12.500 7.500l-5 5"/>',help:'<circle cx="10" cy="10" r="7"/><path d="M7.900 8a2.200 2.200 0 1 1 3.200 2c-.7.4-1.100.9-1.100 1.600M10 14v.1"/>',globe:'<circle cx="10" cy="10" r="7"/><path d="M3 10h14M10 3c2 2.200 3 4.500 3 7s-1 4.800-3 7c-2-2.200-3-4.500-3-7s1-4.800 3-7z"/>',phone:'<rect x="5.500" y="2.500" width="9" height="15" rx="2.200"/><path d="M9 14.500h2"/>',"credit-card":'<rect x="2.500" y="4.500" width="15" height="11" rx="2.200"/><path d="M2.500 8.500h15M5.500 12.500h3"/>',truck:'<path d="M4.200 13.500H2.500v-8h9v8M7.800 13.500h4.400M11.500 8.500h3l3 3v2h-1.700"/><circle cx="6" cy="14.500" r="1.600"/><circle cx="14" cy="14.500" r="1.600"/>',chart:'<path d="M3.500 16.500h13M6 13.500V10M10 13.500V5M14 13.500V8"/>',"trending-up":'<path d="M3 14l4.500-4.500 3 3L17 6M12.500 6H17v4.500"/>',"trending-down":'<path d="M3 6l4.500 4.500 3-3L17 14M12.500 14H17V9.500"/>',layout:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M3 8h14M8 8v8.500"/>',sidebar:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M8 3.500v13"/>',command:'<path d="M7.500 7.500h5v5h-5zM7.500 7.500h-2a2 2 0 1 1 2-2zM12.500 7.500v-2a2 2 0 1 1 2 2zM12.500 12.500h2a2 2 0 1 1-2 2zM7.500 12.500v2a2 2 0 1 1-2-2z"/>',zap:'<path d="M11 2.500l-6.500 9H10l-1 6 6.500-9H10l1-6z"/>'},he=l.forwardRef(function({name:e,size:s,label:r,filled:a,className:o,style:i,children:c,...d},u){const p=r?{role:"img","aria-label":r}:{"aria-hidden":!0},m=s?{width:s,height:s,...i}:i,f=L("ok-icon",a&&"ok-icon--fill",o);return e?n.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:f,style:m,...p,...d,dangerouslySetInnerHTML:{__html:Tn[e]}}):n.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:f,style:m,...p,...d,children:c})});function In({className:t,...e}){return n.jsx("span",{className:L("ok-sr",t),...e})}const Ls=(t,e=0,s=1)=>Math.min(s,Math.max(e,t));function gt(t){const e=t.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(e)?[0,1,2].map(s=>parseInt(e[s]+e[s],16)):/^[0-9a-f]{6}$/i.test(e)?[0,2,4].map(s=>parseInt(e.slice(s,s+2),16)):null}function Ve(t){const e=gt(t);return e?ot(e):null}function ot([t,e,s]){return"#"+[t,e,s].map(r=>Math.round(Ls(r,0,255)).toString(16).padStart(2,"0")).join("")}function $s([t,e,s]){const[r,a,o]=[t/255,e/255,s/255],i=Math.max(r,a,o),c=Math.min(r,a,o),d=i-c;let u=0;return d&&(i===r?u=(a-o)/d%6:i===a?u=(o-r)/d+2:u=(r-a)/d+4,u*=60,u<0&&(u+=360)),{h:u,s:i?d/i:0,v:i}}function Ds({h:t,s:e,v:s}){const r=a=>{const o=(a+t/60)%6;return Math.round(255*(s-s*e*Math.max(0,Math.min(o,4-o,1))))};return[r(5),r(3),r(1)]}const Os=t=>{const e=gt(t);return e?$s(e):null},Bs=t=>ot(Ds(t)),ht=t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4},sa=t=>255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055);function xn([t,e,s]){return .2126*ht(t)+.7152*ht(e)+.0722*ht(s)}function Ct(t,e){const[s,r]=[xn(t),xn(e)].sort((a,o)=>o-a);return(s+.05)/(r+.05)}function Fs([t,e,s]){const[r,a,o]=[ht(t),ht(e),ht(s)],i=Math.cbrt(.4122214708*r+.5363325363*a+.0514459929*o),c=Math.cbrt(.2119034982*r+.6806995451*a+.1073969566*o),d=Math.cbrt(.0883024619*r+.2817188376*a+.6299787005*o);return[.2104542553*i+.793617785*c-.0040720468*d,1.9779984951*i-2.428592205*c+.4505937099*d,.0259040371*i+.7827717662*c-.808675766*d]}function ra([t,e,s]){const r=(t+.3963377774*e+.2158037573*s)**3,a=(t-.1055613458*e-.0638541728*s)**3,o=(t-.0894841775*e-1.291485548*s)**3;return[4.0767416621*r-3.3077115913*a+.2309699292*o,-1.2684380046*r+2.6097574011*a-.3413193965*o,-.0041960863*r-.7034186147*a+1.707614701*o]}const Pn=t=>Fs(t)[0];function cs(t,e){const[,s,r]=Fs(t),a=Math.hypot(s,r),o=Math.atan2(r,s);let i=0,c=a;const d=p=>ra([e,p*Math.cos(o),p*Math.sin(o)]),u=p=>p.every(m=>m>=-1e-4&&m<=1+1e-4);if(u(d(a)))i=a;else for(let p=0;p<20;p++){const m=(i+c)/2;u(d(m))?i=m:c=m}return d(i).map(p=>sa(Ls(p)))}function ds(t,e,s,r){if(Ct(t,e)>=s)return t;const a=Pn(t);let o=0,i=1,c=cs(t,r);for(let d=0;d<24;d++){const u=(o+i)/2,p=r===0?a-(a-0)*u:a+(1-a)*u,m=cs(t,p);Ct(m,e)>=s?(c=m,i=u):o=u}return c}const Hs=.65,aa=[255,255,255],oa=[42,41,39],us={light:[27,28,34],dark:[244,244,246]},kn=1.45;function yn(t){const e=gt(t);if(!e)return{light:"#ffffff",dark:"#1b1c22"};const s=ot(e);return{light:Ct(e,us.light)<kn?"#ffffff":s,dark:Ct(e,us.dark)<kn?"#1b1c22":s}}function zs(t){const e=gt(t);return e&&Pn(e)<Hs?"#ffffff":"#1b1c22"}function _n(t){const e=gt(t);if(!e)return{};const s=zs(t),r={"--ok-accent":ot(e),"--ok-on-accent":s,"--ok-accent-deep":ot(ds(e,aa,4.6,0)),"--ok-accent-light":ot(ds(e,oa,4.6,1)),"--ok-logo-snout-light":yn(t).light,"--ok-logo-snout-dark":yn(t).dark};return s==="#ffffff"&&(r["--ok-accent-fill"]="var(--ok-accent)",r["--ok-accent-fill-hover"]="var(--ok-accent-hover)"),r}const qs="M9 10C9 26 20 38 31 38c7 0 11-5 11-10.500S37.500 18 32 18c-5 0-8.500 3.500-9 8",Gt=l.createContext(void 0);function Vs({tail:t,children:e}){const s=l.useContext(Gt);return n.jsx(Gt.Provider,{value:t===void 0?s:t,children:e})}function la(){return l.useContext(Gt)}function Ln({className:t="ok-tail",...e}){const s=l.useContext(Gt);if(s==null||s===!1)return n.jsx("svg",{className:t,viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false",...e,children:n.jsx("path",{pathLength:1,d:qs})});if(typeof s=="function")return n.jsx(n.Fragment,{children:s({className:t})});if(l.isValidElement(s)){const r=s;return l.cloneElement(r,{className:L(t,r.props.className),"aria-hidden":r.props["aria-hidden"]??!0,...r.type==="svg"?{focusable:r.props.focusable??"false"}:null})}return n.jsx("span",{className:t,"aria-hidden":"true",children:s})}const ia={common:{close:"关闭",clear:"清除",loading:"加载中",remove:"移除",separator:","},avatar:{status:{online:"在线",busy:"忙碌",away:"离开",offline:"离线"},more:t=>`还有 ${t} 人`,moreButton:(t,e)=>`还有 ${t} 人${e?","+e:""},查看全部成员`,panel:(t,e)=>e?`${e}(共 ${t} 人)`:`全部成员(共 ${t} 人)`,rest:t=>`另有 ${t} 人`},breadcrumb:{label:"面包屑",expand:t=>`显示中间的 ${t} 级路径`},code:{label:"代码",copy:"复制代码",copied:"已复制",copyFailed:"复制失败"},pagination:{label:"分页",prev:"上一页",next:"下一页",page:t=>`第 ${t} 页`,status:(t,e)=>`第 ${t} 页,共 ${e} 页`},reaction:{label:"Oink 一下"},stat:{trend:{up:"上升",down:"下降",flat:"持平"}},steps:{label:"步骤",state:{complete:"已完成",current:"当前步骤",upcoming:"未开始"},error:"出错",prefix:(t,e)=>`第 ${t} 步,${e}:`},table:{label:"表格",empty:"暂无数据",selectAll:"选择全部",selectColumn:"选择",selectRow:t=>`选择 ${t}`,row:t=>`第 ${t} 行`,selected:t=>`已选择 ${t} 行`,pagination:t=>`${t}分页`},tag:{remove:t=>`移除${t?` ${t}`:""}`},button:{status:{loading:"正在处理",success:"已完成",error:"操作失败"}},colorPicker:{label:"颜色",area:"饱和度与亮度",areaRole:"二维滑块",areaValue:(t,e)=>`饱和度 ${t}%,亮度 ${e}%`,hue:"色相",hex:"十六进制色值",eyedropper:"从屏幕取色",swatches:"预设颜色"},fileDrop:{title:"把文件拖到这里,或点击选择",status:(t,e,s)=>t?(t===1?`已选择 ${e}`:`已选择 ${t} 个文件`)+(s?`,${s} 个不符合要求`:""):`${s} 个文件不符合要求`},hotkey:{placeholder:"点击录制",recording:"按下组合键…",spokenRecording:t=>`正在录制,${t}`,spokenCurrent:t=>`当前:${t}`,none:"未设置"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"空格",ArrowUp:"上",ArrowDown:"下",ArrowLeft:"左",ArrowRight:"右",Enter:"回车",Backspace:"退格",Tab:"Tab",Escape:"Esc"},input:{showPassword:"显示密码"},numberInput:{decrement:"减少",increment:"增加"},pinInput:{label:"验证码",cell:(t,e)=>`第 ${t} 位,共 ${e} 位`},rangeSlider:{thumbs:["最小值","最大值"]},rating:{label:"评分",star:t=>`${t} 星`,value:(t,e)=>`评分:${t} / ${e}`},searchInput:{placeholder:"搜索…"},appShell:{skipLink:"跳到主要内容",sidebar:"侧栏",aside:"辅助栏",toggleSidebar:"切换导航",toggleAside:"切换辅助栏"},splitPane:{separator:"调整分栏大小"},commandPalette:{label:"命令面板",placeholder:"搜索命令…",empty:"没有匹配的结果",results:t=>`${t} 条结果`},toast:{label:"通知"},confirm:{confirm:"确定",cancel:"取消"},calendar:{prevMonth:"上个月",nextMonth:"下个月",todaySuffix:",今天"},datePicker:{placeholder:"年-月-日",dialog:"选择日期",open:"打开日历",rangePlaceholder:"开始日期 – 结束日期",rangeDialog:"选择日期范围"},combobox:{loading:"加载中…",empty:"没有匹配的选项",listbox:"选项"},select:{placeholder:"请选择",count:t=>`已选 ${t} 项`}},ut=(t,e,s)=>`${t} ${t===1?e:s}`,ca={common:{close:"Close",clear:"Clear",loading:"Loading",remove:"Remove",separator:", "},avatar:{status:{online:"Online",busy:"Busy",away:"Away",offline:"Offline"},more:t=>`${t} more`,moreButton:(t,e)=>`${t} more${e?", "+e:""}, show all members`,panel:(t,e)=>e?`${e} (${ut(t,"person","people")})`:`All members (${t})`,rest:t=>`And ${t} more`},breadcrumb:{label:"Breadcrumb",expand:t=>`Show ${ut(t,"hidden level","hidden levels")}`},code:{label:"Code",copy:"Copy code",copied:"Copied",copyFailed:"Copy failed"},pagination:{label:"Pagination",prev:"Previous page",next:"Next page",page:t=>`Page ${t}`,status:(t,e)=>`Page ${t} of ${e}`},reaction:{label:"Oink"},stat:{trend:{up:"Up",down:"Down",flat:"Unchanged"}},steps:{label:"Steps",state:{complete:"Completed",current:"Current step",upcoming:"Not started"},error:"Error",prefix:(t,e)=>`Step ${t}, ${e}: `},table:{label:"Table",empty:"No data",selectAll:"Select all",selectColumn:"Select",selectRow:t=>`Select ${t}`,row:t=>`Row ${t}`,selected:t=>`${ut(t,"row","rows")} selected`,pagination:t=>`${t} pagination`},tag:{remove:t=>`Remove${t?` ${t}`:""}`},button:{status:{loading:"Working",success:"Done",error:"Failed"}},colorPicker:{label:"Color",area:"Saturation and brightness",areaRole:"2D slider",areaValue:(t,e)=>`Saturation ${t}%, brightness ${e}%`,hue:"Hue",hex:"Hex color",eyedropper:"Pick color from screen",swatches:"Preset colors"},fileDrop:{title:"Drop files here, or click to browse",status:(t,e,s)=>t?(t===1?`Selected ${e}`:`Selected ${t} files`)+(s?`, ${s} not accepted`:""):`${ut(s,"file","files")} not accepted`},hotkey:{placeholder:"Click to record",recording:"Press keys…",spokenRecording:t=>`Recording, ${t}`,spokenCurrent:t=>`Current: ${t}`,none:"Not set"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right",Enter:"Enter",Backspace:"Backspace",Tab:"Tab",Escape:"Esc"},input:{showPassword:"Show password"},numberInput:{decrement:"Decrease",increment:"Increase"},pinInput:{label:"Verification code",cell:(t,e)=>`Digit ${t} of ${e}`},rangeSlider:{thumbs:["Minimum","Maximum"]},rating:{label:"Rating",star:t=>ut(t,"star","stars"),value:(t,e)=>`Rating: ${t} of ${e}`},searchInput:{placeholder:"Search…"},appShell:{skipLink:"Skip to main content",sidebar:"Sidebar",aside:"Side panel",toggleSidebar:"Toggle navigation",toggleAside:"Toggle side panel"},splitPane:{separator:"Resize panes"},commandPalette:{label:"Command palette",placeholder:"Search commands…",empty:"No results",results:t=>ut(t,"result","results")},toast:{label:"Notifications"},confirm:{confirm:"OK",cancel:"Cancel"},calendar:{prevMonth:"Previous month",nextMonth:"Next month",todaySuffix:", today"},datePicker:{placeholder:"YYYY-MM-DD",dialog:"Choose date",open:"Open calendar",rangePlaceholder:"Start date – End date",rangeDialog:"Choose date range"},combobox:{loading:"Loading…",empty:"No matching options",listbox:"Options"},select:{placeholder:"Select…",count:t=>`${t} selected`}},Et={"zh-CN":ia,"en-US":ca},Gs="en-US";function Ws(t){const e=(t.find(Boolean)??"").toLowerCase();return e==="zh"||e.startsWith("zh-")?"zh-CN":"en-US"}const da=t=>(window.addEventListener("languagechange",t),()=>window.removeEventListener("languagechange",t)),ua=()=>{var t;return Ws((t=navigator.languages)!=null&&t.length?navigator.languages:[navigator.language])},fa=()=>Gs;function pa(){return l.useSyncExternalStore(da,ua,fa)}const jn=l.createContext("auto");function Us({locale:t,children:e}){const s=l.useContext(jn);return n.jsx(jn.Provider,{value:t??s,children:e})}function pe(){const t=l.useContext(jn),e=pa(),s=t==="auto"||!Et[t]?e:t;return{locale:s,messages:Et[s]}}const Ys=["pink","orange","amber","blue","violet"],Rt=t=>t.startsWith("#");function Xs(t){return typeof t=="string"&&(Ys.includes(t)||t.startsWith("#")&&Ve(t)!==null)}function $n(t){return Xs(t)?Rt(t)?Ve(t):t:null}const Ks=520,Zs=l.createContext(null);function ha(t){if(!t||!Ae)return{};let e={};try{e=JSON.parse(localStorage.getItem(t)||"{}")||{}}catch{return{}}return{theme:["light","dark","system"].includes(e.theme)?e.theme:void 0,accent:$n(e.accent)??void 0,motion:["auto","full","reduced"].includes(e.motion)?e.motion:void 0}}const ma=["--ok-accent","--ok-on-accent","--ok-accent-deep","--ok-accent-light","--ok-accent-fill","--ok-accent-fill-hover","--ok-logo-snout-light","--ok-logo-snout-dark"];let Ft=null;function ba(){if(Ft)return Ft;const t=":root.ok-theming::view-transition-new(root){clip-path:circle(0px at 50% 0%)}:root.ok-theming::view-transition-old(root){animation-duration:600ms}";let e;try{e=new CSSStyleSheet,e.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}catch{const s=document.createElement("style");s.textContent=t,document.head.appendChild(s),e=s.sheet}return Ft={next:e.cssRules[0].style,old:e.cssRules[1].style},Ft}function va(t){const o=1.2000000000000002,i=3*(.2-.4)-o,c=1-o-i,d=3*0,u=3*1-d,p=1-d-u;let m=t;for(let f=0;f<6;f++){const h=(3*c*m+2*i)*m+o;if(Math.abs(h)<1e-6)break;m-=(((c*m+i)*m+o)*m-t)/h}return((p*m+u)*m+d)*m}function ga({children:t,defaultTheme:e="system",defaultAccent:s="pink",defaultMotion:r="auto",storageKey:a,tail:o,locale:i}){const[c,d]=l.useState(e),[u,p]=l.useState(s),m=l.useCallback(R=>{const M=$n(R);M&&p(M)},[]),[f,h]=l.useState(r),v=Xt("(prefers-color-scheme: dark)"),b=c==="system"?v?"dark":"light":c,[g,N]=l.useState(!a);ge(()=>{if(!a)return;const R=ha(a);R.theme&&d(R.theme),R.accent&&p(R.accent),R.motion&&h(R.motion),N(!0)},[a]),l.useEffect(()=>{if(!g)return;const R=document.documentElement;R.dataset.theme=b,R.dataset.accent=Rt(u)?"custom":u,ma.forEach(M=>R.style.removeProperty(M)),Rt(u)&&Object.entries(_n(u)).forEach(([M,E])=>R.style.setProperty(M,E)),f==="auto"?delete R.dataset.motion:R.dataset.motion=f,R.style.colorScheme=b},[g,b,u,f]),l.useEffect(()=>{if(!a||!g)return;const R=Rt(u)?_n(u):void 0;try{localStorage.setItem(a,JSON.stringify({theme:c,accent:u,motion:f,vars:R}))}catch{}},[a,g,c,u,f]);const x=l.useRef(null),j=l.useRef(0),_=ke((R,M)=>{var B;const E=document.documentElement,P=document.startViewTransition,C=R==="system"?v?"dark":"light":R,w=()=>{E.dataset.theme=C,E.style.colorScheme=C,d(R)},y=++j.current;if(x.current){const q=x.current;x.current=null,E.classList.remove("ok-theming");try{(B=q.skipTransition)==null||B.call(q)}catch{}w();return}if(!M||!P||Fe()===0||document.hidden||C===b){d(R);return}const S=Math.ceil(Math.hypot(Math.max(M.x,innerWidth-M.x),Math.max(M.y,innerHeight-M.y))),O=Ks*Fe(),T=ba(),D=` at ${Math.round(M.x)}px ${Math.round(M.y)}px)`;T.next.clipPath="circle(0px"+D,T.old.animationDuration=Math.round(O+80)+"ms",E.classList.add("ok-theming");let $;try{$=P.call(document,()=>Ss.flushSync(w))}catch{E.classList.remove("ok-theming"),w();return}x.current=$,$.ready.then(()=>{const q=performance.now(),H=U=>{if(y!==j.current)return;const ae=Math.min(1,(U-q)/O);T.next.clipPath=`circle(${Math.round(S*va(ae))}px${D}`,ae<1&&requestAnimationFrame(H)};requestAnimationFrame(H)}).catch(()=>{});const A=()=>{x.current===$&&(x.current=null,E.classList.remove("ok-theming"))};$.finished.then(A,A)}),k=l.useMemo(()=>({theme:c,resolvedTheme:b,accent:u,motion:f,setTheme:_,setAccent:m,setMotion:h}),[c,b,u,f,_,m]);return n.jsx(Zs.Provider,{value:k,children:n.jsx(Us,{locale:i,children:n.jsx(Vs,{tail:o,children:t})})})}function xa(){const t=l.useContext(Zs),e=l.useCallback(()=>{},[]);return t??{theme:"light",resolvedTheme:"light",accent:"pink",motion:"auto",setTheme:e,setAccent:e,setMotion:e}}const Js="M10 3H18A7 7 0 0 1 25 10V18A7 7 0 0 1 18 25H5A2 2 0 0 1 3 23V10A7 7 0 0 1 10 3Z",zt={x:15.5,y:15,width:13.5,height:10,rx:5},wn=[{cx:20,cy:20},{cx:24.5,cy:20}],ka=l.forwardRef(function({size:e=28,wordmark:s=!1,title:r="Oink UI",animated:a=!1,mono:o=!1,className:i,style:c,...d},u){const p=l.useId().replace(/:/g,""),m=`ok-logo-gap-${p}`,f=`ok-logo-holes-${p}`,v=d["aria-hidden"]===!0||d["aria-hidden"]==="true"?null:{role:"img","aria-label":r};return n.jsxs("span",{ref:u,className:L("ok-logo",o&&"ok-logo--mono",i),"data-animated":a||void 0,style:{"--ok-logo-size":`${e}px`,...c},...v,...d,children:[n.jsxs("svg",{className:"ok-logo__mark",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:[o&&n.jsxs("defs",{children:[n.jsxs("mask",{id:m,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[n.jsx("rect",{x:"0",y:"0",width:"32",height:"32",fill:"#fff"}),n.jsx("rect",{...zt,fill:"#000",stroke:"#000",strokeWidth:3})]}),n.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[n.jsx("rect",{...zt,fill:"#fff"}),wn.map(b=>n.jsx("ellipse",{cx:b.cx,cy:b.cy,rx:1.3,ry:1.9,fill:"#000"},b.cx))]})]}),n.jsxs("g",{transform:"rotate(-8 16 16)",children:[n.jsx("path",{className:"ok-logo__ink",d:Js,mask:o?`url(#${m})`:void 0}),n.jsxs("g",{className:"ok-logo__snout",children:[n.jsx("rect",{className:"ok-logo__accent",...zt,mask:o?`url(#${f})`:void 0}),!o&&wn.map(b=>n.jsx("ellipse",{className:"ok-logo__nostril",cx:b.cx,cy:b.cy,rx:1.3,ry:1.9},b.cx))]})]})]}),s&&n.jsx("span",{className:"ok-logo__word","aria-hidden":"true",children:"Oink UI"})]})}),Zt="M3.6 8.4l2.9 2.9 5.9-6.4",ya="M4.5 4.5l7 7M11.5 4.5l-7 7";function Jt(t,e){const s={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key],r=t.key==="Home"?"first":t.key==="End"?"last":null;if(!s&&!r)return null;const a=Array.from(t.currentTarget.querySelectorAll(e)).filter(i=>!i.disabled&&i.getAttribute("aria-disabled")!=="true");if(!a.length)return null;if(t.preventDefault(),r)return r==="first"?a[0]:a[a.length-1];const o=a.indexOf(document.activeElement);return a[(o+s+a.length)%a.length]}function Dn(t,e,s,r){if(!Ae)return()=>{};const a=e.pointerId;let o=!0;const i=d=>{if(!(!o||d.pointerId!==a)){if(!(d.buttons&1)){c();return}s(d)}};function c(){if(o){o=!1,document.removeEventListener("pointermove",i,!0),document.removeEventListener("pointerup",c,!0),document.removeEventListener("pointercancel",c,!0),document.removeEventListener("pointerdown",c,!0),window.removeEventListener("blur",c);try{t.releasePointerCapture(a)}catch{}r()}}try{t.setPointerCapture(a)}catch{}return document.addEventListener("pointermove",i,!0),document.addEventListener("pointerup",c,!0),document.addEventListener("pointercancel",c,!0),document.addEventListener("pointerdown",c,!0),window.addEventListener("blur",c),c}function _a(t){const e=String(t);if(e.includes("e-"))return parseInt(e.split("e-")[1],10);const s=e.indexOf(".");return s<0?0:e.length-s-1}Et["zh-CN"].button.status;const Qs=l.createContext({}),er=l.forwardRef(function(e,s){const r=l.useContext(Qs),{variant:a=r.variant??"soft",size:o=r.size??"md",loading:i,success:c,error:d,statusLabels:u,leading:p,trailing:m,block:f,iconOnly:h,disabled:v=r.disabled,href:b,target:g,rel:N,download:x,type:j="button",className:_,children:k,onClick:R,"aria-disabled":M,...E}=e,P=pe().messages.button.status,C=M===!0||M==="true",w=!!v||C,y=i?"loading":c?"success":d?"error":void 0,S=i!==void 0||c!==void 0||d!==void 0,[O,T]=l.useState(""),D=y?(u==null?void 0:u[y])??P[y]:null;l.useEffect(()=>{D&&T(D)},[D]);const $=H=>{if(w||y==="loading"||y==="success"){H.preventDefault(),H.stopPropagation();return}R==null||R(H)},A=L("ok-btn ok-focusable",a!=="soft"&&`ok-btn--${a}`,o!=="md"&&`ok-btn--${o}`,h&&"ok-btn--icon",f&&"ok-btn--block",_),B=n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"ok-btn__label",children:[p,k,m]}),S&&n.jsxs("span",{className:"ok-btn__status","aria-hidden":"true",children:[n.jsx(Ln,{className:"ok-tail"}),n.jsx("svg",{className:"ok-btn__check",viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})}),n.jsx("svg",{className:"ok-btn__cross",viewBox:"0 0 16 16",children:n.jsx("path",{d:ya,pathLength:1})})]})]}),q=S&&n.jsx(it,{children:n.jsx(In,{role:"status","aria-live":"polite","aria-atomic":"true","data-ok-button-status":"",children:O})});return b!==void 0?n.jsxs(n.Fragment,{children:[n.jsx("a",{...E,ref:s,className:A,href:w?void 0:b,target:g,rel:N??(g==="_blank"?"noopener noreferrer":void 0),download:x,role:w?"link":void 0,"aria-disabled":w||void 0,"aria-busy":i||void 0,"data-state":y,onClick:$,children:B}),q]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{...E,ref:s,type:j,className:A,disabled:v,"aria-disabled":C||void 0,"aria-busy":i||void 0,"data-state":y,onClick:$,children:B}),q]})}),ja=l.forwardRef(function({size:e,variant:s,disabled:r,attached:a,orientation:o="horizontal",block:i,className:c,children:d,...u},p){return n.jsx("div",{ref:p,role:"group",className:L("ok-btn-group",a&&"ok-btn-group--attached",o==="vertical"&&"ok-btn-group--vertical",i&&"ok-btn-group--block",c),...u,children:n.jsx(Qs.Provider,{value:{size:e,variant:s,disabled:r},children:d})})}),wa=l.forwardRef(function({pressed:e,defaultPressed:s=!1,onChange:r,onClick:a,...o},i){const[c,d]=le(e,s,r),u={...o,"aria-pressed":c,onClick:p=>{a==null||a(p),p.defaultPrevented||d(!c)}};return n.jsx(er,{ref:i,...u})});function Na(t={}){const{successHold:e=1200,errorHold:s=1200,labels:r}=t,[a,o]=l.useState("idle"),i=l.useRef(0),c=l.useRef(void 0),d=l.useRef({successHold:e,errorHold:s});d.current={successHold:e,errorHold:s},l.useEffect(()=>()=>{i.current++,clearTimeout(c.current)},[]);const u=l.useCallback(()=>{i.current++,clearTimeout(c.current),o("idle")},[]),p=l.useCallback(f=>{const h=++i.current;clearTimeout(c.current),o("loading");const v=g=>{h===i.current&&(o(g),c.current=setTimeout(()=>{h===i.current&&o("idle")},g==="success"?d.current.successHold:d.current.errorHold))};let b;try{b=Promise.resolve(typeof f=="function"?f():f)}catch(g){b=Promise.reject(g)}return b.then(g=>(v("success"),g),g=>{throw v("error"),g})},[]),m=l.useMemo(()=>({loading:a==="loading",success:a==="success",error:a==="error",...r?{statusLabels:r}:{}}),[a,r]);return{state:a,run:p,reset:u,buttonProps:m}}const Ie=l.createContext(null);function _e(t,e=!0){const s=l.useContext(Ie),r=`${t["aria-describedby"]??""} ${(s==null?void 0:s.describedBy)??""}`.split(/\s+/).filter(Boolean),a=Array.from(new Set(r)).join(" ")||void 0;return{id:t.id??(s==null?void 0:s.id),disabled:t.disabled??(s==null?void 0:s.disabled)??!1,required:t.required??(s==null?void 0:s.required)??!1,invalid:t.invalid??(s==null?void 0:s.invalid)??!1,describedBy:a,labelledBy:t["aria-labelledby"]??(!e&&!t["aria-label"]?s==null?void 0:s.labelId:void 0)}}const On=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,size:a="md",pill:o,block:i=!0,icon:c,prefix:d,suffix:u,clearable:p,clearLabel:m,onClear:f,revealable:h=!0,invalid:v,type:b="text",className:g,style:N,rootClassName:x,rootStyle:j,id:_,disabled:k,required:R,"aria-describedby":M,...E},P){const C=_e({id:_,disabled:k,required:R,invalid:v,"aria-describedby":M}),[w,y]=le(e,s,r),{messages:S}=pe(),O=m??S.common.clear,[T,D]=l.useState(!1),$=l.useRef(null),A=b==="password",B=w!=="",q=H=>{var U;H.target.closest("input, button, a, select")||(H.preventDefault(),(U=$.current)==null||U.focus())};return n.jsxs("div",{className:L("ok-input",a!=="md"&&`ok-input--${a}`,o&&"ok-input--pill",!i&&"ok-input--inline",x,g),style:{...j,...N},"data-has-value":B?"":void 0,"data-invalid":C.invalid?"":void 0,"data-disabled":C.disabled?"":void 0,onMouseDown:q,children:[c&&n.jsx(he,{name:c,className:"ok-input__icon"}),d!=null&&n.jsx("span",{className:"ok-input__affix",children:d}),n.jsx("input",{...E,ref:xe(P,$),id:C.id,type:A&&T?"text":b,value:w,disabled:C.disabled,required:C.required||void 0,"aria-invalid":C.invalid||void 0,"aria-describedby":C.describedBy,onChange:H=>y(H.target.value)}),p&&n.jsx("button",{type:"button",className:"ok-input__clear","aria-label":O,disabled:!B||C.disabled,tabIndex:B?void 0:-1,onClick:()=>{var H;y(""),f==null||f(),(H=$.current)==null||H.focus()},children:n.jsx(he,{name:"x"})}),A&&h&&n.jsx("button",{type:"button",className:"ok-input__toggle ok-focusable","aria-label":S.input.showPassword,"aria-pressed":T,disabled:C.disabled,onClick:()=>D(H=>!H),children:n.jsx(he,{children:T?n.jsx("path",{d:"M3 3l14 14M8.3 5.200A7.600 7.600 0 0 1 10 5c4.200 0 6.800 3.600 7.500 5-.3.600-1 1.700-2.100 2.700M12.700 14.400A7 7 0 0 1 10 15c-4.200 0-6.800-3.600-7.500-5 .4-.8 1.400-2.300 3-3.400M8.200 8.300a2.500 2.500 0 0 0 3.500 3.500"}):n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M2.500 10C3.200 8.600 5.800 5 10 5s6.800 3.600 7.500 5c-.7 1.400-3.300 5-7.500 5s-6.800-3.600-7.500-5z"}),n.jsx("circle",{cx:"10",cy:"10",r:"2.500"})]})})}),u!=null&&n.jsx("span",{className:"ok-input__affix",children:u})]})}),Ra=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,autoGrow:a=!0,minRows:o=3,maxRows:i,resize:c="none",invalid:d,className:u,style:p,id:m,disabled:f,required:h,"aria-describedby":v,...b},g){const N=_e({id:m,disabled:f,required:h,invalid:d,"aria-describedby":v}),[x,j]=le(e,s,r),_=l.useRef(null);ge(()=>{var E;const R=_.current;if(!R||!a||typeof CSS<"u"&&((E=CSS.supports)!=null&&E.call(CSS,"field-sizing","content")))return;R.style.height="auto";const M=R.offsetHeight-R.clientHeight;R.style.height=R.scrollHeight+M+"px"},[x,a,o,i]);const k={"--_min-rows":o,...i?{"--_max-rows":i}:null};return n.jsx("textarea",{...b,ref:xe(g,_),id:N.id,rows:o,className:L("ok-textarea ok-scroll",u),style:{...k,...p},"data-autogrow":a?"":void 0,"data-resize":c!=="none"?c:void 0,value:x,disabled:N.disabled,required:N.required||void 0,"aria-invalid":N.invalid||void 0,"aria-describedby":N.describedBy,onChange:R=>j(R.target.value)})}),Ma=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,onSearch:a,onKeyDown:o,pill:i=!0,clearable:c=!0,placeholder:d,...u},p){const{messages:m}=pe(),f=d??m.searchInput.placeholder,[h,v]=le(e,s,r);return n.jsx(On,{ref:p,type:"search",icon:"search",enterKeyHint:"search",autoComplete:"off",pill:i,clearable:c,placeholder:f,value:h,onChange:v,onKeyDown:b=>{o==null||o(b),!b.defaultPrevented&&(b.key==="Enter"?a==null||a(h):b.key==="Escape"&&h!==""&&(b.preventDefault(),v("")))},...u})}),Sa=400,Ca=60,Ea=l.forwardRef(function({value:e,defaultValue:s,onChange:r,min:a=-1/0,max:o=1/0,step:i=1,largeStep:c,precision:d,format:u,size:p="md",invalid:m,decrementLabel:f,incrementLabel:h,className:v,style:b,rootClassName:g,rootStyle:N,id:x,disabled:j,required:_,readOnly:k,"aria-describedby":R,onKeyDown:M,onBlur:E,onFocus:P,...C},w){const y=_e({id:x,disabled:j,required:_,invalid:m,"aria-describedby":R}),{messages:S}=pe(),O=f??S.numberInput.decrement,T=h??S.numberInput.increment,D=d??_a(i),$=Y=>ye(+Y.toFixed(D),a,o),[A,B]=le(e,$(s??0),r),[q,H]=l.useState(null),[U,ae]=l.useState(!1),K=l.useRef(null),I=y.disabled||!!k,F=l.useRef(A);F.current=A;const V=l.useRef(B);V.current=B;const te=()=>{if(q===null)return;const Y=parseFloat(q.replace(/,/g,""));if(H(null),Number.isFinite(Y)){const G=$(Y);F.current=G,V.current(G)}},Z=(Y,G)=>{const ie=$(Y),ue=K.current;return ie===F.current?(Ne(ue,[{transform:"translateX(0)"},{transform:`translateX(${G*6}px)`},{transform:"translateX(0)"}],{spring:"bouncy"}),!1):(F.current=ie,V.current(ie),Ne(ue,[{transform:`translateY(${G*60}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"}),!0)},ne=(Y,G=i)=>Z(F.current+Y*G,Y),ce=l.useRef({}),W=()=>{clearTimeout(ce.current.delay),clearInterval(ce.current.every),ce.current={}};l.useEffect(()=>W,[]);const z=l.useRef(!1),se=Y=>({onPointerDown:G=>{G.button||I||(z.current=!0,te(),W(),ne(Y)&&(ce.current.delay=setTimeout(()=>{ce.current.every=setInterval(()=>{ne(Y)||W()},Ca)},Sa)))},onPointerUp:W,onPointerCancel:()=>{W(),z.current=!1},onPointerLeave:()=>{W()},onClick:()=>{if(z.current){z.current=!1;return}I||(te(),ne(Y))}}),de=Y=>{if(M==null||M(Y),Y.defaultPrevented||I)return;const G=c??i*10,ie={ArrowUp:()=>ne(1),ArrowDown:()=>ne(-1),PageUp:()=>ne(1,G),PageDown:()=>ne(-1,G)};if(Number.isFinite(a)&&(ie.Home=()=>Z(a,-1)),Number.isFinite(o)&&(ie.End=()=>Z(o,1)),Y.key==="Enter"){te();return}const ue=ie[Y.key];ue&&(Y.preventDefault(),te(),ue())},Q=q??(u&&!U?u(A):A.toFixed(D)),oe=A<=a,X=A>=o;return n.jsxs("div",{className:L("ok-stepper",p!=="md"&&`ok-stepper--${p}`,g,v),style:{...N,...b},"data-invalid":y.invalid?"":void 0,"data-disabled":y.disabled?"":void 0,children:[n.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":O,"aria-disabled":oe||I,...se(-1),children:n.jsx(he,{name:"minus"})}),n.jsx("input",{...C,ref:xe(w,K),id:y.id,className:"ok-stepper__value",type:"text",inputMode:D>0?"decimal":"numeric",autoComplete:"off",role:"spinbutton","aria-valuenow":A,"aria-valuemin":Number.isFinite(a)?a:void 0,"aria-valuemax":Number.isFinite(o)?o:void 0,"aria-valuetext":u?u(A):void 0,"aria-invalid":y.invalid||void 0,"aria-describedby":y.describedBy,"aria-required":y.required||void 0,value:Q,disabled:y.disabled,readOnly:k,onChange:Y=>H(Y.target.value),onFocus:Y=>{ae(!0),P==null||P(Y)},onBlur:Y=>{ae(!1),te(),E==null||E(Y)},onKeyDown:de}),n.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":T,"aria-disabled":X||I,...se(1),children:n.jsx(he,{name:"plus"})})]})}),Aa=l.forwardRef(function({length:e=6,value:s,defaultValue:r="",onChange:a,onComplete:o,type:i="numeric",mask:c,size:d="md",disabled:u,invalid:p,required:m,autoFocus:f,name:h,className:v,id:b,"aria-label":g,"aria-labelledby":N,"aria-describedby":x,...j},_){const k=_e({id:b,disabled:u,required:m,invalid:p,"aria-describedby":x,"aria-labelledby":N,"aria-label":g},!1),{messages:R}=pe(),[M,E]=le(s,r,a),P=l.useRef([]),C=$=>$.replace(i==="numeric"?/\D/g:/[^a-zA-Z0-9]/g,""),w=$=>{const A=P.current[Math.max(0,Math.min(e-1,$))];A==null||A.focus(),A==null||A.select()},y=($,A)=>{const B=C(A);if(!B)return;const q=Math.min($,M.length),H=(M.slice(0,q)+B+M.slice(q+B.length)).slice(0,e);E(H),w(q+B.length),H.length===e&&H!==M&&(o==null||o(H))},S=($,A)=>{const B=M[$]??"";let q=C(A);if(!q){B&&E(M.slice(0,$)+M.slice($+1));return}B&&q.length===2&&(q=q.startsWith(B)?q.slice(1):q.slice(0,1)),y($,q)},O=($,A)=>{A.key==="Backspace"&&!M[$]&&$>0?(A.preventDefault(),E(M.slice(0,$-1)+M.slice($)),w($-1)):A.key==="ArrowLeft"?(A.preventDefault(),w($-1)):A.key==="ArrowRight"?(A.preventDefault(),w($+1)):A.key==="Home"?(A.preventDefault(),w(0)):A.key==="End"&&(A.preventDefault(),w(Math.min(M.length,e-1)))},T=($,A)=>{A.preventDefault(),y($,A.clipboardData.getData("text"))},D=k.labelledBy?void 0:g??R.pinInput.label;return n.jsxs("div",{ref:_,role:"group",className:L("ok-pin",d==="sm"&&"ok-pin--sm",v),"aria-label":D,"aria-labelledby":k.labelledBy,"aria-describedby":k.describedBy,"data-invalid":k.invalid?"":void 0,...j,children:[n.jsx(Ie.Provider,{value:null,children:Array.from({length:e},($,A)=>n.jsx("input",{ref:B=>{P.current[A]=B},id:A===0?k.id:void 0,className:"ok-pin__cell",type:c?"password":"text",inputMode:i==="numeric"?"numeric":"text",pattern:i==="numeric"?"[0-9]*":void 0,autoComplete:A===0?"one-time-code":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-label":R.pinInput.cell(A+1,e),"aria-invalid":k.invalid||void 0,"aria-required":k.required||void 0,autoFocus:f&&A===0,disabled:k.disabled,value:M[A]??"",onChange:B=>S(A,B.target.value),onKeyDown:B=>O(A,B),onPaste:B=>T(A,B),onFocus:B=>B.target.select()},A))}),h&&n.jsx("input",{type:"hidden",name:h,value:M})]})}),Ta=new Set(["input","select","textarea"]),Ia=l.forwardRef(function({label:e,hint:s,error:r,invalid:a,required:o=!1,disabled:i=!1,id:c,orientation:d="vertical",className:u,children:p,...m},f){const h=l.useId(),v=c??`ok-field-${h}`,b=`${v}-label`,g=`${v}-hint`,N=`${v}-error`,x=r!=null&&r!==!1&&r!=="",j=a??x,_=[s!=null&&g,x&&N].filter(Boolean).join(" ")||void 0,k=l.useMemo(()=>({id:v,labelId:e!=null?b:void 0,describedBy:_,invalid:j,required:o,disabled:i}),[v,e!=null,b,_,j,o,i]),R=l.useRef(null),M=l.useRef(j);l.useEffect(()=>{j&&!M.current&&Ne(R.current,{transform:["translateX(0)","translateX(-7px)","translateX(6px)","translateX(-4px)","translateX(2px)","translateX(0)"]},{duration:520}),M.current=j},[j]);const E={id:v,"aria-describedby":_,"aria-invalid":j?!0:void 0,required:o||void 0,disabled:i||void 0};let P;if(typeof p=="function")P=p(E);else if(l.isValidElement(p)&&typeof p.type=="string"&&Ta.has(p.type)){const C=p,w=C.props;P=l.cloneElement(C,{...E,id:w.id??v,"aria-describedby":[w["aria-describedby"],_].filter(Boolean).join(" ")||void 0,required:w.required??E.required,disabled:w.disabled??E.disabled})}else P=p;return n.jsxs("div",{ref:f,className:L("ok-field",d==="horizontal"&&"ok-field--horizontal",u),"data-invalid":j?"":void 0,"data-disabled":i?"":void 0,...m,children:[e!=null&&n.jsxs("label",{className:"ok-field__label",id:b,htmlFor:v,onClick:C=>{const w=C.currentTarget.ownerDocument.getElementById(v);!w||!w.hasAttribute("data-label-focus")||(C.preventDefault(),w.disabled||w.focus())},children:[e,o&&n.jsx("span",{className:"ok-field__required","aria-hidden":"true",children:"*"})]}),n.jsx("div",{className:"ok-field__control",ref:R,children:n.jsx(Ie.Provider,{value:k,children:P})}),s!=null&&n.jsx("span",{className:"ok-field__hint",id:g,children:s}),n.jsx("span",{className:"ok-field__msg",id:N,"aria-live":"polite",children:n.jsx("span",{children:x&&n.jsxs(n.Fragment,{children:[n.jsx(he,{name:"alert"}),r]})})})]})}),Pa=l.forwardRef(function({legend:e,hint:s,className:r,children:a,"aria-describedby":o,...i},c){const d=`ok-fieldset-${l.useId()}-hint`;return n.jsxs("fieldset",{ref:c,className:L("ok-fieldset",r),"aria-describedby":[o,s!=null&&d].filter(Boolean).join(" ")||void 0,...i,children:[e!=null&&n.jsx("legend",{className:"ok-fieldset__legend",children:e}),s!=null&&n.jsx("span",{className:"ok-fieldset__hint",id:d,children:s}),n.jsx("div",{className:"ok-fieldset__body",children:a})]})}),La=l.forwardRef(function({required:e,disabled:s,size:r="sm",className:a,children:o,...i},c){return n.jsxs("label",{ref:c,className:L("ok-label",r==="md"&&"ok-label--md",a),"data-disabled":s?"":void 0,...i,children:[o,e&&n.jsx("span",{className:"ok-label__required","aria-hidden":"true",children:"*"})]})}),$a=l.forwardRef(function({size:e="md",onSubmit:s,className:r,children:a,...o},i){return n.jsx("form",{ref:i,className:L("ok-form",e!=="md"&&`ok-form--${e}`,r),onSubmit:c=>{c.preventDefault(),s==null||s(new FormData(c.currentTarget),c)},...o,children:a})}),Da=l.forwardRef(function({align:e="start",stack:s=!0,className:r,...a},o){return n.jsx("div",{ref:o,className:L("ok-form__actions",e!=="start"&&`ok-form__actions--${e}`,s&&"ok-form__actions--stack",r),...a})}),tr=l.createContext(null),Oa=l.forwardRef(function({checked:e,defaultChecked:s=!1,onChange:r,indeterminate:a=!1,value:o,description:i,invalid:c,children:d,className:u,style:p,rootClassName:m,rootStyle:f,id:h,disabled:v,required:b,name:g,"aria-describedby":N,...x},j){const _=l.useContext(tr),k=_e({id:h,disabled:v??((_==null?void 0:_.disabled)||void 0),required:b,invalid:c??((_==null?void 0:_.invalid)||void 0),"aria-describedby":N}),R=!!_&&o!==void 0,[M,E]=le(e,s,r),P=R?_.value.includes(o):M,C=l.useRef(null);return l.useEffect(()=>{C.current&&(C.current.indeterminate=a)},[a,P]),n.jsxs("label",{className:L("ok-check",m,u),style:{...f,...p},"data-invalid":k.invalid?"":void 0,"data-described":i!=null?"":void 0,children:[n.jsx("input",{...x,ref:xe(j,C),id:k.id,type:"checkbox",name:g??(_==null?void 0:_.name),value:o,checked:P,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:w=>{R?(_.toggle(o),r==null||r(w.target.checked)):E(w.target.checked)}}),n.jsxs("span",{className:"ok-check__box","aria-hidden":"true",children:[n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{className:"ok-check__tick",d:Zt,pathLength:1})}),n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{className:"ok-check__dash",d:"M4 8h8",pathLength:1})})]}),i!=null?n.jsxs("span",{className:"ok-check__text",children:[n.jsx("span",{children:d}),n.jsx("span",{className:"ok-check__desc",children:i})]}):d]})}),Ba=[],Fa=l.forwardRef(function({value:e,defaultValue:s=Ba,onChange:r,name:a,orientation:o="vertical",disabled:i,invalid:c,className:d,children:u,id:p,"aria-label":m,"aria-labelledby":f,"aria-describedby":h,...v},b){const g=_e({id:p,disabled:i,invalid:c,"aria-describedby":h,"aria-labelledby":f,"aria-label":m},!1),[N,x]=le(e,s,r),j=_=>x(N.includes(_)?N.filter(k=>k!==_):[...N,_]);return n.jsx("div",{ref:b,id:g.id,role:"group",className:L("ok-check-group",o==="horizontal"&&"ok-check-group--horizontal",d),"aria-label":m,"aria-labelledby":g.labelledBy,"aria-describedby":g.describedBy,"aria-invalid":g.invalid||void 0,...v,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(tr.Provider,{value:{value:N,toggle:j,name:a,disabled:g.disabled,invalid:g.invalid},children:u})})})}),nr=l.createContext(null),Ha=l.forwardRef(function({value:e,onChange:s,description:r,children:a,className:o,style:i,rootClassName:c,rootStyle:d,name:u,checked:p,disabled:m,required:f,...h},v){const b=l.useContext(nr);return n.jsxs("label",{className:L("ok-radio",c,o),style:{...d,...i},"data-described":r!=null?"":void 0,children:[n.jsx("input",{...h,ref:v,type:"radio",name:u??(b==null?void 0:b.name),value:e,checked:b?b.value===e:p,disabled:m??(b==null?void 0:b.disabled),required:f??((b==null?void 0:b.required)||void 0),onChange:g=>{g.target.checked&&(b&&b.select(e),s==null||s(e))}}),n.jsx("span",{className:"ok-radio__dot","aria-hidden":"true"}),r!=null?n.jsxs("span",{className:"ok-radio__text",children:[n.jsx("span",{children:a}),n.jsx("span",{className:"ok-radio__desc",children:r})]}):a]})}),za=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,name:a,orientation:o="vertical",disabled:i,required:c,invalid:d,className:u,children:p,id:m,"aria-label":f,"aria-labelledby":h,"aria-describedby":v,...b},g){const N=_e({id:m,disabled:i,required:c,invalid:d,"aria-describedby":v,"aria-labelledby":h,"aria-label":f},!1),x=`ok-radio-${l.useId()}`,[j,_]=le(e,s,r);return n.jsx("div",{ref:g,id:N.id,role:"radiogroup",className:L("ok-radio-group",o==="horizontal"&&"ok-radio-group--horizontal",u),"aria-label":f,"aria-labelledby":N.labelledBy,"aria-describedby":N.describedBy,"aria-orientation":o,"aria-required":N.required||void 0,"aria-invalid":N.invalid||void 0,"data-invalid":N.invalid?"":void 0,...b,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(nr.Provider,{value:{value:j,select:_,name:a??x,disabled:N.disabled,required:N.required},children:p})})})}),qa=l.forwardRef(function({checked:e,defaultChecked:s=!1,onChange:r,labelPosition:a="end",children:o,className:i,style:c,rootClassName:d,rootStyle:u,id:p,disabled:m,required:f,"aria-describedby":h,...v},b){const g=_e({id:p,disabled:m,required:f,"aria-describedby":h}),[N,x]=le(e,s,r),j=o!=null&&n.jsx("span",{className:"ok-switch__label",children:o});return n.jsxs("label",{className:L("ok-switch",d,i),style:{...u,...c},"data-label-position":a,children:[a==="start"&&j,n.jsx("input",{...v,ref:b,id:g.id,type:"checkbox",role:"switch",checked:N,disabled:g.disabled,required:g.required||void 0,"aria-describedby":g.describedBy,onChange:_=>x(_.target.checked)}),n.jsx("span",{className:"ok-switch__track",children:n.jsx("span",{className:"ok-switch__thumb"})}),a!=="start"&&j]})});function qt(t,e,s,r){return+ye(r==="any"?t:Math.round((t-e)/r)*r+e,e,s).toFixed(6)}function sr(t,e,s){const r=s==="any"?(e-t)/100:s;return{small:r,big:Math.max(r,(e-t)/10)}}const Va=l.forwardRef(function({value:e,defaultValue:s,onChange:r,onChangeEnd:a,onActiveChange:o,min:i=0,max:c=100,step:d=1,ticks:u,bubble:p=!0,format:m,digits:f,disabled:h,name:v,className:b,style:g,id:N,onKeyDown:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const P=_e({id:N,disabled:h,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),C=d==="any",w=z=>qt(z,i,c,d),[y,S]=le(e,w(s??i),r),O=w(y),T=C?1/0:Math.round((c-i)/d),D=T<=12,$=f??(C?0:void 0),A=z=>m?m(z):$==null?String(z):z.toFixed($),B=l.useRef(null),q=l.useRef(null),[H,U]=l.useState(!1),[ae,K]=l.useState(!1),I=l.useRef(O);I.current=O;const F=ke(z=>{const se=w(z);I.current=se,S(se)}),V=ke(()=>a==null?void 0:a(I.current)),te=ke(z=>o==null?void 0:o(z)),Z=l.useRef(null);l.useEffect(()=>()=>{var z;return(z=Z.current)==null?void 0:z.call(Z)},[]);const ne=z=>{var Y;j==null||j(z);const se=B.current;if(z.defaultPrevented||z.button||P.disabled||!se)return;(Y=Z.current)==null||Y.call(Z),U(!0),te(!0);const de=z.clientX;let Q=0;const oe=q.current;if(oe&&oe.contains(z.target)){const G=oe.getBoundingClientRect();Q=z.clientX-(G.left+G.width/2)}const X=G=>{const ie=se.getBoundingClientRect(),ue=oe?oe.offsetWidth:0,we=ye((G-Q-ie.left-ue/2)/(ie.width-ue||1),0,1);F(i+we*(c-i))};X(z.clientX),Z.current=Dn(se,z,G=>{!D&&Math.abs(G.clientX-de)>2&&K(!0),X(G.clientX)},()=>{Z.current=null,U(!1),K(!1),te(!1),V()})},ce=z=>{if(x==null||x(z),z.defaultPrevented||P.disabled)return;const{small:se,big:de}=sr(i,c,d),Q={ArrowRight:se,ArrowUp:se,ArrowLeft:-se,ArrowDown:-se,PageUp:de,PageDown:-de}[z.key];let oe;if(Q)oe=I.current+Q;else if(z.key==="Home")oe=i;else if(z.key==="End")oe=c;else return;z.preventDefault(),F(oe),V()},W=(O-i)/(c-i||1);return n.jsxs("div",{ref:xe(E,B),id:P.id,role:"slider",tabIndex:P.disabled?-1:0,className:L("ok-slider ok-focusable",b),style:{"--v":W,...g},"aria-label":_,"aria-labelledby":P.labelledBy,"aria-describedby":P.describedBy,"aria-valuemin":i,"aria-valuemax":c,"aria-valuenow":O,"aria-valuetext":A(O),"aria-orientation":"horizontal","aria-disabled":P.disabled||void 0,"data-ticks":u&&D?"":void 0,"data-active":H?"":void 0,"data-tracking":ae?"":void 0,onPointerDown:ne,onKeyDown:ce,...M,children:[n.jsx("span",{className:"ok-slider__track",children:n.jsx("span",{className:"ok-slider__fill"})}),u&&D&&n.jsx("span",{className:"ok-slider__ticks","aria-hidden":"true",children:Array.from({length:T+1},(z,se)=>n.jsx("i",{style:{left:`${se/T*100}%`}},se))}),n.jsx("span",{className:"ok-slider__thumb",ref:q,children:p&&n.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:A(O)})}),v&&n.jsx("input",{type:"hidden",name:v,value:O})]})}),Ga=l.forwardRef(function({value:e,defaultValue:s,onChange:r,onChangeEnd:a,onActiveChange:o,min:i=0,max:c=100,step:d=1,minDistance:u=0,bubble:p=!0,format:m,digits:f,disabled:h,thumbLabels:v,name:b,className:g,style:N,id:x,onPointerDown:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const P=_e({id:x,disabled:h,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),{messages:C}=pe(),w=v??C.rangeSlider.thumbs,y=d==="any",[S,O]=le(e,s??[i,c],r),T=qt(Math.min(S[0],S[1]),i,c,d),D=qt(Math.max(S[0],S[1]),i,c,d),A=(y?1/0:Math.round((c-i)/d))<=12,B=f??(y?0:void 0),q=Q=>m?m(Q):B==null?String(Q):Q.toFixed(B),H=l.useRef(null),U=l.useRef([null,null]),[ae,K]=l.useState(null),[I,F]=l.useState(!1),V=l.useRef([T,D]);V.current=[T,D];const te=ke((Q,oe)=>{const[X,Y]=V.current,G=qt(oe,i,c,d),ie=Q===0?[Math.min(G,Y-u),Y]:[X,Math.max(G,X+u)];ie[Q]=ye(ie[Q],i,c),!(ie[0]===X&&ie[1]===Y)&&(V.current=ie,O(ie))}),Z=ke(()=>a==null?void 0:a(V.current)),ne=ke(Q=>o==null?void 0:o(Q)),ce=l.useRef(null);l.useEffect(()=>()=>{var Q;return(Q=ce.current)==null?void 0:Q.call(ce)},[]);const W=Q=>{var Pe,dt,Te;j==null||j(Q);const oe=H.current;if(Q.defaultPrevented||Q.button||P.disabled||!oe)return;(Pe=ce.current)==null||Pe.call(ce);const X=((dt=U.current[0])==null?void 0:dt.offsetWidth)??0,Y=(je,Me)=>{const ve=oe.getBoundingClientRect();return i+ye((je-Me-ve.left-X/2)/(ve.width-X||1),0,1)*(c-i)};let G=U.current.findIndex(je=>je&&je.contains(Q.target)),ie=0;if(G>=0){const je=U.current[G].getBoundingClientRect();ie=Q.clientX-(je.left+je.width/2)}else{const je=Y(Q.clientX,0),[Me,ve]=V.current;G=Math.abs(je-Me)<=Math.abs(je-ve)?0:1,Me===ve&&(G=je<Me?0:1)}const ue=G,we=Q.clientX;K(ue),ne(!0),(Te=U.current[ue])==null||Te.focus({preventScroll:!0}),te(ue,Y(Q.clientX,ie)),ce.current=Dn(oe,Q,je=>{!A&&Math.abs(je.clientX-we)>2&&F(!0),te(ue,Y(je.clientX,ie))},()=>{ce.current=null,K(null),F(!1),ne(!1),Z()})},z=(Q,oe)=>{if(P.disabled)return;const{small:X,big:Y}=sr(i,c,d),G={ArrowRight:X,ArrowUp:X,ArrowLeft:-X,ArrowDown:-X,PageUp:Y,PageDown:-Y}[oe.key];let ie;if(G)ie=V.current[Q]+G;else if(oe.key==="Home")ie=i;else if(oe.key==="End")ie=c;else return;oe.preventDefault(),te(Q,ie),Z()},se=c-i||1,de=[T,D];return n.jsxs("div",{ref:xe(E,H),id:P.id,role:"group",className:L("ok-slider ok-slider--range",g),style:{"--a":(T-i)/se,"--b":(D-i)/se,...N},"aria-label":_,"aria-labelledby":P.labelledBy,"aria-describedby":P.describedBy,"data-disabled":P.disabled?"":void 0,"data-active":ae!==null?"":void 0,"data-tracking":I?"":void 0,onPointerDown:W,...M,children:[n.jsx("span",{className:"ok-slider__track",children:n.jsx("span",{className:"ok-slider__fill"})}),de.map((Q,oe)=>n.jsx("span",{ref:X=>{U.current[oe]=X},className:"ok-slider__thumb ok-focusable",role:"slider",tabIndex:P.disabled?-1:0,"data-index":oe,"data-active":ae===oe?"":void 0,"aria-label":w[oe],"aria-valuemin":oe===0?i:Math.min(c,T+u),"aria-valuemax":oe===0?Math.max(i,D-u):c,"aria-valuenow":Q,"aria-valuetext":q(Q),"aria-orientation":"horizontal","aria-disabled":P.disabled||void 0,onKeyDown:X=>z(oe,X),children:p&&n.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:q(Q)})},oe)),b&&n.jsxs(n.Fragment,{children:[n.jsx("input",{type:"hidden",name:b,value:T}),n.jsx("input",{type:"hidden",name:b,value:D})]})]})});function Wa({options:t,value:e,defaultValue:s,onChange:r,size:a="md",block:o,disabled:i,className:c,id:d,"aria-label":u,"aria-labelledby":p,"aria-describedby":m,onKeyDown:f,...h},v){var C,w;const b=_e({id:d,disabled:i,"aria-describedby":m,"aria-labelledby":p,"aria-label":u},!1),g=((C=t.find(y=>!y.disabled))==null?void 0:C.value)??((w=t[0])==null?void 0:w.value),[N,x]=le(e,s??g,r),j=l.useRef(null),_=l.useRef(null),[k,R]=l.useState(!1),M=l.useRef(!1),E=()=>{const y=j.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');!y||!S||(y.style.setProperty("--x",S.offsetLeft+"px"),y.style.setProperty("--w",S.offsetWidth+"px"))},P=()=>{const y=j.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');if(!y||!S||y.scrollWidth<=y.clientWidth)return;const O=3,T=S.offsetLeft-O,D=S.offsetLeft+S.offsetWidth+O;T<y.scrollLeft?y.scrollLeft=T:D>y.scrollLeft+y.clientWidth&&(y.scrollLeft=D-y.clientWidth)};return ge(()=>{E(),P(),M.current&&Ne(_.current,{scale:["1 1","1.05 .86","1 1"]},{duration:340,easing:De.out}),M.current=!0},[N]),ge(E),l.useEffect(()=>{const y=j.current;if(!y||typeof ResizeObserver>"u"){R(!0);return}let S=0;const O=new ResizeObserver(()=>{R(!1),E(),P(),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{S=requestAnimationFrame(()=>R(!0))})});return O.observe(y),S=requestAnimationFrame(()=>R(!0)),()=>{O.disconnect(),cancelAnimationFrame(S)}},[]),n.jsxs("div",{ref:xe(v,j),id:b.id,role:"radiogroup",className:L("ok-seg",a!=="md"&&`ok-seg--${a}`,o&&"ok-seg--block",c),"aria-label":u,"aria-labelledby":b.labelledBy,"aria-describedby":b.describedBy,"aria-disabled":b.disabled||void 0,"data-ready":k?"":void 0,onKeyDown:y=>{if(f==null||f(y),y.defaultPrevented)return;const S=Jt(y,'[role="radio"]');if(!S)return;S.focus();const O=S.dataset.value;O!==void 0&&x(O)},...h,children:[n.jsx("span",{className:"ok-seg__thumb",ref:_,"aria-hidden":"true"}),t.map(y=>{const S=y.value===N;return n.jsxs("button",{type:"button",role:"radio",className:"ok-seg__item ok-focusable","aria-checked":S,"aria-label":y["aria-label"],tabIndex:S?0:-1,disabled:b.disabled||y.disabled,"data-value":y.value,onClick:()=>x(y.value),children:[y.icon,y.label!=null&&y.label!==""&&n.jsx("span",{children:y.label})]},y.value)})]})}const Ua=l.forwardRef(Wa),rr=l.createContext(null),Ya=l.forwardRef(function({value:e,selected:s,defaultSelected:r,onChange:a,onRemove:o,removeLabel:i,icon:c,disabled:d,className:u,children:p,onClick:m,...f},h){const{messages:v}=pe(),b=i??v.common.remove,g=l.useContext(rr),N=!!g&&g.selectable&&e!==void 0,x=N||s!==void 0||r!==void 0||a!==void 0&&!o,[j,_]=le(s,r??!1,a),k=N?g.value.includes(e):j,R=d??(g==null?void 0:g.disabled)??!1,M=l.useRef(null),[E,P]=l.useState(!1),C=L("ok-chip",u),w=c!=null&&n.jsx("span",{className:"ok-chip__lead",children:c});if(x&&!o)return n.jsxs("button",{ref:xe(h,M),type:"button",className:L(C,"ok-focusable"),"aria-pressed":k,disabled:R,"data-value":e,onClick:S=>{m==null||m(S),!S.defaultPrevented&&(N?(g.toggle(e),a==null||a(!k)):_(!k))},...f,children:[n.jsx("span",{className:"ok-chip__check","aria-hidden":"true",children:n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})})}),w,n.jsx("span",{className:"ok-chip__text",children:p})]});const y=()=>{P(!0);const S=Ne(M.current,[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(.5)"}],{duration:140,easing:De.in,fill:"forwards"}),O=()=>o==null?void 0:o();S!=null&&S.finished?S.finished.then(O,O):O()};return n.jsxs("span",{ref:xe(h,M),className:C,"data-value":e,"data-removing":E||void 0,"aria-disabled":R||void 0,onClick:m,...f,children:[w,n.jsx("span",{className:"ok-chip__text",children:p}),o&&n.jsx("button",{type:"button",className:"ok-chip__remove ok-focusable","aria-label":typeof p=="string"?`${b} ${p}`:b,disabled:R,onClick:y,children:n.jsx(he,{name:"x"})})]})}),Xa=[],fs="ok-chips-flip";class Ka extends l.Component{getSnapshotBeforeUpdate(){const e=this.props.root.current;if(!e)return null;const s=Array.from(e.children);return{node:e,count:s.length,rects:new Map(s.map(r=>[r,r.getBoundingClientRect()]))}}componentDidUpdate(e,s,r){if(!r||!r.node.isConnected)return;const a=r.node,o=Array.from(a.children);if(o.length===r.count)return;o.forEach(c=>{var d;return(d=c.getAnimations)==null?void 0:d.call(c).forEach(u=>{u.id===fs&&u.cancel()})});const i=new Map;r.rects.forEach((c,d)=>{var u;(u=d.dataset)!=null&&u.removing||i.set(d,c)}),Yt(i,{id:fs})}render(){return this.props.children}}const Za=l.forwardRef(function({value:e,defaultValue:s,onChange:r,multiple:a=!0,disabled:o,className:i,children:c,id:d,"aria-label":u,"aria-labelledby":p,"aria-describedby":m,...f},h){const v=_e({id:d,disabled:o,"aria-describedby":m,"aria-labelledby":p,"aria-label":u},!1),b=e!==void 0||s!==void 0||r!==void 0,[g,N]=le(e,s??Xa,r),x=_=>{g.includes(_)?N(g.filter(k=>k!==_)):N(a?[...g,_]:[_])},j=l.useRef(null);return n.jsx("div",{ref:xe(h,j),id:v.id,role:"group",className:L("ok-chips",i),"aria-label":u,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,...f,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(rr.Provider,{value:{value:g,toggle:x,selectable:b,disabled:v.disabled},children:n.jsx(Ka,{root:j,children:c})})})})}),ar=l.createContext(null),Ja=l.forwardRef(function({value:e,art:s,description:r,checked:a,onChange:o,disabled:i,className:c,children:d,onClick:u,...p},m){const f=l.useContext(ar),h=f?f.values.includes(e):!!a,v=f?!f.multiple:!1;return n.jsxs("button",{ref:m,type:"button",role:v?"radio":"checkbox",className:L("ok-option ok-focusable",c),"aria-checked":h,tabIndex:v?f.tabStop===e?0:-1:void 0,disabled:i??(f==null?void 0:f.disabled),"data-value":e,onClick:b=>{u==null||u(b),!b.defaultPrevented&&(f&&f.pick(e),o==null||o(f?f.multiple?!h:!0:!h))},...p,children:[s!=null&&n.jsx("span",{className:"ok-option__art",children:s}),n.jsxs("span",{className:"ok-option__foot",children:[n.jsx("span",{className:"ok-option__title",children:d}),n.jsx("span",{className:"ok-option__check","aria-hidden":"true",children:n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})})})]}),r!=null&&n.jsx("span",{className:"ok-option__desc",children:r})]})}),ps=t=>t===void 0?void 0:t===null?[]:Array.isArray(t)?t:[t],Qa=l.forwardRef(function(e,s){const{multiple:r=!1,value:a,defaultValue:o,onChange:i,disabled:c,minItemWidth:d,className:u,style:p,children:m,id:f,onKeyDown:h,"aria-label":v,"aria-labelledby":b,"aria-describedby":g,...N}=e,x=_e({id:f,disabled:c,"aria-describedby":g,"aria-labelledby":b,"aria-label":v},!1),j=i,[_,k]=le(ps(a),ps(o)??[],C=>{r?j==null||j(C):C.length&&(j==null||j(C[0]))}),R=C=>{r?k(_.includes(C)?_.filter(w=>w!==C):[..._,C]):_[0]!==C&&k([C])};let M;const E=C=>{var y,S;if(M!==void 0||C==null||typeof C!="object")return;if(Array.isArray(C)){C.forEach(E);return}const w=C;typeof((y=w.props)==null?void 0:y.value)=="string"&&!w.props.disabled?M=w.props.value:(S=w.props)!=null&&S.children&&E(w.props.children)};!r&&!_.length&&E(m);const P=_[0]??M;return n.jsx("div",{ref:s,id:x.id,role:r?"group":"radiogroup",className:L("ok-options",u),style:d?{gridTemplateColumns:`repeat(auto-fit, minmax(${d}px, 1fr))`,...p}:p,"aria-label":v,"aria-labelledby":x.labelledBy,"aria-describedby":x.describedBy,onKeyDown:C=>{if(h==null||h(C),C.defaultPrevented||r)return;const w=Jt(C,'[role="radio"]');w&&(w.focus(),w.dataset.value!==void 0&&R(w.dataset.value))},...N,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(ar.Provider,{value:{values:_,multiple:r,pick:R,disabled:x.disabled,tabStop:P},children:m})})})}),or=l.forwardRef(function({colors:e,value:s,defaultValue:r=null,onChange:a,size:o="md",disabled:i,className:c,id:d,onKeyDown:u,"aria-label":p,"aria-labelledby":m,"aria-describedby":f,...h},v){var j;const b=_e({id:d,disabled:i,"aria-describedby":f,"aria-labelledby":m,"aria-label":p},!1),[g,N]=le(s,r,a),x=e.some(_=>_.value===g)?g:(j=e.find(_=>!_.disabled))==null?void 0:j.value;return n.jsx("div",{ref:v,id:b.id,role:"radiogroup",className:L("ok-swatches",o!=="md"&&`ok-swatches--${o}`,c),"aria-label":p,"aria-labelledby":b.labelledBy,"aria-describedby":b.describedBy,onKeyDown:_=>{if(u==null||u(_),_.defaultPrevented)return;const k=Jt(_,'[role="radio"]');k&&(k.focus(),k.dataset.value!==void 0&&N(k.dataset.value))},...h,children:e.map(_=>n.jsx("button",{type:"button",role:"radio",className:"ok-swatch ok-focusable",style:{"--c":_.color},"aria-checked":_.value===g,"aria-label":_.label,title:_.label,tabIndex:_.value===x?0:-1,disabled:b.disabled||_.disabled,"data-value":_.value,onClick:()=>N(_.value)},_.value))})}),fn="#ff6b8e",eo=()=>()=>{},to=()=>"EyeDropper"in window,no=()=>!1;function pn(t,e){const s=Os(t);return s?s.v===0?{h:e.h,s:e.s,v:0}:s.s===0?{h:e.h,s:0,v:s.v}:s:e}const hn=t=>Math.round(t*100),so=l.forwardRef(function({value:e,defaultValue:s=fn,onChange:r,onChangeEnd:a,swatches:o,disabled:i,className:c,style:d,id:u,"aria-label":p,"aria-labelledby":m,"aria-describedby":f,...h},v){const b=_e({id:u,disabled:i,"aria-describedby":f,"aria-labelledby":m,"aria-label":p},!1),{messages:g}=pe(),N=b.disabled,[x,j]=le(e,Ve(s)??fn,r),_=Ve(x)??fn,[k,R]=l.useState(()=>({hex:_,hsv:pn(_,{h:0,s:0,v:0})}));let M=k.hsv;k.hex!==_&&(M=pn(_,k.hsv),R({hex:_,hsv:M}));const E=l.useRef({hex:_,hsv:M});E.current={hex:_,hsv:M};const P=ke(F=>{const V=Bs(F);E.current={hex:V,hsv:F},R({hex:V,hsv:F}),j(V)}),C=ke(F=>P(pn(F,E.current.hsv))),w=ke(()=>a==null?void 0:a(E.current.hex)),y=l.useRef(null),[S,O]=l.useState(!1),T=l.useRef(null);l.useEffect(()=>()=>{var F;return(F=T.current)==null?void 0:F.call(T)},[]);const D=F=>{var Z;const V=y.current;if(F.button||N||!V)return;(Z=T.current)==null||Z.call(T),V.focus({preventScroll:!0}),O(!0);const te=(ne,ce)=>{const W=V.getBoundingClientRect(),z=ye((ne-W.left)/(W.width||1),0,1),se=1-ye((ce-W.top)/(W.height||1),0,1);P({h:E.current.hsv.h,s:z,v:se})};te(F.clientX,F.clientY),T.current=Dn(V,F,ne=>te(ne.clientX,ne.clientY),()=>{T.current=null,O(!1),w()})},$=F=>{if(N||F.altKey||F.ctrlKey||F.metaKey)return;const{h:V,s:te,v:Z}=E.current.hsv,ne=F.shiftKey?10:1,ce=(z,se)=>ye(Math.round(z*100+se)/100,0,1);let W;switch(F.key){case"ArrowLeft":W={h:V,s:ce(te,-ne),v:Z};break;case"ArrowRight":W={h:V,s:ce(te,ne),v:Z};break;case"ArrowUp":W={h:V,s:te,v:ce(Z,ne)};break;case"ArrowDown":W={h:V,s:te,v:ce(Z,-ne)};break;case"PageUp":W={h:V,s:te,v:ce(Z,10)};break;case"PageDown":W={h:V,s:te,v:ce(Z,-10)};break;case"Home":W={h:V,s:0,v:Z};break;case"End":W={h:V,s:1,v:Z};break;default:return}F.preventDefault(),P(W),w()},A=l.useRef(null),B=ke(F=>{F!==Math.round(E.current.hsv.h)&&P({...E.current.hsv,h:F})});l.useEffect(()=>{const F=A.current;if(!F)return;const V=()=>{B(Number(F.value)),w()};return F.addEventListener("change",V),()=>F.removeEventListener("change",V)},[B,w]);const[q,H]=l.useState(null),U=()=>{if(q===null)return;H(null);const F=Ve(q);!F||F===E.current.hex||(C(F),w())},ae=l.useSyncExternalStore(eo,to,no),K=async()=>{const F=window.EyeDropper;if(F)try{const{sRGBHex:V}=await new F().open(),te=Ve(V);if(!te)return;C(te),w()}catch{}},I=o==null?void 0:o.map(F=>{const V=Ve(F)??F;return{value:V,color:F,label:V}});return n.jsxs("div",{ref:v,id:b.id,role:"group",className:L("ok-color-picker",c),style:{"--h":M.h,"--c":_,...d},"aria-label":p??(b.labelledBy?void 0:g.colorPicker.label),"aria-labelledby":b.labelledBy,"aria-describedby":b.describedBy,"aria-disabled":N||void 0,"data-disabled":N?"":void 0,...h,children:[n.jsx("div",{ref:y,role:"slider",tabIndex:N?-1:0,className:"ok-color-picker__area ok-focusable",style:{"--s":M.s,"--v":M.v},"aria-label":g.colorPicker.area,"aria-roledescription":g.colorPicker.areaRole,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":hn(M.s),"aria-valuetext":g.colorPicker.areaValue(hn(M.s),hn(M.v)),"aria-disabled":N||void 0,"data-active":S?"":void 0,onPointerDown:D,onKeyDown:$,children:n.jsx("span",{className:"ok-color-picker__thumb"})}),n.jsx("input",{ref:A,type:"range",className:"ok-color-picker__hue ok-focusable",min:0,max:360,step:1,value:Math.round(M.h),"aria-label":g.colorPicker.hue,"aria-valuetext":`${Math.round(M.h)}°`,disabled:N,onChange:F=>B(Number(F.target.value))}),n.jsxs(Ie.Provider,{value:null,children:[n.jsxs("div",{className:"ok-color-picker__row",children:[n.jsx(On,{size:"sm",className:"ok-color-picker__hex","aria-label":g.colorPicker.hex,prefix:n.jsx("span",{className:"ok-color-picker__chip"}),value:q??_,onChange:H,onBlur:U,onKeyDown:F=>{F.key==="Enter"?(F.preventDefault(),U()):F.key==="Escape"&&q!==null&&H(null)},spellCheck:!1,autoComplete:"off",autoCapitalize:"off",disabled:N}),ae&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":g.colorPicker.eyedropper,title:g.colorPicker.eyedropper,disabled:N,onClick:K,children:n.jsx(he,{children:n.jsx("path",{d:"M13.6 3.4a2 2 0 0 1 2.9 2.9l-1.7 1.7.9.9-1.4 1.4-4.2-4.2 1.4-1.4.9.9zM10.6 7.4l-6 6a1.5 1.5 0 0 0-.4.8l-.4 2.4 2.4-.4a1.5 1.5 0 0 0 .8-.4l6-6"})})})]}),I&&I.length>0&&n.jsx(or,{size:"sm",className:"ok-color-picker__swatches","aria-label":g.colorPicker.swatches,colors:I,value:I.some(F=>F.value===_)?_:null,onChange:F=>{const V=Ve(F);V&&(C(V),w())},disabled:N})]})]})}),lr={Meta:"⌘",Control:"⌃",Alt:"⌥",Shift:"⇧",Space:"Space",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Enter:"↩",Backspace:"⌫",Tab:"⇥",Escape:"Esc"},Bn=t=>lr[t]??t,Wt=(t,e=Et["zh-CN"].keyNames)=>e[t]??t,ro=l.forwardRef(function({k:e,size:s="md",className:r,children:a,...o},i){const c=pe().messages.keyNames,d=e?Bn(e):null;return n.jsx("kbd",{ref:i,className:L("ok-kbd",s!=="md"&&`ok-kbd--${s}`,r),"data-key":e,...o,children:d!==null&&d!==Wt(e,c)?n.jsx("abbr",{title:Wt(e,c),style:{textDecoration:"none"},children:d}):d??a})}),ir=["Control","Alt","Shift","Meta"],hs=t=>ir.filter(e=>({Control:t.ctrlKey,Alt:t.altKey,Shift:t.shiftKey,Meta:t.metaKey})[e]);function ao({k:t,index:e}){const s=l.useRef(null);return l.useEffect(()=>{Ne(s.current,[{transform:"scale(.3) translateY(8px)",opacity:0},{transform:"none",opacity:1}],{spring:"bouncy",delay:e*45})},[]),n.jsx("kbd",{ref:s,className:"ok-kbd","data-key":t,children:Bn(t)})}const oo=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,placeholder:a,recordingText:o,size:i="md",disabled:c,className:d,id:u,onClick:p,onKeyDown:m,onKeyUp:f,onBlur:h,onPointerDown:v,"aria-label":b,"aria-labelledby":g,"aria-describedby":N,...x},j){const _=_e({id:u,disabled:c,"aria-describedby":N,"aria-labelledby":g,"aria-label":b},!1),{messages:k}=pe(),R=a??k.hotkey.placeholder,M=o??k.hotkey.recording,[E,P]=le(e,s,I=>r==null?void 0:r(I,I.split("+").filter(Boolean))),C=E.split("+").filter(Boolean),[w,y]=l.useState(!1),[S,O]=l.useState([]),[T,D]=l.useState(!1),$=l.useRef(null),A=`ok-hotkey-${l.useId()}`,B=()=>{!w&&!_.disabled&&(y(!0),O([]))},q=()=>{y(!1),O([])},H=I=>{var Z,ne;if(m==null||m(I),_.disabled)return;if(!w){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),B());return}if(I.key==="Tab"){q();return}if(I.preventDefault(),I.stopPropagation(),(ne=(Z=I.nativeEvent).stopImmediatePropagation)==null||ne.call(Z),I.key==="Escape"){q();return}const F=hs(I);if(ir.includes(I.key)){O(F);return}const V=I.code||"";let te=V.startsWith("Key")?V.slice(3):V.startsWith("Digit")?V.slice(5):V==="Space"?"Space":I.key;te.length===1&&(te=te.toUpperCase()),q(),P([...F,te].join("+"))},U=w?S:C,ae=w?S.length?"…":M:C.length?"":R,K=w?k.hotkey.spokenRecording(M):C.length?k.hotkey.spokenCurrent(C.map(I=>Wt(I,k.keyNames)).join(" + ")):k.hotkey.none;return n.jsxs("div",{ref:xe(j,$),id:_.id,role:"button",tabIndex:_.disabled?-1:0,className:L("ok-hotkey ok-focusable",i!=="md"&&`ok-hotkey--${i}`,d),"aria-label":b,"aria-labelledby":_.labelledBy,"aria-describedby":[_.describedBy,A].filter(Boolean).join(" "),"aria-disabled":_.disabled||void 0,"aria-pressed":w,"data-recording":w?"":void 0,"data-pointer":T?"":void 0,onPointerDown:I=>{v==null||v(I),D(!0)},onClick:I=>{p==null||p(I),I.defaultPrevented||B()},onKeyDown:H,onKeyUp:I=>{f==null||f(I),w&&O(hs(I))},onBlur:I=>{h==null||h(I),D(!1),w&&q()},...x,children:[U.map((I,F)=>n.jsx(ao,{k:I,index:F},I)),ae&&n.jsx("span",{className:"ok-hotkey__hint",children:ae}),n.jsx(In,{id:A,"aria-live":"polite",children:K})]})}),ms=2.9,lo=17.1,bs="M10 2.600l2.200 4.700 5.100.600-3.800 3.500 1 5-4.500-2.500-4.500 2.500 1-5-3.800-3.500 5.100-.600z",io=l.forwardRef(function({value:e,defaultValue:s=0,onChange:r,max:a=5,allowClear:o=!0,readOnly:i,disabled:c,size:d="md",starLabel:u,name:p,className:m,id:f,onKeyDown:h,"aria-label":v,"aria-labelledby":b,"aria-describedby":g,...N},x){const j=_e({id:f,disabled:c,"aria-describedby":g,"aria-labelledby":b,"aria-label":v},!1),{messages:_}=pe(),k=u??_.rating.star,[R,M]=le(e,s,r),E=Array.from({length:a},(w,y)=>y+1),P=L("ok-rating",d!=="md"&&`ok-rating--${d}`,m),C=n.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:n.jsx("path",{d:bs})});return i?n.jsx("div",{ref:x,id:j.id,role:"img",className:P,"data-readonly":"","aria-label":b?void 0:v??_.rating.value(R,a),"aria-labelledby":b,"aria-describedby":j.describedBy,...N,children:E.map(w=>{const y=Math.min(1,Math.max(0,R-(w-1))),S=y>0&&y<1,O=100-(ms+y*(lo-ms))/20*100;return n.jsxs("span",{className:"ok-rating__star","data-on":y>=1?"":void 0,"data-partial":S?"":void 0,children:[C,S&&n.jsx("svg",{className:"ok-rating__fill",viewBox:"0 0 20 20","aria-hidden":"true",style:{"--ok-rating-cut":`${+O.toFixed(2)}%`},children:n.jsx("path",{d:bs})})]},w)})}):n.jsxs("div",{ref:x,id:j.id,role:"radiogroup",className:P,"aria-label":j.labelledBy?void 0:v??_.rating.label,"aria-labelledby":j.labelledBy,"aria-describedby":j.describedBy,"aria-disabled":j.disabled||void 0,onKeyDown:w=>{if(h==null||h(w),w.defaultPrevented||j.disabled)return;const y=Jt(w,'[role="radio"]');y&&(y.focus(),M(Number(y.dataset.value)))},...N,children:[E.map(w=>n.jsx("button",{type:"button",role:"radio",className:"ok-rating__star ok-focusable","aria-checked":w===R,"aria-label":k(w),tabIndex:w===(R||1)?0:-1,disabled:j.disabled,"data-value":w,"data-on":w<=R?"":void 0,onClick:()=>M(o&&w===R?0:w),children:C},w)),p&&n.jsx("input",{type:"hidden",name:p,value:R})]})});function co(t,e){if(!e)return!0;const s=t.name.toLowerCase(),r=(t.type||"").toLowerCase();return e.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.slice(0,-1)):r===a)}const uo=l.forwardRef(function({onChange:e,onReject:s,maxSize:r,title:a,hint:o,icon:i,invalid:c,accept:d,multiple:u,children:p,className:m,style:f,rootClassName:h,rootStyle:v,id:b,disabled:g,required:N,"aria-describedby":x,...j},_){const k=_e({id:b,disabled:g,required:N,invalid:c,"aria-describedby":x}),{messages:R}=pe(),M=a===void 0?R.fileDrop.title:a,[E,P]=l.useState(!1),[C,w]=l.useState(""),y=l.useRef(null),S=l.useRef(0),O=$=>{var H;let A=Array.from($??[]);if(!A.length)return;const B=A.filter(U=>co(U,d)&&(r==null||U.size<=r)),q=A.filter(U=>!B.includes(U));A=u?B:B.slice(0,1),q.length&&(s==null||s(q)),A.length&&(e==null||e(A)),w(R.fileDrop.status(A.length,((H=A[0])==null?void 0:H.name)??"",q.length))},T=$=>{var A;return Array.from(((A=$.dataTransfer)==null?void 0:A.types)??[]).includes("Files")},D={onDragEnter:$=>{k.disabled||!T($)||($.preventDefault(),S.current++,P(!0))},onDragOver:$=>{k.disabled||!T($)||$.preventDefault()},onDragLeave:()=>{S.current=Math.max(0,S.current-1),S.current||P(!1)},onDrop:$=>{S.current=0,P(!1),!(k.disabled||!T($))&&($.preventDefault(),O($.dataTransfer.files))}};return n.jsxs("label",{className:L("ok-filedrop",h,m),style:{...v,...f},"data-dragging":E?"":void 0,"data-invalid":k.invalid?"":void 0,"data-disabled":k.disabled?"":void 0,...D,children:[n.jsx("input",{...j,ref:xe(_,y),id:k.id,className:"ok-filedrop__input",type:"file",accept:d,multiple:u,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:$=>{O($.target.files),$.target.value=""}}),n.jsxs("span",{className:"ok-filedrop__body",children:[i??n.jsx(he,{name:"upload",className:"ok-filedrop__icon"}),n.jsx("span",{className:"ok-filedrop__title",children:M}),o!=null&&n.jsx("span",{className:"ok-filedrop__hint",children:o}),p,n.jsx("span",{className:"ok-filedrop__status","aria-live":"polite",children:C})]})]})}),fo=1e3,po='button, a[href], [role="button"], [role="menuitem"], [role="option"], [role="tab"], summary, label, input, select, textarea, [tabindex]';function ho(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement?!0:t instanceof HTMLInputElement?!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(t.type):t instanceof HTMLElement&&t.isContentEditable}function cr({pointer:t,active:e,now:s,viewport:r}){const a={x:r.width/2,y:r.height/2},o=e==null?void 0:e.ownerDocument,i=!e||e===(o==null?void 0:o.body)||e===(o==null?void 0:o.documentElement);if(t&&t.target&&s-t.time<=fo){const c=t.target;if(!i&&(e===c||e.contains(c)))return{x:t.x,y:t.y};if(i&&c.closest(po))return{x:t.x,y:t.y}}if(!i&&!ho(e)){const c=e.getBoundingClientRect();if(c.width>0&&c.height>0&&c.right>0&&c.bottom>0&&c.left<r.width&&c.top<r.height)return{x:c.left+c.width/2,y:c.top+c.height/2}}return a}let dr=null,vs=!1;function ur(){vs||!Ae||(vs=!0,document.addEventListener("pointerdown",t=>{dr={x:t.clientX,y:t.clientY,time:performance.now(),target:t.target instanceof Element?t.target:null}},!0))}function mo(t="trigger"){if(typeof t=="object")return t;const e={width:window.innerWidth,height:window.innerHeight};return t==="center"?{x:e.width/2,y:e.height/2}:cr({pointer:dr,active:document.activeElement,now:performance.now(),viewport:e})}function Qt(t,e){return t==="sm"||t==="md"||t==="lg"?e[t]:t}const fr=l.createContext(null);function pr(){return l.useContext(fr)}function bo({active:t,layerRef:e}){return Ts(t,e),null}const vo=t=>typeof t=="number"?t+"px":t;function go(t,e){for(let s=t;s&&s!==e;s=s.parentElement)if(s.scrollWidth>s.clientWidth+1){const r=getComputedStyle(s).overflowX;if(r==="auto"||r==="scroll")return!0}return!1}const xo='button, a[href], input, select, textarea, label, [role="button"], [contenteditable="true"], [data-ok-no-drag]',ko=.5,Je=l.forwardRef(function({open:e,onOpenChange:s,placement:r="center",modal:a=!0,autoFocus:o=!1,dismissible:i=!0,size:c,gap:d,stretch:u=!0,align:p,role:m="dialog",initialFocus:f,restoreFocus:h=!0,container:v,contained:b,dragToDismiss:g=!1,swipeToDismiss:N=!0,closeButton:x="auto",closeLabel:j,origin:_,onExited:k,className:R,style:M,children:E,"aria-label":P,"aria-labelledby":C,"aria-describedby":w,onPointerDown:y,onFocus:S,onBlur:O,...T},D){const $=pe().messages.common.close,A=j??$,{mounted:B,state:q,ref:H}=Pt(e,Es.out*2),U=l.useRef(null),ae=l.useRef(null),K=l.useRef(null),I=l.useId(),F=I+"title",V=I+"desc",[te,Z]=l.useState(!1),[ne,ce]=l.useState(!1),[W,z]=l.useState(!1),se=l.useRef(null),de=_!==void 0||r==="center",[Q,oe]=l.useState(null);l.useEffect(()=>{ur()},[]),ge(()=>{e&&de&&oe(mo(_??"trigger"))},[e]);const X=l.useRef(null),Y=J=>{if(!J||!de||!Q||X.current&&X.current.node===J&&X.current.point===Q)return;X.current={node:J,point:Q};const me=J.offsetParent;if(!me)return;const fe=me.getBoundingClientRect();J.style.setProperty("--_ox",`${Q.x-fe.left-J.offsetLeft}px`),J.style.setProperty("--_oy",`${Q.y-fe.top-J.offsetTop}px`)},G=ke(()=>{s==null||s(!1)}),ie=ke(()=>{k==null||k()});As(B&&a&&!b),Lt(e&&i&&(a||W),G);const ue=l.useRef(B);l.useEffect(()=>{ue.current&&!B&&(z(!1),ie()),ue.current=B},[B,ie]),l.useEffect(()=>{if(e||a||!h)return;const J=U.current;J&&J.contains(document.activeElement)&&An(se.current)},[e,a,h]);const we=g&&i&&r!=="center",Pe=Xt("(max-width: 519.98px)"),Te=N&&i&&Pe&&(r==="left"||r==="right")&&!b,[je,Me]=l.useState(!1),ve=i&&!je&&(x===!0||x==="auto"&&Pe&&r!=="center"&&!b),Ue=l.useMemo(()=>({titleId:F,descriptionId:V,setTitled:Z,setDescribed:ce,close:G,dismissible:i,modal:a,placement:r,draggable:we,setHeaderClose:Me}),[F,V,G,i,a,r,we]);if(!B)return null;const Ye=J=>{S==null||S(J);const me=U.current,fe=J.relatedTarget;!W&&fe&&me&&!me.contains(fe)&&(se.current=En(fe)),z(!0)},He=J=>{var fe;O==null||O(J);const me=J.relatedTarget;(!me||!((fe=U.current)!=null&&fe.contains(me)))&&z(!1)},et=J=>{var as;y==null||y(J);const me=U.current;if(!we&&!Te||!me||J.defaultPrevented||q!=="open"||J.pointerType==="mouse"&&J.button!==0)return;const fe=J.target,re=(as=fe.closest)==null?void 0:as.call(fe,"[data-ok-drag-handle]");if(!me.contains(fe)||fe.closest(xo))return;const be=we&&!!re&&me.contains(re),Re=!be&&Te&&J.pointerType!=="mouse"&&!go(fe,me);if(!be&&!Re)return;const Ke=J.clientX,ze=J.clientY,tt=r==="left"||r==="right",kt=r==="bottom"||r==="right"?1:-1,Zn=J.pointerId,Yr=tt?J.clientX:J.clientY,Jn=me.getBoundingClientRect(),on=tt?Jn.width:Jn.height,Oe=K.current;let ln=!1,nt=0,cn=0,dn=J.timeStamp,Qn=0;const es=Se=>{if(Se.pointerId!==Zn)return;const st=((tt?Se.clientX:Se.clientY)-Yr)*kt;if(!ln){if(Re){const yt=Math.abs(Se.clientX-Ke),os=Math.abs(Se.clientY-ze);if(yt<8&&os<8)return;if(os>yt||st<=0){ts();return}}if(Math.abs(st)<4)return;ln=!0,me.style.transition="none",me.setAttribute("data-dragging",""),Oe&&(Oe.style.transition="none")}nt=st>=0?st:Math.max(st*.15,-8);const Dt=Se.timeStamp-dn;Dt>0&&(cn=(nt-Qn)/Dt,dn=Se.timeStamp,Qn=nt);const Ot=nt*kt;me.style.transform=tt?`translateX(${Ot}px)`:`translateY(${Ot}px)`,Oe&&(Oe.style.opacity=String(1-ye(nt/(on||320),0,1)*.7))},ts=()=>{document.removeEventListener("pointermove",es),document.removeEventListener("pointerup",ss),document.removeEventListener("pointercancel",rs)},ns=(Se,st)=>{if(Se.pointerId!==Zn||(ts(),!ln))return;Se.timeStamp-dn>120&&(cn=0);const Dt=on>0?Math.min(on*.4,160):160,Ot=!st&&(nt>Dt||cn>ko&&nt>12);me.style.transition="",me.style.transform="",me.removeAttribute("data-dragging"),Oe&&(Oe.style.transition=""),Ot?(G(),requestAnimationFrame(()=>{var yt;Oe&&((yt=ae.current)==null?void 0:yt.getAttribute("data-state"))==="open"&&(Oe.style.opacity="")})):Oe&&(Oe.style.opacity="")},ss=Se=>ns(Se,!1),rs=Se=>ns(Se,!0);document.addEventListener("pointermove",es),document.addEventListener("pointerup",ss),document.addEventListener("pointercancel",rs)},Xe=c==="auto",ee={"--ok-float-size":Xe?void 0:vo(c),"--ok-float-gap":d!=null?d+"px":void 0};return n.jsx(it,{container:v,children:n.jsxs("div",{ref:ae,className:L("ok-float",b&&"ok-float--contained",a&&"ok-float--modal"),"data-ok-layer":"","data-state":q,"data-placement":r,"data-stretch":u?"":void 0,"data-align":p,"data-size":Xe?"auto":void 0,"data-zoom":de?"":void 0,style:ee,children:[a&&n.jsx("div",{ref:K,className:"ok-float__scrim","aria-hidden":"true",onClick:i?G:void 0}),n.jsx(Ps,{scopeRef:U,trap:a,autoFocus:a||o,restoreFocus:h&&a,initialFocus:f,children:n.jsxs("div",{...T,ref:xe(D,U,H,Y),className:L("ok-float__card",R),style:M,role:m,"aria-modal":a&&(m==="dialog"||m==="alertdialog")?!0:void 0,"aria-label":P,"aria-labelledby":C??(te&&!P?F:void 0),"aria-describedby":w??(ne?V:void 0),"data-draggable":we?"":void 0,"data-swipe":Te?"":void 0,tabIndex:-1,onPointerDown:et,onFocus:Ye,onBlur:He,children:[n.jsx(fr.Provider,{value:Ue,children:E}),ve&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close ok-float__close--auto","aria-label":A,onClick:G,children:n.jsx(he,{name:"x"})})]})}),a&&!b&&n.jsx(bo,{active:e,layerRef:ae})]})})}),hr=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{ref:r,className:L("ok-float__grip",e),"aria-hidden":"true","data-ok-drag-handle":"",...s,children:n.jsx("span",{})})}),yo=l.forwardRef(function({title:e,description:s,icon:r,level:a=2,closable:o,closeLabel:i,onClose:c,className:d,children:u,...p},m){const f=pe().messages.common.close,h=i??f,v=pr(),b=l.useId(),g=(v==null?void 0:v.titleId)??b+"title",N=(v==null?void 0:v.descriptionId)??b+"desc",x=e!=null&&e!==!1,j=s!=null&&s!==!1,_=v==null?void 0:v.setTitled,k=v==null?void 0:v.setDescribed;ge(()=>{if(!(!x||!_))return _(!0),()=>_(!1)},[x,_]),ge(()=>{if(!(!j||!k))return k(!0),()=>k(!1)},[j,k]);const R="h"+a,M=o??(v==null?void 0:v.dismissible)??!0,E=v==null?void 0:v.setHeaderClose;return ge(()=>{if(!(!M||!E))return E(!0),()=>E(!1)},[M,E]),n.jsxs("div",{ref:m,className:L("ok-float__header",d),"data-ok-drag-handle":v!=null&&v.draggable?"":void 0,...p,children:[r!=null&&r!==!1&&n.jsx("span",{className:"ok-float__icon",children:r}),n.jsxs("div",{className:"ok-float__heading",children:[x&&n.jsx(R,{id:g,className:"ok-float__title",children:e}),j&&n.jsx("p",{id:N,className:"ok-float__desc",children:s})]}),u,M&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close","aria-label":h,onClick:c??(v==null?void 0:v.close),children:n.jsx(he,{name:"x"})})]})}),_o=l.forwardRef(function({padded:e=!0,className:s,...r},a){return n.jsx("div",{ref:a,className:L("ok-float__body ok-scroll",!e&&"ok-float__body--flush",s),...r})}),jo=l.forwardRef(function({align:e="end",className:s,...r},a){return n.jsx("div",{ref:a,className:L("ok-float__footer",s),"data-align":e,...r})}),wo={sm:320,md:400,lg:560},mr=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,size:a="md",icon:o,tone:i="accent",title:c,description:d,actions:u,align:p="start",role:m="dialog",closable:f=!1,closeLabel:h,dismissible:v=!0,as:b="div",onSubmit:g,origin:N,className:x,children:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const P=pe().messages.common.close,C=h??P,[w,y]=le(e,s,r),S=l.useId(),O=c!=null&&c!==!1,T=d!=null&&d!==!1,D=o!=null&&o!==!1,$=n.jsxs(n.Fragment,{children:[(O||D||f)&&n.jsxs("div",{className:"ok-dialog__head",children:[D&&n.jsx("div",{className:L("ok-dialog__icon",i!=="accent"&&"ok-dialog__icon--"+i),children:o}),O&&n.jsx("h2",{id:S+"title",className:"ok-dialog__title",children:c}),f&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-dialog__close","aria-label":C,onClick:()=>y(!1),children:n.jsx(he,{name:"x"})})]}),T&&n.jsx("p",{id:S+"desc",className:"ok-dialog__desc",children:d}),j!=null&&j!==!1&&n.jsx("div",{className:"ok-dialog__body ok-scroll",children:j}),u!=null&&u!==!1&&n.jsx("div",{className:"ok-dialog__actions",children:u})]});return n.jsx(Je,{...M,ref:E,open:w,onOpenChange:y,placement:"center",origin:N,size:Qt(a,wo),role:m,dismissible:v,className:L("ok-dialog__panel ok-scroll",p==="center"&&"ok-dialog__panel--center",x),"aria-label":_,"aria-labelledby":k??(O&&!_?S+"title":void 0),"aria-describedby":R??(T?S+"desc":void 0),children:b==="form"?n.jsx("form",{className:"ok-dialog__form",onSubmit:A=>{A.preventDefault(),A.stopPropagation(),g==null||g(A)},children:$}):$})});let Ze=[],br=0,No=0;const Nn=new Set,mt=[];let gs=!1;const At=()=>{br++,Nn.forEach(t=>t())},Ro=t=>(Nn.add(t),()=>{Nn.delete(t)}),xs=()=>br,Mo=()=>{var t;return(t=mt.find(e=>!e.auto)??mt[0])==null?void 0:t.id};function mn(t,e){const s=Ze.find(r=>r.id===t);!s||!s.open||(s.resolve(e),Ze=Ze.map(r=>r.id===t?{...r,open:!1}:r),At())}function So(t){Ze=Ze.filter(e=>e.id!==t),At()}function Co(t){if(!Ae)return Promise.resolve(!1);const e=typeof t=="string"?{title:t}:t;return ur(),new Promise(s=>{if(Ze=[...Ze,{id:++No,options:e,open:!0,resolve:s}],!mt.some(r=>!r.auto)&&!gs){gs=!0;const r=document.createElement("div");r.setAttribute("data-ok-confirmer",""),document.body.appendChild(r),Xr.createRoot(r).render(n.jsx(vr,{auto:!0}))}At()})}function vr({auto:t=!1}){const e=l.useRef();e.current||(e.current=Symbol("confirmer")),l.useSyncExternalStore(Ro,xs,xs);const{messages:s}=pe();return l.useEffect(()=>{const r={id:e.current,auto:t};return mt.push(r),At(),()=>{const a=mt.indexOf(r);a>=0&&mt.splice(a,1),At()}},[t]),Mo()!==e.current?null:n.jsx(n.Fragment,{children:Ze.map(r=>{const a=r.options,o=a.tone==="danger";return n.jsx(mr,{role:"alertdialog",open:r.open,onOpenChange:i=>{i||mn(r.id,!1)},onExited:()=>So(r.id),title:a.title,description:a.description,icon:a.icon,tone:a.tone,size:a.size,align:a.align??(a.icon==null?"center":"start"),dismissible:a.dismissible??!0,origin:a.origin,actions:n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable","data-autofocus":o?"":void 0,onClick:()=>mn(r.id,!1),children:a.cancelText??s.confirm.cancel}),n.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable "+(o?"ok-btn--danger":"ok-btn--primary"),"data-autofocus":o?void 0:"",onClick:()=>mn(r.id,!0),children:a.confirmText??s.confirm.confirm})]})},r.id)})})}const Eo={sm:280,md:360,lg:480},Ao={sm:240,md:360,lg:520},To=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,placement:a="right",size:o="md",modal:i=!0,className:c,...d},u){const[p,m]=le(e,s,r),f=a==="left"||a==="right";return n.jsx(Je,{...d,ref:u,open:p,onOpenChange:m,placement:a,modal:i,size:Qt(o,f?Eo:Ao),className:L("ok-drawer",c)})}),ks={auto:void 0,sm:"40%",md:"60%",lg:"85%",full:"100%"},Io=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,size:a="auto",grip:o=!0,dragToDismiss:i=!0,stretch:c=!1,modal:d=!0,className:u,children:p,...m},f){const[h,v]=le(e,s,r),b=typeof a=="string"&&a in ks?ks[a]:a;return n.jsxs(Je,{...m,ref:f,open:h,onOpenChange:v,placement:"bottom",modal:d,stretch:c,size:b,dragToDismiss:i,className:L("ok-sheet",u),children:[o&&n.jsx(hr,{}),p]})}),Po={sm:280,md:320,lg:400},Lo={sm:200,md:280,lg:400},gr=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,placement:a="right",size:o="md",role:i="complementary",className:c,...d},u){const[p,m]=le(e,s,r),f=a==="left"||a==="right";return n.jsx(Je,{...d,ref:u,open:p,onOpenChange:m,placement:a,modal:!1,role:i,size:Qt(o,f?Po:Lo),className:L("ok-panel-float",c)})}),$o=gr;let Ee=[],Do=0;const Rn=new Set,Fn=()=>Rn.forEach(t=>t());function ft(t,e){const s=typeof t=="string"?{title:t}:t,r=e?{...s,tone:e}:s,a=r.id??"ok-toast-"+ ++Do;return Ee=Ee.some(i=>i.id===a&&!i.leaving)?Ee.map(i=>i.id===a&&!i.leaving?{...r,id:a,leaving:!1,createdAt:i.createdAt,rev:i.rev+1,closable:r.closable??i.closable,live:r.live??i.live,onDismiss:r.onDismiss??i.onDismiss}:i):[{...r,id:a,leaving:!1,createdAt:Date.now(),rev:0},...Ee],Fn(),a}function rt(t){let e=!1;Ee=Ee.map(s=>s.leaving||t!=null&&s.id!==t?s:(e=!0,{...s,leaving:!0})),e&&Fn()}function Oo(t){var s;const e=Ee.find(r=>r.id===t);e&&(Ee=Ee.filter(r=>r.id!==t),Fn(),(s=e.onDismiss)==null||s.call(e))}const Bo=Object.assign(t=>ft(t),{success:t=>ft(t,"success"),warning:t=>ft(t,"warning"),danger:t=>ft(t,"danger"),error:t=>ft(t,"danger"),info:t=>ft(t,"info"),dismiss:rt}),Fo={success:n.jsx("path",{pathLength:1,d:"M5 10.5l3.2 3.2L15 6.5"}),danger:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M6 6l8 8"}),n.jsx("path",{pathLength:1,d:"M14 6l-8 8"})]}),warning:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M10 5v6"}),n.jsx("path",{pathLength:1,d:"M10 14.5v.1"})]}),info:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M10 9v5.5"}),n.jsx("path",{pathLength:1,d:"M10 5.8v.1"})]}),default:n.jsx("path",{pathLength:1,d:"M4 4.5c0 6.500 4.500 11 9 11 2.800 0 4.500-2 4.500-4.200S15.700 7.500 13.500 7.500c-2 0-3.400 1.400-3.600 3.200"})};function Ho({record:t,position:e,defaultDuration:s,pauseOnHover:r,closeLabel:a,register:o}){const i=l.useRef(null),[c,d]=l.useState(!1),u=l.useRef(!1),p=l.useRef(!1),m=t.duration??s,f=l.useRef(m),{id:h,leaving:v}=t,b=e.startsWith("top");ge(()=>{Ne(i.current,[{opacity:0,transform:`translateY(${b?-32:32}px) scale(.84)`},{opacity:1,transform:"none"}],{spring:"bouncy"})},[]),l.useEffect(()=>{f.current=m},[m,t.rev]),l.useEffect(()=>{if(v||c||m<=0)return;const R=Date.now(),M=setTimeout(()=>rt(h),f.current);return()=>{clearTimeout(M),f.current=Math.max(800,f.current-(Date.now()-R))}},[v,c,m,h,t.rev]),l.useEffect(()=>{if(!v)return;const R=e.endsWith("right")?56:e.endsWith("left")?-56:0,M=R?0:b?-24:24,E=Ne(i.current,[{opacity:1,transform:"none"},{opacity:0,transform:`translate(${R}px, ${M}px) scale(.92)`}],{duration:170,easing:De.in,fill:"forwards"});let P=!1;const C=()=>{P||(P=!0,Oo(h))};E!=null&&E.finished&&E.finished.then(C,C);const w=setTimeout(C,170*Fe()+80);return()=>clearTimeout(w)},[v,h]);const g=()=>d(u.current||p.current),N=t.tone&&t.tone!=="neutral"&&t.tone!=="accent"?t.tone:"default",x=t.live??(t.tone==="danger"?"assertive":"polite"),j=t.closable??m<=0,_=t.action,k=t.description!=null&&t.description!==!1;return n.jsxs("div",{ref:xe(i,R=>o(h,R)),className:L("ok-toast","ok-toast--"+N),role:x==="assertive"?"alert":"status","aria-live":x,"aria-atomic":"true","data-leaving":v?"":void 0,onClick:()=>rt(h),onKeyDown:R=>{R.key==="Escape"&&(R.stopPropagation(),rt(h))},onPointerEnter:r?()=>{u.current=!0,g()}:void 0,onPointerLeave:r?()=>{u.current=!1,g()}:void 0,onFocus:()=>{p.current=!0,g()},onBlur:R=>{R.currentTarget.contains(R.relatedTarget)||(p.current=!1,g())},children:[t.icon!==!1&&n.jsx("span",{className:"ok-toast__icon","aria-hidden":"true",children:t.icon??n.jsx("svg",{className:"ok-toast__glyph",viewBox:"0 0 20 20",children:Fo[N]})}),n.jsxs("div",{className:"ok-toast__body",children:[n.jsx("div",{className:"ok-toast__title",children:t.title}),k&&n.jsx("div",{className:"ok-toast__desc",children:t.description})]}),_&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-focusable ok-toast__action",onClick:R=>{var M;R.stopPropagation(),(M=_.onClick)==null||M.call(_),_.dismiss!==!1&&rt(h)},children:_.label}),j&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-toast__close","aria-label":a,onClick:R=>{R.stopPropagation(),rt(h)},children:n.jsx(he,{name:"x"})})]})}const zo=l.forwardRef(function({position:e,mobilePosition:s,max:r=4,duration:a=4200,pauseOnHover:o=!0,offset:i,label:c,closeLabel:d,container:u,className:p,style:m,...f},h){const{messages:v}=pe(),b=c??v.toast.label,g=d??v.common.close,N=at("sm"),x=at("md"),j=at("lg"),_=at("xl");let k;if(typeof e=="object"&&e!==null){const y=e;k=(_?y.xl:void 0)??(j?y.lg:void 0)??(x?y.md:void 0)??(N?y.sm:void 0)??y.base??(N?"top-right":"bottom-center")}else k=(N?e:s??e)??(N?"top-right":"bottom-center");const[R,M]=l.useState(()=>Ee),E=l.useRef(new Map),P=l.useRef(null),C=ke((y,S)=>{S?E.current.set(y,S):E.current.delete(y)});l.useEffect(()=>{const y=()=>{const S=new Map;E.current.forEach(O=>S.set(O,O.getBoundingClientRect())),P.current=S,M(Ee)};return Rn.add(y),Ee.length&&M(Ee),()=>{Rn.delete(y)}},[]),ge(()=>{P.current&&(Yt(P.current),P.current=null)},[R]),l.useEffect(()=>{const y=R.filter(S=>!S.leaving);r>0&&y.length>r&&y.slice(r).forEach(S=>rt(S.id))},[R,r]);const w=i!=null?{...m,"--ok-toast-offset":i+"px"}:m;return n.jsx(it,{container:u,children:n.jsx("div",{ref:h,className:L("ok-toasts",p),role:"region","aria-label":b,"data-position":k,"data-ok-layer":"",style:w,...f,children:R.map(y=>n.jsx(Ho,{record:y,position:k,defaultDuration:a,pauseOnHover:o,closeLabel:g,register:C},y.id))})})});function en(t,e,s){const r=t.props,a={...e};for(const i in e){const c=e[i],d=r[i];/^on[A-Z]/.test(i)&&typeof d=="function"&&typeof c=="function"?a[i]=It(d,c):i==="className"?a[i]=L(d,c):i==="style"?a[i]={...c,...d}:c===void 0&&d!==void 0&&(a[i]=d)}const o=parseInt(l.version,10)>=19?r.ref:t.ref;return s&&(a.ref=o?xe(o,s):s),l.cloneElement(t,a)}function Hn(t){return t==null||t===!1?null:typeof t=="string"&&t in Tn?n.jsx(he,{name:t}):l.isValidElement(t)?t:null}function zn(){return n.jsx("svg",{className:"ok-menu__check",viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.900-6.400",pathLength:1})})}function qn(){const t=l.useRef(null),e=l.useRef(!1),s=l.useCallback(r=>{const a=t.current,o=a==null?void 0:a.parentElement;if(!a||!o)return;if(!r||r.getAttribute("aria-disabled")==="true"){e.current=!1,o.removeAttribute("data-hl");return}const i=!e.current;i&&(a.style.transition="none"),a.dataset.tone=r.dataset.tone||"",a.style.setProperty("--y",r.offsetTop+"px"),a.style.height=r.offsetHeight+"px",i&&(a.offsetWidth,a.style.transition=""),e.current=!0,o.setAttribute("data-hl","")},[]);return{hlRef:t,moveTo:s}}function Vn(t,e){const s=l.useRef(t);return ge(()=>{e||(s.current=t)}),e?s.current:t}function qo(t,e,s,r){const a=(p,m,f)=>(p.x-f.x)*(m.y-f.y)-(m.x-f.x)*(p.y-f.y),o=a(t,e,s),i=a(t,s,r),c=a(t,r,e),d=o<0||i<0||c<0,u=o>0||i>0||c>0;return!(d&&u)}function Vo(t,e,s){if(t.x===e.x&&t.y===e.y)return!1;const r=s.left>=t.x,a=r?s.left:s.right;if(r?e.x>s.right:e.x<s.left)return!1;const o=4;return qo(e,t,{x:a,y:s.top-o},{x:a,y:s.bottom+o})}const xr=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;function kr(){const t=l.useRef(""),e=l.useRef();l.useEffect(()=>()=>clearTimeout(e.current),[]);const s=l.useCallback((a,o,i)=>{clearTimeout(e.current),e.current=setTimeout(()=>{t.current=""},500),t.current+=a.toLowerCase();const c=t.current,d=c.length>1&&c.split("").every(f=>f===c[0]),u=d?c[0]:c,p=o.length,m=d||c.length===1?i+1:Math.max(i,0);for(let f=0;f<p;f++){const h=((m+f)%p+p)%p;if(o[h].trim().toLowerCase().startsWith(u))return h}return-1},[]),r=l.useCallback(()=>t.current.length>0,[]);return{search:s,pending:r}}const bn="\0none",Go=(t,e)=>{const s=[t.label,t.description,t.group,...t.keywords??[]].filter(Boolean).join(" ").toLowerCase();return e.toLowerCase().split(/\s+/).filter(Boolean).every(r=>s.includes(r))},Wo=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,items:a,query:o,defaultQuery:i="",onQueryChange:c,filter:d,onSelect:u,closeOnSelect:p=!0,placeholder:m,emptyText:f,label:h,width:v,footer:b,origin:g="trigger",className:N,style:x,...j},_){const{messages:k}=pe(),R=m??k.commandPalette.placeholder,M=f===void 0?k.commandPalette.empty:f,E=h??k.commandPalette.label,[P,C]=le(e,s,r),[w,y]=le(o,i,c),[S,O]=l.useState(null),T=l.useRef(null),[D,$]=l.useState(null),{hlRef:A,moveTo:B}=qn(),q=l.useId(),H=q+"list",U=W=>q+"opt-"+W,ae=l.useMemo(()=>{const W=d===!1?null:d??Go,z=w.trim(),se=W&&z?a.filter(Q=>W(Q,z)):a,de=[];return se.forEach(Q=>{let oe=de.find(X=>X.label===Q.group);oe||(oe={label:Q.group,items:[]},de.push(oe)),oe.items.push(Q)}),de},[a,w,d]),K=l.useMemo(()=>ae.flatMap(W=>W.items).filter(W=>!W.disabled),[ae]),I=S===bn?null:K.find(W=>W.id===S)??K[0]??null,F=l.useRef(P);l.useEffect(()=>{P&&!F.current&&(y(""),O(null)),F.current=P},[P,y]),ge(()=>{D&&B(I?D.querySelector("[data-active]"):null)},[D,I,ae,B]),ge(()=>{var W;!P||!I||!D||(I===K[0]?D.scrollTop=0:(W=D.querySelector("[data-active]"))==null||W.scrollIntoView({block:"nearest"}))},[P,I==null?void 0:I.id,D]);const V=W=>{var z;W.disabled||((z=W.onSelect)==null||z.call(W),u==null||u(W),p&&C(!1))},te=W=>{if(!K.length)return;let z;W==="first"?z=0:W==="last"?z=K.length-1:I?z=(K.indexOf(I)+W+K.length)%K.length:z=W>0?0:K.length-1,O(K[z].id)},Z=W=>{if(!K.length)return;const z=I?K.indexOf(I):W>0?-1:K.length;O(K[Math.min(K.length-1,Math.max(0,z+W))].id)},ne=W=>{if(!W.nativeEvent.isComposing)switch(W.key){case"ArrowDown":W.preventDefault(),te(1);break;case"ArrowUp":W.preventDefault(),te(-1);break;case"Home":K.length&&(W.preventDefault(),te("first"));break;case"End":K.length&&(W.preventDefault(),te("last"));break;case"PageDown":W.preventDefault(),Z(5);break;case"PageUp":W.preventDefault(),Z(-5);break;case"Enter":I&&(W.preventDefault(),V(I));break}},ce=v!=null?{...x,"--ok-cmdk-width":typeof v=="number"?v+"px":v}:x;return n.jsxs(Je,{"aria-label":E,...j,ref:_,open:P,onOpenChange:C,placement:"top",stretch:!1,origin:g,initialFocus:T,className:L("ok-cmdk",N),style:ce,children:[n.jsxs("div",{className:"ok-cmdk__search",children:[n.jsx(he,{name:"search",className:"ok-cmdk__search-icon"}),n.jsx("input",{ref:T,className:"ok-cmdk__input",type:"text",role:"combobox","aria-label":E,"aria-expanded":"true","aria-controls":H,"aria-autocomplete":"list","aria-activedescendant":I?U(I.id):void 0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,enterKeyHint:"go",placeholder:R,value:w,onChange:W=>{y(W.target.value),O(null)},onKeyDown:ne}),n.jsx("kbd",{className:"ok-kbd ok-cmdk__esc","aria-hidden":"true",children:"Esc"})]}),n.jsxs("div",{ref:$,id:H,className:"ok-cmdk__list ok-scroll",role:"listbox","aria-label":E,hidden:ae.length===0,onPointerLeave:()=>O(bn),children:[n.jsx("span",{className:"ok-cmdk__hl",ref:A,"aria-hidden":"true"}),ae.map((W,z)=>{const se=q+"group-"+z;return n.jsxs("div",{className:"ok-cmdk__group",role:"group","aria-labelledby":W.label?se:void 0,children:[W.label&&n.jsx("div",{id:se,className:"ok-cmdk__group-label",role:"presentation",children:W.label}),W.items.map(de=>{const Q=(I==null?void 0:I.id)===de.id;return n.jsxs("div",{id:U(de.id),className:"ok-cmdk__item",role:"option","aria-selected":Q,"aria-disabled":de.disabled||void 0,"data-active":Q?"":void 0,onMouseDown:oe=>oe.preventDefault(),onPointerMove:Q?void 0:()=>O(de.disabled?bn:de.id),onClick:()=>V(de),children:[de.icon!=null&&n.jsx("span",{className:"ok-cmdk__item-icon","aria-hidden":"true",children:de.icon}),n.jsxs("span",{className:"ok-cmdk__item-text",children:[n.jsx("span",{className:"ok-cmdk__item-label",children:de.label}),de.description&&n.jsx("span",{className:"ok-cmdk__item-desc",children:de.description})]}),de.shortcut&&de.shortcut.length>0&&n.jsx("span",{className:"ok-cmdk__item-keys","aria-hidden":"true",children:de.shortcut.map((oe,X)=>n.jsx("kbd",{className:"ok-kbd",children:oe},X))})]},de.id)})]},W.label??"\0"+z)})]}),n.jsx("div",{className:"ok-cmdk__empty",role:"status","aria-live":"polite","data-empty":K.length===0&&ae.length===0?"":void 0,children:ae.length===0?M:n.jsx("span",{className:"ok-sr",children:k.commandPalette.results(K.length)})}),b!=null&&b!==!1&&n.jsx("div",{className:"ok-cmdk__footer",children:b})]})}),ys={top:"bottom",bottom:"top",left:"right",right:"left"},Uo=96;function yr(t){const{anchor:e,floating:s,viewport:r,placement:a="bottom",offset:o=8,alignOffset:i=0,padding:c=8,flip:d=!0,shift:u=!0}=t,p=a.split("-");let m=p[0];const f=p[1]??"center",h=m==="top"||m==="bottom",v=Math.max(0,r.width-c*2),b=Math.max(0,r.height-c*2),g={top:e.top-o-c,bottom:r.height-e.bottom-o-c,left:e.left-o-c,right:r.width-e.right-o-c},N=h?s.height:s.width;d&&N>g[m]&&g[ys[m]]>g[m]&&(m=ys[m]);let x,j,_,k,R=v,M=b;return h?(M=Math.min(b,Math.max(g[m],Uo)),_=Math.min(s.width,v),k=Math.min(s.height,M),j=m==="bottom"?e.bottom+o:e.top-o-k,x=(f==="start"?e.left:f==="end"?e.right-_:e.left+e.width/2-_/2)+i):(_=Math.min(s.width,v),k=Math.min(s.height,b),x=m==="right"?e.right+o:e.left-o-_,j=(f==="start"?e.top:f==="end"?e.bottom-k:e.top+e.height/2-k/2)+i),u&&(x=ye(x,c,Math.max(c,r.width-c-_)),j=ye(j,c,Math.max(c,r.height-c-k))),{x:Math.round(x),y:Math.round(j),side:m,align:f,availableWidth:R,availableHeight:M}}function tn(t){const{open:e,anchorRef:s,floatingRef:r,placement:a="bottom",offset:o=8,alignOffset:i=0,padding:c=8,flip:d=!0,shift:u=!0,matchWidth:p=!1}=t,m=ke(t.onPosition),f=l.useRef(0),h=l.useCallback(()=>{const v=s.current,b=r.current;if(!v||!b)return;const g=v.getBoundingClientRect(),N=document.documentElement,x={width:N.clientWidth||window.innerWidth,height:window.innerHeight||N.clientHeight};p===!0?b.style.width=g.width+"px":p==="min"&&(b.style.minWidth=g.width+"px");const j=b.style.getPropertyValue("--ok-popup-avail-h")?[b,...Array.from(b.querySelectorAll(".ok-scroll"))].map(R=>[R,R.scrollTop]):[];b.style.setProperty("--ok-popup-avail-h","100000px"),b.style.setProperty("--ok-popup-avail-w",Math.max(0,x.width-c*2)+"px");const _={width:b.offsetWidth,height:b.offsetHeight},k=yr({anchor:g,floating:_,viewport:x,placement:a,offset:o,alignOffset:i,padding:c,flip:d,shift:u});b.style.setProperty("--ok-popup-avail-h",k.availableHeight+"px"),b.style.setProperty("--ok-popup-avail-w",k.availableWidth+"px"),b.style.left=k.x+"px",b.style.top=k.y+"px",b.dataset.side=k.side,b.dataset.align=k.align,j.forEach(([R,M])=>{R.scrollTop!==M&&(R.scrollTop=M)}),m({...k,anchor:g,width:Math.min(_.width,k.availableWidth),height:Math.min(_.height,k.availableHeight)})},[s,r,a,o,i,c,d,u,p,m]);return ge(()=>{e&&h()},[e,h]),l.useEffect(()=>{var N;if(!e)return;const v=()=>{f.current||(f.current=requestAnimationFrame(()=>{f.current=0,h()}))},b=x=>{const j=r.current;j&&x.target instanceof Node&&j.contains(x.target)||v()};window.addEventListener("scroll",b,{capture:!0,passive:!0}),window.addEventListener("resize",v),(N=window.visualViewport)==null||N.addEventListener("resize",v);let g;if(typeof ResizeObserver<"u"){g=new ResizeObserver(v);const x=s.current;x instanceof Element&&g.observe(x),r.current&&g.observe(r.current)}return()=>{var x;window.removeEventListener("scroll",b,{capture:!0}),window.removeEventListener("resize",v),(x=window.visualViewport)==null||x.removeEventListener("resize",v),g==null||g.disconnect(),f.current&&(cancelAnimationFrame(f.current),f.current=0)}},[e,h,s,r]),{update:h}}const _s=l.createContext(null),_r=l.createContext(!0),Gn=()=>l.useContext(_r),xt=l.forwardRef(function(e,s){const{open:r,container:a}=e,o=Pt(r,200);return o.mounted?n.jsx(it,{container:a,children:n.jsx(Yo,{...e,ref:s,state:o.state,presenceRef:o.ref})}):null}),Yo=l.forwardRef(function({open:e,anchorRef:s,placement:r="bottom-start",offset:a=8,alignOffset:o=0,padding:i=8,flip:c=!0,shift:d=!0,matchWidth:u=!1,onDismiss:p,insideRefs:m,surface:f=!0,container:h,updateRef:v,onPosition:b,state:g,presenceRef:N,className:x,children:j,..._},k){const R=l.useRef(null),{update:M}=tn({open:!0,anchorRef:s,floatingRef:R,placement:r,offset:a,alignOffset:o,padding:i,flip:c,shift:d,matchWidth:u,onPosition:b});ge(()=>{if(v)return v.current=M,()=>{v.current=null}},[v,M]);const E=l.useContext(_s),P=l.useRef(new Set),C=l.useMemo(()=>({register(S){P.current.add(S);const O=E==null?void 0:E.register(S);return()=>{P.current.delete(S),O==null||O()}}}),[E]);l.useEffect(()=>{const S=R.current;if(!(!S||!E))return E.register(S)},[E]);const w=ke(p),y=l.useRef(m);return y.current=m,l.useEffect(()=>{if(!e)return;const S=O=>{var $,A;const T=O.target;if(!T||($=R.current)!=null&&$.contains(T))return;const D=s.current;if(!(D instanceof Element&&D.contains(T))&&!((A=y.current)!=null&&A.some(B=>{var q;return(q=B.current)==null?void 0:q.contains(T)}))){for(const B of P.current)if(B.contains(T))return;w("outside",O)}};return document.addEventListener("pointerdown",S,!0),()=>document.removeEventListener("pointerdown",S,!0)},[e,s,w]),Lt(e&&!!p,()=>w("escape",new Event("keydown"))),n.jsx(_s.Provider,{value:C,children:n.jsx(_r.Provider,{value:e,children:n.jsx("div",{..._,ref:xe(k,R,N),className:L("ok-popup",f&&"ok-popup--surface",x),"data-state":g,"data-ok-layer":"",children:j})})})}),Wn=l.forwardRef(function({trigger:e,children:s,open:r,defaultOpen:a=!1,onOpenChange:o,placement:i="bottom",offset:c=8,matchWidth:d=!1,anchorRef:u,initialFocus:p,autoFocus:m=!0,closeOnOutsidePress:f=!0,closeOnEscape:h=!0,id:v,className:b,role:g="dialog",onKeyDown:N,...x},j){const[_,k]=le(r,a,o),R=l.useRef(null),M=l.useId(),E=v??`${M}-popover`,P=(y=!0)=>{var S;y&&((S=R.current)==null||S.focus({preventScroll:!0})),k(!1)},C=en(e,{"aria-haspopup":g==="dialog"?"dialog":"true","aria-expanded":_,"aria-controls":_?E:void 0,"data-state":_?"open":"closed",onClick:()=>_?P(!1):k(!0)},R),w=y=>{if(N==null||N(y),y.defaultPrevented||y.key!=="Tab")return;const S=y.currentTarget;if(!S.contains(y.target))return;const O=St(S),T=document.activeElement,D=!O.length||T===O[O.length-1],$=!O.length||T===O[0]||T===S;(y.shiftKey?$:D)&&(y.shiftKey&&y.preventDefault(),P(!0))};return n.jsxs(n.Fragment,{children:[C,n.jsx(xt,{...x,ref:j,id:E,role:g,tabIndex:-1,open:_,anchorRef:u??R,insideRefs:[R],placement:i,offset:c,matchWidth:d,className:L("ok-popover",b),onKeyDown:w,onDismiss:y=>{y==="escape"?h&&P(!0):f&&P(!1)},children:n.jsx(Xo,{open:_,autoFocus:m,initialFocus:p,children:typeof s=="function"?s({close:()=>P(!0)}):s})})]})});function Xo({open:t,autoFocus:e,initialFocus:s,children:r}){const a=l.useRef(null);return l.useEffect(()=>{var c;if(!t||!e)return;const o=(c=a.current)==null?void 0:c.parentElement;if(!o||o.contains(document.activeElement))return;((s==null?void 0:s.current)??o.querySelector("[data-autofocus]")??St(o)[0]??o).focus({preventScroll:!0})},[t]),n.jsx("div",{className:"ok-popover__body ok-scroll",ref:a,children:r})}const Ce={current:null,hiddenAt:-1/0,lastPos:null},Ko=t=>{try{return t.matches(":focus-visible")}catch{return!0}};function Zo({content:t,shortcut:e,children:s,placement:r="top",offset:a=8,delay:o=380,skipDelayWithin:i=320,hideDelay:c=160,disabled:d,open:u,defaultOpen:p=!1,onOpenChange:m,className:f}){const[h,v]=le(u,p,m),[b,g]=l.useState(!1),[N,x]=l.useState(!1),j=l.useId(),_=l.useRef(null),k=l.useRef(null),R=l.useRef(),M=l.useRef(),E=l.useRef(!1),P=l.useRef(!1),C=l.useRef(!1),w=Pt(h,250);let y=t,S=e;if(typeof t=="string"&&S==null&&t.includes("|")){const H=t.indexOf("|");y=t.slice(0,H),S=t.slice(H+1)}const O=()=>{clearTimeout(R.current),R.current=void 0,clearTimeout(M.current),M.current=void 0},T=ke((H=!1)=>{var U;O(),E.current=!1,C.current=!1,((U=Ce.current)==null?void 0:U.id)===j&&(Ce.current=null,Ce.hiddenAt=performance.now()),x(H),g(!1),v(!1)}),D=ke(()=>{if(O(),d||h)return;const H=Ce.current,U=!!H&&H.id!==j;U?H.hide(!0):Ce.lastPos=null,Ce.current={id:j,hide:T},x(!1),g(U),v(!0)}),$=()=>{if(clearTimeout(M.current),M.current=void 0,d||h||R.current)return;Ce.current&&Ce.current.id!==j||performance.now()-Ce.hiddenAt<i||o<=0?D():R.current=setTimeout(D,o)},A=()=>{clearTimeout(R.current),R.current=void 0,!(!h||M.current)&&(M.current=setTimeout(()=>{M.current=void 0,!(E.current||P.current||C.current)&&T()},c))};l.useEffect(()=>()=>{var H;O(),((H=Ce.current)==null?void 0:H.id)===j&&(Ce.current=null)},[]),l.useEffect(()=>{d&&h&&T()},[d,h,T]),Lt(h,()=>T()),l.useEffect(()=>{if(!h)return;const H=K=>{var I;if((I=k.current)!=null&&I.contains(K.target)){C.current=!0;return}T()},U=()=>{C.current&&(C.current=!1,E.current||A())},ae=()=>T();return document.addEventListener("pointerdown",H,!0),document.addEventListener("pointerup",U,!0),document.addEventListener("pointercancel",U,!0),window.addEventListener("scroll",ae,{capture:!0,passive:!0}),()=>{document.removeEventListener("pointerdown",H,!0),document.removeEventListener("pointerup",U,!0),document.removeEventListener("pointercancel",U,!0),window.removeEventListener("scroll",ae,{capture:!0})}},[h,T]);const B=s.props["aria-describedby"],q=en(s,{"aria-describedby":w.mounted?L(B,j):B,onPointerEnter:H=>{H.pointerType!=="touch"&&(P.current=!0,$())},onPointerLeave:()=>{P.current=!1,A()},onFocus:H=>{Ko(H.currentTarget)&&$()},onBlur:()=>{!E.current&&!C.current&&T()}},_);return n.jsxs(n.Fragment,{children:[q,w.mounted&&y!=null&&y!==""&&n.jsx(it,{children:n.jsxs(Jo,{id:j,anchorRef:_,tipRef:k,presenceRef:w.ref,state:w.state,warm:b,instant:N,placement:r,offset:a,className:f,onPointerEnter:()=>{E.current=!0,clearTimeout(M.current),M.current=void 0},onPointerLeave:()=>{E.current=!1,C.current||A()},children:[y,S!=null&&S!==""&&n.jsx("kbd",{children:S})]})})]})}function Jo({id:t,anchorRef:e,tipRef:s,presenceRef:r,state:a,warm:o,instant:i,placement:c,offset:d,className:u,onPointerEnter:p,onPointerLeave:m,children:f}){const h=l.useRef(!0);return tn({open:!0,anchorRef:e,floatingRef:s,placement:c,offset:d,onPosition:b=>{const g=s.current;if(!g)return;g.style.setProperty("--bl",Math.max(0,b.x-b.anchor.left)+"px"),g.style.setProperty("--br",Math.max(0,b.anchor.right-(b.x+b.width))+"px");const N=Ce.lastPos;h.current&&o&&N&&Ne(g,[{translate:`${N.x-b.x}px ${N.y-b.y}px`},{translate:"0 0"}],{spring:"snappy"}),h.current=!1,Ce.lastPos={x:b.x,y:b.y}}}),n.jsx("div",{id:t,role:"tooltip",ref:b=>{s.current=b,r.current=b},className:L("ok-tip",u),"data-state":a,"data-warm":o||void 0,"data-instant":i||void 0,onPointerEnter:p,onPointerLeave:m,children:f})}const nn=l.createContext(null),Un=l.createContext(null),Vt='[data-ok-item]:not([aria-disabled="true"])',Qo=150,el=t=>{var e;return t.dataset.text??((e=t.querySelector(".ok-menu__label"))==null?void 0:e.textContent)??t.textContent??""},sn=l.forwardRef(function({focusOnOpen:e=null,bare:s=!1,className:r,children:a,onKeyDown:o,onPointerMove:i,onPointerLeave:c,onFocus:d,...u},p){const m=l.useContext(nn),f=l.useRef(null),{hlRef:h,moveTo:v}=qn(),[b,g]=l.useState(null),N=kr(),x=l.useRef(null),j=l.useRef(!1),_=ke(()=>j.current),k=ke(()=>{j.current=!1,g(null),v(null);const C=f.current;C&&C!==document.activeElement&&C.contains(document.activeElement)&&C.focus({preventScroll:!0})}),R=l.useMemo(()=>({highlight:v,openSub:b,setOpenSub:g,holding:_,clear:k}),[v,b,_,k]),M=()=>{var C;return Array.from(((C=f.current)==null?void 0:C.querySelectorAll(Vt))??[])};l.useEffect(()=>{if(!b)return;j.current=!1;let C=!1,w;const y=()=>{var D;return((D=document.getElementById(`${b}-sub`))==null?void 0:D.closest(".ok-popup"))??null},S=()=>{var D;return((D=f.current)==null?void 0:D.querySelector(`[aria-controls="${b}-sub"]`))??null},O=D=>{var B,q;if(!D||(B=y())!=null&&B.contains(D)||(q=S())!=null&&q.contains(D))return;const $=f.current,A=$!=null&&$.contains(D)?D.closest(Vt):null;A?A.focus({preventScroll:!0}):($!=null&&$.contains(D)||!C)&&k()},T=D=>{var H,U;const $={x:D.clientX,y:D.clientY},A=x.current;x.current=$,clearTimeout(w);const B=D.target,q=y();if(j.current=!1,!(!q||!B)){if(q.contains(B)){C=!0;return}if(!((H=S())!=null&&H.contains(B))){if(A&&Vo(A,$,q.getBoundingClientRect())){j.current=!0,w=setTimeout(()=>{j.current=!1,O(B)},Qo);return}(U=f.current)!=null&&U.contains(B)&&B.closest(Vt)||O(B)}}};return document.addEventListener("pointermove",T,!0),()=>{document.removeEventListener("pointermove",T,!0),clearTimeout(w),j.current=!1}},[b,k]),l.useEffect(()=>{var y;if(!e)return;const C=M(),w=e==="first"?C[0]:e==="last"?C[C.length-1]:null;(y=w??f.current)==null||y.focus({preventScroll:!0}),w||v(null)},[e]);const E=m==null?void 0:m.open;l.useEffect(()=>{E===!1&&g(null)},[E]);const P=C=>{if(o==null||o(C),C.defaultPrevented||!C.currentTarget.contains(C.target))return;const w=M(),y=w.length,S=w.indexOf(document.activeElement),O=T=>{C.preventDefault();const D=w[T];D&&(D.focus({preventScroll:!0}),D.scrollIntoView({block:"nearest"}))};if(C.key==="ArrowDown")O(S<0?0:(S+1)%y);else if(C.key==="ArrowUp")O(S<0?y-1:(S-1+y)%y);else if(C.key==="Home"||C.key==="PageUp")O(0);else if(C.key==="End"||C.key==="PageDown")O(y-1);else if(C.key==="Tab")m==null||m.close("tab");else if(xr(C)&&(C.key!==" "||N.pending())){const T=N.search(C.key,w.map(el),S);C.preventDefault(),T>=0&&O(T)}};return n.jsx(Un.Provider,{value:R,children:n.jsxs("div",{role:"menu","aria-orientation":"vertical",tabIndex:-1,...u,ref:xe(p,f),className:L("ok-menu ok-scroll",!s&&"ok-menu--static",r),onKeyDown:P,onPointerMove:C=>{i==null||i(C),b||(x.current={x:C.clientX,y:C.clientY})},onFocus:C=>{d==null||d(C),C.target===C.currentTarget&&v(null)},onPointerLeave:C=>{c==null||c(C),!b&&k()},children:[n.jsx("span",{className:"ok-menu__hl",ref:h,"aria-hidden":"true"}),a]})})}),rn=l.forwardRef(function({role:e="menuitem",icon:s,shortcut:r,tone:a,disabled:o,onSelect:i,closeOnSelect:c=!0,textValue:d,trailing:u,subId:p,className:m,children:f,onClick:h,onFocus:v,onPointerMove:b,...g},N){const x=l.useContext(Un),j=l.useContext(nn),_=a&&a!=="neutral"?a:void 0;return n.jsxs("button",{type:"button",role:e,tabIndex:-1,...g,ref:N,className:L("ok-menu__item",_&&`ok-menu__item--${_}`,m),"data-ok-item":"","data-icon":s!=null&&s!==!1?"":void 0,"data-tone":_,"data-text":d,"aria-disabled":o||void 0,onClick:k=>{if(o){k.preventDefault();return}h==null||h(k),!k.defaultPrevented&&(i==null||i(),c&&(j==null||j.close("select")))},onFocus:k=>{v==null||v(k),x==null||x.highlight(k.currentTarget),x&&!p&&x.openSub&&x.setOpenSub(null)},onPointerMove:k=>{if(b==null||b(k),!!x&&!(x.openSub&&x.openSub!==p&&x.holding())){if(o){x.clear();return}document.activeElement!==k.currentTarget&&k.currentTarget.focus({preventScroll:!0})}},children:[Hn(s),n.jsx("span",{className:"ok-menu__label",children:f}),r!=null&&n.jsx("span",{className:"ok-menu__meta",children:r}),u]})}),tl=l.forwardRef(function(e,s){return n.jsx(rn,{...e,ref:s})}),nl=l.forwardRef(function({checked:e,defaultChecked:s=!1,onCheckedChange:r,onSelect:a,closeOnSelect:o=!1,...i},c){const[d,u]=le(e,s,r),p=Vn(d,!Gn());return n.jsx(rn,{...i,ref:c,role:"menuitemcheckbox","aria-checked":p,closeOnSelect:o,onSelect:()=>{u(!d),a==null||a()},trailing:n.jsx(zn,{})})}),jr=l.createContext(null),sl=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,children:a,...o},i){const[c,d]=le(e,s,r),u=l.useMemo(()=>({value:c,set:d}),[c,d]);return n.jsx(jr.Provider,{value:u,children:n.jsx("div",{role:"group",...o,ref:i,children:a})})}),rl=l.forwardRef(function({value:e,onSelect:s,closeOnSelect:r=!1,...a},o){const i=l.useContext(jr),c=Vn((i==null?void 0:i.value)===e,!Gn());return n.jsx(rn,{...a,ref:o,role:"menuitemradio","aria-checked":c,closeOnSelect:r,onSelect:()=>{i==null||i.set(e),s==null||s()},trailing:n.jsx(zn,{})})}),al=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{role:"separator",...s,ref:r,className:L("ok-menu__sep",e)})}),ol=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{role:"presentation",...s,ref:r,className:L("ok-menu__heading",e)})}),ll=l.forwardRef(function({label:e,children:s,disabled:r,onKeyDown:a,...o},i){const c=l.useId(),d=l.useContext(Un),u=l.useRef(null),p=l.useRef(null),m=!!d&&d.openSub===c,[f,h]=l.useState(null),v=g=>{var N,x;if(!(r||!d)){if(m&&g){(x=(N=p.current)==null?void 0:N.querySelector(Vt))==null||x.focus({preventScroll:!0});return}h(g?"first":null),d.setOpenSub(c)}},b=()=>{var g;d==null||d.setOpenSub(null),(g=u.current)==null||g.focus({preventScroll:!0})};return l.useEffect(()=>{m||h(null)},[m]),n.jsxs(n.Fragment,{children:[n.jsx(rn,{...o,ref:xe(i,u),disabled:r,subId:c,closeOnSelect:!1,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?`${c}-sub`:void 0,onSelect:()=>v(!0),onPointerMove:()=>{!m&&!(d!=null&&d.holding())&&v(!1)},onKeyDown:g=>{a==null||a(g),g.key==="ArrowRight"&&(g.preventDefault(),v(!0))},trailing:n.jsx(he,{name:"chevron-right",className:"ok-menu__chevron"}),children:e}),n.jsx(xt,{open:m,anchorRef:u,placement:"right-start",offset:8,alignOffset:-6,className:"ok-popup--menu",onDismiss:g=>{g==="escape"&&b()},children:n.jsx(sn,{bare:!0,id:`${c}-sub`,ref:p,focusOnOpen:m?f:null,onKeyDown:g=>{g.key==="ArrowLeft"&&g.currentTarget.contains(g.target)&&(g.preventDefault(),b())},children:s})})]})}),il=l.forwardRef(function({trigger:e,children:s,open:r,defaultOpen:a=!1,onOpenChange:o,placement:i="bottom-start",offset:c=8,matchTriggerWidth:d=!0,id:u,...p},m){const[f,h]=le(r,a,o),[v,b]=l.useState("menu"),g=l.useRef(null),N=l.useId(),x=u??`${N}-menu`,j=M=>{b(M),h(!0)},_=M=>{var E;M&&((E=g.current)==null||E.focus({preventScroll:!0})),h(!1)},k=l.useMemo(()=>({open:f,close:()=>_(!0)}),[f,h]),R=en(e,{"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?x:void 0,"data-state":f?"open":"closed",onClick:M=>f?_(!1):j(M.detail===0?"first":"menu"),onKeyDown:M=>{(M.key==="ArrowDown"||M.key==="ArrowUp")&&(M.preventDefault(),j(M.key==="ArrowDown"?"first":"last"))}},g);return n.jsxs(nn.Provider,{value:k,children:[R,n.jsx(xt,{open:f,anchorRef:g,placement:i,offset:c,matchWidth:d?"min":!1,className:"ok-popup--menu",onDismiss:M=>_(M==="escape"),children:n.jsx(sn,{...p,bare:!0,id:x,ref:m,focusOnOpen:f?v:null,children:s})})]})}),cl=10,dl=l.forwardRef(function({children:e,menu:s,open:r,onOpenChange:a,disabled:o,longPressMs:i=500,id:c,...d},u){const[p,m]=le(r,!1,a),[f,h]=l.useState({x:0,y:0}),v=l.useRef(f);v.current=f;const b=l.useRef({getBoundingClientRect:()=>{const{x:w,y}=v.current;return{left:w,top:y,right:w,bottom:y,width:0,height:0}}}),g=l.useRef(null),N=l.useRef(null),x=l.useRef(null),j=l.useRef(null),_=l.useId(),k=c??`${_}-menu`,R=(w,y)=>{const S=document.activeElement;S!=null&&S.closest(".ok-popup")||(x.current=S),h({x:w,y}),m(!0)},M=w=>{var y;w&&((y=x.current)!=null&&y.isConnected)&&x.current.focus({preventScroll:!0}),m(!1)};ge(()=>{var w;(w=g.current)==null||w.call(g)},[f]);const E=()=>{j.current&&(clearTimeout(j.current.timer),j.current=null)};l.useEffect(()=>E,[]),l.useEffect(()=>{if(!p)return;const w=y=>{y.target instanceof Element&&y.target.closest(".ok-popup")||m(!1)};return window.addEventListener("scroll",w,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",w,{capture:!0})},[p,m]);const P=l.useMemo(()=>({open:p,close:()=>M(!0)}),[p,m]),C=en(e,{"data-state":p?"open":"closed",className:"ok-context-area",onContextMenu:w=>{if(!o)if(w.preventDefault(),E(),w.clientX===0&&w.clientY===0){const y=w.target.getBoundingClientRect();R(y.left,y.bottom)}else R(w.clientX,w.clientY)},onPointerDown:w=>{if(o||w.pointerType!=="touch")return;E();const{clientX:y,clientY:S}=w;j.current={x:y,y:S,timer:setTimeout(()=>{j.current=null,R(y,S)},i)}},onPointerMove:w=>{const y=j.current;y&&Math.hypot(w.clientX-y.x,w.clientY-y.y)>cl&&E()},onPointerUp:E,onPointerCancel:E,onPointerLeave:E},N);return n.jsxs(nn.Provider,{value:P,children:[C,n.jsx(xt,{open:p,anchorRef:b,placement:"bottom-start",offset:2,className:"ok-popup--menu",updateRef:g,onDismiss:w=>M(w==="escape"),children:n.jsx(sn,{...d,bare:!0,id:k,ref:u,focusOnOpen:p?"menu":null,children:s})})]})}),Ut=t=>"options"in t,lt=t=>t.flatMap(e=>Ut(e)?e.options:[e]),bt=t=>t.textValue??(typeof t.label=="string"||typeof t.label=="number"?String(t.label):t.value);function vt(t,e,s){const r=t.length;for(let a=1;a<=r;a++){const o=((e+s*a)%r+r)%r;if(!t[o].disabled)return o}return-1}const Mt=t=>vt(t,-1,1),Mn=t=>vt(t,t.length,-1),Yn=(t,e)=>`${t}-opt-${e}`,wr=l.forwardRef(function({id:e,entries:s,activeIndex:r,onActiveChange:a,isSelected:o,onPick:i,multi:c,lockWidth:d,followActive:u,className:p,...m},f){const h=l.useRef(null),{hlRef:v,moveTo:b}=qn(),g=!Gn(),N=lt(s).filter(k=>o(k.value)).map(k=>k.value),x=new Set(JSON.parse(Vn(JSON.stringify(N),g)));ge(()=>{var R;const k=h.current;if(k){if(d){k.style.minWidth="",k.setAttribute("data-measuring","");const M=Math.ceil(k.getBoundingClientRect().width);k.removeAttribute("data-measuring"),M>0&&(k.style.minWidth=M+"px")}(R=k.querySelector('[aria-selected="true"]'))==null||R.scrollIntoView({block:"nearest"})}},[]),l.useEffect(()=>{var R;const k=r>=0?((R=h.current)==null?void 0:R.querySelector(`[data-index="${r}"]`))??null:null;b(k),k&&u&&k.scrollIntoView({block:"nearest"})},[r,u,b,s]);let j=-1;const _=k=>{j+=1;const R=j,M=x.has(k.value),E=k.tone&&k.tone!=="neutral"?k.tone:void 0;return n.jsxs("div",{role:"option",id:Yn(e,R),className:L("ok-menu__item",E&&`ok-menu__item--${E}`),"data-index":R,"data-value":k.value,"data-icon":k.icon!=null&&k.icon!==!1?"":void 0,"data-tone":E,"data-active":R===r||void 0,"aria-selected":M,"aria-disabled":k.disabled||void 0,onPointerMove:()=>{const P=k.disabled?-1:R;P!==r&&a(P)},onClick:()=>{k.disabled||i(k)},children:[Hn(k.icon),n.jsx("span",{className:"ok-menu__label",children:k.label}),k.meta!=null&&n.jsx("span",{className:"ok-menu__meta",children:k.meta}),n.jsx(zn,{})]},k.value)};return n.jsxs("div",{role:"listbox","aria-multiselectable":c||void 0,tabIndex:-1,...m,id:e,ref:xe(f,h),className:L("ok-menu ok-scroll",p),"data-check":c?void 0:"instant",onMouseDown:k=>k.preventDefault(),onPointerLeave:()=>a(-1),children:[n.jsx("span",{className:"ok-menu__hl",ref:v,"aria-hidden":"true"}),s.map((k,R)=>Ut(k)?n.jsxs("div",{role:"group","aria-labelledby":`${e}-group-${R}`,children:[n.jsx("div",{className:"ok-menu__heading",id:`${e}-group-${R}`,role:"presentation",children:k.label}),k.options.map(_)]},`group-${R}`):_(k))]})}),Nr=l.forwardRef(function({multi:e,selected:s,onPick:r,display:a,options:o,placeholder:i,size:c="md",block:d,disabled:u,required:p,invalid:m,name:f,form:h,open:v,defaultOpen:b=!1,onOpenChange:g,placement:N="bottom-start",id:x,className:j,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const P=pe().messages.select.placeholder,C=i===void 0?P:i,w=l.useContext(Ie),y=_e({id:x,disabled:u,required:p,invalid:m,"aria-describedby":R,"aria-labelledby":k,"aria-label":_}),{disabled:S,invalid:O}=y,T=d??!!w,[D,$]=le(v,b,g),[A,B]=l.useState(-1),[q,H]=l.useState(!1),U=l.useRef(null),K=`${l.useId()}-list`,I=l.useMemo(()=>lt(o),[o]),F=kr(),V=I.findIndex(z=>s.includes(z.value)&&!z.disabled),te=z=>{B(z),H(z>=0),$(!0)},Z=()=>$(!1),ne=z=>{z>=0&&(B(z),H(!0))},ce=z=>{r(z),e||Z()},W=z=>{if(S)return;const se=z.key,de=xr(z)&&(se!==" "||F.pending());if(!D){if(se==="ArrowDown"||se==="ArrowUp"||se==="Enter"||se===" ")z.preventDefault(),te(V>=0?V:se==="ArrowUp"?Mn(I):Mt(I));else if(de){z.preventDefault();const Q=F.search(se,I.map(bt),V);te(Q>=0&&!I[Q].disabled?Q:V)}return}if(se==="ArrowDown"||se==="ArrowUp")z.preventDefault(),A<0&&V>=0?ne(V):ne(se==="ArrowDown"?vt(I,A,1):vt(I,A<0?I.length:A,-1));else if(se==="Home"||se==="PageUp")z.preventDefault(),ne(Mt(I));else if(se==="End"||se==="PageDown")z.preventDefault(),ne(Mn(I));else if(de){z.preventDefault();const Q=F.search(se,I.map(bt),A);Q>=0&&!I[Q].disabled&&ne(Q)}else se==="Enter"||se===" "?(z.preventDefault(),A>=0&&I[A]&&!I[A].disabled?ce(I[A]):Z()):se==="Tab"&&Z()};return n.jsxs("div",{...M,ref:E,className:L("ok-select",T&&"ok-select--block",j),"data-size":c,"data-disabled":S||void 0,children:[n.jsxs("button",{type:"button",ref:U,id:y.id,"data-label-focus":"",className:"ok-select__trigger ok-focusable",role:"combobox","aria-haspopup":"listbox","aria-expanded":D,"aria-controls":D?K:void 0,"aria-activedescendant":D&&A>=0?Yn(K,A):void 0,"aria-label":_,"aria-labelledby":k,"aria-describedby":y.describedBy,"aria-invalid":O||void 0,"aria-required":y.required||void 0,disabled:S,"data-state":D?"open":"closed",onClick:()=>D?Z():te(-1),onKeyDown:W,onKeyUp:z=>{z.key===" "&&z.preventDefault()},children:[n.jsx("span",{className:"ok-select__value","data-placeholder":s.length?void 0:"",children:s.length?a:C}),n.jsx(he,{name:"chevron-down"})]}),f&&(e?s.map(z=>n.jsx("input",{type:"hidden",name:f,value:z,form:h,disabled:S},z)):n.jsx("input",{type:"hidden",name:f,value:s[0]??"",form:h,disabled:S})),n.jsx(xt,{open:D,anchorRef:U,placement:N,matchWidth:"min",className:"ok-popup--menu",onDismiss:Z,children:n.jsx(wr,{id:K,entries:o,activeIndex:A,onActiveChange:z=>{B(z),H(!1)},followActive:q,isSelected:z=>s.includes(z),onPick:ce,multi:e,lockWidth:!0,"aria-label":_,"aria-labelledby":k??(_||w==null?void 0:w.labelId)})})]})}),ul=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,...a},o){const[i,c]=le(e,s),d=ke(r),u=l.useMemo(()=>lt(a.options).find(p=>p.value===i),[a.options,i]);return n.jsx(Nr,{...a,ref:o,multi:!1,selected:i==null?[]:[i],display:u?u.label:i,onPick:p=>{p.value!==i&&(c(p.value),d(p.value,p))}})}),fl=[],pl=l.forwardRef(function({value:e,defaultValue:s=fl,onChange:r,display:a="chips",maxChips:o=2,renderValue:i,...c},d){const{messages:u}=pe(),[p,m]=le(e,s,r),f=l.useMemo(()=>{const v=lt(c.options);return p.map(b=>v.find(g=>g.value===b)).filter(Boolean)},[c.options,p]);let h;return i?h=i(f):a==="count"?h=u.select.count(p.length):h=n.jsxs("span",{className:"ok-select__chips",children:[f.slice(0,o).map(v=>n.jsx("span",{className:"ok-select__chip",children:v.label},v.value)),f.length>o&&n.jsxs("span",{className:"ok-select__chip ok-select__chip--more",children:["+",f.length-o]})]}),n.jsx(Nr,{...c,ref:d,multi:!0,selected:p,display:h,onPick:v=>m(p.includes(v.value)?p.filter(b=>b!==v.value):[...p,v.value])})}),hl=(t,e)=>bt(t).toLowerCase().includes(e.trim().toLowerCase()),Rr=l.forwardRef(function({options:e,value:s,defaultValue:r=null,onChange:a,inputValue:o,defaultInputValue:i,onInputChange:c,filter:d=hl,loading:u=!1,loadingText:p,emptyText:m,freeSolo:f=!1,clearable:h=!1,icon:v,size:b="md",invalid:g,name:N,form:x,disabled:j,required:_,open:k,defaultOpen:R=!1,onOpenChange:M,placement:E="bottom-start",className:P,style:C,rootRef:w,rootClassName:y,rootStyle:S,id:O,onKeyDown:T,onBlur:D,onClick:$,"aria-describedby":A,...B},q){const{messages:H}=pe(),U=p===void 0?H.combobox.loading:p,ae=m===void 0?H.combobox.empty:m,K=l.useContext(Ie),I=_e({id:O,disabled:j,required:_,invalid:g,"aria-describedby":A}),{disabled:F,invalid:V}=I,te=l.useMemo(()=>lt(e),[e]),Z=re=>{if(re==null)return"";const be=te.find(Re=>Re.value===re);return be?bt(be):f?re:""},[ne,ce]=le(s,r),W=ke(a),[z,se]=le(o??(f&&s!=null?s:void 0),i??Z(r),c),[de,Q]=le(k,R,M),[oe,X]=l.useState(-1),[Y,G]=l.useState(!1),[ie,ue]=l.useState(!1),we=l.useRef(null),Pe=l.useRef(null),Te=`${l.useId()}-list`,je=(re,be)=>!d||!be||!re.trim()?e:e.map(Re=>Ut(Re)?{...Re,options:Re.options.filter(Ke=>d(Ke,re))}:Re).filter(Re=>Ut(Re)?Re.options.length>0:d(Re,re)),Me=je(z,ie),ve=lt(Me),Ue=(re,be)=>{re!==ne&&(ce(re),W(re,be))},Ye=(re,be)=>{X(re),G(be),Q(!0)},He=()=>{Q(!1),X(-1),ue(!1)},et=re=>{se(bt(re)),Ue(f?bt(re):re.value,re),He()},Xe=ve.findIndex(re=>re.value===ne&&!re.disabled),ee=ve.map(re=>re.disabled?`${re.value}`:re.value).join("\0");l.useEffect(()=>{!de||!ie||u||(X(Mt(ve)),G(!0))},[ee,u]);const J=re=>{if(T==null||T(re),re.defaultPrevented||F)return;const be=re.key;be==="ArrowDown"||be==="ArrowUp"?(re.preventDefault(),de?(G(!0),X(be==="ArrowDown"?vt(ve,oe,1):vt(ve,oe<0?ve.length:oe,-1))):Ye(Xe>=0?Xe:be==="ArrowDown"?Mt(ve):Mn(ve),!0)):be==="Enter"?de&&oe>=0&&ve[oe]&&!ve[oe].disabled?(re.preventDefault(),et(ve[oe])):de&&He():be==="Tab"&&de&&He()},me=u||ve.length>0||ae!=null,fe=de&&me&&!F;return n.jsxs("div",{ref:xe(w,we),className:L("ok-input ok-combobox",b==="lg"&&"ok-input--lg",z&&h&&"has-value",y,P),style:{...S,...C},"data-size":b,"data-disabled":F||void 0,"data-invalid":V||void 0,onClick:re=>{var be;re.target===re.currentTarget&&((be=Pe.current)==null||be.focus())},children:[v!=null&&n.jsx("span",{className:"ok-input__icon ok-combobox__icon",children:Hn(v)}),n.jsx("input",{type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,...B,ref:xe(q,Pe),id:I.id,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":fe,"aria-controls":fe?Te:void 0,"aria-activedescendant":fe&&oe>=0?Yn(Te,oe):void 0,"aria-invalid":V||void 0,"aria-describedby":I.describedBy,"aria-busy":u||void 0,disabled:F,required:I.required||void 0,name:f?N:void 0,form:f?x:void 0,value:z,onChange:re=>{const be=re.target.value;se(be),ue(!0),f?Ue(be):be===""&&ne!=null&&Ue(null),Ye(Mt(lt(je(be,!0))),!0)},onClick:re=>{$==null||$(re),de||Ye(-1,!1)},onKeyDown:J,onBlur:re=>{D==null||D(re),de&&He(),!f&&z!==Z(ne)&&se(Z(ne))}}),h&&n.jsx("button",{type:"button",className:"ok-input__clear","aria-label":H.common.clear,tabIndex:-1,disabled:F||!z,onMouseDown:re=>re.preventDefault(),onClick:()=>{var re;se(""),Ue(f?"":null),(re=Pe.current)==null||re.focus()},children:n.jsx(he,{name:"x"})}),N&&!f&&n.jsx("input",{type:"hidden",name:N,form:x,value:ne??"",disabled:F}),n.jsxs(xt,{open:fe,anchorRef:we,placement:E,matchWidth:"min",className:"ok-popup--menu",onDismiss:He,onMouseDown:re=>re.preventDefault(),children:[u&&n.jsx("div",{className:"ok-menu__empty",role:"status",children:U}),!u&&ve.length===0&&n.jsx("div",{className:"ok-menu__empty",role:"status",children:ae}),n.jsx(wr,{id:Te,entries:Me,hidden:ve.length===0,activeIndex:oe,onActiveChange:re=>{X(re),G(!1)},followActive:Y,isSelected:re=>!f&&re===ne,onPick:et,"aria-label":B["aria-label"]??H.combobox.listbox,"aria-labelledby":B["aria-labelledby"]??(B["aria-label"]||K==null?void 0:K.labelId)})]})]})}),ml=l.forwardRef(function(e,s){return n.jsx(Rr,{...e,ref:s,freeSolo:!0})}),Ge=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),qe=(t,e)=>new Date(t.getFullYear(),t.getMonth(),t.getDate()+e);function wt(t,e){const s=new Date(t.getFullYear(),t.getMonth()+e,1),r=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return new Date(s.getFullYear(),s.getMonth(),Math.min(t.getDate(),r))}const $e=(t,e)=>!!t&&!!e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),Nt=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),vn=(t,e=2)=>String(t).padStart(e,"0"),Be=t=>`${vn(t.getFullYear(),4)}-${vn(t.getMonth()+1)}-${vn(t.getDate())}`;function Xn(t){const e=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*[-/.月]\s*(\d{1,2})\s*日?\s*$/.exec(t);if(!e)return null;const[s,r,a]=[Number(e[1]),Number(e[2]),Number(e[3])],o=new Date(s,r-1,a);return o.setFullYear(s),o.getFullYear()===s&&o.getMonth()===r-1&&o.getDate()===a?o:null}const Mr=l.forwardRef(function({anchorDate:e,isSelected:s,rangePart:r,onPick:a,onHoverDate:o,onFocusDate:i,multiselectable:c,month:d,defaultMonth:u,onMonthChange:p,min:m,max:f,isDateDisabled:h,weekStartsOn:v=1,locale:b,today:g,autoFocus:N,disabled:x,className:j,"aria-label":_,...k},R){const{locale:M,messages:E}=pe(),P=b??M,C=l.useMemo(()=>Ge(g??new Date),[g]),w=l.useMemo(()=>m?Ge(m):null,[m]),y=l.useMemo(()=>f?Ge(f):null,[f]),S=X=>w&&X<w?w:y&&X>y?y:X,O=X=>!!x||!!w&&X<w||!!y&&X>y||!!(h!=null&&h(X)),T=S(Ge(e??u??d??C)),[D,$]=l.useState(T),[A,B]=le(d,u??T,p),q=new Date(A.getFullYear(),A.getMonth(),1),H=l.useRef(null),U=l.useRef(!!N),ae=l.useId(),K=e?Be(e):"";l.useEffect(()=>{if(!e)return;const X=Ge(e);$(X),Nt(X,A)||B(X)},[K]);const I=Nt(D,q)?D:q,F=Be(I);l.useEffect(()=>{var X,Y;U.current&&(U.current=!1,(Y=(X=H.current)==null?void 0:X.querySelector(`[data-date="${F}"]`))==null||Y.focus({preventScroll:!0}))});const V=X=>{const Y=S(X);U.current=!0,$(Y),Nt(Y,q)||B(Y)},te=X=>{const Y=wt(q,X);B(Y),$(S(wt(I,X)))},Z=X=>{const Y=X.target.closest("[data-date]");if(!Y)return;const G=Xn(Y.dataset.date),ie=(G.getDay()-v+7)%7;let ue=null;switch(X.key){case"ArrowLeft":ue=qe(G,-1);break;case"ArrowRight":ue=qe(G,1);break;case"ArrowUp":ue=qe(G,-7);break;case"ArrowDown":ue=qe(G,7);break;case"Home":ue=qe(G,-ie);break;case"End":ue=qe(G,6-ie);break;case"PageUp":ue=wt(G,X.shiftKey?-12:-1);break;case"PageDown":ue=wt(G,X.shiftKey?12:1);break;default:return}X.preventDefault(),V(ue)},ne=l.useMemo(()=>new Intl.DateTimeFormat(P,{year:"numeric",month:"long"}),[P]),ce=l.useMemo(()=>new Intl.DateTimeFormat(P,{dateStyle:"full"}),[P]),W=l.useMemo(()=>{const X=new Intl.DateTimeFormat(P,{weekday:"narrow"}),Y=new Intl.DateTimeFormat(P,{weekday:"long"});return Array.from({length:7},(G,ie)=>{const ue=new Date(2023,0,1+(ie+v)%7);return{short:X.format(ue),long:Y.format(ue)}})},[P,v]),z=(q.getDay()-v+7)%7,se=qe(q,-z),de=Array.from({length:6},(X,Y)=>Array.from({length:7},(G,ie)=>qe(se,Y*7+ie))),Q=!!w&&qe(q,-1)<w,oe=!!y&&wt(q,1)>y;return n.jsxs("div",{...k,ref:xe(R,H),className:L("ok-calendar",j),"data-disabled":x||void 0,children:[n.jsxs("div",{className:"ok-calendar__head",children:[n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":E.calendar.prevMonth,disabled:x||Q,onClick:()=>te(-1),children:n.jsx(he,{children:n.jsx("path",{d:"M12.5 4.5L7 10l5.500 5.500"})})}),n.jsx("div",{className:"ok-calendar__title",id:`${ae}-title`,"aria-live":"polite",children:ne.format(q)}),n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":E.calendar.nextMonth,disabled:x||oe,onClick:()=>te(1),children:n.jsx(he,{name:"chevron-right"})})]}),n.jsxs("table",{role:"grid",className:"ok-calendar__grid","aria-label":_,"aria-labelledby":_?void 0:`${ae}-title`,"aria-multiselectable":c||void 0,onKeyDown:Z,onPointerLeave:()=>o==null?void 0:o(null),children:[n.jsx("thead",{children:n.jsx("tr",{children:W.map(X=>n.jsxs("th",{scope:"col",abbr:X.long,children:[n.jsx("span",{"aria-hidden":"true",children:X.short}),n.jsx("span",{className:"ok-sr",children:X.long})]},X.long))})}),n.jsx("tbody",{children:de.map(X=>n.jsx("tr",{children:X.map(Y=>{const G=Be(Y),ie=O(Y),ue=s(Y),we=r==null?void 0:r(Y);return n.jsx("td",{role:"gridcell","aria-selected":ue,"aria-disabled":ie||void 0,"data-range":we,children:n.jsx("button",{type:"button",className:"ok-calendar__day ok-focusable",tabIndex:G===F?0:-1,"data-date":G,"data-autofocus":N&&G===F?"":void 0,"data-outside":Nt(Y,q)?void 0:"","data-today":$e(Y,C)?"":void 0,"data-selected":ue?"":void 0,"aria-label":ce.format(Y)+($e(Y,C)?E.calendar.todaySuffix:""),"aria-current":$e(Y,C)?"date":void 0,"aria-pressed":ue,"aria-disabled":ie||void 0,onFocus:()=>{$(Y),i==null||i(Y)},onPointerEnter:()=>o==null?void 0:o(Y),onClick:()=>{ie||($(Y),Nt(Y,q)||(U.current=!0,B(Y)),a(Y))},children:Y.getDate()})},G)})},Be(X[0])))})]})]})}),Sr=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,...a},o){const[i,c]=le(e,s,r);return n.jsx(Mr,{...a,ref:o,anchorDate:i,isSelected:d=>$e(d,i),onPick:d=>c(d)})}),bl={start:null,end:null},Cr=l.forwardRef(function({value:e,defaultValue:s=bl,onChange:r,...a},o){const[i,c]=le(e,s,r),[d,u]=l.useState(null),[p,m]=l.useState(null),{start:f,end:h}=i,v=d??p,b=h??(f&&v?v:null),g=f&&b?f<=b?f:b:f,N=f&&b&&f<=b?b:f;return n.jsx(Mr,{...a,ref:o,multiselectable:!0,anchorDate:f,isSelected:x=>$e(x,f)||$e(x,h)||!!f&&!!h&&x>f&&x<h,rangePart:x=>{if(!(!g||!N))return $e(g,N)?$e(x,g)?"single":void 0:$e(x,g)?"start":$e(x,N)?"end":x>g&&x<N?"in":void 0},onHoverDate:u,onFocusDate:x=>{u(null),m(x)},onPick:x=>{c(!f||h?{start:x,end:null}:x<f?{start:x,end:f}:{start:f,end:x})}})});function js(t,e){const s=e(t);if(s)return new Date(s.getFullYear(),s.getMonth(),1);const r=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*([-/.月])?\s*$/.exec(t);if(!r)return null;const[,a,o,i]=r;if(o.length===1&&!i&&(o==="0"||o==="1"))return null;const c=Number(o);return c>=1&&c<=12?new Date(Number(a),c-1,1):null}const vl=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),Er=()=>n.jsxs(he,{children:[n.jsx("rect",{x:"3.500",y:"4.500",width:"13",height:"12",rx:"2.500"}),n.jsx("path",{d:"M3.500 8.500h13M7 3v3M13 3v3"})]}),gl=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,parse:a=Xn,format:o=Be,min:i,max:c,isDateDisabled:d,weekStartsOn:u,locale:p,today:m,size:f="md",invalid:h,name:v,form:b,disabled:g,required:N,readOnly:x,open:j,defaultOpen:_=!1,onOpenChange:k,placement:R="bottom-start",className:M,style:E,placeholder:P,id:C,onBlur:w,onKeyDown:y,"aria-describedby":S,...O},T){const{messages:D}=pe(),$=P??D.datePicker.placeholder,A=_e({id:C,disabled:g,required:N,invalid:h,"aria-describedby":S}),{disabled:B,invalid:q}=A,[H,U]=le(e,s,r),[ae,K]=le(j,_,k),[I,F]=l.useState(H?o(H):""),V=l.useRef(null),te=l.useRef(null),Z=`${l.useId()}-calendar`,[ne,ce]=l.useState(!1),[W,z]=l.useState(()=>Ge(H??m??new Date));l.useEffect(()=>{if(!ae)return;const G=js(I,a);z(Ge(G??H??m??new Date))},[ae]),l.useEffect(()=>{ae||ce(!1)},[ae]);const se=()=>{ae||B||x||(ce(!0),K(!0))},de=G=>{F(G);const ie=js(G,a);ie&&!vl(ie,W)&&z(ie)},Q=H?Be(H):"";l.useEffect(()=>{F(H?o(H):"")},[Q]);const oe=G=>!(i&&G<Ge(i))&&!(c&&G>Ge(c))&&!(d!=null&&d(G)),X=(()=>{if(I.trim()==="")return null;const G=a(I);return G&&oe(G)?G:H&&I===o(H)?H:null})(),Y=()=>{if(I.trim()===""){H&&U(null);return}const G=a(I);G&&oe(G)?$e(G,H)?F(o(G)):U(G):F(H?o(H):"")};return n.jsxs("div",{ref:xe(T,V),className:L("ok-input ok-datepicker",f==="lg"&&"ok-input--lg",M),style:E,"data-size":f,"data-disabled":B||void 0,"data-invalid":q||void 0,children:[n.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"off",...O,id:A.id,placeholder:$,disabled:B,readOnly:x,required:A.required||void 0,"aria-invalid":q||void 0,"aria-describedby":A.describedBy,ref:te,"aria-haspopup":"dialog","aria-expanded":ae,"aria-controls":ae?Z:void 0,value:I,onChange:G=>de(G.target.value),onClick:se,onBlur:G=>{var ue,we;w==null||w(G),Y();const ie=G.relatedTarget;ae&&ne&&!(ie&&((ue=V.current)!=null&&ue.contains(ie)||(we=document.getElementById(Z))!=null&&we.contains(ie)))&&K(!1)},onKeyDown:G=>{var ie,ue;y==null||y(G),!G.defaultPrevented&&(G.key==="Enter"?(Y(),ae&&ne&&K(!1)):G.key==="Escape"&&ae?(G.preventDefault(),K(!1)):G.key==="ArrowDown"&&G.altKey&&!B&&!x?(G.preventDefault(),ce(!1),K(!0)):G.key==="ArrowDown"&&ae&&(G.preventDefault(),(ue=(ie=document.getElementById(Z))==null?void 0:ie.querySelector('.ok-calendar__day[tabindex="0"]'))==null||ue.focus()))}}),v&&n.jsx("input",{type:"hidden",name:v,form:b,value:Q,disabled:B}),n.jsx(Wn,{id:Z,open:ae,onOpenChange:G=>{G&&ce(!1),K(G)},autoFocus:!ne,anchorRef:V,placement:R,"aria-label":D.datePicker.dialog,className:"ok-popover--calendar",trigger:n.jsx("button",{type:"button",className:"ok-datepicker__btn ok-focusable","aria-label":D.datePicker.open,disabled:B||x,children:n.jsx(Er,{})}),children:({close:G})=>n.jsx(Sr,{autoFocus:!ne,value:X,month:W,onMonthChange:z,onChange:ie=>{var ue;U(ie),ne?(K(!1),(ue=te.current)==null||ue.focus()):G()},min:i,max:c,isDateDisabled:d,weekStartsOn:u,locale:p,today:m})})]})}),xl={start:null,end:null},kl=l.forwardRef(function({value:e,defaultValue:s=xl,onChange:r,placeholder:a,startName:o,endName:i,form:c,separator:d=" – ",format:u=Be,min:p,max:m,isDateDisabled:f,weekStartsOn:h,locale:v,today:b,size:g="md",invalid:N,disabled:x,required:j,open:_,defaultOpen:k=!1,onOpenChange:R,placement:M="bottom-start",className:E,id:P,"aria-label":C,"aria-labelledby":w,"aria-describedby":y,...S},O){const{messages:T}=pe(),D=a===void 0?T.datePicker.rangePlaceholder:a,$=l.useContext(Ie),A=_e({id:P,disabled:x,required:j,invalid:N,"aria-describedby":y,"aria-labelledby":w,"aria-label":C}),{disabled:B,invalid:q}=A,[H,U]=le(e,s,r),[ae,K]=le(_,k,R),[I,F]=l.useState(null);l.useEffect(()=>{ae||F(null)},[ae]);const{start:V,end:te}=H,Z=ae&&I||H,ne=Z.start?`${u(Z.start)}${d}${Z.end?u(Z.end):"…"}`:null,ce=l.useRef(null),W=`${l.useId()}-value`,[z,se]=l.useState(!1);l.useEffect(()=>{var oe,X;se(!!((X=(oe=ce.current)==null?void 0:oe.labels)!=null&&X.length))});const Q=[(!!C||!!w||!!($!=null&&$.labelId)||z)&&W,A.describedBy].filter(Boolean).join(" ")||void 0;return n.jsxs(n.Fragment,{children:[n.jsx(Wn,{open:ae,onOpenChange:K,placement:M,"aria-label":T.datePicker.rangeDialog,className:"ok-popover--calendar",trigger:n.jsxs("button",{type:"button",...S,ref:xe(O,ce),id:A.id,className:L("ok-input ok-daterange ok-focusable",g==="lg"&&"ok-input--lg",E),"data-size":g,"data-label-focus":"","data-invalid":q||void 0,"aria-label":C,"aria-labelledby":w,"aria-describedby":Q,"aria-invalid":q||void 0,"aria-required":A.required||void 0,disabled:B,children:[n.jsx("span",{className:"ok-daterange__value",id:W,"data-placeholder":ne?void 0:"",children:ne??D}),n.jsx(Er,{})]}),children:({close:oe})=>n.jsx(Cr,{autoFocus:!0,value:I??H,onChange:X=>{X.start&&X.end?(F(null),U(X),oe()):F(X)},min:p,max:m,isDateDisabled:f,weekStartsOn:h,locale:v,today:b})}),o&&n.jsx("input",{type:"hidden",name:o,form:c,value:V?Be(V):"",disabled:B}),i&&n.jsx("input",{type:"hidden",name:i,form:c,value:te?Be(te):"",disabled:B})]})}),yl=l.forwardRef(function({variant:e="body",as:s="span",tone:r="default",truncate:a,lineClamp:o,align:i,className:c,style:d,...u},p){const m=s,f=o&&o>0?{"--ok-clamp":o}:void 0;return n.jsx(m,{ref:p,className:L("ok-text",`ok-t-${e}`,c),"data-tone":r==="default"?void 0:r,"data-truncate":a?"":void 0,"data-clamp":f?"":void 0,"data-align":i,style:f?{...f,...d}:d,...u})}),_l=l.forwardRef(function({level:e=2,variant:s,tone:r="default",truncate:a,align:o,className:i,...c},d){const u=`h${e}`;return n.jsx(u,{ref:d,className:L("ok-text ok-heading",`ok-t-${s??`h${e}`}`,i),"data-tone":r==="default"?void 0:r,"data-truncate":a?"":void 0,"data-align":o,...c})}),jl=l.forwardRef(function({as:e="div",size:s="md",className:r,...a},o){const i=e;return n.jsx(i,{ref:o,className:L("ok-panel",s!=="md"&&`ok-panel--${s}`,r),...a})}),wl=t=>t===void 0?void 0:typeof t=="number"?String(t):t,Ar=l.forwardRef(function({src:e,alt:s,ratio:r,fit:a="cover",radius:o=3,fallback:i,placeholder:c="skeleton",loading:d="lazy",children:u,className:p,style:m,onLoad:f,onError:h,decoding:v="async",...b},g){const N=l.useRef(null),[x,j]=l.useState({src:e,status:"loading"}),_=u!=null&&u!==!1;let k;e?k=x.src===e?x.status:"loading":k=_?"content":"empty",l.useEffect(()=>{const w=N.current;e&&w&&w.complete&&w.naturalWidth>0&&j({src:e,status:"loaded"})},[e]);const R=w=>{j({src:e,status:"loaded"}),f==null||f(w)},M=w=>{j({src:e,status:"error"}),h==null||h(w)},P=k==="content"||k==="error"||k==="empty"?s?{role:"img","aria-label":s}:{"aria-hidden":!0}:null,C=wl(r);return n.jsxs("span",{ref:g,className:L("ok-image",p),"data-status":k,"data-fit":a,"data-radius":o,"data-placeholder":c,"data-ratio":C!==void 0?"":void 0,style:C!==void 0?{aspectRatio:C,...m}:m,...P,children:[e&&k!=="error"&&n.jsx("img",{...b,ref:N,className:"ok-image__img",src:e,alt:s,loading:d,decoding:v,onLoad:R,onError:M}),(k==="error"||k==="empty")&&n.jsx("span",{className:"ok-image__fallback",children:i??n.jsx(he,{name:"image",className:"ok-image__icon"})}),_&&n.jsx("span",{className:e?"ok-image__overlay":"ok-image__content",children:u})]})}),Nl=l.forwardRef(function({as:e="div",size:s="md",href:r,target:a,rel:o,interactive:i,disabled:c,chevron:d,className:u,children:p,...m},f){const h=r!==void 0,v=!h&&!!i,b=h?"a":v?"button":e,g=v?"span":"div",N=h?{href:r,target:a,rel:o}:v?{type:"button",disabled:c}:null;return n.jsx(b,{ref:f,className:L("ok-card",s!=="md"&&`ok-card--${s}`,(h||v)&&"ok-card--interactive ok-focusable",d&&"ok-card--chev",u),...N,...m,children:d?n.jsxs(n.Fragment,{children:[n.jsx(g,{className:"ok-card__main",children:p}),n.jsx(he,{name:"chevron-right",className:"ok-card__chev"})]}):p})}),Rl=l.forwardRef(function({href:e,className:s,...r},a){const o=e!==void 0?"a":"button",i=e!==void 0?{href:e}:{type:"button"};return n.jsx(o,{ref:a,className:L("ok-card__link",s),...i,...r})}),Ml=l.forwardRef(function({title:e,description:s,titleAs:r="h3",titleId:a,actions:o,className:i,children:c,...d},u){return n.jsxs("div",{ref:u,className:L("ok-card__header",i),...d,children:[n.jsxs("div",{className:"ok-card__heading",children:[e!=null&&n.jsx(r,{id:a,className:"ok-card__title",children:e}),s!=null&&n.jsx("p",{className:"ok-card__desc",children:s}),c]}),o!=null&&n.jsx("div",{className:"ok-card__actions",children:o})]})}),Sl=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{ref:r,className:L("ok-card__body",e),...s})}),Cl=l.forwardRef(function({align:e="start",className:s,...r},a){return n.jsx("div",{ref:a,className:L("ok-card__footer",s),"data-align":e,...r})}),El=l.forwardRef(function({ratio:e=16/9,position:s="top",className:r,...a},o){return n.jsx(Ar,{ref:o,ratio:e,radius:0,className:L("ok-card__media",s==="start"&&"ok-card__media--start",r),...a})}),Al=l.forwardRef(function({as:e="div",compact:s,className:r,...a},o){const i=e;return n.jsx(i,{ref:o,className:L("ok-group",s&&"ok-group--compact",r),...a})}),Tl=l.forwardRef(function({as:e="div",label:s,description:r,leading:a,stack:o,controlWidth:i="auto",href:c,target:d,rel:u,interactive:p,disabled:m,className:f,children:h,...v},b){const g=c!==void 0,N=!g&&!!p,x=g||N,j=g?"a":N?"button":e,_=g?{href:c,target:d,rel:u}:N?{type:"button",disabled:m}:null,k=s!=null||r!=null,R=!x&&i!=="auto"&&h!=null,M=R&&i==="fill",E=R&&!M,P=R?n.jsx("span",{className:"ok-row__control",style:E?{"--_cw":typeof i=="number"?`${i}px`:i}:void 0,children:h}):h;return n.jsxs(j,{ref:b,className:L("ok-row",o===!0&&"ok-row--stack",o==="auto"&&"ok-row--wrap",M&&"ok-row--fill",E&&"ok-row--fixed",x&&"ok-row--link ok-focusable",f),..._,...v,children:[a!=null&&n.jsx("span",{className:"ok-row__leading",children:a}),k&&n.jsxs("span",{className:"ok-row__text",children:[s!=null&&n.jsx("span",{className:"ok-row__label",children:s}),r!=null&&n.jsx("span",{className:"ok-row__desc",children:r})]}),x&&h!=null?n.jsx("span",{className:"ok-row__value",children:h}):P,x&&n.jsx(he,{name:"chevron-right",className:"ok-row__chev"})]})}),Il=l.forwardRef(function({as:e,marker:s="none",divided:r,size:a="md",className:o,...i},c){const d=e??(s==="number"?"ol":"ul");return n.jsx(d,{ref:c,role:"list",className:L("ok-list",a!=="md"&&`ok-list--${a}`,o),"data-marker":s,"data-divided":r?"":void 0,...i})}),Pl=l.forwardRef(function({leading:e,trailing:s,title:r,description:a,className:o,children:i,...c},d){return n.jsxs("li",{ref:d,className:L("ok-list__item",o),...c,children:[e!=null&&n.jsx("span",{className:"ok-list__leading",children:e}),n.jsxs("div",{className:"ok-list__content",children:[r!=null&&n.jsx("span",{className:"ok-list__title",children:r}),a!=null&&n.jsx("span",{className:"ok-list__desc",children:a}),i]}),s!=null&&n.jsx("span",{className:"ok-list__trailing",children:s})]})}),Ll=l.forwardRef(function({items:e,layout:s="auto",divided:r,className:a,children:o,...i},c){return n.jsxs("dl",{ref:c,className:L("ok-dl",a),"data-layout":s,"data-divided":r?"":void 0,...i,children:[e==null?void 0:e.map((d,u)=>n.jsx(Tr,{term:d.term,children:d.description},d.key??u)),o]})}),Tr=l.forwardRef(function({term:e,className:s,children:r,...a},o){return n.jsxs("div",{ref:o,className:L("ok-dl__item",s),...a,children:[n.jsx("dt",{className:"ok-dl__term",children:e}),n.jsx("dd",{className:"ok-dl__desc",children:r})]})});function Ir(t,e,s=1,r=1){const a=r*2+s*2+3;if(t<=a)return Array.from({length:t},(f,h)=>h+1);const o=Math.max(e-s,r+2),i=Math.min(e+s,t-r-1),c=o>r+2,d=i<t-r-1,u=(f,h)=>Array.from({length:Math.max(0,h-f+1)},(v,b)=>f+b),p=u(1,r),m=u(t-r+1,t);return!c&&d?[...u(1,r+s*2+2),0,...m]:c&&!d?[...p,0,...u(t-r-s*2-1,t)]:[...p,0,...u(o,i),0,...m]}const Pr=l.forwardRef(function({count:e,page:s,defaultPage:r=1,onChange:a,siblings:o=1,boundaries:i=1,label:c,size:d="md",disabled:u,className:p,...m},f){const{messages:h}=pe(),v=c??h.pagination.label,b=Math.max(1,Math.floor(e)),[g,N]=le(s,r,a),x=ye(g,1,b),j=k=>{u||N(ye(k,1,b))},_=Ir(b,x,o,i);return n.jsxs("nav",{ref:f,"aria-label":v,className:L("ok-pagination",d==="sm"&&"ok-pagination--sm",p),...m,children:[n.jsxs("ul",{className:"ok-pagination__list",children:[n.jsx("li",{children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":h.pagination.prev,disabled:u||x<=1,onClick:()=>j(x-1),children:n.jsx(he,{children:n.jsx("path",{d:"M12.500 4.500L7 10l5.500 5.500"})})})}),_.map((k,R)=>k===0?n.jsx("li",{className:"ok-pagination__gap","aria-hidden":"true",children:"…"},`gap-${R}`):n.jsx("li",{className:"ok-pagination__page",children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-focusable","aria-label":h.pagination.page(k),"aria-current":k===x?"page":void 0,disabled:u,onClick:()=>j(k),children:k})},k)),n.jsxs("li",{className:"ok-pagination__status","aria-hidden":"true",children:[x," / ",b]}),n.jsx("li",{children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":h.pagination.next,disabled:u||x>=b,onClick:()=>j(x+1),children:n.jsx(he,{name:"chevron-right"})})})]}),n.jsx("span",{className:"ok-sr",role:"status",children:h.pagination.status(x,b)})]})}),ws=n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.9-6.4",pathLength:1})}),Ht=(t,e)=>t.accessor?t.accessor(e):e[t.key],$l=t=>t.label??(typeof t.header=="string"?t.header:t.key);function Dl(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0})}function Ol({columns:t,data:e,rowKey:s,label:r,caption:a,sort:o,defaultSort:i=null,onSortChange:c,manualSort:d,selectable:u,selectedKeys:p,defaultSelectedKeys:m,onSelectionChange:f,getRowLabel:h,scroll:v,maxHeight:b,stackOnMobile:g,empty:N,noHighlight:x,rowAction:j,pageSize:_,page:k,defaultPage:R=1,onPageChange:M,className:E,style:P,onScroll:C,...w},y){const{messages:S}=pe(),O=N===void 0?S.table.empty:N,T=l.useId(),D=l.useRef(null),$=l.useRef(null),A=l.useRef(null),[B,q]=le(o,i,c),[H,U]=le(p,m??[],f),[ae,K]=l.useState(!1),I=(ee,J)=>typeof s=="function"?s(ee,J):s!=null?String(ee[s]):String(J),F=l.useMemo(()=>{const ee=e.map((re,be)=>({row:re,index:be})),J=B&&t.find(re=>re.key===B.key);if(!B||!J||d)return ee;const me=B.direction==="desc"?-1:1,fe=J.compare??((re,be)=>Dl(Ht(J,re),Ht(J,be)));return ee.sort((re,be)=>me*fe(re.row,be.row)||re.index-be.index)},[e,t,B,d]),V=_!=null&&_>0,te=V?Math.max(1,Math.floor(_)):0,Z=V?Math.max(1,Math.ceil(F.length/te)):1,[ne,ce]=le(k,R,M),W=ye(ne,1,Z),z=l.useMemo(()=>V?F.slice((W-1)*te,W*te):F,[F,V,W,te]),se=z.map(ee=>I(ee.row,ee.index)),de=new Set(H),Q=se.filter(ee=>de.has(ee)).length,oe=se.length>0&&Q===se.length,X=Q>0&&!oe;ge(()=>{A.current&&(A.current.indeterminate=X)},[X]),l.useEffect(()=>{const ee=D.current,J=$.current;if(!ee||!J||typeof ResizeObserver>"u")return;const me=()=>K(ee.scrollWidth>ee.clientWidth+1);me();const fe=new ResizeObserver(me);return fe.observe(ee),fe.observe(J),()=>fe.disconnect()},[]);const Y=l.useRef({cur:null,x:0,y:0,top:0,calm:void 0}),G=ee=>{const J=$.current,me=Y.current;if(!J||ee===me.cur)return;if(me.cur=ee,!ee){delete J.dataset.hl;return}const fe=()=>{const re=ee.getBoundingClientRect();J.style.setProperty("--hl-y",(re.top-J.getBoundingClientRect().top).toFixed(2)+"px"),J.style.setProperty("--hl-h",re.height.toFixed(2)+"px")};J.dataset.hl!==void 0?fe():(J.dataset.noAnim="",fe(),J.offsetWidth,delete J.dataset.noAnim,J.dataset.hl="")},ie=ee=>{var me,fe;const J=(me=ee==null?void 0:ee.closest)==null?void 0:me.call(ee,"tr");return J&&((fe=J.parentElement)==null?void 0:fe.tagName)==="TBODY"&&!J.hasAttribute("data-empty")?J:null},ue=ee=>{if(ee.pointerType==="touch")return;Y.current.x=ee.clientX,Y.current.y=ee.clientY;const J=ie(ee.target);J&&G(J)},we=ee=>{const J=ee.currentTarget,me=$.current,fe=Y.current;me&&(J.scrollTop!==fe.top&&(fe.top=J.scrollTop,me.dataset.jumping="",clearTimeout(fe.calm),fe.calm=setTimeout(()=>{delete me.dataset.jumping},140)),!(!fe.cur||typeof document.elementFromPoint!="function")&&G(ie(document.elementFromPoint(fe.x,fe.y))))};l.useEffect(()=>()=>clearTimeout(Y.current.calm),[]),ge(()=>{G(null)},[z]);const Pe=ee=>{!B||B.key!==ee?q({key:ee,direction:"asc"}):B.direction==="asc"?q({key:ee,direction:"desc"}):q(null),V&&ce(1)},dt=()=>{U(oe?H.filter(ee=>!se.includes(ee)):Array.from(new Set([...H,...se])))},Te=ee=>U(de.has(ee)?H.filter(J=>J!==ee):[...H,ee]),je=v||ae,Me=r??(typeof a=="string"?a:void 0),ve=ee=>g?{role:ee}:null,Ue=t.length+(u?1:0),Ye=ee=>L(ee.numeric&&"is-num",ee.align&&`ok-table__cell--${ee.align}`)||void 0,He=t.some(ee=>ee.hideBelow),et=b!=null?{"--ok-table-h":typeof b=="number"?`${b}px`:b}:void 0,Xe=n.jsxs("div",{ref:xe(y,D),className:L("ok-table",v&&"ok-table--scroll ok-scroll",g&&"ok-table--stack",E),"data-ready":x?void 0:"","data-responsive":He?"":void 0,style:et?{...et,...P}:P,...je?{role:"region",tabIndex:0,"aria-label":Me??S.table.label}:null,onScroll:It(C,x?void 0:we),...w,children:[n.jsxs("table",{ref:$,"aria-label":a==null?Me:void 0,...ve("table"),children:[a!=null&&n.jsx("caption",{className:"ok-table__caption",children:a}),n.jsx("thead",{...ve("rowgroup"),children:n.jsxs("tr",{...ve("row"),children:[u&&n.jsx("th",{className:"ok-table__select",scope:"col",...ve("columnheader"),children:n.jsxs("label",{className:"ok-check",children:[n.jsx("input",{ref:A,type:"checkbox",checked:oe,onChange:dt,disabled:se.length===0,"aria-label":S.table.selectAll}),n.jsx("span",{className:"ok-check__box",children:ws})]})}),t.map(ee=>{const J=B&&B.key===ee.key?B.direction:null;return n.jsx("th",{scope:"col",className:Ye(ee),"data-hide-below":ee.hideBelow,style:ee.width!=null?{width:ee.width}:void 0,"aria-sort":ee.sortable?J==="asc"?"ascending":J==="desc"?"descending":"none":void 0,...ve("columnheader"),children:ee.sortable?n.jsxs("button",{type:"button",className:"ok-table__sort ok-focusable","data-dir":J??void 0,onClick:()=>Pe(ee.key),children:[ee.header,n.jsx(he,{className:"ok-table__sort-icon",children:n.jsx("path",{d:"M10 15.500v-11M5.500 9L10 4.500 14.500 9"})})]}):ee.header},ee.key)})]})}),n.jsxs("tbody",{onPointerMove:x?void 0:ue,onPointerLeave:x?void 0:()=>G(null),...ve("rowgroup"),children:[z.length===0&&n.jsx("tr",{"data-empty":"",...ve("row"),children:n.jsx("td",{className:"ok-table__empty",colSpan:Ue,...ve("cell"),children:O})}),z.map(({row:ee,index:J},me)=>{const fe=se[me],re=de.has(fe),be=t[0]?Ht(t[0],ee):void 0,Re=h?h(ee,J):typeof be=="string"||typeof be=="number"?String(be):S.table.row(me+1),Ke=(j==null?void 0:j(ee,J))??null;return n.jsxs("tr",{"data-selected":u&&re?"":void 0,"data-action":Ke?"":void 0,"aria-selected":u?re:void 0,...ve("row"),children:[u&&n.jsx("td",{className:"ok-table__select","data-label":S.table.selectColumn,...ve("cell"),children:n.jsxs("label",{className:"ok-check",children:[n.jsx("input",{type:"checkbox",checked:re,onChange:()=>Te(fe),"aria-label":S.table.selectRow(Re)}),n.jsx("span",{className:"ok-check__box",children:ws})]})}),t.map((ze,tt)=>{const kt=ze.render?ze.render(ee,J):Ht(ze,ee);return n.jsxs("td",{className:L(Ye(ze),tt===0&&"ok-table__primary")||void 0,"data-label":$l(ze),"data-hide-below":ze.hideBelow,...ve("cell"),children:[tt===0&&Ke&&n.jsx("button",{type:"button",className:"ok-table__row-action ok-focusable","aria-label":Ke.label,onClick:Ke.onSelect}),g?n.jsx("span",{className:"ok-table__value",children:kt}):kt]},ze.key)})]},fe)})]})]}),u&&n.jsx("span",{className:"ok-sr",role:"status",id:`${T}-count`,children:H.length>0?S.table.selected(H.length):""})]});return V?n.jsxs("div",{className:"ok-table-paged",children:[Xe,Z>1&&n.jsx(Pr,{className:"ok-table__pagination",label:S.table.pagination(Me??S.table.label),count:Z,page:W,onChange:ce})]}):Xe}const Bl=l.forwardRef(Ol),Fl=l.forwardRef(function({items:e,value:s,defaultValue:r,onChange:a,activation:o="auto",label:i,keepMounted:c=!1,unmountInactive:d,className:u,...p},m){var C;const f=d??!c,h=l.useId(),[v,b]=le(s,r??((C=e.find(w=>!w.disabled))==null?void 0:C.value)??"",a),g=Math.max(0,e.findIndex(w=>w.value===v)),N=l.useRef(null),x=l.useRef(null),j=l.useRef([]),_=l.useRef([]),k=l.useRef(null),R=l.useRef(null),M=l.useRef(g),E=ke(()=>{const w=N.current,y=j.current[g];!w||!y||(w.style.setProperty("--x",y.offsetLeft+"px"),w.style.setProperty("--w",y.offsetWidth+"px"))});ge(()=>{const w=M.current;M.current=g,E();const y=N.current,S=j.current[w],O=j.current[g];if(w===g||!y||!S||!O)return;const T=g>w?1:-1,D=S.offsetLeft,$=S.offsetWidth,A=O.offsetLeft,B=O.offsetWidth,q=Math.min(D,A),H=Math.max(D+$,A+B);if(Ne(x.current,[{transform:`translateX(${D}px)`,width:$+"px"},{transform:`translateX(${q}px)`,width:H-q+"px",offset:.42},{transform:`translateX(${A}px)`,width:B+"px"}],{duration:420,easing:De.inOut}),y.scrollWidth>y.clientWidth&&typeof y.scrollTo=="function"){const V=Fe()===0?"auto":"smooth";A<y.scrollLeft?y.scrollTo({left:A-16,behavior:V}):A+B>y.scrollLeft+y.clientWidth&&y.scrollTo({left:A+B-y.clientWidth+16,behavior:V})}const U=_.current[w],ae=_.current[g];if(U&&U!==ae){U.dataset.leaving="";const V=()=>{delete U.dataset.leaving},te=Ne(U,[{opacity:1,transform:"none"},{opacity:0,transform:`translateX(${-20*T}px)`}],{duration:150,easing:De.in});te?te.finished.then(V,V):V()}ae&&Ne(ae,[{opacity:0,transform:`translateX(${24*T}px)`},{opacity:1,transform:"none"}],{spring:"spring",delay:f?0:110});const K=k.current,I=R.current,F=(K==null?void 0:K.offsetHeight)??0;K&&I!==null&&Math.abs(F-I)>=1&&Ne(K,[{height:I+"px",overflow:"hidden"},{height:F+"px",overflow:"hidden"}],{spring:"soft"})},[g]),ge(()=>{var w;R.current=((w=k.current)==null?void 0:w.offsetHeight)??null}),l.useEffect(()=>{E();const w=N.current;if(!w||typeof ResizeObserver>"u")return;const y=new ResizeObserver(()=>E());return y.observe(w),j.current.forEach(S=>S&&y.observe(S)),()=>y.disconnect()},[e.length,E]);const P=w=>{var D;const y=e.map(($,A)=>$.disabled?-1:A).filter($=>$>=0);if(!y.length)return;const S=j.current.findIndex($=>$===document.activeElement),O=y.indexOf(S>=0?S:g);let T;if(w.key==="ArrowRight")T=y[(O+1)%y.length];else if(w.key==="ArrowLeft")T=y[(O-1+y.length)%y.length];else if(w.key==="Home")T=y[0];else if(w.key==="End")T=y[y.length-1];else return;w.preventDefault(),(D=j.current[T])==null||D.focus(),o==="auto"&&b(e[T].value)};return n.jsxs("div",{ref:m,className:L("ok-tabs",u),...p,children:[n.jsxs("div",{ref:N,className:"ok-tabs__list",role:"tablist","aria-label":i,"aria-orientation":"horizontal",onKeyDown:P,children:[e.map((w,y)=>n.jsx("button",{ref:S=>{j.current[y]=S},type:"button",role:"tab",id:`${h}-tab-${y}`,className:"ok-tabs__tab ok-focusable","aria-selected":y===g,"aria-controls":f&&y!==g?void 0:`${h}-panel-${y}`,tabIndex:y===g?0:-1,disabled:w.disabled,onClick:()=>b(w.value),children:w.label},w.value)),n.jsx("span",{ref:x,className:"ok-tabs__ink","aria-hidden":"true"})]}),n.jsx("div",{ref:k,className:"ok-tabs__panels","data-keep-mounted":f?void 0:"",children:e.map((w,y)=>f&&y!==g?null:n.jsx("div",{ref:S=>{_.current[y]=S},role:"tabpanel",id:`${h}-panel-${y}`,"aria-labelledby":`${h}-tab-${y}`,className:"ok-tabs__panel","data-state":y===g?"active":"inactive",tabIndex:y===g?0:-1,children:w.content},w.value))})]})}),Hl=l.forwardRef(function({items:e,type:s="multiple",value:r,defaultValue:a,onChange:o,collapsible:i=!0,headingLevel:c=3,variant:d="group",className:u,...p},m){const f=l.useId(),[h,v]=le(r,a??[],o),b=l.useRef([]),g=`h${c}`,N=j=>{const _=h.includes(j);s==="single"?_?i&&v([]):v([j]):v(_?h.filter(k=>k!==j):[...h,j])},x=j=>{const _=b.current.filter(M=>!!M&&!M.disabled),k=_.indexOf(j.target);if(k<0)return;let R;if(j.key==="ArrowDown")R=(k+1)%_.length;else if(j.key==="ArrowUp")R=(k-1+_.length)%_.length;else if(j.key==="Home")R=0;else if(j.key==="End")R=_.length-1;else return;j.preventDefault(),_[R].focus()};return n.jsx("div",{ref:m,className:L("ok-accordion",d==="group"?"ok-group":"ok-accordion--plain",u),onKeyDown:x,...p,children:e.map((j,_)=>{const k=h.includes(j.value),R=s==="single"&&k&&!i;return n.jsxs("div",{className:"ok-accordion__item","data-state":k?"open":"closed",children:[n.jsx(g,{className:"ok-accordion__heading",children:n.jsxs("button",{ref:M=>{b.current[_]=M},type:"button",id:`${f}-head-${_}`,className:"ok-accordion__head ok-focusable","aria-expanded":k,"aria-controls":`${f}-body-${_}`,"aria-disabled":R||void 0,disabled:j.disabled,onClick:()=>N(j.value),children:[n.jsx("span",{className:"ok-accordion__title",children:j.title}),n.jsx(he,{name:"chevron-right"})]})}),n.jsx("div",{className:"ok-accordion__body",id:`${f}-body-${_}`,role:"region","aria-labelledby":`${f}-head-${_}`,children:n.jsx("div",{children:n.jsx("div",{className:"ok-accordion__content",children:j.content})})})]},j.value)})})}),zl=l.forwardRef(function({items:e,label:s,maxItems:r,separator:a,className:o,...i},c){const{messages:d}=pe(),u=s??d.breadcrumb.label,[p,m]=l.useState(!1),f=l.useRef(null),h=l.useRef(!1),v=e.length-1,b=e.length>2,g=r!=null&&e.length>r,N=n.jsx("span",{className:"ok-breadcrumb__sep","aria-hidden":"true",children:a??n.jsx(he,{name:"chevron-right"})});return ge(()=>{var x,j;!p||!h.current||(h.current=!1,(j=(x=f.current)==null?void 0:x.querySelector("[data-middle] a, [data-middle] button"))==null||j.focus())},[p]),n.jsx("nav",{ref:c,"aria-label":u,className:L("ok-breadcrumb",o),"data-collapse":!b||p?void 0:g?"always":"narrow",...i,children:n.jsx("ol",{ref:f,className:"ok-breadcrumb__list",children:e.map((x,j)=>{const k=j===v?n.jsx("span",{className:"ok-breadcrumb__current","aria-current":"page",children:x.label}):x.href!==void 0?n.jsx("a",{className:"ok-breadcrumb__link ok-focusable",href:x.href,onClick:x.onClick,children:x.label}):x.onClick?n.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable",onClick:x.onClick,children:x.label}):n.jsx("span",{className:"ok-breadcrumb__text",children:x.label});return[n.jsxs("li",{className:"ok-breadcrumb__item","data-middle":j>0&&j<v?"":void 0,children:[j>0&&N,k]},j),j===0&&b&&!p?n.jsxs("li",{className:"ok-breadcrumb__item ok-breadcrumb__more",children:[N,n.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable","aria-label":d.breadcrumb.expand(e.length-2),"aria-expanded":!1,onClick:()=>{h.current=!0,m(!0)},children:n.jsx(he,{name:"more"})})]},"more"):null]})})})}),ql=l.forwardRef(function({items:e,current:s=0,orientation:r="horizontal",status:a="default",label:o,className:i,...c},d){const{messages:u}=pe(),p=o??u.steps.label;return n.jsx("ol",{ref:d,"aria-label":p,className:L("ok-steps",i),"data-orientation":r,...c,children:e.map((m,f)=>{const h=f<s?"complete":f===s?"current":"upcoming",v=h==="current"&&a==="error";return n.jsxs("li",{className:"ok-steps__item","data-state":h,"data-error":v?"":void 0,"aria-current":h==="current"?"step":void 0,children:[n.jsx("span",{className:"ok-steps__marker","aria-hidden":"true",children:h==="complete"?n.jsx(he,{name:"check"}):v?n.jsx(he,{name:"x"}):m.icon??f+1}),n.jsxs("span",{className:"ok-steps__text",children:[n.jsxs("span",{className:"ok-steps__title",children:[n.jsx("span",{className:"ok-sr",children:u.steps.prefix(f+1,v?u.steps.error:u.steps.state[h])}),m.title]}),m.description!=null&&n.jsx("span",{className:"ok-steps__desc",children:m.description})]})]},f)})})}),Vl=l.forwardRef(function({items:e,className:s,...r},a){return n.jsx("ol",{ref:a,className:L("ok-timeline",s),...r,children:e.map((o,i)=>n.jsxs("li",{className:"ok-timeline__item","data-tone":o.tone??"neutral",children:[n.jsx("span",{className:"ok-timeline__marker","data-icon":o.icon!=null?"":void 0,"aria-hidden":"true",children:o.icon}),n.jsxs("div",{className:"ok-timeline__content",children:[n.jsxs("div",{className:"ok-timeline__head",children:[n.jsx("span",{className:"ok-timeline__title",children:o.title}),o.time!=null&&n.jsx("time",{className:"ok-timeline__time",dateTime:o.dateTime,children:o.time})]}),o.description!=null&&n.jsx("div",{className:"ok-timeline__desc",children:o.description})]})]},o.key??i))})}),Gl=l.forwardRef(function({items:e,expanded:s,defaultExpanded:r,onExpandedChange:a,selected:o,defaultSelected:i=null,onSelect:c,label:d,className:u,...p},m){var y;const[f,h]=le(s,r??[],a),[v,b]=le(o,i,c),[g,N]=l.useState(v),x=l.useRef(new Map),j=new Set(f),_=[],k=(S,O,T)=>S.forEach(D=>{var $;_.push({node:D,level:O,parent:T}),($=D.children)!=null&&$.length&&j.has(D.id)&&k(D.children,O+1,D.id)});k(e,1,null);const R=_.filter(S=>!S.node.disabled),M=R.some(S=>S.node.id===g)?g:((y=R[0])==null?void 0:y.node.id)??null,E=S=>{var O;S!=null&&(N(S),(O=x.current.get(S))==null||O.focus())},P=(S,O)=>h(O?[...f.filter(T=>T!==S),S]:f.filter(T=>T!==S)),C=S=>{var q,H,U,ae;const O=S.target;if(O.getAttribute("role")!=="treeitem")return;const T=R.findIndex(K=>K.node.id===O.dataset.id);if(T<0)return;const{node:D,parent:$}=R[T],A=!!((q=D.children)!=null&&q.length);let B=!0;switch(S.key){case"ArrowDown":E((H=R[T+1])==null?void 0:H.node.id);break;case"ArrowUp":E((U=R[T-1])==null?void 0:U.node.id);break;case"Home":E(R[0].node.id);break;case"End":E(R[R.length-1].node.id);break;case"ArrowRight":A&&!j.has(D.id)?P(D.id,!0):A&&E((ae=D.children.find(K=>!K.disabled))==null?void 0:ae.id);break;case"ArrowLeft":A&&j.has(D.id)?P(D.id,!1):$&&E($);break;case"Enter":case" ":b(D.id),A&&P(D.id,!j.has(D.id));break;default:B=!1}B&&S.preventDefault()},w=(S,O)=>S.map((T,D)=>{var B;const $=!!((B=T.children)!=null&&B.length),A=$&&j.has(T.id);return n.jsxs("li",{ref:q=>{q?x.current.set(T.id,q):x.current.delete(T.id)},role:"treeitem","data-id":T.id,className:"ok-tree__item","aria-level":O,"aria-setsize":S.length,"aria-posinset":D+1,"aria-expanded":$?A:void 0,"aria-selected":v===T.id,"aria-disabled":T.disabled||void 0,tabIndex:M===T.id?0:-1,onFocus:q=>{q.target===q.currentTarget&&N(T.id)},children:[n.jsxs("div",{className:"ok-tree__row",onClick:()=>{T.disabled||(N(T.id),b(T.id),$&&P(T.id,!A))},children:[n.jsx("span",{className:"ok-tree__chev","aria-hidden":"true",children:$&&n.jsx(he,{name:"chevron-right"})}),T.icon!=null&&n.jsx("span",{className:"ok-tree__icon","aria-hidden":"true",children:T.icon}),n.jsx("span",{className:"ok-tree__label",children:T.label})]}),A&&n.jsx("ul",{role:"group",className:"ok-tree__group",children:w(T.children,O+1)})]},T.id)});return n.jsx("ul",{ref:m,role:"tree","aria-label":d,className:L("ok-tree",u),onKeyDown:C,...p,children:w(e,1)})}),Wl=l.forwardRef(function({tone:e="neutral",variant:s="soft",dot:r,ping:a,className:o,children:i,...c},d){return n.jsxs("span",{ref:d,className:L("ok-badge",e!=="neutral"&&`ok-badge--${e}`,s==="solid"&&"ok-badge--solid",s==="ink"&&"ok-badge--ink",o),...c,children:[(r||a)&&n.jsx("span",{className:L("ok-dot",a&&"ok-dot--live"),"aria-hidden":"true"}),i]})}),Ul=l.forwardRef(function({tone:e="neutral",size:s="md",icon:r,onRemove:a,removeLabel:o,className:i,children:c,...d},u){const{messages:p}=pe(),m=typeof c=="string"||typeof c=="number"?String(c):"";return n.jsxs("span",{ref:u,className:L("ok-tag",s==="sm"&&"ok-tag--sm",i),"data-tone":e,...d,children:[r!=null&&n.jsx("span",{className:"ok-tag__icon","aria-hidden":"true",children:r}),n.jsx("span",{className:"ok-tag__label",children:c}),a&&n.jsx("button",{type:"button",className:"ok-tag__remove ok-focusable","aria-label":o??p.tag.remove(m),onClick:a,children:n.jsx(he,{name:"x"})})]})}),an=l.forwardRef(function({value:e,direction:s="auto",className:r,...a},o){const i=l.useRef(null),c=l.useRef(null),d=l.useRef(e);return ge(()=>{const u=d.current;if(u===e)return;d.current=e;const p=i.current,m=c.current;if(!p||!m)return;const f=s==="auto"?Number(e)<Number(u)?-1:1:s,h=document.createElement("span");h.textContent=String(u),h.setAttribute("aria-hidden","true"),p.insertBefore(h,m);const v=()=>h.remove(),b=Ne(h,[{transform:"translateY(0)",opacity:1},{transform:`translateY(${-f*80}%)`,opacity:0}],{duration:150,easing:De.in,fill:"forwards"});b?b.finished.then(v,v):v(),Ne(m,[{transform:`translateY(${f*80}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"})},[e,s]),n.jsx("span",{ref:xe(o,i),className:L("ok-roll",r),...a,children:n.jsx("span",{ref:c,children:e})})}),Yl=l.forwardRef(function({value:e,max:s=99,showZero:r,tone:a="accent",label:o,className:i,...c},d){const u=l.useRef(null),p=l.useRef(e);if(ge(()=>{p.current!==e&&(p.current=e,Ne(u.current,[{transform:"scale(1)"},{transform:"scale(1.35)",offset:.3},{transform:"scale(1)"}],{duration:Cn.bouncy.duration,easing:De.out}))},[e]),e===0&&!r)return null;const m=e>s?`${s}+`:String(e);return n.jsxs("span",{ref:xe(d,u),className:L("ok-count",i),"data-tone":a==="accent"?void 0:a,...c,children:[n.jsx(an,{value:m,direction:e>=p.current?1:-1,"aria-hidden":o?!0:void 0}),o&&n.jsx("span",{className:"ok-sr",children:o})]})}),Xl={neutral:"info",accent:"sparkle",info:"info",success:"check",warning:"alert",danger:"alert"},Kl=l.forwardRef(function({tone:e="accent",title:s,icon:r,action:a,closable:o,open:i,defaultOpen:c=!0,onOpenChange:d,onClose:u,closeLabel:p,className:m,children:f,...h},v){const{messages:b}=pe(),g=p??b.common.close,[N,x]=le(i,c,d),{mounted:j,ref:_}=Pt(N,700);if(!j)return null;const k=n.jsxs("div",{ref:v,role:e==="warning"||e==="danger"?"alert":"status",className:L("ok-alert",e!=="accent"&&`ok-alert--${e}`,m),...h,children:[r!==!1&&(r??n.jsx(he,{name:Xl[e]})),n.jsxs("div",{className:"ok-alert__body",children:[s!=null&&n.jsx("b",{className:"ok-alert__title",children:s}),f]}),a!=null&&n.jsx("div",{className:"ok-alert__action",children:a}),o&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-alert__close","aria-label":g,onClick:()=>{u==null||u(),x(!1)},children:n.jsx(he,{name:"x"})})]});return n.jsx("div",{ref:_,className:"ok-collapse ok-alert-wrap","data-state":N?"open":"closed",children:k})}),Zl=l.forwardRef(function({value:e,max:s=100,label:r,tone:a="accent",size:o="md",noDoneState:i,className:c,style:d,...u},p){const m=e!=null,f=m?ye(e/(s||1),0,1):0;return n.jsx("div",{ref:p,role:"progressbar","aria-label":r,"aria-valuemin":m?0:void 0,"aria-valuemax":m?s:void 0,"aria-valuenow":m?ye(e,0,s):void 0,className:L("ok-progress",!m&&"ok-progress--indeterminate",o!=="md"&&`ok-progress--${o}`,c),"data-tone":a==="accent"?void 0:a,"data-done":m&&f>=1&&!i?"":void 0,style:{"--v":f,...d},...u,children:n.jsx("div",{className:"ok-progress__bar"})})}),Jl={sm:40,md:64,lg:96},Ql=l.forwardRef(function({value:e=0,max:s=100,label:r,size:a="md",thickness:o=6,showValue:i,noDoneState:c,className:d,style:u,children:p,...m},f){const h=ye(e/(s||1),0,1),v=typeof a=="number"?a:Jl[a],b=i??v>=56;return n.jsxs("div",{ref:f,role:"progressbar","aria-label":r,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":ye(e,0,s),className:L("ok-ring",d),"data-done":h>=1&&!c?"":void 0,style:{"--v":h,"--size":`${v}px`,...u},...m,children:[n.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",style:{strokeWidth:o},children:[n.jsx("circle",{className:"ok-ring__track",cx:"18",cy:"18",r:"15"}),n.jsx("circle",{className:"ok-ring__bar",cx:"18",cy:"18",r:"15",pathLength:100})]}),p!=null?n.jsx("span",{className:"ok-ring__label",children:p}):b?n.jsx(an,{className:"ok-ring__label",value:Math.round(h*100),"aria-hidden":"true"}):null]})}),ei=l.forwardRef(function({value:e,min:s=0,max:r=100,segments:a=10,label:o,valueText:i,tone:c,warnAt:d,dangerAt:u,size:p="md",className:m,...f},h){const v=Math.max(1,Math.floor(a)),b=ye(e,s,r),g=Math.round((b-s)/(r-s||1)*v);return n.jsx("div",{ref:h,role:"meter","aria-label":o,"aria-valuemin":s,"aria-valuemax":r,"aria-valuenow":b,"aria-valuetext":i,className:L("ok-level",p!=="md"&&`ok-level--${p}`,m),"data-tone":c,...f,children:Array.from({length:v},(N,x)=>{const j=s+(r-s)*x/v,_=u!=null&&j>=u?"danger":d!=null&&j>=d?"warning":void 0;return n.jsx("i",{className:"ok-level__seg","data-on":x<g?"":void 0,"data-zone":_},x)})})}),pt=t=>typeof t=="number"?`${t}px`:t,ti=l.forwardRef(function({variant:e="text",width:s,height:r,lines:a=1,className:o,style:i,...c},d){const u=L("ok-skel",e==="circle"&&"ok-skel--circle",e==="rect"&&"ok-skel--rect");if(e==="text"&&a>1)return n.jsx("span",{ref:d,"aria-hidden":"true",className:L("ok-skel-lines",o),style:{width:pt(s),...i},...c,children:Array.from({length:a},(m,f)=>n.jsx("span",{className:u,style:{height:pt(r),width:f===a-1?"70%":void 0}},f))});const p=e==="circle"?{width:pt(s??r),height:pt(r??s)}:{width:pt(s),height:pt(r)};return n.jsx("span",{ref:d,"aria-hidden":"true",className:L(u,o),style:{...p,...i},...c})}),ni={sm:20,md:28,lg:40},si=l.forwardRef(function({variant:e="tail",size:s="md",label:r,className:a,style:o,...i},c){const{messages:d}=pe(),u=r??d.common.loading,p=typeof s=="number"?s:ni[s];return n.jsxs("span",{ref:c,role:"status",className:L("ok-loader",a),style:{"--size":`${p}px`,...o},...i,children:[e==="tail"?n.jsx(Ln,{className:"ok-tail"}):n.jsx("span",{className:"ok-spinner","aria-hidden":"true"}),n.jsx("span",{className:"ok-sr",children:u})]})}),ri=l.forwardRef(function({label:e,className:s,...r},a){const{messages:o}=pe(),i=e??o.common.loading;return n.jsxs("span",{ref:a,role:"status",className:L("ok-dots",s),...r,children:[n.jsx("i",{"aria-hidden":"true"}),n.jsx("i",{"aria-hidden":"true"}),n.jsx("i",{"aria-hidden":"true"}),n.jsx("span",{className:"ok-sr",children:i})]})}),ai=l.forwardRef(function({icon:e,title:s,description:r,actions:a,titleAs:o="h3",size:i="md",className:c,children:d,...u},p){return n.jsxs("div",{ref:p,className:L("ok-empty",i!=="md"&&`ok-empty--${i}`,c),...u,children:[e!=null&&n.jsx("div",{className:"ok-empty__media","aria-hidden":"true",children:e}),n.jsx(o,{className:"ok-empty__title",children:s}),r!=null&&n.jsx("p",{className:"ok-empty__desc",children:r}),d,a!=null&&n.jsx("div",{className:"ok-empty__actions",children:a})]})}),oi=l.forwardRef(function({label:e,value:s,delta:r,trend:a,positive:o="up",hint:i,icon:c,variant:d="card",className:u,...p},m){const f=pe().messages.stat.trend,h=a??(r!=null?"flat":void 0),v=!h||h==="flat"?"neutral":h===o?"good":"bad";return n.jsxs("div",{ref:m,className:L("ok-stat",d==="card"&&"ok-card",u),...p,children:[n.jsxs("div",{className:"ok-stat__label",children:[c!=null&&n.jsx("span",{className:"ok-stat__icon","aria-hidden":"true",children:c}),n.jsx("span",{children:e})]}),n.jsx("div",{className:"ok-stat__value",children:s}),(h||i!=null)&&n.jsxs("div",{className:"ok-stat__foot",children:[h&&n.jsxs("span",{className:"ok-stat__delta","data-trend":h,"data-mood":v,children:[n.jsx(he,{children:h==="flat"?n.jsx("path",{d:"M4.500 10h11"}):n.jsx("path",{d:h==="up"?"M10 15.500v-11M5.500 9L10 4.500 14.500 9":"M10 4.500v11M5.500 11l4.500 4.500 4.500-4.500"})}),n.jsx("span",{className:"ok-sr",children:f[h]}),r]}),i!=null&&n.jsx("span",{className:"ok-stat__hint",children:i})]})]})}),li={sm:28,md:36,lg:48},Ns=["#FF8FA9","#FFBE3B","#4CD787","#D9A6FF","#7FB0FF","#FF9A5C"];function Lr(t){const e=t.trim();if(!e)return"";const s=Array.from(e)[0];if(/[⺀-鿿가-豈-]/.test(s))return s;const r=e.split(/[\s._-]+/).filter(Boolean),a=Array.from(r[0])[0]??"",o=r.length>1?Array.from(r[r.length-1])[0]:"";return(a+o).toUpperCase()}const $r=l.createContext(void 0),Kn=l.forwardRef(function({src:e,name:s,alt:r,size:a,color:o,status:i,statusLabel:c,decorative:d,className:u,style:p,children:m,...f},h){const v=l.useContext($r),b=a??v??"md",g=typeof b=="number"?b:li[b],[N,x]=l.useState(!1);l.useEffect(()=>{x(!1)},[e]);const{messages:j}=pe(),k=[r??s,i?c??j.avatar.status[i]:void 0].filter(Boolean).join(j.common.separator);let R=o;if(o==="auto"){let E=0;for(const P of s??"")E=E*31+(P.codePointAt(0)??0)>>>0;R=Ns[E%Ns.length]}const M={"--size":`${g}px`,...R?{"--c":R}:null};return n.jsxs("span",{ref:h,className:L("ok-avatar",u),style:{...M,...p},...k&&!d?{role:"img","aria-label":k}:{"aria-hidden":!0},...f,children:[n.jsx("span",{className:"ok-avatar__fallback","aria-hidden":"true",children:m??(s?Lr(s):n.jsxs(he,{children:[n.jsx("circle",{cx:"10",cy:"7.500",r:"3"}),n.jsx("path",{d:"M4 16.500c.8-2.800 3.100-4.300 6-4.300s5.200 1.500 6 4.300"})]}))}),e&&!N&&n.jsx("img",{className:"ok-avatar__img",src:e,alt:"",onError:()=>x(!0),draggable:!1}),i&&n.jsx("span",{className:"ok-avatar__status","data-status":i,"aria-hidden":"true"})]})});function ii({extra:t,members:e,label:s,total:r}){const{messages:a}=pe(),[o,i]=l.useState(!1),c=l.useRef(null),d=l.useRef(null),u=l.useRef(),p=l.useId();tn({open:o,anchorRef:c,floatingRef:d,placement:"bottom",offset:8}),Lt(o,()=>i(!1)),l.useEffect(()=>()=>clearTimeout(u.current),[]);const m=x=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!0),x)},f=()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!1),160)},[h,v]=l.useState("closed"),[b,g]=l.useState(!1);l.useEffect(()=>{if(o){g(!0);const j=requestAnimationFrame(()=>requestAnimationFrame(()=>v("open")));return()=>cancelAnimationFrame(j)}v("closed");const x=setTimeout(()=>g(!1),200*Fe());return()=>clearTimeout(x)},[o]);const N=e.map(x=>x.props.name||x.props.alt).filter(Boolean);return n.jsxs(n.Fragment,{children:[n.jsx("button",{ref:c,type:"button",className:"ok-avatars__more ok-focusable","aria-expanded":o,"aria-controls":b?p:void 0,"aria-label":a.avatar.moreButton(t,s),onPointerEnter:x=>{x.pointerType!=="touch"&&m(120)},onPointerLeave:f,onFocus:()=>m(0),onBlur:f,onClick:()=>i(x=>!x),children:n.jsxs(Kn,{className:"ok-avatar--more",decorative:!0,children:["+",t]})}),b&&n.jsx(it,{children:n.jsxs("div",{ref:d,id:p,className:"ok-popup ok-popup--surface ok-avatars__panel","data-state":h,role:"group","aria-label":a.avatar.panel(r,s),onPointerEnter:()=>clearTimeout(u.current),onPointerLeave:f,children:[n.jsx("ul",{className:"ok-avatars__list ok-scroll",children:e.map((x,j)=>n.jsxs("li",{className:"ok-avatars__item",children:[l.cloneElement(x,{size:"sm",decorative:!0}),n.jsx("span",{className:"ok-avatars__name",children:x.props.name||x.props.alt})]},x.key??j))}),r>N.length&&n.jsx("p",{className:"ok-avatars__rest",children:a.avatar.rest(r-N.length)})]})})]})}const ci=l.forwardRef(function({max:e,total:s,size:r,label:a,overflowList:o=!0,className:i,children:c,...d},u){const{messages:p}=pe(),m=l.Children.toArray(c),f=e!=null&&m.length>e?m.slice(0,e):m,h=Math.max(0,(s??m.length)-f.length),v=m.filter(g=>l.isValidElement(g)),b=o&&v.some(g=>g.props.name||g.props.alt);return n.jsx("div",{ref:u,role:"group","aria-label":a,className:L("ok-avatars",i),...d,children:n.jsxs($r.Provider,{value:r,children:[f,h>0&&(b?n.jsx(ii,{extra:h,members:v,label:a,total:s??m.length}):n.jsxs(Kn,{className:"ok-avatar--more",alt:p.avatar.more(h),children:["+",h]}))]})})});function Dr(t,e,s={}){if(typeof document>"u"||Fe()===0)return;const r=s.count??12,a=getComputedStyle(s.source??document.documentElement),o=s.colors??[a.getPropertyValue("--ok-accent").trim()||"#FF6B8E",a.getPropertyValue("--ok-accent-tint-2").trim()||"#FFC4D2",a.getPropertyValue("--ok-text").trim()||"#1B1C22"];for(let i=0;i<r;i++){const c=document.createElement("i");c.className="ok-particle",c.setAttribute("aria-hidden","true");const d=4+Math.random()*6,u=i/r*Math.PI*2+(Math.random()-.5)*.5,p=(s.distance??46)*(.6+Math.random()*.7);c.style.cssText=`width:${d}px;height:${d}px;margin:${-d/2}px 0 0 ${-d/2}px;background:${o[i%o.length]}`,document.body.appendChild(c);const m=Math.cos(u)*p,f=Math.sin(u)*p,h=()=>c.remove(),v=Ne(c,[{transform:`translate(${t}px,${e}px) scale(0)`,opacity:1},{transform:`translate(${t+m*.8}px,${e+f*.8}px) scale(1)`,opacity:1,offset:.4},{transform:`translate(${t+m}px,${e+f+14}px) scale(0)`,opacity:0}],{duration:620+Math.random()*260,easing:De.out,fill:"forwards"});v?v.finished.then(h,h):h()}}const di=n.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[n.jsx("ellipse",{cx:"12",cy:"12",rx:"8.5",ry:"6.5"}),n.jsx("ellipse",{className:"nostril",cx:"9",cy:"12",rx:"1.2",ry:"1.9"}),n.jsx("ellipse",{className:"nostril",cx:"15",cy:"12",rx:"1.2",ry:"1.9"})]}),ui=l.forwardRef(function({pressed:e,defaultPressed:s=!1,onChange:r,count:a,label:o,icon:i,noBurst:c,className:d,onClick:u,children:p,...m},f){const{messages:h}=pe(),v=o??h.reaction.label,[b,g]=le(e,s,r),N=l.useRef(null),x=j=>{var k,R;const _=!b;if(g(_),_&&!c){const M=(R=(k=N.current)==null?void 0:k.querySelector(".ok-react__icon"))==null?void 0:R.getBoundingClientRect();M&&Dr(M.left+M.width/2,M.top+M.height/2,{source:N.current??void 0})}};return n.jsxs("button",{ref:xe(f,N),type:"button",className:L("ok-react ok-focusable",d),"aria-pressed":b,"data-icon-only":a==null&&p==null?"":void 0,onClick:It(u,x),...m,children:[n.jsx("span",{className:"ok-react__icon",children:i??di}),n.jsx("span",{className:"ok-sr",children:v}),p,a!=null&&n.jsx(an,{className:"ok-react__count",value:a+(b?1:0)})]})}),fi=l.forwardRef(function({className:e,...s},r){return n.jsx("code",{ref:r,className:L("ok-code",e),...s})});async function pi(t){var r;if((r=navigator.clipboard)!=null&&r.writeText)return navigator.clipboard.writeText(t);const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="position:fixed;left:-9999px;top:0;opacity:0",document.body.appendChild(e),e.select();const s=document.execCommand("copy");if(e.remove(),!s)throw new Error("copy failed")}const hi=l.forwardRef(function({code:e,children:s,language:r,title:a,copyable:o=!0,wrap:i,maxHeight:c,label:d,onCopy:u,className:p,...m},f){const{messages:h}=pe(),v=e??s??"",[b,g]=l.useState("idle"),N=l.useRef();l.useEffect(()=>()=>clearTimeout(N.current),[]);const x=async()=>{let k="copied";try{await pi(v),u==null||u(v)}catch{k="failed"}g(k),clearTimeout(N.current),N.current=setTimeout(()=>g("idle"),2e3)},j=a!=null||!!r,_=d??(typeof a=="string"?a:void 0)??r??h.code.label;return n.jsxs("div",{ref:f,className:L("ok-codeblock",p),"data-head":j?"":void 0,...m,children:[(j||o)&&n.jsxs("div",{className:"ok-codeblock__head",children:[a!=null&&n.jsx("span",{className:"ok-codeblock__title",children:a}),r&&n.jsx("span",{className:"ok-codeblock__lang",children:r}),o&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-codeblock__copy","aria-label":h.code.copy,"data-state":b,onClick:x,children:n.jsx(he,{name:b==="copied"?"check":b==="failed"?"x":"copy"})})]}),n.jsx("pre",{className:"ok-codeblock__pre ok-scroll",tabIndex:0,role:"group","aria-label":_,"data-wrap":i?"":void 0,style:c!=null?{maxHeight:typeof c=="number"?`${c}px`:c}:void 0,children:n.jsx("code",{className:r?`language-${r}`:void 0,children:v})}),n.jsx("span",{className:"ok-sr",role:"status","aria-live":"polite",children:b==="copied"?h.code.copied:b==="failed"?h.code.copyFailed:""})]})}),Or=t=>{const e=t!=null&&t!==l.Fragment;return{Tag:e?t:"div",box:e}},mi=l.forwardRef(function({as:e,above:s,below:r,className:a,...o},i){const{Tag:c,box:d}=Or(e);return n.jsx(c,{ref:i,className:L("ok-show",a),"data-box":d?"":void 0,"data-ok-hide-below":s,"data-ok-hide-above":r,...o})}),bi=l.forwardRef(function({as:e,above:s,below:r,className:a,...o},i){const{Tag:c,box:d}=Or(e);return n.jsx(c,{ref:i,className:L("ok-show",a),"data-box":d?"":void 0,"data-ok-hide-below":r,"data-ok-hide-above":s,...o})}),vi=["base","sm","md","lg","xl"];function gi(t){return typeof t=="object"&&t!==null}const We=t=>t===0?"0px":`var(--ok-s-${t})`,xi=t=>t*4,ki={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},yi={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},_i=t=>ki[t],ji=t=>yi[t];function Le(t,e,s){const r={};if(e==null)return r;const a=`--ok-l-${t}`;if(!gi(e))return r[a]=String(s(e)),r;let o;for(const i of vi){const c=e[i];c!==void 0&&(o=String(s(c))),o!==void 0&&(r[i==="base"?a:`${a}-${i}`]=o)}return r}function Qe(t,e){return{...Le("gap",t.gap,We),...Le("rgap",t.rowGap,We),...Le("p",t.padding,We),...Le("px",t.paddingX,We),...Le("py",t.paddingY,We),...Le("align",t.align,_i),...Le("justify",t.justify,ji),...e}}const $t=t=>t.padding!==void 0||t.paddingX!==void 0||t.paddingY!==void 0?"":void 0,wi=l.forwardRef(function({as:e,padding:s,paddingX:r,paddingY:a,radius:o,surface:i,border:c,highlight:d,className:u,style:p,...m},f){const h=e??"div",v={};return o!==void 0&&(v["--ok-box-r"]=o===0?"0px":`var(--ok-r-${o})`),i&&(v["--ok-box-bg"]=`var(--ok-${i})`),n.jsx(h,{ref:f,className:L("ok-l ok-box",u),"data-pad":$t({padding:s,paddingX:r,paddingY:a}),"data-radius":o,"data-surface":i,"data-border":c?c==="strong"?"strong":"line":void 0,"data-highlight":d?"":void 0,style:Qe({padding:s,paddingX:r,paddingY:a},{...v,...p}),...m})}),Br=l.forwardRef(function({orientation:e="horizontal",labelAlign:s="center",decorative:r,className:a,children:o,...i},c){const d=o!=null&&o!==!1&&e==="horizontal";return n.jsx("div",{ref:c,role:r?"none":"separator","aria-orientation":!r&&e==="vertical"?"vertical":void 0,"aria-label":!r&&d&&typeof o=="string"?o:void 0,className:L("ok-divider",d&&"ok-divider--label",a),"data-orientation":e,"data-label-align":d?s:void 0,...i,children:d?n.jsx("span",{className:"ok-divider__label",children:o}):null})}),Ni=l.forwardRef(function({as:e,gap:s,align:r,justify:a,divider:o,padding:i,paddingX:c,paddingY:d,className:u,style:p,children:m,...f},h){const v=e??"div";let b=m;return o&&(b=l.Children.toArray(m).filter(N=>N!=null&&typeof N!="boolean").map((N,x)=>n.jsxs(l.Fragment,{children:[x>0&&(o===!0?n.jsx(Br,{}):o),N]},l.isValidElement(N)&&N.key!=null?N.key:x))),n.jsx(v,{ref:h,className:L("ok-l ok-stack",u),"data-pad":$t({padding:i,paddingX:c,paddingY:d}),style:Qe({gap:s,align:r,justify:a,padding:i,paddingX:c,paddingY:d},p),...f,children:b})}),Fr=l.forwardRef(function({as:e,gap:s,rowGap:r,align:a,justify:o,wrap:i=!0,padding:c,paddingX:d,paddingY:u,className:p,style:m,...f},h){const v=e??"div";return n.jsx(v,{ref:h,className:L("ok-l ok-inline",p),"data-nowrap":i?void 0:"","data-pad":$t({padding:c,paddingX:d,paddingY:u}),style:Qe({gap:s,rowGap:r,align:a,justify:o,padding:c,paddingX:d,paddingY:u},m),...f})}),Ri=Fr,Mi={start:"start",center:"center",end:"end",stretch:"stretch"},Si={start:"start",center:"center",end:"end",stretch:"stretch",baseline:"baseline"},Ci=l.forwardRef(function({as:e,columns:s,minItemWidth:r,gap:a,rowGap:o,align:i,justify:c,padding:d,paddingX:u,paddingY:p,className:m,style:f,...h},v){const b=e??"div",g=r!==void 0,N={...Le("cols",g?void 0:s,x=>Math.max(1,Math.round(x))),...Le("align",i,x=>Si[x]),...Le("justify",c,x=>Mi[x]),...g?{"--ok-grid-min":typeof r=="number"?`${r}px`:r}:null};return n.jsx(b,{ref:v,className:L("ok-l ok-grid",m),"data-auto":g?"":void 0,"data-pad":$t({padding:d,paddingX:u,paddingY:p}),style:Qe({gap:a,rowGap:o,padding:d,paddingX:u,paddingY:p},{...N,...f}),...h})}),Ei=l.forwardRef(function({as:e,span:s,rowSpan:r,className:a,style:o,...i},c){const d=e??"div",u=Le("span",s,p=>p==="full"?"1 / -1":`span ${Math.max(1,Math.round(p))}`);return n.jsx(d,{ref:c,className:L("ok-l ok-grid__item",a),style:{...u,...r?{gridRow:`span ${r}`}:null,...o},...i})}),Ai=l.forwardRef(function({as:e,size:s="lg",gutter:r=!0,center:a=!0,className:o,...i},c){const d=e??"div";return n.jsx(d,{ref:c,className:L("ok-container",o),"data-size":s,"data-gutter":r?void 0:"false","data-center":a?void 0:"false",...i})}),Ti=l.forwardRef(function({as:e,axis:s="both",inline:r,padding:a,paddingX:o,paddingY:i,className:c,style:d,...u},p){const m=e??"div";return n.jsx(m,{ref:p,className:L("ok-l ok-center",c),"data-axis":s,"data-inline":r?"":void 0,"data-pad":$t({padding:a,paddingX:o,paddingY:i}),style:Qe({padding:a,paddingX:o,paddingY:i},d),...u})}),Ii=l.forwardRef(function({size:e,className:s,style:r,...a},o){return n.jsx("div",{ref:o,"aria-hidden":"true",className:L("ok-spacer",s),style:e!==void 0?{flex:`0 0 ${We(e)}`,...r}:r,...a})}),Pi=l.forwardRef(function({ratio:e=16/9,className:s,style:r,...a},o){return n.jsx("div",{ref:o,className:L("ok-aspect",s),style:{aspectRatio:String(e),...r},...a})}),Li=l.forwardRef(function({as:e,edge:s="top",offset:r=0,className:a,style:o,...i},c){const d=e??"div";return n.jsx(d,{ref:c,className:L("ok-sticky",a),"data-edge":s,style:{[s]:typeof r=="number"?We(r):r,...o},...i})}),$i=l.forwardRef(function({direction:e="vertical",label:s,focusable:r=!0,className:a,role:o,tabIndex:i,...c},d){const u=!!(s??c["aria-label"]??c["aria-labelledby"]);return n.jsx("div",{ref:d,role:o??(u?"region":"group"),"aria-label":s,tabIndex:i??(r?0:void 0),className:L("ok-scroll ok-scroll-area",a),"data-direction":e,...c})}),Di=l.forwardRef(function({as:e,size:s="lg",gap:r,padded:a=!0,className:o,style:i,...c},d){const u=e??"div";return n.jsx(u,{ref:d,className:L("ok-l ok-container ok-page",o),"data-size":s,"data-padded":a?void 0:"false",style:Qe({gap:r},i),...c})}),Oi=l.forwardRef(function({title:e,description:s,breadcrumb:r,actions:a,headingLevel:o=1,titleId:i,className:c,children:d,...u},p){const m=`h${o}`;return n.jsxs("header",{ref:p,className:L("ok-page-header",c),...u,children:[r?n.jsx("div",{className:"ok-page-header__breadcrumb",children:r}):null,n.jsxs("div",{className:"ok-page-header__row",children:[n.jsxs("div",{className:"ok-page-header__text",children:[n.jsx(m,{id:i,className:"ok-page-header__title",children:e}),s?n.jsx("p",{className:"ok-page-header__desc",children:s}):null]}),a?n.jsx("div",{className:"ok-page-header__actions",children:a}):null]}),d]})}),Bi=l.forwardRef(function({title:e,description:s,actions:r,headingLevel:a=2,gap:o,className:i,style:c,children:d,...u},p){const m=l.useId(),f=`h${a}`,h=e!=null&&e!==!1,v=u["aria-labelledby"]??(h&&!u["aria-label"]?m:void 0);return n.jsxs("section",{ref:p,className:L("ok-l ok-section",i),style:Qe({gap:o},c),...u,"aria-labelledby":v,children:[h||r?n.jsxs("div",{className:"ok-section__head",children:[n.jsxs("div",{className:"ok-section__text",children:[h?n.jsx(f,{id:m,className:"ok-section__title",children:e}):null,s?n.jsx("p",{className:"ok-section__desc",children:s}):null]}),r?n.jsx("div",{className:"ok-section__actions",children:r}):null]}):null,d]})}),Fi='a[href], button, input:not([type="hidden"]), select, textarea, [tabindex]';function gn(t){return Array.from(t.querySelectorAll(Fi)).filter(e=>!e.disabled&&e.getAttribute("aria-hidden")!=="true"&&!e.closest("[hidden], [inert]"))}function Hi(t){const e=t;if(!e||!e.tagName)return!1;if(e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT")return!0;if(e.tagName!=="INPUT")return!1;const s=e.type;return!["button","checkbox","radio","submit","reset","image","file","color"].includes(s)}function Hr(t,e,s,r,a=!0){if(s===0)return null;const o=r==="horizontal"?"ArrowLeft":"ArrowUp",i=r==="horizontal"?"ArrowRight":"ArrowDown";return t==="Home"?0:t==="End"?s-1:t===i?e+1<s?e+1:a?0:e:t===o?e>0?e-1:a?s-1:e:null}const zi=l.forwardRef(function({orientation:e="horizontal",gap:s,loop:r=!0,wrap:a=!1,className:o,style:i,onKeyDown:c,onFocus:d,...u},p){const m=l.useRef(null),f=l.useRef(null),h=()=>{const g=m.current;if(!g)return;const N=gn(g);if(!N.length)return;const x=f.current&&N.includes(f.current)?f.current:N[0];f.current=x,N.forEach(j=>{j.tabIndex=j===x?0:-1})};ge(h);const v=g=>{d==null||d(g);const N=m.current,x=g.target;N&&x!==N&&gn(N).includes(x)&&(f.current=x,h())},b=g=>{c==null||c(g);const N=m.current;if(g.defaultPrevented||!N||g.altKey||g.ctrlKey||g.metaKey||Hi(g.target))return;const x=gn(N),j=x.indexOf(g.target);if(j<0)return;const _=Hr(g.key,j,x.length,e,r);_!==null&&(g.preventDefault(),x[_].focus())};return n.jsx("div",{ref:xe(p,m),role:"toolbar","aria-orientation":e,className:L("ok-l ok-toolbar",o),"data-orientation":e,"data-wrap":a&&e==="horizontal"?"":void 0,style:Qe({gap:s},i),onFocus:v,onKeyDown:b,...u})}),Tt=l.createContext(!1),qi=l.forwardRef(function({collapsed:e,className:s,children:r,...a},o){const i=l.useContext(Tt),c=e??i,d=l.useRef(null);return ge(()=>{const u=d.current;if(!u)return;const p=()=>{const h=u.querySelector('.ok-nav__item[aria-current]:not([aria-current="false"])');if(!h){u.removeAttribute("data-ready");return}u.style.setProperty("--y",h.offsetTop+"px"),u.style.setProperty("--h",h.offsetHeight+"px"),u.hasAttribute("data-ready")||(u.offsetWidth,u.setAttribute("data-ready",""))};p();const m=typeof ResizeObserver<"u"?new ResizeObserver(p):null;m==null||m.observe(u);const f=typeof MutationObserver<"u"?new MutationObserver(p):null;return f==null||f.observe(u,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current"]}),()=>{m==null||m.disconnect(),f==null||f.disconnect()}},[]),n.jsx(Tt.Provider,{value:c,children:n.jsxs("nav",{ref:xe(o,d),className:L("ok-nav",s),"data-collapsed":c?"":void 0,...a,children:[n.jsx("span",{className:"ok-nav__pill","aria-hidden":"true"}),r]})})}),Vi=l.forwardRef(function({label:e,className:s,children:r,...a},o){const i=l.useId(),c=e!=null&&e!==!1;return n.jsxs("div",{ref:o,role:"group","aria-labelledby":c?i:void 0,className:L("ok-nav__group",s),...a,children:[c?n.jsx("div",{id:i,className:"ok-nav__group-label",children:n.jsx("span",{children:e})}):null,r]})}),Gi=l.forwardRef(function({as:e,current:s,icon:r,badge:a,sub:o,label:i,disabled:c,href:d,className:u,children:p,onClick:m,title:f,...h},v){const b=l.useContext(Tt),g=e??(d!==void 0?"a":"button"),N=i??(typeof p=="string"||typeof p=="number"?String(p):void 0),x=a!=null&&a!==!1,j=k=>{if(c){k.preventDefault();return}m==null||m(k)},_={...d!==void 0&&!c?{href:d}:null,...g==="button"?{type:"button",...c?{disabled:!0}:null}:null};return n.jsxs(g,{ref:v,className:L("ok-nav__item ok-focusable",o&&"ok-nav__item--sub",u),..._,"aria-current":s?"page":void 0,"aria-disabled":c?!0:void 0,"aria-label":b?N:void 0,title:f??(b?N:void 0),"data-has-badge":x?"":void 0,onClick:j,...h,children:[r?n.jsx("span",{className:"ok-nav__icon","aria-hidden":"true",children:r}):null,n.jsx("span",{className:"ok-nav__label",children:p}),x?n.jsx("span",{className:"ok-nav__badge",children:a}):null]})}),zr=l.createContext(null);function ct(t){const e=l.useContext(zr);if(!e)throw new Error(`${t} 必须放在 <AppShell> 里面`);return e}function Wi(){const{root:t,floatGap:e,...s}=ct("useAppShell()");return s}const Ui=l.forwardRef(function({contained:e=!1,collapsed:s="auto",collapseBelow:r="md",asideCollapseBelow:a="lg",sidebarOpen:o,defaultSidebarOpen:i=!1,onSidebarOpenChange:c,asideOpen:d,defaultAsideOpen:u,onAsideOpenChange:p,rail:m,defaultRail:f=!1,onRailChange:h,gap:v,skipLinkLabel:b,mainId:g,className:N,style:x,children:j,..._},k){const R=pe().messages.appShell.skipLink,M=b??R,E=l.useId(),P=g??`ok-main-${E.replace(/[^a-zA-Z0-9_-]/g,"")}`,[C,w]=l.useState(null),[y,S]=le(o,i,c),[O,T]=le(m,f,h),D=at(r),$=at(a),[A,B]=l.useState(null);ge(()=>{if(!C||!e){B(null);return}const ne=()=>{const W=C.getBoundingClientRect().width;B(W>0?W:null)};if(ne(),typeof ResizeObserver>"u")return;const ce=new ResizeObserver(ne);return ce.observe(C),()=>ce.disconnect()},[C,e]);const q=(ne,ce)=>e?A===null||A>=Kt[ne]:ce,H=s==="auto"?!q(r,D):s,U=s==="auto"?!q(a,$):s,[ae,K]=le(d,u??!U,p),I=d!==void 0,F=l.useRef(U),V=F.current===U?ae:U?!1:I?ae:u??!0;l.useEffect(()=>{!H&&y&&S(!1)},[H,y,S]),l.useEffect(()=>{F.current!==U&&(F.current=U,U?K(!1):I||K(u??!0))},[U,I,u,K]);const te=l.useMemo(()=>({sidebarCollapsed:H,asideCollapsed:U,sidebarOpen:y,setSidebarOpen:S,openSidebar:()=>S(!0),closeSidebar:()=>S(!1),toggleSidebar:()=>H?S(ne=>!ne):T(ne=>!ne),rail:O,setRail:T,toggleRail:()=>T(ne=>!ne),asideOpen:V,setAsideOpen:K,toggleAside:()=>K(ne=>!ne),contained:e,mainId:P,root:C,floatGap:v!==void 0?xi(v):void 0}),[H,U,y,S,O,T,V,K,e,P,C,v]),Z=ne=>{const ce=document.getElementById(P);ce&&(ne.preventDefault(),ce.focus())};return n.jsx(zr.Provider,{value:te,children:n.jsxs("div",{ref:xe(k,w),className:L("ok-shell",N),"data-contained":e?"":void 0,"data-collapsed":String(s),"data-collapse-below":r,"data-aside-collapse-below":a,style:v!==void 0?{"--ok-shell-gap":We(v),...x}:x,..._,children:[n.jsx("a",{className:"ok-skip-link ok-focusable",href:`#${P}`,onClick:Z,children:M}),j]})})}),Yi=l.forwardRef(function({variant:e="plain",className:s,...r},a){return ct("<AppShell.Header>"),n.jsx("header",{ref:a,className:L("ok-shell__header",s),"data-variant":e,...r})}),Xi=l.forwardRef(function({variant:e="plain",className:s,...r},a){return ct("<AppShell.Footer>"),n.jsx("footer",{ref:a,className:L("ok-shell__footer",s),"data-variant":e,...r})});function qr(t){const{role:e,...s}=t;return s}const Ki=t=>typeof t=="number"?`${t}px`:t;function Vr(t,e,s,r){return{...e!==void 0?{[`--ok-shell-${t}-w`]:Ki(e)}:null,...s!==void 0?{"--ok-shell-card-pad":We(s)}:null,...r}}const Zi=l.forwardRef(function({label:e,width:s,drawerWidth:r=300,padding:a,closeOnNavigate:o=!0,className:i,style:c,children:d,...u},p){const m=pe().messages.appShell.sidebar,f=e??m,h=ct("<AppShell.Sidebar>"),v=Vr("sidebar",s,a,c);return h.sidebarCollapsed?n.jsx(Je,{...qr(u),ref:p,open:h.sidebarOpen,onOpenChange:h.setSidebarOpen,placement:"left",modal:!0,size:r,gap:h.floatGap,container:h.contained?h.root:void 0,contained:h.contained,"aria-label":f,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:v,children:n.jsx(Tt.Provider,{value:!1,children:n.jsx("div",{className:"ok-shell__drawer-body",onClick:o?b=>Gr(b,h.setSidebarOpen):void 0,children:d})})}):n.jsx("aside",{ref:p,"aria-label":f,className:L("ok-shell__sidebar ok-shell-card ok-scroll",i),"data-rail":h.rail?"":void 0,style:v,...u,children:n.jsx(Tt.Provider,{value:h.rail,children:d})})}),Ji=l.forwardRef(function({label:e,width:s,drawerWidth:r=360,padding:a,closeOnNavigate:o=!1,className:i,style:c,children:d,...u},p){const m=pe().messages.appShell.aside,f=e??m,h=ct("<AppShell.Aside>"),v=Vr("aside",s,a,c);return h.asideCollapsed?n.jsx(Je,{...qr(u),ref:p,open:h.asideOpen,onOpenChange:h.setAsideOpen,placement:"right",modal:!0,size:r,gap:h.floatGap,container:h.contained?h.root:void 0,contained:h.contained,"aria-label":f,className:L("ok-shell-card ok-shell__drawer ok-scroll",i),style:v,children:n.jsx("div",{className:"ok-shell__drawer-body",onClick:o?b=>Gr(b,h.setAsideOpen):void 0,children:d})}):h.asideOpen?n.jsx("aside",{ref:p,"aria-label":f,className:L("ok-shell__aside ok-shell-card ok-scroll",i),style:v,...u,children:d}):null});function Gr(t,e){var r,a;const s=(a=(r=t.target).closest)==null?void 0:a.call(r,"a[href], .ok-nav__item");s&&s.getAttribute("aria-disabled")!=="true"&&e(!1)}const Qi=l.forwardRef(function({className:e,id:s,tabIndex:r,...a},o){const i=ct("<AppShell.Main>");return n.jsx("main",{ref:o,id:s??i.mainId,tabIndex:r??-1,className:L("ok-shell__main ok-scroll",e),...a})}),ec=l.forwardRef(function({target:e="sidebar",label:s,drawerOnly:r,className:a,children:o,onClick:i,...c},d){const{messages:u}=pe(),p=ct("<AppShell.Trigger>"),m=e==="sidebar",f=m?p.sidebarCollapsed:p.asideCollapsed;if(!f&&r)return null;const h=m?f?p.sidebarOpen:!p.rail:p.asideOpen;return n.jsx("button",{ref:d,type:"button",className:L("ok-btn ok-btn--ghost ok-btn--icon ok-focusable",a),"aria-label":s??(m?u.appShell.toggleSidebar:u.appShell.toggleAside),"aria-expanded":h,"aria-haspopup":f?"dialog":void 0,onClick:It(i,()=>m?p.toggleSidebar():p.toggleAside()),...c,children:o??n.jsx(he,{children:n.jsx("path",{d:"M3.5 6h13M3.5 10h13M3.5 14h13"})})})}),tc=Object.assign(Ui,{Header:Yi,Sidebar:Zi,Main:Qi,Aside:Ji,Footer:Xi,Trigger:ec}),Wr=l.createContext(null),Rs=t=>typeof t=="number"?`${t}px`:t,nc=l.forwardRef(function({value:e,defaultValue:s,onChange:r,action:a,position:o="fixed",layout:i="auto",insetStart:c,insetEnd:d,className:u,style:p,children:m,onKeyDown:f,...h},v){const[b,g]=le(e,s,r),N=l.useRef(null),[x,j]=l.useState(0),_=()=>{const M=N.current;if(!M)return;const E=M.querySelector('.ok-tabbar__item[aria-current="page"]');if(!E){M.removeAttribute("data-ready");return}M.style.setProperty("--x",E.offsetLeft+"px"),M.style.setProperty("--w",E.offsetWidth+"px"),M.hasAttribute("data-ready")||(M.offsetWidth,M.setAttribute("data-ready",""))},k=l.useRef(_);k.current=_,ge(()=>{var E;const M=(E=N.current)!=null&&E.querySelector(".ok-tabbar__label")?N.current.querySelectorAll(".ok-tabbar__item").length:0;M!==x&&j(M),_()}),ge(()=>{const M=N.current;if(!M||typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>k.current());return E.observe(M),()=>E.disconnect()},[]);const R=M=>{f==null||f(M);const E=N.current;if(M.defaultPrevented||!E||M.altKey||M.ctrlKey||M.metaKey)return;const P=Array.from(E.querySelectorAll('.ok-tabbar__item:not([aria-disabled="true"])')),C=P.indexOf(M.target);if(C<0)return;const w=Hr(M.key,C,P.length,"horizontal");w!==null&&(M.preventDefault(),P[w].focus())};return n.jsx(Wr.Provider,{value:{value:b,select:g},children:n.jsxs("nav",{ref:v,className:L("ok-tabbar",u),"data-position":o,"data-layout":i==="auto"?x>=4?"stacked":"inline":i,style:c!==void 0||d!==void 0?{"--ok-tabbar-inset-start":Rs(c),"--ok-tabbar-inset-end":Rs(d),...p}:p,onKeyDown:R,...h,children:[n.jsxs("div",{ref:N,className:"ok-tabbar__list",children:[n.jsx("span",{className:"ok-tabbar__thumb","aria-hidden":"true"}),m]}),a?n.jsx("div",{className:"ok-tabbar__action",children:a}):null]})})}),Ur=l.forwardRef(function({value:e,as:s,icon:r,badge:a,label:o,disabled:i,href:c,className:d,children:u,onClick:p,...m},f){const h=l.useContext(Wr),v=s??(c!==void 0?"a":"button"),b=(h==null?void 0:h.value)===e,g=j=>{if(i){j.preventDefault();return}p==null||p(j),j.defaultPrevented||h==null||h.select(e)},N=u!=null&&u!==!1,x={...c!==void 0&&!i?{href:c}:null,...v==="button"?{type:"button",...i?{disabled:!0}:null}:null};return n.jsxs(v,{ref:f,className:L("ok-tabbar__item ok-focusable",d),...x,"aria-current":b?"page":void 0,"aria-disabled":i?!0:void 0,"aria-label":N?void 0:o,"data-value":e,onClick:g,...m,children:[r?n.jsx("span",{className:"ok-tabbar__icon","aria-hidden":"true",children:r}):null,N?n.jsx("span",{className:"ok-tabbar__label",children:u}):null,a!=null&&a!==!1?n.jsx("span",{className:"ok-tabbar__badge",children:a}):null]})}),sc=Object.assign(nc,{Item:Ur}),rc=l.forwardRef(function({orientation:e="horizontal",value:s,defaultValue:r=50,onChange:a,min:o=20,max:i=80,step:c=2,stackBelow:d="md",stacked:u,separatorLabel:p,className:m,style:f,children:h,...v},b){const{messages:g}=pe(),N=p??g.splitPane.separator,[x,j]=le(s,r,a),_=l.useRef(null),k=l.useRef(null),R=l.useRef(!1),[M,E]=l.useState(!1),[P,C]=l.useState(!1),w=l.useId(),[y,S]=l.Children.toArray(h),O=ye(x,o,i),T=e==="horizontal",D=T?d:!1;ge(()=>{const I=_.current;if(!I||u!==void 0||D===!1){C(!1);return}const F=Kt[D],V=()=>{const Z=I.getBoundingClientRect().width;C(Z>0&&Z<F)};if(V(),typeof ResizeObserver>"u")return;const te=new ResizeObserver(V);return te.observe(I),()=>te.disconnect()},[u,D]);const $=u??P,A=I=>j(ye(Math.round(I*10)/10,o,i)),B=I=>{const F=k.current;if(!F)return;const V=F.getBoundingClientRect(),te=T?V.width:V.height;if(te<=0)return;let Z=T?(I.clientX-V.left)/te:(I.clientY-V.top)/te;T&&getComputedStyle(F).direction==="rtl"&&(Z=1-Z),A(Z*100)},q=I=>{var F,V;$||I.button!==0||(I.preventDefault(),I.currentTarget.focus(),(V=(F=I.currentTarget).setPointerCapture)==null||V.call(F,I.pointerId),R.current=!0,E(!0))},H=I=>{R.current&&B(I)},U=I=>{var F,V;R.current&&(R.current=!1,E(!1),(V=(F=I.currentTarget).releasePointerCapture)==null||V.call(F,I.pointerId))},ae=I=>{if($)return;const F=I.shiftKey?10:c,V=T?"ArrowLeft":"ArrowUp",te=T?"ArrowRight":"ArrowDown";let Z=null;I.key===V?Z=O-F:I.key===te?Z=O+F:I.key==="Home"?Z=o:I.key==="End"?Z=i:I.key==="Enter"&&(Z=r),Z!==null&&(I.preventDefault(),A(Z))},K=!$;return n.jsx("div",{ref:xe(b,_),className:L("ok-split",m),"data-orientation":e,"data-stack-below":u===void 0&&D?D:void 0,"data-stacked":u!==void 0?String(u):P?"true":void 0,"data-dragging":M?"":void 0,style:{"--ok-split-size":O,...f},...v,children:n.jsxs("div",{ref:k,className:"ok-split__track",children:[n.jsx("div",{id:w,className:"ok-split__pane ok-split__pane--first",children:y}),n.jsx("div",{role:"separator",className:"ok-split__sep ok-focusable",tabIndex:K?0:void 0,"aria-orientation":$?"horizontal":T?"vertical":"horizontal","aria-label":K?N:void 0,"aria-controls":K?w:void 0,"aria-valuenow":K?Math.round(O):void 0,"aria-valuemin":K?o:void 0,"aria-valuemax":K?i:void 0,onPointerDown:q,onPointerMove:H,onPointerUp:U,onPointerCancel:U,onDoubleClick:K?()=>A(r):void 0,onKeyDown:ae}),n.jsx("div",{className:"ok-split__pane ok-split__pane--second",children:S})]})})});exports.ACCENTS=Ys;exports.Accordion=Hl;exports.Alert=Kl;exports.AppShell=tc;exports.AspectRatio=Pi;exports.Autocomplete=ml;exports.Avatar=Kn;exports.AvatarGroup=ci;exports.BREAKPOINTS=Kt;exports.Badge=Wl;exports.Box=wi;exports.Breadcrumb=zl;exports.Button=er;exports.ButtonGroup=ja;exports.Calendar=Sr;exports.Card=Nl;exports.CardBody=Sl;exports.CardFooter=Cl;exports.CardHeader=Ml;exports.CardLink=Rl;exports.CardMedia=El;exports.Center=Ti;exports.Checkbox=Oa;exports.CheckboxGroup=Fa;exports.Chip=Ya;exports.ChipGroup=Za;exports.Cluster=Ri;exports.Code=fi;exports.CodeBlock=hi;exports.ColorPicker=so;exports.ColorSwatches=or;exports.Combobox=Rr;exports.CommandPalette=Wo;exports.Confirmer=vr;exports.Container=Ai;exports.ContextMenu=dl;exports.Count=Yl;exports.DatePicker=gl;exports.DateRangePicker=kl;exports.DescriptionItem=Tr;exports.DescriptionList=Ll;exports.Dialog=mr;exports.Divider=Br;exports.Dots=ri;exports.Drawer=To;exports.DropdownMenu=il;exports.EmptyState=ai;exports.Field=Ia;exports.FieldContext=Ie;exports.Fieldset=Pa;exports.FileDrop=uo;exports.FloatingBody=_o;exports.FloatingCard=Je;exports.FloatingFooter=jo;exports.FloatingGrip=hr;exports.FloatingHeader=yo;exports.FloatingPanel=$o;exports.FocusScope=Ps;exports.Form=$a;exports.FormActions=Da;exports.Grid=Ci;exports.GridItem=Ei;exports.Group=Al;exports.Heading=_l;exports.Hide=bi;exports.Hotkey=oo;exports.ICONS=Tn;exports.Icon=he;exports.Image=Ar;exports.Inline=Fr;exports.Input=On;exports.KEY_SYMBOL=lr;exports.Kbd=ro;exports.LOGO_SNOUT_MIN_CONTRAST=kn;exports.Label=La;exports.List=Il;exports.ListItem=Pl;exports.LocaleProvider=Us;exports.Menu=sn;exports.MenuCheckboxItem=nl;exports.MenuItem=tl;exports.MenuLabel=ol;exports.MenuRadioGroup=sl;exports.MenuRadioItem=rl;exports.MenuSeparator=al;exports.MenuSub=ll;exports.Meter=ei;exports.MultiSelect=pl;exports.Nav=qi;exports.NavGroup=Vi;exports.NavItem=Gi;exports.NumberInput=Ea;exports.OINK_LOGO_INK_PATH=Js;exports.OINK_LOGO_NOSTRILS=wn;exports.OINK_LOGO_SNOUT=zt;exports.OINK_MESSAGES=Et;exports.ON_ACCENT_THRESHOLD=Hs;exports.OinkLogo=ka;exports.OinkProvider=ga;exports.OptionCard=Ja;exports.OptionCardGroup=Qa;exports.Page=Di;exports.PageHeader=Oi;exports.Pagination=Pr;exports.Panel=gr;exports.PinInput=Aa;exports.Popover=Wn;exports.Portal=it;exports.Progress=Zl;exports.ProgressRing=Ql;exports.Radio=Ha;exports.RadioGroup=za;exports.RangeCalendar=Cr;exports.RangeSlider=Ga;exports.Rating=io;exports.Reaction=ui;exports.Roll=an;exports.Row=Tl;exports.SERVER_LOCALE=Gs;exports.ScrollArea=$i;exports.SearchInput=Ma;exports.Section=Bi;exports.Segmented=Ua;exports.Select=ul;exports.Sheet=Io;exports.Show=mi;exports.Skeleton=ti;exports.Slider=Va;exports.Spacer=Ii;exports.Spinner=si;exports.SplitPane=rc;exports.Stack=Ni;exports.Stat=oi;exports.Steps=ql;exports.Sticky=Li;exports.Surface=jl;exports.Switch=qa;exports.TAIL_PATH=qs;exports.THEME_REVEAL_MS=Ks;exports.TabBar=sc;exports.TabBarItem=Ur;exports.Table=Bl;exports.Tabs=Fl;exports.Tag=Ul;exports.TailGlyph=Ln;exports.TailProvider=Vs;exports.Text=yl;exports.Textarea=Ra;exports.Timeline=Vl;exports.Toaster=zo;exports.ToggleButton=wa;exports.Toolbar=zi;exports.Tooltip=Zo;exports.Tree=Gl;exports.VisuallyHidden=In;exports.accentVars=_n;exports.animate=Ne;exports.burst=Dr;exports.canUseDOM=Ae;exports.captureFocusTrail=En;exports.chain=It;exports.clamp=ye;exports.computePosition=yr;exports.confirm=Co;exports.contrastRatio=Ct;exports.cx=L;exports.detectLocale=Ws;exports.ease=De;exports.flip=Qr;exports.floatMotion=Es;exports.formatISODate=Be;exports.getFocusable=St;exports.hexToHsv=Os;exports.hsvToHex=Bs;exports.hsvToRgb=Ds;exports.initialsOf=Lr;exports.isAccent=Xs;exports.isCustomAccent=Rt;exports.keyName=Wt;exports.keySymbol=Bn;exports.logoSnoutColors=yn;exports.luminance=xn;exports.mergeRefs=xe;exports.normalizeAccent=$n;exports.normalizeHex=Ve;exports.onAccentColor=zs;exports.paginationRange=Ir;exports.parseHex=gt;exports.parseISODate=Xn;exports.perceivedLightness=Pn;exports.playFlip=Yt;exports.presets=Cn;exports.resolveFloatSize=Qt;exports.resolveTriggerPoint=cr;exports.restoreFocusTo=An;exports.rgbToHsv=$s;exports.speed=Fe;exports.spring=Sn;exports.supportsLinear=Cs;exports.toHex=ot;exports.toast=Bo;exports.useAppShell=Wi;exports.useBreakpoint=at;exports.useBusy=Na;exports.useControllable=le;exports.useEscape=Lt;exports.useEvent=ke;exports.useFieldControl=_e;exports.useFloatingCard=pr;exports.useInertOthers=Ts;exports.useIsoLayoutEffect=ge;exports.useLocale=pe;exports.useMediaQuery=Xt;exports.useOink=xa;exports.useOutsidePress=ea;exports.usePosition=tn;exports.usePresence=Pt;exports.useScrollLock=As;exports.useTail=la;exports.wait=Zr;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),l=require("react"),Ss=require("react-dom"),Xr=require("react-dom/client");function P(...t){const e=[],s=r=>{if(!(!r&&r!==0)){if(typeof r=="string"||typeof r=="number")e.push(String(r));else if(Array.isArray(r))r.forEach(s);else if(typeof r=="object")for(const a in r)r[a]&&e.push(a)}};return t.forEach(s),e.join(" ")}const ye=(t,e,s)=>Math.min(s,Math.max(e,t)),Ae=typeof window<"u"&&typeof document<"u",Kr='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';function St(t){return Array.from(t.querySelectorAll(Kr)).filter(e=>{if(e.closest('[inert], [aria-hidden="true"]'))return!1;const s=getComputedStyle(e);return s.display!=="none"&&s.visibility!=="hidden"})}function It(...t){return e=>{for(const s of t)if(s==null||s(e),e.defaultPrevented)break}}function Fe(){if(!Ae)return 1;const t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--ok-ms"));return Number.isFinite(t)?t:1}const Zr=t=>new Promise(e=>setTimeout(e,t*Fe()));function Jr(t,e,s){const r=Math.sqrt(t/s),a=e/(2*Math.sqrt(t*s));if(a<1){const d=r*Math.sqrt(1-a*a);return u=>1-Math.exp(-a*r*u)*(Math.cos(d*u)+a*r/d*Math.sin(d*u))}if(a===1)return d=>1-Math.exp(-r*d)*(1+r*d);const o=Math.sqrt(a*a-1),i=-r*(a-o),c=-r*(a+o);return d=>1-(c*Math.exp(i*d)-i*Math.exp(c*d))/(c-i)}function Sn(t={}){const e=t.stiffness||260,s=t.damping||24,r=t.mass||1,a=Jr(e,s,r);let o=.1;for(let u=3;u>0;u-=1/240)if(Math.abs(a(u)-1)>(t.precision||.004)){o=u+1/240;break}const i=ye(Math.round(o*70),18,48),c=[];let d=1;for(let u=0;u<=i;u++){const p=u===i?1:a(o*u/i);p>d&&(d=p),c.push(+p.toFixed(3))}return{stiffness:e,damping:s,mass:r,duration:Math.round(o*1e3),easing:"linear("+c.join(", ")+")",overshoot:d-1,at:u=>a(u*o)}}var Ms;const Cs=Ae&&typeof CSS<"u"&&!!((Ms=CSS.supports)!=null&&Ms.call(CSS,"transition-timing-function","linear(0, 1)")),De={out:"cubic-bezier(.22, 1, .36, 1)",in:"cubic-bezier(.55, 0, 1, .45)",inOut:"cubic-bezier(.65, 0, .35, 1)",standard:"cubic-bezier(.2, 0, 0, 1)"},Es={in:303,fade:100,out:160},un={soft:{stiffness:170,damping:26,fallback:"cubic-bezier(.22, 1, .36, 1)"},spring:{stiffness:260,damping:24,fallback:"cubic-bezier(.3, 1.3, .5, 1)"},snappy:{stiffness:520,damping:34,fallback:"cubic-bezier(.3, 1.25, .45, 1)"},bouncy:{stiffness:300,damping:18,fallback:"cubic-bezier(.3, 1.7, .5, 1)"},wobbly:{stiffness:180,damping:9,fallback:"cubic-bezier(.3, 2.3, .5, 1)"}},Cn=Object.fromEntries(Object.keys(un).map(t=>[t,{...Sn(un[t]),fallback:un[t].fallback}]));function Ne(t,e,s={}){if(!t||typeof t.animate!="function")return null;const{spring:r,...a}=s,o={duration:240,easing:De.out,...a};if(r){const c=typeof r=="string"?Cn[r]:Sn(r);o.duration=c.duration,o.easing=Cs?c.easing:c.fallback||De.out}const i=Fe();return o.duration=Math.max(0,o.duration*i),o.delay&&(o.delay*=i,o.fill||(o.fill="backwards")),t.animate(e,o)}function Qr(t,e,s){const r=t.filter(Boolean),a=new Map(r.map(o=>[o,o.getBoundingClientRect()]));e(),Yt(a,s)}function Yt(t,e){t.forEach((s,r)=>{if(!r.isConnected)return;const a=r.getBoundingClientRect(),o=s.left-a.left,i=s.top-a.top;Math.abs(o)<.5&&Math.abs(i)<.5||Ne(r,[{transform:`translate(${o}px, ${i}px)`},{transform:"none"}],{spring:"spring",...e})})}const ge=Ae?l.useLayoutEffect:l.useEffect;function ke(t){const e=l.useRef(t);return ge(()=>{e.current=t}),l.useCallback((...s)=>{var r;return(r=e.current)==null?void 0:r.call(e,...s)},[])}function le(t,e,s){const[r,a]=l.useState(e),o=t!==void 0,i=o?t:r,c=ke(s),d=l.useRef(i),u=l.useRef(o),p=l.useRef(null);ge(()=>{d.current=i,u.current=o,p.current=null});const h=l.useCallback(f=>{const m=p.current?p.current.value:d.current,b=typeof f=="function"?f:null,v=b?b(m):f;if(Object.is(v,m))return;const g={value:v};p.current=g,Promise.resolve().then(()=>{p.current===g&&(p.current=null)}),u.current||a(b?N=>b(N):()=>v),c(v)},[c]);return[i,h]}function xe(...t){return e=>{t.forEach(s=>{typeof s=="function"?s(e):s&&(s.current=e)})}}function Xt(t,e=!1){const s=l.useCallback(r=>{if(!Ae)return()=>{};const a=window.matchMedia(t);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[t]);return l.useSyncExternalStore(s,()=>window.matchMedia(t).matches,()=>e)}const Kt={sm:520,md:768,lg:1024,xl:1280};function at(t,e=!0){return Xt(`(min-width: ${Kt[t]}px)`,e)}function Pt(t,e=400){const[s,r]=l.useState(t),[a,o]=l.useState("closed"),i=l.useRef(null);return ge(()=>{t&&r(!0)},[t]),l.useEffect(()=>{if(!s)return;if(t){let f=0,m=0;const b=()=>{const g=i.current;if(!g&&m++<10){f=requestAnimationFrame(b);return}g==null||g.offsetWidth,o("open")};b();const v=setTimeout(()=>{cancelAnimationFrame(f),b()},100);return()=>{cancelAnimationFrame(f),clearTimeout(v)}}o("closed");const c=i.current;let d=!1;const u=()=>{d||(d=!0,r(!1))},p=f=>{f.target===c&&u()};c==null||c.addEventListener("transitionend",p);const h=setTimeout(u,e*Fe());return()=>{c==null||c.removeEventListener("transitionend",p),clearTimeout(h)}},[t,s,e]),{mounted:s,state:t?a:"closed",ref:i}}let ls=0,_t=null;function As(t){l.useEffect(()=>{if(!(!t||!Ae)){if(ls++===0){const e=document.documentElement,s=e.style.overflow,r=e.style.paddingRight,a=window.innerWidth-e.clientWidth;e.style.overflow="hidden",a>0&&(e.style.paddingRight=a+"px"),_t=()=>{e.style.overflow=s,e.style.paddingRight=r}}return()=>{--ls===0&&(_t==null||_t(),_t=null)}}},[t])}const jt=[];function Lt(t,e){const s=ke(e);l.useEffect(()=>{if(!t||!Ae)return;jt.push(s);const r=a=>{a.key!=="Escape"||a.defaultPrevented||jt[jt.length-1]===s&&(a.preventDefault(),s())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r);const a=jt.lastIndexOf(s);a>=0&&jt.splice(a,1)}},[t,s])}function ea(t,e,s){const r=ke(s),a=l.useRef(e);a.current=e,l.useEffect(()=>{if(!t||!Ae)return;const o=i=>{const c=i.target;a.current.some(d=>d.current&&d.current.contains(c))||r(i)};return document.addEventListener("pointerdown",o,!0),()=>document.removeEventListener("pointerdown",o,!0)},[t,r])}const Bt=new Map,ta='[data-ok-layer], .ok-popup, .ok-toasts, .ok-tooltip, [role="tooltip"], [data-ok-confirmer], [aria-live], script, style, link, template, noscript';function Ts(t,e){l.useEffect(()=>{if(!t||!Ae)return;const s=e.current,r="inert"in HTMLElement.prototype,a=[];return Array.from(document.body.children).forEach(o=>{if(o.matches(ta)||s&&o.contains(s))return;let i=Bt.get(o);i||(i={count:0,inert:o.hasAttribute("inert"),ariaHidden:o.getAttribute("aria-hidden"),viaInert:r},Bt.set(o,i),r?o.setAttribute("inert",""):o.setAttribute("aria-hidden","true")),i.count++,a.push(o)}),()=>{a.forEach(o=>{const i=Bt.get(o);!i||--i.count>0||(Bt.delete(o),i.viaInert?i.inert||o.removeAttribute("inert"):i.ariaHidden===null?o.removeAttribute("aria-hidden"):o.setAttribute("aria-hidden",i.ariaHidden))})}},[t,e])}function it({children:t,container:e,disabled:s}){const[r,a]=l.useState(null);return l.useEffect(()=>{a(e??document.body)},[e]),s?n.jsx(n.Fragment,{children:t}):r?Ss.createPortal(t,r):null}const na='a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex], [contenteditable="true"]';function En(t){const e=t instanceof HTMLElement&&t!==document.body&&t!==document.documentElement?t:null,s=[];for(let r=(e==null?void 0:e.parentElement)??null;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement)s.push(r);return{target:e,ancestors:s}}const Is=t=>!!t.closest('[inert], [aria-hidden="true"]'),is=t=>t.isConnected&&!Is(t);function An(t){var a,o;if(!t||!t.target)return null;const e={preventScroll:!0};if(t.target.isConnected)return Is(t.target)?null:(t.target.focus(e),t.target);const s=t.ancestors.find(i=>is(i)&&i.matches(na));if(s)return s.focus(e),s;const r=document.querySelector('main, [role="main"]');return r&&is(r)?(r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus(e),r):((o=(a=document.activeElement)==null?void 0:a.blur)==null||o.call(a),document.body)}function Ps({children:t,trap:e=!0,autoFocus:s=!0,restoreFocus:r=!0,initialFocus:a,scopeRef:o}){const i=l.useRef(null),c=l.useRef(r);return c.current=r,l.useEffect(()=>{const d=o.current;if(d)return(!i.current||!d.contains(document.activeElement))&&(i.current=En(document.activeElement)),s&&!d.contains(document.activeElement)&&((a==null?void 0:a.current)??d.querySelector("[data-autofocus]")??d).focus({preventScroll:!0}),()=>{c.current&&An(i.current)}},[]),l.useEffect(()=>{const d=o.current;if(!e||!d)return;const u=h=>{if(h.key!=="Tab")return;const f=St(d);if(!f.length){h.preventDefault(),d.focus();return}const m=f[0],b=f[f.length-1],v=document.activeElement;h.shiftKey&&(v===m||v===d)?(h.preventDefault(),b.focus()):!h.shiftKey&&v===b&&(h.preventDefault(),m.focus())},p=h=>{var m;const f=h.target;d.contains(f)||((m=f.closest)==null?void 0:m.call(f,"[data-ok-layer]"))!==d.closest("[data-ok-layer]")||(St(d)[0]??d).focus()};return d.addEventListener("keydown",u),document.addEventListener("focusin",p),()=>{d.removeEventListener("keydown",u),document.removeEventListener("focusin",p)}},[e,o]),n.jsx(n.Fragment,{children:t})}const Tn={search:'<circle cx="9" cy="9" r="5.5"/><path d="M13.2 13.2L17 17"/>',check:'<path d="M4.500 10.500l3.500 3.500 7.500-8"/>',x:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',plus:'<path d="M10 4.500v11M4.500 10h11"/>',minus:'<path d="M4.500 10h11"/>',"chevron-right":'<path d="M7.500 4.500L13 10l-5.500 5.500"/>',"chevron-down":'<path d="M4.500 7.500L10 13l5.500-5.500"/>',sun:'<circle cx="10" cy="10" r="3.300"/><path d="M10 2.500v1.800M10 15.700v1.800M2.500 10h1.800M15.700 10h1.800M4.700 4.700L6 6M14 14l1.300 1.300M4.700 15.300L6 14M14 6l1.300-1.300"/>',moon:'<path d="M16.500 11.800A7 7 0 1 1 8.200 3.500a5.500 5.500 0 0 0 8.300 8.300z"/>',monitor:'<rect x="3" y="4" width="14" height="9.500" rx="2.200"/><path d="M7.500 16.500h5M10 13.500v3"/>',copy:'<rect x="7" y="7" width="9.500" height="9.500" rx="2.500"/><path d="M13 7V5.500A2 2 0 0 0 11 3.500H5.500a2 2 0 0 0-2 2V11a2 2 0 0 0 2 2H7"/>',play:'<path d="M7 4.600v10.800a.7.700 0 0 0 1.100.600l8-5.400a.7.700 0 0 0 0-1.200l-8-5.400A.7.700 0 0 0 7 4.600z" fill="currentColor" stroke="none"/>',replay:'<path d="M4.300 10a5.700 5.700 0 1 0 1.900-4.200M4 3.500v3h3"/>',info:'<circle cx="10" cy="10" r="7"/><path d="M10 9.300v4.200M10 6.500v.1"/>',alert:'<path d="M10 3.500l7 12.500H3l7-12.500zM10 8.500v3.200M10 14v.1"/>',bell:'<path d="M5.500 8.500a4.500 4.500 0 0 1 9 0c0 4 1.500 5 1.500 5H4s1.500-1 1.500-5zM8.300 16.200a1.800 1.800 0 0 0 3.400 0"/>',trash:'<path d="M4.500 6h11M8 6V4.500h4V6M6 6l.7 8.800a1.600 1.600 0 0 0 1.600 1.500h3.400a1.600 1.600 0 0 0 1.600-1.500L14 6"/>',more:'<path d="M5 10v.1M10 10v.1M15 10v.1" stroke-width="2.600"/>',download:'<path d="M10 3.500v9M6.500 9.500L10 13l3.500-3.500M4.500 16.500h11"/>',upload:'<path d="M10 13V4M6.500 7.500L10 4l3.500 3.500M4.500 16.500h11"/>',edit:'<path d="M4 16l.8-3.300L13.400 4a1.700 1.700 0 0 1 2.400 0l.2.2a1.700 1.700 0 0 1 0 2.400L7.300 15.200 4 16z"/>',share:'<path d="M10 12.500V3.500M6.800 6.500L10 3.500l3.200 3M5 10v5a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15v-5"/>',mail:'<rect x="3" y="4.800" width="14" height="10.500" rx="2.500"/><path d="M3.800 7l6.200 4.300L16.200 7"/>',sparkle:'<path d="M10 3.500l1.700 4.800 4.800 1.700-4.800 1.700L10 16.500l-1.700-4.800L3.500 10l4.800-1.700z"/>',shuffle:'<path d="M3.500 6h2.300c1.400 0 2.600.7 3.300 1.900l1.800 4.200c.7 1.200 1.900 1.900 3.300 1.900h2.300M14.500 4l2 2-2 2M14.500 12l2 2-2 2M3.500 14h2.300c.9 0 1.700-.3 2.300-.8M16.500 6h-2.300c-.9 0-1.700.3-2.300.8"/>',sliders:'<path d="M3.500 6.500h6M13.500 6.500h3M3.500 13.500h3M10.500 13.500h6"/><circle cx="11.500" cy="6.500" r="2"/><circle cx="8.500" cy="13.500" r="2"/>',home:'<path d="M3.5 9.2L10 3.5l6.5 5.7V15a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 15V9.2z"/><path d="M8 16.5V12h4v4.5"/>',user:'<circle cx="10" cy="7" r="3.2"/><path d="M4 16.5c.7-2.8 3-4.3 6-4.3s5.3 1.5 6 4.3"/>',users:'<circle cx="7.5" cy="7.2" r="2.8"/><path d="M2.5 16c.6-2.5 2.5-3.800 5-3.800s4.400 1.300 5 3.800M12.800 4.600a2.800 2.800 0 0 1 0 5.200M14.800 12.500c1.400.5 2.300 1.700 2.700 3.500"/>',settings:'<path d="M8.600 3h2.800l.5 2 1.800 1 2-.6 1.400 2.400-1.500 1.500v1.400l1.500 1.500-1.400 2.400-2-.6-1.800 1-.5 2H8.600l-.5-2-1.800-1-2 .6-1.400-2.400 1.500-1.500V9.300L2.900 7.800l1.400-2.400 2 .6 1.800-1z"/><circle cx="10" cy="10" r="2.500"/>',heart:'<path d="M10 16.500S3.500 12.700 3.500 8.200A3.700 3.700 0 0 1 10 5.900a3.700 3.700 0 0 1 6.500 2.300c0 4.500-6.500 8.300-6.500 8.300z"/>',star:'<path d="M10 3.500l1.800 4.500 4.900.4-3.700 3.100 1.100 4.700L10 13.600l-4.100 2.600 1.100-4.700-3.700-3.100 4.900-.4z"/>',cart:'<path d="M2.500 3.500h2l1.800 8.500h8.200l1.500-6H5"/><circle cx="7.500" cy="15.500" r="1.200"/><circle cx="13.500" cy="15.500" r="1.200"/>',bag:'<path d="M4.500 7h11l-.7 8.100a1.500 1.500 0 0 1-1.500 1.400H6.700a1.500 1.500 0 0 1-1.500-1.400L4.500 7z"/><path d="M7.500 9V6.500a2.500 2.500 0 0 1 5 0V9"/>',grid:'<rect x="3.500" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="3.500" width="5.500" height="5.500" rx="1.500"/><rect x="3.500" y="11" width="5.500" height="5.500" rx="1.500"/><rect x="11" y="11" width="5.500" height="5.500" rx="1.500"/>',list:'<path d="M7.500 5.500h9M7.500 10h9M7.500 14.500h9"/><path d="M3.800 5.500v.1M3.800 10v.1M3.800 14.500v.1" stroke-width="2.400"/>',filter:'<path d="M3.500 4.500h13l-5 6V15l-3 1.500v-6l-5-6z"/>',calendar:'<rect x="3.500" y="4.500" width="13" height="12" rx="2.500"/><path d="M3.500 8.500h13M7 3v3M13 3v3"/>',clock:'<circle cx="10" cy="10" r="7"/><path d="M10 6v4l2.500 1.500"/>',inbox:'<path d="M3.500 11l2-6a1.500 1.500 0 0 1 1.400-1h6.200a1.500 1.500 0 0 1 1.400 1l2 6v3.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V11z"/><path d="M3.500 11H7l1 2h4l1-2h3.500"/>',send:'<path d="M16.500 3.500L3.500 8.700l5.300 2.500 2.500 5.300 5.200-13zM8.800 11.200L12 8"/>',archive:'<rect x="3" y="4" width="14" height="4" rx="1.200"/><path d="M4.500 8v6.500A1.500 1.500 0 0 0 6 16h8a1.500 1.500 0 0 0 1.500-1.500V8M8.300 11.200h3.400"/>',reply:'<path d="M8 5.500L3.500 10 8 14.500M3.500 10h8a5 5 0 0 1 5 5v.5"/>',forward:'<path d="M12 5.500l4.500 4.500-4.500 4.500M16.500 10h-8a5 5 0 0 0-5 5v.5"/>',paperclip:'<path d="M15.500 9.500l-5.700 5.700a3.540 3.540 0 0 1-5-5l6-6a2.340 2.340 0 0 1 3.300 3.300l-5.900 5.900a1.200 1.200 0 0 1-1.700-1.700l5.300-5.300"/>',folder:'<path d="M3.500 6A1.500 1.500 0 0 1 5 4.500h3l1.800 2H15A1.500 1.500 0 0 1 16.500 8v6.500A1.500 1.500 0 0 1 15 16H5a1.500 1.500 0 0 1-1.500-1.500V6z"/>',file:'<path d="M11.500 3.500h-5A1.500 1.500 0 0 0 5 5v10a1.500 1.500 0 0 0 1.500 1.500h7A1.500 1.500 0 0 0 15 15V7l-3.500-3.500z"/><path d="M11.500 3.500V7H15"/>',image:'<rect x="3.500" y="4" width="13" height="12" rx="2.500"/><circle cx="7.500" cy="8" r="1.300"/><path d="M4.200 13.800l3.300-3.300 3 3 2-2 3.300 3.300"/>',link:'<path d="M8.500 11.500a3.200 3.200 0 0 0 4.500 0L15.500 9A3.200 3.200 0 0 0 11 4.500l-.8.8"/><path d="M11.500 8.500a3.200 3.200 0 0 0-4.500 0L4.500 11A3.200 3.200 0 0 0 9 15.500l.8-.8"/>',external:'<path d="M11.500 4H16v4.500M16 4l-7 7M14 11.500V15a1.500 1.500 0 0 1-1.500 1.500H5A1.500 1.500 0 0 1 3.500 15V7.500A1.500 1.500 0 0 1 5 6h3.500"/>',eye:'<path d="M2.500 10S5.200 5 10 5s7.500 5 7.500 5-2.700 5-7.500 5-7.500-5-7.500-5z"/><circle cx="10" cy="10" r="2.300"/>',"eye-off":'<path d="M8.300 5.200A7 7 0 0 1 10 5c4.800 0 7.500 5 7.500 5a12.500 12.500 0 0 1-1.900 2.500M12.900 14.300A6.500 6.500 0 0 1 10 15c-4.800 0-7.500-5-7.500-5a12.300 12.300 0 0 1 3.300-3.700M3.500 3.500l13 13M8.400 8.400a2.300 2.300 0 0 0 3.200 3.200"/>',lock:'<rect x="4.500" y="9" width="11" height="7.500" rx="2"/><path d="M7 9V6.500a3 3 0 0 1 6 0V9"/>',tag:'<path d="M3.500 4.500v5.200a1.500 1.500 0 0 0 .4 1l5.700 5.700a1.500 1.500 0 0 0 2.100 0l4.700-4.700a1.500 1.500 0 0 0 0-2.100l-5.700-5.700a1.500 1.500 0 0 0-1-.4H4.500a1 1 0 0 0-1 1z"/><path d="M7 7v.1" stroke-width="2.400"/>',bookmark:'<path d="M5.500 4.500A1.500 1.500 0 0 1 7 3h6a1.500 1.500 0 0 1 1.500 1.500v12L10 13.500l-4.500 3v-12z"/>',"chevron-left":'<path d="M12.500 4.500L7 10l5.500 5.500"/>',"chevron-up":'<path d="M4.500 12.500L10 7l5.500 5.500"/>',"arrow-left":'<path d="M16 10H4M8.500 5.500L4 10l4.500 4.500"/>',"arrow-right":'<path d="M4 10h12M11.500 5.500L16 10l-4.500 4.500"/>',"arrow-up":'<path d="M10 16V4M5.500 8.500L10 4l4.500 4.500"/>',"arrow-down":'<path d="M10 4v12M5.500 11.500L10 16l4.500-4.500"/>',refresh:'<path d="M16 10a6 6 0 0 1-10.600 3.800M4 10a6 6 0 0 1 10.600-3.800M14.500 3v3.200h-3.200M5.500 17v-3.200h3.200"/>',menu:'<path d="M3.500 6h13M3.500 10h13M3.500 14h13"/>',close:'<path d="M5.500 5.500l9 9M14.500 5.500l-9 9"/>',"check-circle":'<circle cx="10" cy="10" r="7"/><path d="M6.800 10.300l2.200 2.200 4.200-4.600"/>',"x-circle":'<circle cx="10" cy="10" r="7"/><path d="M7.500 7.500l5 5M12.500 7.500l-5 5"/>',help:'<circle cx="10" cy="10" r="7"/><path d="M7.900 8a2.200 2.200 0 1 1 3.200 2c-.7.4-1.100.9-1.100 1.600M10 14v.1"/>',globe:'<circle cx="10" cy="10" r="7"/><path d="M3 10h14M10 3c2 2.200 3 4.500 3 7s-1 4.800-3 7c-2-2.200-3-4.500-3-7s1-4.800 3-7z"/>',phone:'<rect x="5.500" y="2.500" width="9" height="15" rx="2.200"/><path d="M9 14.500h2"/>',"credit-card":'<rect x="2.500" y="4.500" width="15" height="11" rx="2.200"/><path d="M2.500 8.500h15M5.500 12.500h3"/>',truck:'<path d="M4.200 13.500H2.500v-8h9v8M7.800 13.500h4.400M11.500 8.500h3l3 3v2h-1.700"/><circle cx="6" cy="14.500" r="1.600"/><circle cx="14" cy="14.500" r="1.600"/>',chart:'<path d="M3.500 16.500h13M6 13.500V10M10 13.500V5M14 13.500V8"/>',"trending-up":'<path d="M3 14l4.500-4.500 3 3L17 6M12.500 6H17v4.500"/>',"trending-down":'<path d="M3 6l4.500 4.500 3-3L17 14M12.500 14H17V9.500"/>',layout:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M3 8h14M8 8v8.500"/>',sidebar:'<rect x="3" y="3.500" width="14" height="13" rx="2.500"/><path d="M8 3.500v13"/>',command:'<path d="M7.500 7.500h5v5h-5zM7.500 7.500h-2a2 2 0 1 1 2-2zM12.500 7.500v-2a2 2 0 1 1 2 2zM12.500 12.500h2a2 2 0 1 1-2 2zM7.500 12.500v2a2 2 0 1 1-2-2z"/>',zap:'<path d="M11 2.500l-6.500 9H10l-1 6 6.500-9H10l1-6z"/>'},he=l.forwardRef(function({name:e,size:s,label:r,filled:a,className:o,style:i,children:c,...d},u){const p=r?{role:"img","aria-label":r}:{"aria-hidden":!0},h=s?{width:s,height:s,...i}:i,f=P("ok-icon",a&&"ok-icon--fill",o);return e?n.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:f,style:h,...p,...d,dangerouslySetInnerHTML:{__html:Tn[e]}}):n.jsx("svg",{ref:u,viewBox:"0 0 20 20",className:f,style:h,...p,...d,children:c})});function In({className:t,...e}){return n.jsx("span",{className:P("ok-sr",t),...e})}const Ls=(t,e=0,s=1)=>Math.min(s,Math.max(e,t));function gt(t){const e=t.trim().replace(/^#/,"");return/^[0-9a-f]{3}$/i.test(e)?[0,1,2].map(s=>parseInt(e[s]+e[s],16)):/^[0-9a-f]{6}$/i.test(e)?[0,2,4].map(s=>parseInt(e.slice(s,s+2),16)):null}function Ve(t){const e=gt(t);return e?ot(e):null}function ot([t,e,s]){return"#"+[t,e,s].map(r=>Math.round(Ls(r,0,255)).toString(16).padStart(2,"0")).join("")}function $s([t,e,s]){const[r,a,o]=[t/255,e/255,s/255],i=Math.max(r,a,o),c=Math.min(r,a,o),d=i-c;let u=0;return d&&(i===r?u=(a-o)/d%6:i===a?u=(o-r)/d+2:u=(r-a)/d+4,u*=60,u<0&&(u+=360)),{h:u,s:i?d/i:0,v:i}}function Ds({h:t,s:e,v:s}){const r=a=>{const o=(a+t/60)%6;return Math.round(255*(s-s*e*Math.max(0,Math.min(o,4-o,1))))};return[r(5),r(3),r(1)]}const Os=t=>{const e=gt(t);return e?$s(e):null},Bs=t=>ot(Ds(t)),ht=t=>{const e=t/255;return e<=.04045?e/12.92:((e+.055)/1.055)**2.4},sa=t=>255*(t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055);function xn([t,e,s]){return .2126*ht(t)+.7152*ht(e)+.0722*ht(s)}function Ct(t,e){const[s,r]=[xn(t),xn(e)].sort((a,o)=>o-a);return(s+.05)/(r+.05)}function Fs([t,e,s]){const[r,a,o]=[ht(t),ht(e),ht(s)],i=Math.cbrt(.4122214708*r+.5363325363*a+.0514459929*o),c=Math.cbrt(.2119034982*r+.6806995451*a+.1073969566*o),d=Math.cbrt(.0883024619*r+.2817188376*a+.6299787005*o);return[.2104542553*i+.793617785*c-.0040720468*d,1.9779984951*i-2.428592205*c+.4505937099*d,.0259040371*i+.7827717662*c-.808675766*d]}function ra([t,e,s]){const r=(t+.3963377774*e+.2158037573*s)**3,a=(t-.1055613458*e-.0638541728*s)**3,o=(t-.0894841775*e-1.291485548*s)**3;return[4.0767416621*r-3.3077115913*a+.2309699292*o,-1.2684380046*r+2.6097574011*a-.3413193965*o,-.0041960863*r-.7034186147*a+1.707614701*o]}const Pn=t=>Fs(t)[0];function cs(t,e){const[,s,r]=Fs(t),a=Math.hypot(s,r),o=Math.atan2(r,s);let i=0,c=a;const d=p=>ra([e,p*Math.cos(o),p*Math.sin(o)]),u=p=>p.every(h=>h>=-1e-4&&h<=1+1e-4);if(u(d(a)))i=a;else for(let p=0;p<20;p++){const h=(i+c)/2;u(d(h))?i=h:c=h}return d(i).map(p=>sa(Ls(p)))}function ds(t,e,s,r){if(Ct(t,e)>=s)return t;const a=Pn(t);let o=0,i=1,c=cs(t,r);for(let d=0;d<24;d++){const u=(o+i)/2,p=r===0?a-(a-0)*u:a+(1-a)*u,h=cs(t,p);Ct(h,e)>=s?(c=h,i=u):o=u}return c}const Hs=.65,aa=[255,255,255],oa=[42,41,39],us={light:[27,28,34],dark:[244,244,246]},kn=1.45;function yn(t){const e=gt(t);if(!e)return{light:"#ffffff",dark:"#1b1c22"};const s=ot(e);return{light:Ct(e,us.light)<kn?"#ffffff":s,dark:Ct(e,us.dark)<kn?"#1b1c22":s}}function zs(t){const e=gt(t);return e&&Pn(e)<Hs?"#ffffff":"#1b1c22"}function _n(t){const e=gt(t);if(!e)return{};const s=zs(t),r={"--ok-accent":ot(e),"--ok-on-accent":s,"--ok-accent-deep":ot(ds(e,aa,4.6,0)),"--ok-accent-light":ot(ds(e,oa,4.6,1)),"--ok-logo-snout-light":yn(t).light,"--ok-logo-snout-dark":yn(t).dark};return s==="#ffffff"&&(r["--ok-accent-fill"]="var(--ok-accent)",r["--ok-accent-fill-hover"]="var(--ok-accent-hover)"),r}const qs="M9 10C9 26 20 38 31 38c7 0 11-5 11-10.500S37.500 18 32 18c-5 0-8.500 3.500-9 8",Gt=l.createContext(void 0);function Vs({tail:t,children:e}){const s=l.useContext(Gt);return n.jsx(Gt.Provider,{value:t===void 0?s:t,children:e})}function la(){return l.useContext(Gt)}function Ln({className:t="ok-tail",...e}){const s=l.useContext(Gt);if(s==null||s===!1)return n.jsx("svg",{className:t,viewBox:"0 0 48 48","aria-hidden":"true",focusable:"false",...e,children:n.jsx("path",{pathLength:1,d:qs})});if(typeof s=="function")return n.jsx(n.Fragment,{children:s({className:t})});if(l.isValidElement(s)){const r=s;return l.cloneElement(r,{className:P(t,r.props.className),"aria-hidden":r.props["aria-hidden"]??!0,...r.type==="svg"?{focusable:r.props.focusable??"false"}:null})}return n.jsx("span",{className:t,"aria-hidden":"true",children:s})}const ia={common:{close:"关闭",clear:"清除",loading:"加载中",remove:"移除",separator:","},avatar:{status:{online:"在线",busy:"忙碌",away:"离开",offline:"离线"},more:t=>`还有 ${t} 人`,moreButton:(t,e)=>`还有 ${t} 人${e?","+e:""},查看全部成员`,panel:(t,e)=>e?`${e}(共 ${t} 人)`:`全部成员(共 ${t} 人)`,rest:t=>`另有 ${t} 人`},breadcrumb:{label:"面包屑",expand:t=>`显示中间的 ${t} 级路径`},code:{label:"代码",copy:"复制代码",copied:"已复制",copyFailed:"复制失败"},pagination:{label:"分页",prev:"上一页",next:"下一页",page:t=>`第 ${t} 页`,status:(t,e)=>`第 ${t} 页,共 ${e} 页`},reaction:{label:"Oink 一下"},stat:{trend:{up:"上升",down:"下降",flat:"持平"}},steps:{label:"步骤",state:{complete:"已完成",current:"当前步骤",upcoming:"未开始"},error:"出错",prefix:(t,e)=>`第 ${t} 步,${e}:`},table:{label:"表格",empty:"暂无数据",selectAll:"选择全部",selectColumn:"选择",selectRow:t=>`选择 ${t}`,row:t=>`第 ${t} 行`,selected:t=>`已选择 ${t} 行`,pagination:t=>`${t}分页`},tag:{remove:t=>`移除${t?` ${t}`:""}`},button:{status:{loading:"正在处理",success:"已完成",error:"操作失败"}},colorPicker:{label:"颜色",area:"饱和度与亮度",areaRole:"二维滑块",areaValue:(t,e)=>`饱和度 ${t}%,亮度 ${e}%`,hue:"色相",hex:"十六进制色值",eyedropper:"从屏幕取色",swatches:"预设颜色"},fileDrop:{title:"把文件拖到这里,或点击选择",status:(t,e,s)=>t?(t===1?`已选择 ${e}`:`已选择 ${t} 个文件`)+(s?`,${s} 个不符合要求`:""):`${s} 个文件不符合要求`},hotkey:{placeholder:"点击录制",recording:"按下组合键…",spokenRecording:t=>`正在录制,${t}`,spokenCurrent:t=>`当前:${t}`,none:"未设置"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"空格",ArrowUp:"上",ArrowDown:"下",ArrowLeft:"左",ArrowRight:"右",Enter:"回车",Backspace:"退格",Tab:"Tab",Escape:"Esc"},input:{showPassword:"显示密码"},numberInput:{decrement:"减少",increment:"增加"},pinInput:{label:"验证码",cell:(t,e)=>`第 ${t} 位,共 ${e} 位`},rangeSlider:{thumbs:["最小值","最大值"]},rating:{label:"评分",star:t=>`${t} 星`,value:(t,e)=>`评分:${t} / ${e}`},searchInput:{placeholder:"搜索…"},appShell:{skipLink:"跳到主要内容",sidebar:"侧栏",aside:"辅助栏",toggleSidebar:"切换导航",toggleAside:"切换辅助栏"},splitPane:{separator:"调整分栏大小"},commandPalette:{label:"命令面板",placeholder:"搜索命令…",empty:"没有匹配的结果",results:t=>`${t} 条结果`},toast:{label:"通知"},confirm:{confirm:"确定",cancel:"取消"},calendar:{prevMonth:"上个月",nextMonth:"下个月",todaySuffix:",今天"},datePicker:{placeholder:"年-月-日",dialog:"选择日期",open:"打开日历",rangePlaceholder:"开始日期 – 结束日期",rangeDialog:"选择日期范围"},combobox:{loading:"加载中…",empty:"没有匹配的选项",listbox:"选项"},select:{placeholder:"请选择",count:t=>`已选 ${t} 项`}},ut=(t,e,s)=>`${t} ${t===1?e:s}`,ca={common:{close:"Close",clear:"Clear",loading:"Loading",remove:"Remove",separator:", "},avatar:{status:{online:"Online",busy:"Busy",away:"Away",offline:"Offline"},more:t=>`${t} more`,moreButton:(t,e)=>`${t} more${e?", "+e:""}, show all members`,panel:(t,e)=>e?`${e} (${ut(t,"person","people")})`:`All members (${t})`,rest:t=>`And ${t} more`},breadcrumb:{label:"Breadcrumb",expand:t=>`Show ${ut(t,"hidden level","hidden levels")}`},code:{label:"Code",copy:"Copy code",copied:"Copied",copyFailed:"Copy failed"},pagination:{label:"Pagination",prev:"Previous page",next:"Next page",page:t=>`Page ${t}`,status:(t,e)=>`Page ${t} of ${e}`},reaction:{label:"Oink"},stat:{trend:{up:"Up",down:"Down",flat:"Unchanged"}},steps:{label:"Steps",state:{complete:"Completed",current:"Current step",upcoming:"Not started"},error:"Error",prefix:(t,e)=>`Step ${t}, ${e}: `},table:{label:"Table",empty:"No data",selectAll:"Select all",selectColumn:"Select",selectRow:t=>`Select ${t}`,row:t=>`Row ${t}`,selected:t=>`${ut(t,"row","rows")} selected`,pagination:t=>`${t} pagination`},tag:{remove:t=>`Remove${t?` ${t}`:""}`},button:{status:{loading:"Working",success:"Done",error:"Failed"}},colorPicker:{label:"Color",area:"Saturation and brightness",areaRole:"2D slider",areaValue:(t,e)=>`Saturation ${t}%, brightness ${e}%`,hue:"Hue",hex:"Hex color",eyedropper:"Pick color from screen",swatches:"Preset colors"},fileDrop:{title:"Drop files here, or click to browse",status:(t,e,s)=>t?(t===1?`Selected ${e}`:`Selected ${t} files`)+(s?`, ${s} not accepted`:""):`${ut(s,"file","files")} not accepted`},hotkey:{placeholder:"Click to record",recording:"Press keys…",spokenRecording:t=>`Recording, ${t}`,spokenCurrent:t=>`Current: ${t}`,none:"Not set"},keyNames:{Meta:"Command",Control:"Control",Alt:"Option",Shift:"Shift",Space:"Space",ArrowUp:"Up",ArrowDown:"Down",ArrowLeft:"Left",ArrowRight:"Right",Enter:"Enter",Backspace:"Backspace",Tab:"Tab",Escape:"Esc"},input:{showPassword:"Show password"},numberInput:{decrement:"Decrease",increment:"Increase"},pinInput:{label:"Verification code",cell:(t,e)=>`Digit ${t} of ${e}`},rangeSlider:{thumbs:["Minimum","Maximum"]},rating:{label:"Rating",star:t=>ut(t,"star","stars"),value:(t,e)=>`Rating: ${t} of ${e}`},searchInput:{placeholder:"Search…"},appShell:{skipLink:"Skip to main content",sidebar:"Sidebar",aside:"Side panel",toggleSidebar:"Toggle navigation",toggleAside:"Toggle side panel"},splitPane:{separator:"Resize panes"},commandPalette:{label:"Command palette",placeholder:"Search commands…",empty:"No results",results:t=>ut(t,"result","results")},toast:{label:"Notifications"},confirm:{confirm:"OK",cancel:"Cancel"},calendar:{prevMonth:"Previous month",nextMonth:"Next month",todaySuffix:", today"},datePicker:{placeholder:"YYYY-MM-DD",dialog:"Choose date",open:"Open calendar",rangePlaceholder:"Start date – End date",rangeDialog:"Choose date range"},combobox:{loading:"Loading…",empty:"No matching options",listbox:"Options"},select:{placeholder:"Select…",count:t=>`${t} selected`}},Et={"zh-CN":ia,"en-US":ca},Gs="en-US";function Ws(t){const e=(t.find(Boolean)??"").toLowerCase();return e==="zh"||e.startsWith("zh-")?"zh-CN":"en-US"}const da=t=>(window.addEventListener("languagechange",t),()=>window.removeEventListener("languagechange",t)),ua=()=>{var t;return Ws((t=navigator.languages)!=null&&t.length?navigator.languages:[navigator.language])},fa=()=>Gs;function pa(){return l.useSyncExternalStore(da,ua,fa)}const jn=l.createContext("auto");function Us({locale:t,children:e}){const s=l.useContext(jn);return n.jsx(jn.Provider,{value:t??s,children:e})}function pe(){const t=l.useContext(jn),e=pa(),s=t==="auto"||!Et[t]?e:t;return{locale:s,messages:Et[s]}}const Ys=["pink","orange","amber","blue","violet"],Rt=t=>t.startsWith("#");function Xs(t){return typeof t=="string"&&(Ys.includes(t)||t.startsWith("#")&&Ve(t)!==null)}function $n(t){return Xs(t)?Rt(t)?Ve(t):t:null}const Ks=520,Zs=l.createContext(null);function ha(t){if(!t||!Ae)return{};let e={};try{e=JSON.parse(localStorage.getItem(t)||"{}")||{}}catch{return{}}return{theme:["light","dark","system"].includes(e.theme)?e.theme:void 0,accent:$n(e.accent)??void 0,motion:["auto","full","reduced"].includes(e.motion)?e.motion:void 0}}const ma=["--ok-accent","--ok-on-accent","--ok-accent-deep","--ok-accent-light","--ok-accent-fill","--ok-accent-fill-hover","--ok-logo-snout-light","--ok-logo-snout-dark"];let Ft=null;function ba(){if(Ft)return Ft;const t=":root.ok-theming::view-transition-new(root){clip-path:circle(0px at 50% 0%)}:root.ok-theming::view-transition-old(root){animation-duration:600ms}";let e;try{e=new CSSStyleSheet,e.replaceSync(t),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]}catch{const s=document.createElement("style");s.textContent=t,document.head.appendChild(s),e=s.sheet}return Ft={next:e.cssRules[0].style,old:e.cssRules[1].style},Ft}function va(t){const o=1.2000000000000002,i=3*(.2-.4)-o,c=1-o-i,d=3*0,u=3*1-d,p=1-d-u;let h=t;for(let f=0;f<6;f++){const m=(3*c*h+2*i)*h+o;if(Math.abs(m)<1e-6)break;h-=(((c*h+i)*h+o)*h-t)/m}return((p*h+u)*h+d)*h}function ga({children:t,defaultTheme:e="system",defaultAccent:s="pink",defaultMotion:r="auto",storageKey:a,tail:o,locale:i}){const[c,d]=l.useState(e),[u,p]=l.useState(s),h=l.useCallback(R=>{const M=$n(R);M&&p(M)},[]),[f,m]=l.useState(r),b=Xt("(prefers-color-scheme: dark)"),v=c==="system"?b?"dark":"light":c,[g,N]=l.useState(!a);ge(()=>{if(!a)return;const R=ha(a);R.theme&&d(R.theme),R.accent&&p(R.accent),R.motion&&m(R.motion),N(!0)},[a]),l.useEffect(()=>{if(!g)return;const R=document.documentElement;R.dataset.theme=v,R.dataset.accent=Rt(u)?"custom":u,ma.forEach(M=>R.style.removeProperty(M)),Rt(u)&&Object.entries(_n(u)).forEach(([M,E])=>R.style.setProperty(M,E)),f==="auto"?delete R.dataset.motion:R.dataset.motion=f,R.style.colorScheme=v},[g,v,u,f]),l.useEffect(()=>{if(!a||!g)return;const R=Rt(u)?_n(u):void 0;try{localStorage.setItem(a,JSON.stringify({theme:c,accent:u,motion:f,vars:R}))}catch{}},[a,g,c,u,f]);const x=l.useRef(null),w=l.useRef(0),_=ke((R,M)=>{var B;const E=document.documentElement,T=document.startViewTransition,C=R==="system"?b?"dark":"light":R,j=()=>{E.dataset.theme=C,E.style.colorScheme=C,d(R)},y=++w.current;if(x.current){const z=x.current;x.current=null,E.classList.remove("ok-theming");try{(B=z.skipTransition)==null||B.call(z)}catch{}j();return}if(!M||!T||Fe()===0||document.hidden||C===v){d(R);return}const S=Math.ceil(Math.hypot(Math.max(M.x,innerWidth-M.x),Math.max(M.y,innerHeight-M.y))),O=Ks*Fe(),L=ba(),$=` at ${Math.round(M.x)}px ${Math.round(M.y)}px)`;L.next.clipPath="circle(0px"+$,L.old.animationDuration=Math.round(O+80)+"ms",E.classList.add("ok-theming");let D;try{D=T.call(document,()=>Ss.flushSync(j))}catch{E.classList.remove("ok-theming"),j();return}x.current=D,D.ready.then(()=>{const z=performance.now(),G=W=>{if(y!==w.current)return;const J=Math.min(1,(W-z)/O);L.next.clipPath=`circle(${Math.round(S*va(J))}px${$}`,J<1&&requestAnimationFrame(G)};requestAnimationFrame(G)}).catch(()=>{});const A=()=>{x.current===D&&(x.current=null,E.classList.remove("ok-theming"))};D.finished.then(A,A)}),k=l.useMemo(()=>({theme:c,resolvedTheme:v,accent:u,motion:f,setTheme:_,setAccent:h,setMotion:m}),[c,v,u,f,_,h]);return n.jsx(Zs.Provider,{value:k,children:n.jsx(Us,{locale:i,children:n.jsx(Vs,{tail:o,children:t})})})}function xa(){const t=l.useContext(Zs),e=l.useCallback(()=>{},[]);return t??{theme:"light",resolvedTheme:"light",accent:"pink",motion:"auto",setTheme:e,setAccent:e,setMotion:e}}const Js="M10 3H18A7 7 0 0 1 25 10V18A7 7 0 0 1 18 25H5A2 2 0 0 1 3 23V10A7 7 0 0 1 10 3Z",zt={x:15.5,y:15,width:13.5,height:10,rx:5},wn=[{cx:20,cy:20},{cx:24.5,cy:20}],ka=l.forwardRef(function({size:e=28,wordmark:s=!1,title:r="Oink UI",animated:a=!1,mono:o=!1,className:i,style:c,...d},u){const p=l.useId().replace(/:/g,""),h=`ok-logo-gap-${p}`,f=`ok-logo-holes-${p}`,b=d["aria-hidden"]===!0||d["aria-hidden"]==="true"?null:{role:"img","aria-label":r};return n.jsxs("span",{ref:u,className:P("ok-logo",o&&"ok-logo--mono",i),"data-animated":a||void 0,style:{"--ok-logo-size":`${e}px`,...c},...b,...d,children:[n.jsxs("svg",{className:"ok-logo__mark",viewBox:"0 0 32 32","aria-hidden":"true",focusable:"false",children:[o&&n.jsxs("defs",{children:[n.jsxs("mask",{id:h,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[n.jsx("rect",{x:"0",y:"0",width:"32",height:"32",fill:"#fff"}),n.jsx("rect",{...zt,fill:"#000",stroke:"#000",strokeWidth:3})]}),n.jsxs("mask",{id:f,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:[n.jsx("rect",{...zt,fill:"#fff"}),wn.map(v=>n.jsx("ellipse",{cx:v.cx,cy:v.cy,rx:1.3,ry:1.9,fill:"#000"},v.cx))]})]}),n.jsxs("g",{transform:"rotate(-8 16 16)",children:[n.jsx("path",{className:"ok-logo__ink",d:Js,mask:o?`url(#${h})`:void 0}),n.jsxs("g",{className:"ok-logo__snout",children:[n.jsx("rect",{className:"ok-logo__accent",...zt,mask:o?`url(#${f})`:void 0}),!o&&wn.map(v=>n.jsx("ellipse",{className:"ok-logo__nostril",cx:v.cx,cy:v.cy,rx:1.3,ry:1.9},v.cx))]})]})]}),s&&n.jsx("span",{className:"ok-logo__word","aria-hidden":"true",children:"Oink UI"})]})}),Zt="M3.6 8.4l2.9 2.9 5.9-6.4",ya="M4.5 4.5l7 7M11.5 4.5l-7 7";function Jt(t,e){const s={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1}[t.key],r=t.key==="Home"?"first":t.key==="End"?"last":null;if(!s&&!r)return null;const a=Array.from(t.currentTarget.querySelectorAll(e)).filter(i=>!i.disabled&&i.getAttribute("aria-disabled")!=="true");if(!a.length)return null;if(t.preventDefault(),r)return r==="first"?a[0]:a[a.length-1];const o=a.indexOf(document.activeElement);return a[(o+s+a.length)%a.length]}function Dn(t,e,s,r){if(!Ae)return()=>{};const a=e.pointerId;let o=!0;const i=d=>{if(!(!o||d.pointerId!==a)){if(!(d.buttons&1)){c();return}s(d)}};function c(){if(o){o=!1,document.removeEventListener("pointermove",i,!0),document.removeEventListener("pointerup",c,!0),document.removeEventListener("pointercancel",c,!0),document.removeEventListener("pointerdown",c,!0),window.removeEventListener("blur",c);try{t.releasePointerCapture(a)}catch{}r()}}try{t.setPointerCapture(a)}catch{}return document.addEventListener("pointermove",i,!0),document.addEventListener("pointerup",c,!0),document.addEventListener("pointercancel",c,!0),document.addEventListener("pointerdown",c,!0),window.addEventListener("blur",c),c}function _a(t){const e=String(t);if(e.includes("e-"))return parseInt(e.split("e-")[1],10);const s=e.indexOf(".");return s<0?0:e.length-s-1}Et["zh-CN"].button.status;const Qs=l.createContext({}),er=l.forwardRef(function(e,s){const r=l.useContext(Qs),{variant:a=r.variant??"soft",size:o=r.size??"md",loading:i,success:c,error:d,statusLabels:u,leading:p,trailing:h,block:f,iconOnly:m,disabled:b=r.disabled,href:v,target:g,rel:N,download:x,type:w="button",className:_,children:k,onClick:R,"aria-disabled":M,...E}=e,T=pe().messages.button.status,C=M===!0||M==="true",j=!!b||C,y=i?"loading":c?"success":d?"error":void 0,S=i!==void 0||c!==void 0||d!==void 0,[O,L]=l.useState(""),$=y?(u==null?void 0:u[y])??T[y]:null;l.useEffect(()=>{$&&L($)},[$]);const D=G=>{if(j||y==="loading"||y==="success"){G.preventDefault(),G.stopPropagation();return}R==null||R(G)},A=P("ok-btn ok-focusable",a!=="soft"&&`ok-btn--${a}`,o!=="md"&&`ok-btn--${o}`,m&&"ok-btn--icon",f&&"ok-btn--block",_),B=n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"ok-btn__label",children:[p,k,h]}),S&&n.jsxs("span",{className:"ok-btn__status","aria-hidden":"true",children:[n.jsx(Ln,{className:"ok-tail"}),n.jsx("svg",{className:"ok-btn__check",viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})}),n.jsx("svg",{className:"ok-btn__cross",viewBox:"0 0 16 16",children:n.jsx("path",{d:ya,pathLength:1})})]})]}),z=S&&n.jsx(it,{children:n.jsx(In,{role:"status","aria-live":"polite","aria-atomic":"true","data-ok-button-status":"",children:O})});return v!==void 0?n.jsxs(n.Fragment,{children:[n.jsx("a",{...E,ref:s,className:A,href:j?void 0:v,target:g,rel:N??(g==="_blank"?"noopener noreferrer":void 0),download:x,role:j?"link":void 0,"aria-disabled":j||void 0,"aria-busy":i||void 0,"data-state":y,onClick:D,children:B}),z]}):n.jsxs(n.Fragment,{children:[n.jsx("button",{...E,ref:s,type:w,className:A,disabled:b,"aria-disabled":C||void 0,"aria-busy":i||void 0,"data-state":y,onClick:D,children:B}),z]})}),ja=l.forwardRef(function({size:e,variant:s,disabled:r,attached:a,orientation:o="horizontal",block:i,className:c,children:d,...u},p){return n.jsx("div",{ref:p,role:"group",className:P("ok-btn-group",a&&"ok-btn-group--attached",o==="vertical"&&"ok-btn-group--vertical",i&&"ok-btn-group--block",c),...u,children:n.jsx(Qs.Provider,{value:{size:e,variant:s,disabled:r},children:d})})}),wa=l.forwardRef(function({pressed:e,defaultPressed:s=!1,onChange:r,onClick:a,...o},i){const[c,d]=le(e,s,r),u={...o,"aria-pressed":c,onClick:p=>{a==null||a(p),p.defaultPrevented||d(!c)}};return n.jsx(er,{ref:i,...u})});function Na(t={}){const{successHold:e=1200,errorHold:s=1200,labels:r}=t,[a,o]=l.useState("idle"),i=l.useRef(0),c=l.useRef(void 0),d=l.useRef({successHold:e,errorHold:s});d.current={successHold:e,errorHold:s},l.useEffect(()=>()=>{i.current++,clearTimeout(c.current)},[]);const u=l.useCallback(()=>{i.current++,clearTimeout(c.current),o("idle")},[]),p=l.useCallback(f=>{const m=++i.current;clearTimeout(c.current),o("loading");const b=g=>{m===i.current&&(o(g),c.current=setTimeout(()=>{m===i.current&&o("idle")},g==="success"?d.current.successHold:d.current.errorHold))};let v;try{v=Promise.resolve(typeof f=="function"?f():f)}catch(g){v=Promise.reject(g)}return v.then(g=>(b("success"),g),g=>{throw b("error"),g})},[]),h=l.useMemo(()=>({loading:a==="loading",success:a==="success",error:a==="error",...r?{statusLabels:r}:{}}),[a,r]);return{state:a,run:p,reset:u,buttonProps:h}}const Ie=l.createContext(null);function _e(t,e=!0){const s=l.useContext(Ie),r=`${t["aria-describedby"]??""} ${(s==null?void 0:s.describedBy)??""}`.split(/\s+/).filter(Boolean),a=Array.from(new Set(r)).join(" ")||void 0;return{id:t.id??(s==null?void 0:s.id),disabled:t.disabled??(s==null?void 0:s.disabled)??!1,required:t.required??(s==null?void 0:s.required)??!1,invalid:t.invalid??(s==null?void 0:s.invalid)??!1,describedBy:a,labelledBy:t["aria-labelledby"]??(!e&&!t["aria-label"]?s==null?void 0:s.labelId:void 0)}}const On=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,size:a="md",pill:o,block:i=!0,icon:c,prefix:d,suffix:u,clearable:p,clearLabel:h,onClear:f,revealable:m=!0,invalid:b,type:v="text",className:g,style:N,rootClassName:x,rootStyle:w,id:_,disabled:k,required:R,"aria-describedby":M,...E},T){const C=_e({id:_,disabled:k,required:R,invalid:b,"aria-describedby":M}),[j,y]=le(e,s,r),{messages:S}=pe(),O=h??S.common.clear,[L,$]=l.useState(!1),D=l.useRef(null),A=v==="password",B=j!=="",z=G=>{var W;G.target.closest("input, button, a, select")||(G.preventDefault(),(W=D.current)==null||W.focus())};return n.jsxs("div",{className:P("ok-input",a!=="md"&&`ok-input--${a}`,o&&"ok-input--pill",!i&&"ok-input--inline",x,g),style:{...w,...N},"data-has-value":B?"":void 0,"data-invalid":C.invalid?"":void 0,"data-disabled":C.disabled?"":void 0,onMouseDown:z,children:[c&&n.jsx(he,{name:c,className:"ok-input__icon"}),d!=null&&n.jsx("span",{className:"ok-input__affix",children:d}),n.jsx("input",{...E,ref:xe(T,D),id:C.id,type:A&&L?"text":v,value:j,disabled:C.disabled,required:C.required||void 0,"aria-invalid":C.invalid||void 0,"aria-describedby":C.describedBy,onChange:G=>y(G.target.value)}),p&&n.jsx("button",{type:"button",className:"ok-input__clear","aria-label":O,disabled:!B||C.disabled,tabIndex:B?void 0:-1,onClick:()=>{var G;y(""),f==null||f(),(G=D.current)==null||G.focus()},children:n.jsx(he,{name:"x"})}),A&&m&&n.jsx("button",{type:"button",className:"ok-input__toggle ok-focusable","aria-label":S.input.showPassword,"aria-pressed":L,disabled:C.disabled,onClick:()=>$(G=>!G),children:n.jsx(he,{children:L?n.jsx("path",{d:"M3 3l14 14M8.3 5.200A7.600 7.600 0 0 1 10 5c4.200 0 6.800 3.600 7.500 5-.3.600-1 1.700-2.100 2.700M12.700 14.400A7 7 0 0 1 10 15c-4.200 0-6.800-3.600-7.500-5 .4-.8 1.400-2.300 3-3.400M8.200 8.300a2.500 2.500 0 0 0 3.500 3.500"}):n.jsxs(n.Fragment,{children:[n.jsx("path",{d:"M2.500 10C3.200 8.600 5.800 5 10 5s6.800 3.600 7.500 5c-.7 1.400-3.300 5-7.500 5s-6.800-3.600-7.500-5z"}),n.jsx("circle",{cx:"10",cy:"10",r:"2.500"})]})})}),u!=null&&n.jsx("span",{className:"ok-input__affix",children:u})]})}),Ra=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,autoGrow:a=!0,minRows:o=3,maxRows:i,resize:c="none",invalid:d,className:u,style:p,id:h,disabled:f,required:m,"aria-describedby":b,...v},g){const N=_e({id:h,disabled:f,required:m,invalid:d,"aria-describedby":b}),[x,w]=le(e,s,r),_=l.useRef(null);ge(()=>{var E;const R=_.current;if(!R||!a||typeof CSS<"u"&&((E=CSS.supports)!=null&&E.call(CSS,"field-sizing","content")))return;R.style.height="auto";const M=R.offsetHeight-R.clientHeight;R.style.height=R.scrollHeight+M+"px"},[x,a,o,i]);const k={"--_min-rows":o,...i?{"--_max-rows":i}:null};return n.jsx("textarea",{...v,ref:xe(g,_),id:N.id,rows:o,className:P("ok-textarea ok-scroll",u),style:{...k,...p},"data-autogrow":a?"":void 0,"data-resize":c!=="none"?c:void 0,value:x,disabled:N.disabled,required:N.required||void 0,"aria-invalid":N.invalid||void 0,"aria-describedby":N.describedBy,onChange:R=>w(R.target.value)})}),Ma=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,onSearch:a,onKeyDown:o,pill:i=!0,clearable:c=!0,placeholder:d,...u},p){const{messages:h}=pe(),f=d??h.searchInput.placeholder,[m,b]=le(e,s,r);return n.jsx(On,{ref:p,type:"search",icon:"search",enterKeyHint:"search",autoComplete:"off",pill:i,clearable:c,placeholder:f,value:m,onChange:b,onKeyDown:v=>{o==null||o(v),!v.defaultPrevented&&(v.key==="Enter"?a==null||a(m):v.key==="Escape"&&m!==""&&(v.preventDefault(),b("")))},...u})}),Sa=400,Ca=60,Ea=l.forwardRef(function({value:e,defaultValue:s,onChange:r,min:a=-1/0,max:o=1/0,step:i=1,largeStep:c,precision:d,format:u,size:p="md",invalid:h,decrementLabel:f,incrementLabel:m,className:b,style:v,rootClassName:g,rootStyle:N,id:x,disabled:w,required:_,readOnly:k,"aria-describedby":R,onKeyDown:M,onBlur:E,onFocus:T,...C},j){const y=_e({id:x,disabled:w,required:_,invalid:h,"aria-describedby":R}),{messages:S}=pe(),O=f??S.numberInput.decrement,L=m??S.numberInput.increment,$=d??_a(i),D=Y=>ye(+Y.toFixed($),a,o),[A,B]=le(e,D(s??0),r),[z,G]=l.useState(null),[W,J]=l.useState(!1),X=l.useRef(null),I=y.disabled||!!k,F=l.useRef(A);F.current=A;const q=l.useRef(B);q.current=B;const ne=()=>{if(z===null)return;const Y=parseFloat(z.replace(/,/g,""));if(G(null),Number.isFinite(Y)){const V=D(Y);F.current=V,q.current(V)}},Z=(Y,V)=>{const ie=D(Y),ue=X.current;return ie===F.current?(Ne(ue,[{transform:"translateX(0)"},{transform:`translateX(${V*6}px)`},{transform:"translateX(0)"}],{spring:"bouncy"}),!1):(F.current=ie,q.current(ie),Ne(ue,[{transform:`translateY(${V*60}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"}),!0)},se=(Y,V=i)=>Z(F.current+Y*V,Y),ce=l.useRef({}),U=()=>{clearTimeout(ce.current.delay),clearInterval(ce.current.every),ce.current={}};l.useEffect(()=>U,[]);const H=l.useRef(!1),re=Y=>({onPointerDown:V=>{V.button||I||(H.current=!0,ne(),U(),se(Y)&&(ce.current.delay=setTimeout(()=>{ce.current.every=setInterval(()=>{se(Y)||U()},Ca)},Sa)))},onPointerUp:U,onPointerCancel:()=>{U(),H.current=!1},onPointerLeave:()=>{U()},onClick:()=>{if(H.current){H.current=!1;return}I||(ne(),se(Y))}}),de=Y=>{if(M==null||M(Y),Y.defaultPrevented||I)return;const V=c??i*10,ie={ArrowUp:()=>se(1),ArrowDown:()=>se(-1),PageUp:()=>se(1,V),PageDown:()=>se(-1,V)};if(Number.isFinite(a)&&(ie.Home=()=>Z(a,-1)),Number.isFinite(o)&&(ie.End=()=>Z(o,1)),Y.key==="Enter"){ne();return}const ue=ie[Y.key];ue&&(Y.preventDefault(),ne(),ue())},ee=z??(u&&!W?u(A):A.toFixed($)),oe=A<=a,K=A>=o;return n.jsxs("div",{className:P("ok-stepper",p!=="md"&&`ok-stepper--${p}`,g,b),style:{...N,...v},"data-invalid":y.invalid?"":void 0,"data-disabled":y.disabled?"":void 0,children:[n.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":O,"aria-disabled":oe||I,...re(-1),children:n.jsx(he,{name:"minus"})}),n.jsx("input",{...C,ref:xe(j,X),id:y.id,className:"ok-stepper__value",type:"text",inputMode:$>0?"decimal":"numeric",autoComplete:"off",role:"spinbutton","aria-valuenow":A,"aria-valuemin":Number.isFinite(a)?a:void 0,"aria-valuemax":Number.isFinite(o)?o:void 0,"aria-valuetext":u?u(A):void 0,"aria-invalid":y.invalid||void 0,"aria-describedby":y.describedBy,"aria-required":y.required||void 0,value:ee,disabled:y.disabled,readOnly:k,onChange:Y=>G(Y.target.value),onFocus:Y=>{J(!0),T==null||T(Y)},onBlur:Y=>{J(!1),ne(),E==null||E(Y)},onKeyDown:de}),n.jsx("button",{type:"button",className:"ok-stepper__btn",tabIndex:-1,"aria-label":L,"aria-disabled":K||I,...re(1),children:n.jsx(he,{name:"plus"})})]})}),Aa=l.forwardRef(function({length:e=6,value:s,defaultValue:r="",onChange:a,onComplete:o,type:i="numeric",mask:c,size:d="md",disabled:u,invalid:p,required:h,autoFocus:f,name:m,className:b,id:v,"aria-label":g,"aria-labelledby":N,"aria-describedby":x,...w},_){const k=_e({id:v,disabled:u,required:h,invalid:p,"aria-describedby":x,"aria-labelledby":N,"aria-label":g},!1),{messages:R}=pe(),[M,E]=le(s,r,a),T=l.useRef([]),C=D=>D.replace(i==="numeric"?/\D/g:/[^a-zA-Z0-9]/g,""),j=D=>{const A=T.current[Math.max(0,Math.min(e-1,D))];A==null||A.focus(),A==null||A.select()},y=(D,A)=>{const B=C(A);if(!B)return;const z=Math.min(D,M.length),G=(M.slice(0,z)+B+M.slice(z+B.length)).slice(0,e);E(G),j(z+B.length),G.length===e&&G!==M&&(o==null||o(G))},S=(D,A)=>{const B=M[D]??"";let z=C(A);if(!z){B&&E(M.slice(0,D)+M.slice(D+1));return}B&&z.length===2&&(z=z.startsWith(B)?z.slice(1):z.slice(0,1)),y(D,z)},O=(D,A)=>{A.key==="Backspace"&&!M[D]&&D>0?(A.preventDefault(),E(M.slice(0,D-1)+M.slice(D)),j(D-1)):A.key==="ArrowLeft"?(A.preventDefault(),j(D-1)):A.key==="ArrowRight"?(A.preventDefault(),j(D+1)):A.key==="Home"?(A.preventDefault(),j(0)):A.key==="End"&&(A.preventDefault(),j(Math.min(M.length,e-1)))},L=(D,A)=>{A.preventDefault(),y(D,A.clipboardData.getData("text"))},$=k.labelledBy?void 0:g??R.pinInput.label;return n.jsxs("div",{ref:_,role:"group",className:P("ok-pin",d==="sm"&&"ok-pin--sm",b),"aria-label":$,"aria-labelledby":k.labelledBy,"aria-describedby":k.describedBy,"data-invalid":k.invalid?"":void 0,...w,children:[n.jsx(Ie.Provider,{value:null,children:Array.from({length:e},(D,A)=>n.jsx("input",{ref:B=>{T.current[A]=B},id:A===0?k.id:void 0,className:"ok-pin__cell",type:c?"password":"text",inputMode:i==="numeric"?"numeric":"text",pattern:i==="numeric"?"[0-9]*":void 0,autoComplete:A===0?"one-time-code":"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,"aria-label":R.pinInput.cell(A+1,e),"aria-invalid":k.invalid||void 0,"aria-required":k.required||void 0,autoFocus:f&&A===0,disabled:k.disabled,value:M[A]??"",onChange:B=>S(A,B.target.value),onKeyDown:B=>O(A,B),onPaste:B=>L(A,B),onFocus:B=>B.target.select()},A))}),m&&n.jsx("input",{type:"hidden",name:m,value:M})]})}),Ta=new Set(["input","select","textarea"]),Ia=l.forwardRef(function({label:e,hint:s,error:r,invalid:a,required:o=!1,disabled:i=!1,id:c,orientation:d="vertical",className:u,children:p,...h},f){const m=l.useId(),b=c??`ok-field-${m}`,v=`${b}-label`,g=`${b}-hint`,N=`${b}-error`,x=r!=null&&r!==!1&&r!=="",w=a??x,_=[s!=null&&g,x&&N].filter(Boolean).join(" ")||void 0,k=l.useMemo(()=>({id:b,labelId:e!=null?v:void 0,describedBy:_,invalid:w,required:o,disabled:i}),[b,e!=null,v,_,w,o,i]),R=l.useRef(null),M=l.useRef(w);l.useEffect(()=>{w&&!M.current&&Ne(R.current,{transform:["translateX(0)","translateX(-7px)","translateX(6px)","translateX(-4px)","translateX(2px)","translateX(0)"]},{duration:520}),M.current=w},[w]);const E={id:b,"aria-describedby":_,"aria-invalid":w?!0:void 0,required:o||void 0,disabled:i||void 0};let T;if(typeof p=="function")T=p(E);else if(l.isValidElement(p)&&typeof p.type=="string"&&Ta.has(p.type)){const C=p,j=C.props;T=l.cloneElement(C,{...E,id:j.id??b,"aria-describedby":[j["aria-describedby"],_].filter(Boolean).join(" ")||void 0,required:j.required??E.required,disabled:j.disabled??E.disabled})}else T=p;return n.jsxs("div",{ref:f,className:P("ok-field",d==="horizontal"&&"ok-field--horizontal",u),"data-invalid":w?"":void 0,"data-disabled":i?"":void 0,...h,children:[e!=null&&n.jsxs("label",{className:"ok-field__label",id:v,htmlFor:b,onClick:C=>{const j=C.currentTarget.ownerDocument.getElementById(b);!j||!j.hasAttribute("data-label-focus")||(C.preventDefault(),j.disabled||j.focus())},children:[e,o&&n.jsx("span",{className:"ok-field__required","aria-hidden":"true",children:"*"})]}),n.jsx("div",{className:"ok-field__control",ref:R,children:n.jsx(Ie.Provider,{value:k,children:T})}),s!=null&&n.jsx("span",{className:"ok-field__hint",id:g,children:s}),n.jsx("span",{className:"ok-field__msg",id:N,"aria-live":"polite",children:n.jsx("span",{children:x&&n.jsxs(n.Fragment,{children:[n.jsx(he,{name:"alert"}),r]})})})]})}),Pa=l.forwardRef(function({legend:e,hint:s,className:r,children:a,"aria-describedby":o,...i},c){const d=`ok-fieldset-${l.useId()}-hint`;return n.jsxs("fieldset",{ref:c,className:P("ok-fieldset",r),"aria-describedby":[o,s!=null&&d].filter(Boolean).join(" ")||void 0,...i,children:[e!=null&&n.jsx("legend",{className:"ok-fieldset__legend",children:e}),s!=null&&n.jsx("span",{className:"ok-fieldset__hint",id:d,children:s}),n.jsx("div",{className:"ok-fieldset__body",children:a})]})}),La=l.forwardRef(function({required:e,disabled:s,size:r="sm",className:a,children:o,...i},c){return n.jsxs("label",{ref:c,className:P("ok-label",r==="md"&&"ok-label--md",a),"data-disabled":s?"":void 0,...i,children:[o,e&&n.jsx("span",{className:"ok-label__required","aria-hidden":"true",children:"*"})]})}),$a=l.forwardRef(function({size:e="md",onSubmit:s,className:r,children:a,...o},i){return n.jsx("form",{ref:i,className:P("ok-form",e!=="md"&&`ok-form--${e}`,r),onSubmit:c=>{c.preventDefault(),s==null||s(new FormData(c.currentTarget),c)},...o,children:a})}),Da=l.forwardRef(function({align:e="start",stack:s=!0,className:r,...a},o){return n.jsx("div",{ref:o,className:P("ok-form__actions",e!=="start"&&`ok-form__actions--${e}`,s&&"ok-form__actions--stack",r),...a})}),tr=l.createContext(null),Oa=l.forwardRef(function({checked:e,defaultChecked:s=!1,onChange:r,indeterminate:a=!1,value:o,description:i,invalid:c,children:d,className:u,style:p,rootClassName:h,rootStyle:f,id:m,disabled:b,required:v,name:g,"aria-describedby":N,...x},w){const _=l.useContext(tr),k=_e({id:m,disabled:b??((_==null?void 0:_.disabled)||void 0),required:v,invalid:c??((_==null?void 0:_.invalid)||void 0),"aria-describedby":N}),R=!!_&&o!==void 0,[M,E]=le(e,s,r),T=R?_.value.includes(o):M,C=l.useRef(null);return l.useEffect(()=>{C.current&&(C.current.indeterminate=a)},[a,T]),n.jsxs("label",{className:P("ok-check",h,u),style:{...f,...p},"data-invalid":k.invalid?"":void 0,"data-described":i!=null?"":void 0,children:[n.jsx("input",{...x,ref:xe(w,C),id:k.id,type:"checkbox",name:g??(_==null?void 0:_.name),value:o,checked:T,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:j=>{R?(_.toggle(o),r==null||r(j.target.checked)):E(j.target.checked)}}),n.jsxs("span",{className:"ok-check__box","aria-hidden":"true",children:[n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{className:"ok-check__tick",d:Zt,pathLength:1})}),n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{className:"ok-check__dash",d:"M4 8h8",pathLength:1})})]}),i!=null?n.jsxs("span",{className:"ok-check__text",children:[n.jsx("span",{children:d}),n.jsx("span",{className:"ok-check__desc",children:i})]}):d]})}),Ba=[],Fa=l.forwardRef(function({value:e,defaultValue:s=Ba,onChange:r,name:a,orientation:o="vertical",disabled:i,invalid:c,className:d,children:u,id:p,"aria-label":h,"aria-labelledby":f,"aria-describedby":m,...b},v){const g=_e({id:p,disabled:i,invalid:c,"aria-describedby":m,"aria-labelledby":f,"aria-label":h},!1),[N,x]=le(e,s,r),w=_=>x(N.includes(_)?N.filter(k=>k!==_):[...N,_]);return n.jsx("div",{ref:v,id:g.id,role:"group",className:P("ok-check-group",o==="horizontal"&&"ok-check-group--horizontal",d),"aria-label":h,"aria-labelledby":g.labelledBy,"aria-describedby":g.describedBy,"aria-invalid":g.invalid||void 0,...b,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(tr.Provider,{value:{value:N,toggle:w,name:a,disabled:g.disabled,invalid:g.invalid},children:u})})})}),nr=l.createContext(null),Ha=l.forwardRef(function({value:e,onChange:s,description:r,children:a,className:o,style:i,rootClassName:c,rootStyle:d,name:u,checked:p,disabled:h,required:f,...m},b){const v=l.useContext(nr);return n.jsxs("label",{className:P("ok-radio",c,o),style:{...d,...i},"data-described":r!=null?"":void 0,children:[n.jsx("input",{...m,ref:b,type:"radio",name:u??(v==null?void 0:v.name),value:e,checked:v?v.value===e:p,disabled:h??(v==null?void 0:v.disabled),required:f??((v==null?void 0:v.required)||void 0),onChange:g=>{g.target.checked&&(v&&v.select(e),s==null||s(e))}}),n.jsx("span",{className:"ok-radio__dot","aria-hidden":"true"}),r!=null?n.jsxs("span",{className:"ok-radio__text",children:[n.jsx("span",{children:a}),n.jsx("span",{className:"ok-radio__desc",children:r})]}):a]})}),za=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,name:a,orientation:o="vertical",disabled:i,required:c,invalid:d,className:u,children:p,id:h,"aria-label":f,"aria-labelledby":m,"aria-describedby":b,...v},g){const N=_e({id:h,disabled:i,required:c,invalid:d,"aria-describedby":b,"aria-labelledby":m,"aria-label":f},!1),x=`ok-radio-${l.useId()}`,[w,_]=le(e,s,r);return n.jsx("div",{ref:g,id:N.id,role:"radiogroup",className:P("ok-radio-group",o==="horizontal"&&"ok-radio-group--horizontal",u),"aria-label":f,"aria-labelledby":N.labelledBy,"aria-describedby":N.describedBy,"aria-orientation":o,"aria-required":N.required||void 0,"aria-invalid":N.invalid||void 0,"data-invalid":N.invalid?"":void 0,...v,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(nr.Provider,{value:{value:w,select:_,name:a??x,disabled:N.disabled,required:N.required},children:p})})})}),qa=l.forwardRef(function({checked:e,defaultChecked:s=!1,onChange:r,labelPosition:a="end",children:o,className:i,style:c,rootClassName:d,rootStyle:u,id:p,disabled:h,required:f,"aria-describedby":m,...b},v){const g=_e({id:p,disabled:h,required:f,"aria-describedby":m}),[N,x]=le(e,s,r),w=o!=null&&n.jsx("span",{className:"ok-switch__label",children:o});return n.jsxs("label",{className:P("ok-switch",d,i),style:{...u,...c},"data-label-position":a,children:[a==="start"&&w,n.jsx("input",{...b,ref:v,id:g.id,type:"checkbox",role:"switch",checked:N,disabled:g.disabled,required:g.required||void 0,"aria-describedby":g.describedBy,onChange:_=>x(_.target.checked)}),n.jsx("span",{className:"ok-switch__track",children:n.jsx("span",{className:"ok-switch__thumb"})}),a!=="start"&&w]})});function qt(t,e,s,r){return+ye(r==="any"?t:Math.round((t-e)/r)*r+e,e,s).toFixed(6)}function sr(t,e,s){const r=s==="any"?(e-t)/100:s;return{small:r,big:Math.max(r,(e-t)/10)}}const Va=l.forwardRef(function({value:e,defaultValue:s,onChange:r,onChangeEnd:a,onActiveChange:o,min:i=0,max:c=100,step:d=1,ticks:u,bubble:p=!0,format:h,digits:f,disabled:m,name:b,className:v,style:g,id:N,onKeyDown:x,onPointerDown:w,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const T=_e({id:N,disabled:m,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),C=d==="any",j=H=>qt(H,i,c,d),[y,S]=le(e,j(s??i),r),O=j(y),L=C?1/0:Math.round((c-i)/d),$=L<=12,D=f??(C?0:void 0),A=H=>h?h(H):D==null?String(H):H.toFixed(D),B=l.useRef(null),z=l.useRef(null),[G,W]=l.useState(!1),[J,X]=l.useState(!1),I=l.useRef(O);I.current=O;const F=ke(H=>{const re=j(H);I.current=re,S(re)}),q=ke(()=>a==null?void 0:a(I.current)),ne=ke(H=>o==null?void 0:o(H)),Z=l.useRef(null);l.useEffect(()=>()=>{var H;return(H=Z.current)==null?void 0:H.call(Z)},[]);const se=H=>{var Y;w==null||w(H);const re=B.current;if(H.defaultPrevented||H.button||T.disabled||!re)return;(Y=Z.current)==null||Y.call(Z),W(!0),ne(!0);const de=H.clientX;let ee=0;const oe=z.current;if(oe&&oe.contains(H.target)){const V=oe.getBoundingClientRect();ee=H.clientX-(V.left+V.width/2)}const K=V=>{const ie=re.getBoundingClientRect(),ue=oe?oe.offsetWidth:0,we=ye((V-ee-ie.left-ue/2)/(ie.width-ue||1),0,1);F(i+we*(c-i))};K(H.clientX),Z.current=Dn(re,H,V=>{!$&&Math.abs(V.clientX-de)>2&&X(!0),K(V.clientX)},()=>{Z.current=null,W(!1),X(!1),ne(!1),q()})},ce=H=>{if(x==null||x(H),H.defaultPrevented||T.disabled)return;const{small:re,big:de}=sr(i,c,d),ee={ArrowRight:re,ArrowUp:re,ArrowLeft:-re,ArrowDown:-re,PageUp:de,PageDown:-de}[H.key];let oe;if(ee)oe=I.current+ee;else if(H.key==="Home")oe=i;else if(H.key==="End")oe=c;else return;H.preventDefault(),F(oe),q()},U=(O-i)/(c-i||1);return n.jsxs("div",{ref:xe(E,B),id:T.id,role:"slider",tabIndex:T.disabled?-1:0,className:P("ok-slider ok-focusable",v),style:{"--v":U,...g},"aria-label":_,"aria-labelledby":T.labelledBy,"aria-describedby":T.describedBy,"aria-valuemin":i,"aria-valuemax":c,"aria-valuenow":O,"aria-valuetext":A(O),"aria-orientation":"horizontal","aria-disabled":T.disabled||void 0,"data-ticks":u&&$?"":void 0,"data-active":G?"":void 0,"data-tracking":J?"":void 0,onPointerDown:se,onKeyDown:ce,...M,children:[n.jsx("span",{className:"ok-slider__track",children:n.jsx("span",{className:"ok-slider__fill"})}),u&&$&&n.jsx("span",{className:"ok-slider__ticks","aria-hidden":"true",children:Array.from({length:L+1},(H,re)=>n.jsx("i",{style:{left:`${re/L*100}%`}},re))}),n.jsx("span",{className:"ok-slider__thumb",ref:z,children:p&&n.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:A(O)})}),b&&n.jsx("input",{type:"hidden",name:b,value:O})]})}),Ga=l.forwardRef(function({value:e,defaultValue:s,onChange:r,onChangeEnd:a,onActiveChange:o,min:i=0,max:c=100,step:d=1,minDistance:u=0,bubble:p=!0,format:h,digits:f,disabled:m,thumbLabels:b,name:v,className:g,style:N,id:x,onPointerDown:w,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const T=_e({id:x,disabled:m,"aria-describedby":R,"aria-labelledby":k,"aria-label":_},!1),{messages:C}=pe(),j=b??C.rangeSlider.thumbs,y=d==="any",[S,O]=le(e,s??[i,c],r),L=qt(Math.min(S[0],S[1]),i,c,d),$=qt(Math.max(S[0],S[1]),i,c,d),A=(y?1/0:Math.round((c-i)/d))<=12,B=f??(y?0:void 0),z=ee=>h?h(ee):B==null?String(ee):ee.toFixed(B),G=l.useRef(null),W=l.useRef([null,null]),[J,X]=l.useState(null),[I,F]=l.useState(!1),q=l.useRef([L,$]);q.current=[L,$];const ne=ke((ee,oe)=>{const[K,Y]=q.current,V=qt(oe,i,c,d),ie=ee===0?[Math.min(V,Y-u),Y]:[K,Math.max(V,K+u)];ie[ee]=ye(ie[ee],i,c),!(ie[0]===K&&ie[1]===Y)&&(q.current=ie,O(ie))}),Z=ke(()=>a==null?void 0:a(q.current)),se=ke(ee=>o==null?void 0:o(ee)),ce=l.useRef(null);l.useEffect(()=>()=>{var ee;return(ee=ce.current)==null?void 0:ee.call(ce)},[]);const U=ee=>{var Pe,dt,Te;w==null||w(ee);const oe=G.current;if(ee.defaultPrevented||ee.button||T.disabled||!oe)return;(Pe=ce.current)==null||Pe.call(ce);const K=((dt=W.current[0])==null?void 0:dt.offsetWidth)??0,Y=(je,Me)=>{const ve=oe.getBoundingClientRect();return i+ye((je-Me-ve.left-K/2)/(ve.width-K||1),0,1)*(c-i)};let V=W.current.findIndex(je=>je&&je.contains(ee.target)),ie=0;if(V>=0){const je=W.current[V].getBoundingClientRect();ie=ee.clientX-(je.left+je.width/2)}else{const je=Y(ee.clientX,0),[Me,ve]=q.current;V=Math.abs(je-Me)<=Math.abs(je-ve)?0:1,Me===ve&&(V=je<Me?0:1)}const ue=V,we=ee.clientX;X(ue),se(!0),(Te=W.current[ue])==null||Te.focus({preventScroll:!0}),ne(ue,Y(ee.clientX,ie)),ce.current=Dn(oe,ee,je=>{!A&&Math.abs(je.clientX-we)>2&&F(!0),ne(ue,Y(je.clientX,ie))},()=>{ce.current=null,X(null),F(!1),se(!1),Z()})},H=(ee,oe)=>{if(T.disabled)return;const{small:K,big:Y}=sr(i,c,d),V={ArrowRight:K,ArrowUp:K,ArrowLeft:-K,ArrowDown:-K,PageUp:Y,PageDown:-Y}[oe.key];let ie;if(V)ie=q.current[ee]+V;else if(oe.key==="Home")ie=i;else if(oe.key==="End")ie=c;else return;oe.preventDefault(),ne(ee,ie),Z()},re=c-i||1,de=[L,$];return n.jsxs("div",{ref:xe(E,G),id:T.id,role:"group",className:P("ok-slider ok-slider--range",g),style:{"--a":(L-i)/re,"--b":($-i)/re,...N},"aria-label":_,"aria-labelledby":T.labelledBy,"aria-describedby":T.describedBy,"data-disabled":T.disabled?"":void 0,"data-active":J!==null?"":void 0,"data-tracking":I?"":void 0,onPointerDown:U,...M,children:[n.jsx("span",{className:"ok-slider__track",children:n.jsx("span",{className:"ok-slider__fill"})}),de.map((ee,oe)=>n.jsx("span",{ref:K=>{W.current[oe]=K},className:"ok-slider__thumb ok-focusable",role:"slider",tabIndex:T.disabled?-1:0,"data-index":oe,"data-active":J===oe?"":void 0,"aria-label":j[oe],"aria-valuemin":oe===0?i:Math.min(c,L+u),"aria-valuemax":oe===0?Math.max(i,$-u):c,"aria-valuenow":ee,"aria-valuetext":z(ee),"aria-orientation":"horizontal","aria-disabled":T.disabled||void 0,onKeyDown:K=>H(oe,K),children:p&&n.jsx("span",{className:"ok-slider__bubble","aria-hidden":"true",children:z(ee)})},oe)),v&&n.jsxs(n.Fragment,{children:[n.jsx("input",{type:"hidden",name:v,value:L}),n.jsx("input",{type:"hidden",name:v,value:$})]})]})});function Wa({options:t,value:e,defaultValue:s,onChange:r,size:a="md",block:o,disabled:i,className:c,id:d,"aria-label":u,"aria-labelledby":p,"aria-describedby":h,onKeyDown:f,...m},b){var C,j;const v=_e({id:d,disabled:i,"aria-describedby":h,"aria-labelledby":p,"aria-label":u},!1),g=((C=t.find(y=>!y.disabled))==null?void 0:C.value)??((j=t[0])==null?void 0:j.value),[N,x]=le(e,s??g,r),w=l.useRef(null),_=l.useRef(null),[k,R]=l.useState(!1),M=l.useRef(null),E=()=>{const y=w.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');!y||!S||(y.style.setProperty("--x",S.offsetLeft+"px"),y.style.setProperty("--w",S.offsetWidth+"px"))},T=()=>{const y=w.current,S=y==null?void 0:y.querySelector('[aria-checked="true"]');if(!y||!S||y.scrollWidth<=y.clientWidth)return;const O=3,L=S.offsetLeft-O,$=S.offsetLeft+S.offsetWidth+O;L<y.scrollLeft?y.scrollLeft=L:$>y.scrollLeft+y.clientWidth&&(y.scrollLeft=$-y.clientWidth)};return ge(()=>{E(),T(),M.current!==null&&M.current!==N&&Ne(_.current,{scale:["1 1","1.05 .86","1 1"]},{duration:340,easing:De.out}),M.current=N},[N]),ge(E),l.useEffect(()=>{const y=w.current;if(!y||typeof ResizeObserver>"u"){R(!0);return}let S=0;const O=new ResizeObserver(()=>{R(!1),E(),T(),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{S=requestAnimationFrame(()=>R(!0))})});return O.observe(y),S=requestAnimationFrame(()=>R(!0)),()=>{O.disconnect(),cancelAnimationFrame(S)}},[]),n.jsxs("div",{ref:xe(b,w),id:v.id,role:"radiogroup",className:P("ok-seg",a!=="md"&&`ok-seg--${a}`,o&&"ok-seg--block",c),"aria-label":u,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":v.disabled||void 0,"data-ready":k?"":void 0,onKeyDown:y=>{if(f==null||f(y),y.defaultPrevented)return;const S=Jt(y,'[role="radio"]');if(!S)return;S.focus();const O=S.dataset.value;O!==void 0&&x(O)},...m,children:[n.jsx("span",{className:"ok-seg__thumb",ref:_,"aria-hidden":"true"}),t.map(y=>{const S=y.value===N;return n.jsxs("button",{type:"button",role:"radio",className:"ok-seg__item ok-focusable","aria-checked":S,"aria-label":y["aria-label"],tabIndex:S?0:-1,disabled:v.disabled||y.disabled,"data-value":y.value,onClick:()=>x(y.value),children:[y.icon,y.label!=null&&y.label!==""&&n.jsx("span",{children:y.label})]},y.value)})]})}const Ua=l.forwardRef(Wa),rr=l.createContext(null),Ya=l.forwardRef(function({value:e,selected:s,defaultSelected:r,onChange:a,onRemove:o,removeLabel:i,icon:c,disabled:d,className:u,children:p,onClick:h,...f},m){const{messages:b}=pe(),v=i??b.common.remove,g=l.useContext(rr),N=!!g&&g.selectable&&e!==void 0,x=N||s!==void 0||r!==void 0||a!==void 0&&!o,[w,_]=le(s,r??!1,a),k=N?g.value.includes(e):w,R=d??(g==null?void 0:g.disabled)??!1,M=l.useRef(null),[E,T]=l.useState(!1),C=P("ok-chip",u),j=c!=null&&n.jsx("span",{className:"ok-chip__lead",children:c});if(x&&!o)return n.jsxs("button",{ref:xe(m,M),type:"button",className:P(C,"ok-focusable"),"aria-pressed":k,disabled:R,"data-value":e,onClick:S=>{h==null||h(S),!S.defaultPrevented&&(N?(g.toggle(e),a==null||a(!k)):_(!k))},...f,children:[n.jsx("span",{className:"ok-chip__check","aria-hidden":"true",children:n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})})}),j,n.jsx("span",{className:"ok-chip__text",children:p})]});const y=()=>{T(!0);const S=Ne(M.current,[{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(.5)"}],{duration:140,easing:De.in,fill:"forwards"}),O=()=>o==null?void 0:o();S!=null&&S.finished?S.finished.then(O,O):O()};return n.jsxs("span",{ref:xe(m,M),className:C,"data-value":e,"data-removing":E||void 0,"aria-disabled":R||void 0,onClick:h,...f,children:[j,n.jsx("span",{className:"ok-chip__text",children:p}),o&&n.jsx("button",{type:"button",className:"ok-chip__remove ok-focusable","aria-label":typeof p=="string"?`${v} ${p}`:v,disabled:R,onClick:y,children:n.jsx(he,{name:"x"})})]})}),Xa=[],fs="ok-chips-flip";class Ka extends l.Component{getSnapshotBeforeUpdate(){const e=this.props.root.current;if(!e)return null;const s=Array.from(e.children);return{node:e,count:s.length,rects:new Map(s.map(r=>[r,r.getBoundingClientRect()]))}}componentDidUpdate(e,s,r){if(!r||!r.node.isConnected)return;const a=r.node,o=Array.from(a.children);if(o.length===r.count)return;o.forEach(c=>{var d;return(d=c.getAnimations)==null?void 0:d.call(c).forEach(u=>{u.id===fs&&u.cancel()})});const i=new Map;r.rects.forEach((c,d)=>{var u;(u=d.dataset)!=null&&u.removing||i.set(d,c)}),Yt(i,{id:fs})}render(){return this.props.children}}const Za=l.forwardRef(function({value:e,defaultValue:s,onChange:r,multiple:a=!0,disabled:o,className:i,children:c,id:d,"aria-label":u,"aria-labelledby":p,"aria-describedby":h,...f},m){const b=_e({id:d,disabled:o,"aria-describedby":h,"aria-labelledby":p,"aria-label":u},!1),v=e!==void 0||s!==void 0||r!==void 0,[g,N]=le(e,s??Xa,r),x=_=>{g.includes(_)?N(g.filter(k=>k!==_)):N(a?[...g,_]:[_])},w=l.useRef(null);return n.jsx("div",{ref:xe(m,w),id:b.id,role:"group",className:P("ok-chips",i),"aria-label":u,"aria-labelledby":b.labelledBy,"aria-describedby":b.describedBy,...f,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(rr.Provider,{value:{value:g,toggle:x,selectable:v,disabled:b.disabled},children:n.jsx(Ka,{root:w,children:c})})})})}),ar=l.createContext(null),Ja=l.forwardRef(function({value:e,art:s,description:r,checked:a,onChange:o,disabled:i,className:c,children:d,onClick:u,...p},h){const f=l.useContext(ar),m=f?f.values.includes(e):!!a,b=f?!f.multiple:!1;return n.jsxs("button",{ref:h,type:"button",role:b?"radio":"checkbox",className:P("ok-option ok-focusable",c),"aria-checked":m,tabIndex:b?f.tabStop===e?0:-1:void 0,disabled:i??(f==null?void 0:f.disabled),"data-value":e,onClick:v=>{u==null||u(v),!v.defaultPrevented&&(f&&f.pick(e),o==null||o(f?f.multiple?!m:!0:!m))},...p,children:[s!=null&&n.jsx("span",{className:"ok-option__art",children:s}),n.jsxs("span",{className:"ok-option__foot",children:[n.jsx("span",{className:"ok-option__title",children:d}),n.jsx("span",{className:"ok-option__check","aria-hidden":"true",children:n.jsx("svg",{viewBox:"0 0 16 16",children:n.jsx("path",{d:Zt,pathLength:1})})})]}),r!=null&&n.jsx("span",{className:"ok-option__desc",children:r})]})}),ps=t=>t===void 0?void 0:t===null?[]:Array.isArray(t)?t:[t],Qa=l.forwardRef(function(e,s){const{multiple:r=!1,value:a,defaultValue:o,onChange:i,disabled:c,minItemWidth:d,className:u,style:p,children:h,id:f,onKeyDown:m,"aria-label":b,"aria-labelledby":v,"aria-describedby":g,...N}=e,x=_e({id:f,disabled:c,"aria-describedby":g,"aria-labelledby":v,"aria-label":b},!1),w=i,[_,k]=le(ps(a),ps(o)??[],C=>{r?w==null||w(C):C.length&&(w==null||w(C[0]))}),R=C=>{r?k(_.includes(C)?_.filter(j=>j!==C):[..._,C]):_[0]!==C&&k([C])};let M;const E=C=>{var y,S;if(M!==void 0||C==null||typeof C!="object")return;if(Array.isArray(C)){C.forEach(E);return}const j=C;typeof((y=j.props)==null?void 0:y.value)=="string"&&!j.props.disabled?M=j.props.value:(S=j.props)!=null&&S.children&&E(j.props.children)};!r&&!_.length&&E(h);const T=_[0]??M;return n.jsx("div",{ref:s,id:x.id,role:r?"group":"radiogroup",className:P("ok-options",u),style:d?{gridTemplateColumns:`repeat(auto-fit, minmax(${d}px, 1fr))`,...p}:p,"aria-label":b,"aria-labelledby":x.labelledBy,"aria-describedby":x.describedBy,onKeyDown:C=>{if(m==null||m(C),C.defaultPrevented||r)return;const j=Jt(C,'[role="radio"]');j&&(j.focus(),j.dataset.value!==void 0&&R(j.dataset.value))},...N,children:n.jsx(Ie.Provider,{value:null,children:n.jsx(ar.Provider,{value:{values:_,multiple:r,pick:R,disabled:x.disabled,tabStop:T},children:h})})})}),or=l.forwardRef(function({colors:e,value:s,defaultValue:r=null,onChange:a,size:o="md",disabled:i,className:c,id:d,onKeyDown:u,"aria-label":p,"aria-labelledby":h,"aria-describedby":f,...m},b){var w;const v=_e({id:d,disabled:i,"aria-describedby":f,"aria-labelledby":h,"aria-label":p},!1),[g,N]=le(s,r,a),x=e.some(_=>_.value===g)?g:(w=e.find(_=>!_.disabled))==null?void 0:w.value;return n.jsx("div",{ref:b,id:v.id,role:"radiogroup",className:P("ok-swatches",o!=="md"&&`ok-swatches--${o}`,c),"aria-label":p,"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,onKeyDown:_=>{if(u==null||u(_),_.defaultPrevented)return;const k=Jt(_,'[role="radio"]');k&&(k.focus(),k.dataset.value!==void 0&&N(k.dataset.value))},...m,children:e.map(_=>n.jsx("button",{type:"button",role:"radio",className:"ok-swatch ok-focusable",style:{"--c":_.color},"aria-checked":_.value===g,"aria-label":_.label,title:_.label,tabIndex:_.value===x?0:-1,disabled:v.disabled||_.disabled,"data-value":_.value,onClick:()=>N(_.value)},_.value))})}),fn="#ff6b8e",eo=()=>()=>{},to=()=>"EyeDropper"in window,no=()=>!1;function pn(t,e){const s=Os(t);return s?s.v===0?{h:e.h,s:e.s,v:0}:s.s===0?{h:e.h,s:0,v:s.v}:s:e}const hn=t=>Math.round(t*100),so=l.forwardRef(function({value:e,defaultValue:s=fn,onChange:r,onChangeEnd:a,swatches:o,disabled:i,className:c,style:d,id:u,"aria-label":p,"aria-labelledby":h,"aria-describedby":f,...m},b){const v=_e({id:u,disabled:i,"aria-describedby":f,"aria-labelledby":h,"aria-label":p},!1),{messages:g}=pe(),N=v.disabled,[x,w]=le(e,Ve(s)??fn,r),_=Ve(x)??fn,[k,R]=l.useState(()=>({hex:_,hsv:pn(_,{h:0,s:0,v:0})}));let M=k.hsv;k.hex!==_&&(M=pn(_,k.hsv),R({hex:_,hsv:M}));const E=l.useRef({hex:_,hsv:M});E.current={hex:_,hsv:M};const T=ke(F=>{const q=Bs(F);E.current={hex:q,hsv:F},R({hex:q,hsv:F}),w(q)}),C=ke(F=>T(pn(F,E.current.hsv))),j=ke(()=>a==null?void 0:a(E.current.hex)),y=l.useRef(null),[S,O]=l.useState(!1),L=l.useRef(null);l.useEffect(()=>()=>{var F;return(F=L.current)==null?void 0:F.call(L)},[]);const $=F=>{var Z;const q=y.current;if(F.button||N||!q)return;(Z=L.current)==null||Z.call(L),q.focus({preventScroll:!0}),O(!0);const ne=(se,ce)=>{const U=q.getBoundingClientRect(),H=ye((se-U.left)/(U.width||1),0,1),re=1-ye((ce-U.top)/(U.height||1),0,1);T({h:E.current.hsv.h,s:H,v:re})};ne(F.clientX,F.clientY),L.current=Dn(q,F,se=>ne(se.clientX,se.clientY),()=>{L.current=null,O(!1),j()})},D=F=>{if(N||F.altKey||F.ctrlKey||F.metaKey)return;const{h:q,s:ne,v:Z}=E.current.hsv,se=F.shiftKey?10:1,ce=(H,re)=>ye(Math.round(H*100+re)/100,0,1);let U;switch(F.key){case"ArrowLeft":U={h:q,s:ce(ne,-se),v:Z};break;case"ArrowRight":U={h:q,s:ce(ne,se),v:Z};break;case"ArrowUp":U={h:q,s:ne,v:ce(Z,se)};break;case"ArrowDown":U={h:q,s:ne,v:ce(Z,-se)};break;case"PageUp":U={h:q,s:ne,v:ce(Z,10)};break;case"PageDown":U={h:q,s:ne,v:ce(Z,-10)};break;case"Home":U={h:q,s:0,v:Z};break;case"End":U={h:q,s:1,v:Z};break;default:return}F.preventDefault(),T(U),j()},A=l.useRef(null),B=ke(F=>{F!==Math.round(E.current.hsv.h)&&T({...E.current.hsv,h:F})});l.useEffect(()=>{const F=A.current;if(!F)return;const q=()=>{B(Number(F.value)),j()};return F.addEventListener("change",q),()=>F.removeEventListener("change",q)},[B,j]);const[z,G]=l.useState(null),W=()=>{if(z===null)return;G(null);const F=Ve(z);!F||F===E.current.hex||(C(F),j())},J=l.useSyncExternalStore(eo,to,no),X=async()=>{const F=window.EyeDropper;if(F)try{const{sRGBHex:q}=await new F().open(),ne=Ve(q);if(!ne)return;C(ne),j()}catch{}},I=o==null?void 0:o.map(F=>{const q=Ve(F)??F;return{value:q,color:F,label:q}});return n.jsxs("div",{ref:b,id:v.id,role:"group",className:P("ok-color-picker",c),style:{"--h":M.h,"--c":_,...d},"aria-label":p??(v.labelledBy?void 0:g.colorPicker.label),"aria-labelledby":v.labelledBy,"aria-describedby":v.describedBy,"aria-disabled":N||void 0,"data-disabled":N?"":void 0,...m,children:[n.jsx("div",{ref:y,role:"slider",tabIndex:N?-1:0,className:"ok-color-picker__area ok-focusable",style:{"--s":M.s,"--v":M.v},"aria-label":g.colorPicker.area,"aria-roledescription":g.colorPicker.areaRole,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":hn(M.s),"aria-valuetext":g.colorPicker.areaValue(hn(M.s),hn(M.v)),"aria-disabled":N||void 0,"data-active":S?"":void 0,onPointerDown:$,onKeyDown:D,children:n.jsx("span",{className:"ok-color-picker__thumb"})}),n.jsx("input",{ref:A,type:"range",className:"ok-color-picker__hue ok-focusable",min:0,max:360,step:1,value:Math.round(M.h),"aria-label":g.colorPicker.hue,"aria-valuetext":`${Math.round(M.h)}°`,disabled:N,onChange:F=>B(Number(F.target.value))}),n.jsxs(Ie.Provider,{value:null,children:[n.jsxs("div",{className:"ok-color-picker__row",children:[n.jsx(On,{size:"sm",className:"ok-color-picker__hex","aria-label":g.colorPicker.hex,prefix:n.jsx("span",{className:"ok-color-picker__chip"}),value:z??_,onChange:G,onBlur:W,onKeyDown:F=>{F.key==="Enter"?(F.preventDefault(),W()):F.key==="Escape"&&z!==null&&G(null)},spellCheck:!1,autoComplete:"off",autoCapitalize:"off",disabled:N}),J&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":g.colorPicker.eyedropper,title:g.colorPicker.eyedropper,disabled:N,onClick:X,children:n.jsx(he,{children:n.jsx("path",{d:"M13.6 3.4a2 2 0 0 1 2.9 2.9l-1.7 1.7.9.9-1.4 1.4-4.2-4.2 1.4-1.4.9.9zM10.6 7.4l-6 6a1.5 1.5 0 0 0-.4.8l-.4 2.4 2.4-.4a1.5 1.5 0 0 0 .8-.4l6-6"})})})]}),I&&I.length>0&&n.jsx(or,{size:"sm",className:"ok-color-picker__swatches","aria-label":g.colorPicker.swatches,colors:I,value:I.some(F=>F.value===_)?_:null,onChange:F=>{const q=Ve(F);q&&(C(q),j())},disabled:N})]})]})}),lr={Meta:"⌘",Control:"⌃",Alt:"⌥",Shift:"⇧",Space:"Space",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Enter:"↩",Backspace:"⌫",Tab:"⇥",Escape:"Esc"},Bn=t=>lr[t]??t,Wt=(t,e=Et["zh-CN"].keyNames)=>e[t]??t,ro=l.forwardRef(function({k:e,size:s="md",className:r,children:a,...o},i){const c=pe().messages.keyNames,d=e?Bn(e):null;return n.jsx("kbd",{ref:i,className:P("ok-kbd",s!=="md"&&`ok-kbd--${s}`,r),"data-key":e,...o,children:d!==null&&d!==Wt(e,c)?n.jsx("abbr",{title:Wt(e,c),style:{textDecoration:"none"},children:d}):d??a})}),ir=["Control","Alt","Shift","Meta"],hs=t=>ir.filter(e=>({Control:t.ctrlKey,Alt:t.altKey,Shift:t.shiftKey,Meta:t.metaKey})[e]);function ao({k:t,index:e}){const s=l.useRef(null);return l.useEffect(()=>{Ne(s.current,[{transform:"scale(.3) translateY(8px)",opacity:0},{transform:"none",opacity:1}],{spring:"bouncy",delay:e*45})},[]),n.jsx("kbd",{ref:s,className:"ok-kbd","data-key":t,children:Bn(t)})}const oo=l.forwardRef(function({value:e,defaultValue:s="",onChange:r,placeholder:a,recordingText:o,size:i="md",disabled:c,className:d,id:u,onClick:p,onKeyDown:h,onKeyUp:f,onBlur:m,onPointerDown:b,"aria-label":v,"aria-labelledby":g,"aria-describedby":N,...x},w){const _=_e({id:u,disabled:c,"aria-describedby":N,"aria-labelledby":g,"aria-label":v},!1),{messages:k}=pe(),R=a??k.hotkey.placeholder,M=o??k.hotkey.recording,[E,T]=le(e,s,I=>r==null?void 0:r(I,I.split("+").filter(Boolean))),C=E.split("+").filter(Boolean),[j,y]=l.useState(!1),[S,O]=l.useState([]),[L,$]=l.useState(!1),D=l.useRef(null),A=`ok-hotkey-${l.useId()}`,B=()=>{!j&&!_.disabled&&(y(!0),O([]))},z=()=>{y(!1),O([])},G=I=>{var Z,se;if(h==null||h(I),_.disabled)return;if(!j){(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),B());return}if(I.key==="Tab"){z();return}if(I.preventDefault(),I.stopPropagation(),(se=(Z=I.nativeEvent).stopImmediatePropagation)==null||se.call(Z),I.key==="Escape"){z();return}const F=hs(I);if(ir.includes(I.key)){O(F);return}const q=I.code||"";let ne=q.startsWith("Key")?q.slice(3):q.startsWith("Digit")?q.slice(5):q==="Space"?"Space":I.key;ne.length===1&&(ne=ne.toUpperCase()),z(),T([...F,ne].join("+"))},W=j?S:C,J=j?S.length?"…":M:C.length?"":R,X=j?k.hotkey.spokenRecording(M):C.length?k.hotkey.spokenCurrent(C.map(I=>Wt(I,k.keyNames)).join(" + ")):k.hotkey.none;return n.jsxs("div",{ref:xe(w,D),id:_.id,role:"button",tabIndex:_.disabled?-1:0,className:P("ok-hotkey ok-focusable",i!=="md"&&`ok-hotkey--${i}`,d),"aria-label":v,"aria-labelledby":_.labelledBy,"aria-describedby":[_.describedBy,A].filter(Boolean).join(" "),"aria-disabled":_.disabled||void 0,"aria-pressed":j,"data-recording":j?"":void 0,"data-pointer":L?"":void 0,onPointerDown:I=>{b==null||b(I),$(!0)},onClick:I=>{p==null||p(I),I.defaultPrevented||B()},onKeyDown:G,onKeyUp:I=>{f==null||f(I),j&&O(hs(I))},onBlur:I=>{m==null||m(I),$(!1),j&&z()},...x,children:[W.map((I,F)=>n.jsx(ao,{k:I,index:F},I)),J&&n.jsx("span",{className:"ok-hotkey__hint",children:J}),n.jsx(In,{id:A,"aria-live":"polite",children:X})]})}),ms=2.9,lo=17.1,bs="M10 2.600l2.200 4.700 5.100.600-3.800 3.500 1 5-4.500-2.500-4.500 2.500 1-5-3.800-3.500 5.100-.600z",io=l.forwardRef(function({value:e,defaultValue:s=0,onChange:r,max:a=5,allowClear:o=!0,readOnly:i,disabled:c,size:d="md",starLabel:u,name:p,className:h,id:f,onKeyDown:m,"aria-label":b,"aria-labelledby":v,"aria-describedby":g,...N},x){const w=_e({id:f,disabled:c,"aria-describedby":g,"aria-labelledby":v,"aria-label":b},!1),{messages:_}=pe(),k=u??_.rating.star,[R,M]=le(e,s,r),E=Array.from({length:a},(j,y)=>y+1),T=P("ok-rating",d!=="md"&&`ok-rating--${d}`,h),C=n.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",children:n.jsx("path",{d:bs})});return i?n.jsx("div",{ref:x,id:w.id,role:"img",className:T,"data-readonly":"","aria-label":v?void 0:b??_.rating.value(R,a),"aria-labelledby":v,"aria-describedby":w.describedBy,...N,children:E.map(j=>{const y=Math.min(1,Math.max(0,R-(j-1))),S=y>0&&y<1,O=100-(ms+y*(lo-ms))/20*100;return n.jsxs("span",{className:"ok-rating__star","data-on":y>=1?"":void 0,"data-partial":S?"":void 0,children:[C,S&&n.jsx("svg",{className:"ok-rating__fill",viewBox:"0 0 20 20","aria-hidden":"true",style:{"--ok-rating-cut":`${+O.toFixed(2)}%`},children:n.jsx("path",{d:bs})})]},j)})}):n.jsxs("div",{ref:x,id:w.id,role:"radiogroup",className:T,"aria-label":w.labelledBy?void 0:b??_.rating.label,"aria-labelledby":w.labelledBy,"aria-describedby":w.describedBy,"aria-disabled":w.disabled||void 0,onKeyDown:j=>{if(m==null||m(j),j.defaultPrevented||w.disabled)return;const y=Jt(j,'[role="radio"]');y&&(y.focus(),M(Number(y.dataset.value)))},...N,children:[E.map(j=>n.jsx("button",{type:"button",role:"radio",className:"ok-rating__star ok-focusable","aria-checked":j===R,"aria-label":k(j),tabIndex:j===(R||1)?0:-1,disabled:w.disabled,"data-value":j,"data-on":j<=R?"":void 0,onClick:()=>M(o&&j===R?0:j),children:C},j)),p&&n.jsx("input",{type:"hidden",name:p,value:R})]})});function co(t,e){if(!e)return!0;const s=t.name.toLowerCase(),r=(t.type||"").toLowerCase();return e.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean).some(a=>a.startsWith(".")?s.endsWith(a):a.endsWith("/*")?r.startsWith(a.slice(0,-1)):r===a)}const uo=l.forwardRef(function({onChange:e,onReject:s,maxSize:r,title:a,hint:o,icon:i,invalid:c,accept:d,multiple:u,children:p,className:h,style:f,rootClassName:m,rootStyle:b,id:v,disabled:g,required:N,"aria-describedby":x,...w},_){const k=_e({id:v,disabled:g,required:N,invalid:c,"aria-describedby":x}),{messages:R}=pe(),M=a===void 0?R.fileDrop.title:a,[E,T]=l.useState(!1),[C,j]=l.useState(""),y=l.useRef(null),S=l.useRef(0),O=D=>{var G;let A=Array.from(D??[]);if(!A.length)return;const B=A.filter(W=>co(W,d)&&(r==null||W.size<=r)),z=A.filter(W=>!B.includes(W));A=u?B:B.slice(0,1),z.length&&(s==null||s(z)),A.length&&(e==null||e(A)),j(R.fileDrop.status(A.length,((G=A[0])==null?void 0:G.name)??"",z.length))},L=D=>{var A;return Array.from(((A=D.dataTransfer)==null?void 0:A.types)??[]).includes("Files")},$={onDragEnter:D=>{k.disabled||!L(D)||(D.preventDefault(),S.current++,T(!0))},onDragOver:D=>{k.disabled||!L(D)||D.preventDefault()},onDragLeave:()=>{S.current=Math.max(0,S.current-1),S.current||T(!1)},onDrop:D=>{S.current=0,T(!1),!(k.disabled||!L(D))&&(D.preventDefault(),O(D.dataTransfer.files))}};return n.jsxs("label",{className:P("ok-filedrop",m,h),style:{...b,...f},"data-dragging":E?"":void 0,"data-invalid":k.invalid?"":void 0,"data-disabled":k.disabled?"":void 0,...$,children:[n.jsx("input",{...w,ref:xe(_,y),id:k.id,className:"ok-filedrop__input",type:"file",accept:d,multiple:u,disabled:k.disabled,required:k.required||void 0,"aria-invalid":k.invalid||void 0,"aria-describedby":k.describedBy,onChange:D=>{O(D.target.files),D.target.value=""}}),n.jsxs("span",{className:"ok-filedrop__body",children:[i??n.jsx(he,{name:"upload",className:"ok-filedrop__icon"}),n.jsx("span",{className:"ok-filedrop__title",children:M}),o!=null&&n.jsx("span",{className:"ok-filedrop__hint",children:o}),p,n.jsx("span",{className:"ok-filedrop__status","aria-live":"polite",children:C})]})]})}),fo=1e3,po='button, a[href], [role="button"], [role="menuitem"], [role="option"], [role="tab"], summary, label, input, select, textarea, [tabindex]';function ho(t){return t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement?!0:t instanceof HTMLInputElement?!["button","submit","reset","checkbox","radio","image","file","color","range"].includes(t.type):t instanceof HTMLElement&&t.isContentEditable}function cr({pointer:t,active:e,now:s,viewport:r}){const a={x:r.width/2,y:r.height/2},o=e==null?void 0:e.ownerDocument,i=!e||e===(o==null?void 0:o.body)||e===(o==null?void 0:o.documentElement);if(t&&t.target&&s-t.time<=fo){const c=t.target;if(!i&&(e===c||e.contains(c)))return{x:t.x,y:t.y};if(i&&c.closest(po))return{x:t.x,y:t.y}}if(!i&&!ho(e)){const c=e.getBoundingClientRect();if(c.width>0&&c.height>0&&c.right>0&&c.bottom>0&&c.left<r.width&&c.top<r.height)return{x:c.left+c.width/2,y:c.top+c.height/2}}return a}let dr=null,vs=!1;function ur(){vs||!Ae||(vs=!0,document.addEventListener("pointerdown",t=>{dr={x:t.clientX,y:t.clientY,time:performance.now(),target:t.target instanceof Element?t.target:null}},!0))}function mo(t="trigger"){if(typeof t=="object")return t;const e={width:window.innerWidth,height:window.innerHeight};return t==="center"?{x:e.width/2,y:e.height/2}:cr({pointer:dr,active:document.activeElement,now:performance.now(),viewport:e})}function Qt(t,e){return t==="sm"||t==="md"||t==="lg"?e[t]:t}const fr=l.createContext(null);function pr(){return l.useContext(fr)}function bo({active:t,layerRef:e}){return Ts(t,e),null}const vo=t=>typeof t=="number"?t+"px":t;function go(t,e){for(let s=t;s&&s!==e;s=s.parentElement)if(s.scrollWidth>s.clientWidth+1){const r=getComputedStyle(s).overflowX;if(r==="auto"||r==="scroll")return!0}return!1}const xo='button, a[href], input, select, textarea, label, [role="button"], [contenteditable="true"], [data-ok-no-drag]',ko=.5,Je=l.forwardRef(function({open:e,onOpenChange:s,placement:r="center",modal:a=!0,autoFocus:o=!1,dismissible:i=!0,size:c,gap:d,stretch:u=!0,align:p,role:h="dialog",initialFocus:f,restoreFocus:m=!0,container:b,contained:v,dragToDismiss:g=!1,swipeToDismiss:N=!0,closeButton:x="auto",closeLabel:w,origin:_,onExited:k,className:R,style:M,children:E,"aria-label":T,"aria-labelledby":C,"aria-describedby":j,onPointerDown:y,onFocus:S,onBlur:O,...L},$){const D=pe().messages.common.close,A=w??D,{mounted:B,state:z,ref:G}=Pt(e,Es.out*2),W=l.useRef(null),J=l.useRef(null),X=l.useRef(null),I=l.useId(),F=I+"title",q=I+"desc",[ne,Z]=l.useState(!1),[se,ce]=l.useState(!1),[U,H]=l.useState(!1),re=l.useRef(null),de=_!==void 0||r==="center",[ee,oe]=l.useState(null);l.useEffect(()=>{ur()},[]),ge(()=>{e&&de&&oe(mo(_??"trigger"))},[e]);const K=l.useRef(null),Y=Q=>{if(!Q||!de||!ee||K.current&&K.current.node===Q&&K.current.point===ee)return;K.current={node:Q,point:ee};const me=Q.offsetParent;if(!me)return;const fe=me.getBoundingClientRect();Q.style.setProperty("--_ox",`${ee.x-fe.left-Q.offsetLeft}px`),Q.style.setProperty("--_oy",`${ee.y-fe.top-Q.offsetTop}px`)},V=ke(()=>{s==null||s(!1)}),ie=ke(()=>{k==null||k()});As(B&&a&&!v),Lt(e&&i&&(a||U),V);const ue=l.useRef(B);l.useEffect(()=>{ue.current&&!B&&(H(!1),ie()),ue.current=B},[B,ie]),l.useEffect(()=>{if(e||a||!m)return;const Q=W.current;Q&&Q.contains(document.activeElement)&&An(re.current)},[e,a,m]);const we=g&&i&&r!=="center",Pe=Xt("(max-width: 519.98px)"),Te=N&&i&&Pe&&(r==="left"||r==="right")&&!v,[je,Me]=l.useState(!1),ve=i&&!je&&(x===!0||x==="auto"&&Pe&&r!=="center"&&!v),Ue=l.useMemo(()=>({titleId:F,descriptionId:q,setTitled:Z,setDescribed:ce,close:V,dismissible:i,modal:a,placement:r,draggable:we,setHeaderClose:Me}),[F,q,V,i,a,r,we]);if(!B)return null;const Ye=Q=>{S==null||S(Q);const me=W.current,fe=Q.relatedTarget;!U&&fe&&me&&!me.contains(fe)&&(re.current=En(fe)),H(!0)},He=Q=>{var fe;O==null||O(Q);const me=Q.relatedTarget;(!me||!((fe=W.current)!=null&&fe.contains(me)))&&H(!1)},et=Q=>{var as;y==null||y(Q);const me=W.current;if(!we&&!Te||!me||Q.defaultPrevented||z!=="open"||Q.pointerType==="mouse"&&Q.button!==0)return;const fe=Q.target,ae=(as=fe.closest)==null?void 0:as.call(fe,"[data-ok-drag-handle]");if(!me.contains(fe)||fe.closest(xo))return;const be=we&&!!ae&&me.contains(ae),Re=!be&&Te&&Q.pointerType!=="mouse"&&!go(fe,me);if(!be&&!Re)return;const Ke=Q.clientX,ze=Q.clientY,tt=r==="left"||r==="right",kt=r==="bottom"||r==="right"?1:-1,Zn=Q.pointerId,Yr=tt?Q.clientX:Q.clientY,Jn=me.getBoundingClientRect(),on=tt?Jn.width:Jn.height,Oe=X.current;let ln=!1,nt=0,cn=0,dn=Q.timeStamp,Qn=0;const es=Se=>{if(Se.pointerId!==Zn)return;const st=((tt?Se.clientX:Se.clientY)-Yr)*kt;if(!ln){if(Re){const yt=Math.abs(Se.clientX-Ke),os=Math.abs(Se.clientY-ze);if(yt<8&&os<8)return;if(os>yt||st<=0){ts();return}}if(Math.abs(st)<4)return;ln=!0,me.style.transition="none",me.setAttribute("data-dragging",""),Oe&&(Oe.style.transition="none")}nt=st>=0?st:Math.max(st*.15,-8);const Dt=Se.timeStamp-dn;Dt>0&&(cn=(nt-Qn)/Dt,dn=Se.timeStamp,Qn=nt);const Ot=nt*kt;me.style.transform=tt?`translateX(${Ot}px)`:`translateY(${Ot}px)`,Oe&&(Oe.style.opacity=String(1-ye(nt/(on||320),0,1)*.7))},ts=()=>{document.removeEventListener("pointermove",es),document.removeEventListener("pointerup",ss),document.removeEventListener("pointercancel",rs)},ns=(Se,st)=>{if(Se.pointerId!==Zn||(ts(),!ln))return;Se.timeStamp-dn>120&&(cn=0);const Dt=on>0?Math.min(on*.4,160):160,Ot=!st&&(nt>Dt||cn>ko&&nt>12);me.style.transition="",me.style.transform="",me.removeAttribute("data-dragging"),Oe&&(Oe.style.transition=""),Ot?(V(),requestAnimationFrame(()=>{var yt;Oe&&((yt=J.current)==null?void 0:yt.getAttribute("data-state"))==="open"&&(Oe.style.opacity="")})):Oe&&(Oe.style.opacity="")},ss=Se=>ns(Se,!1),rs=Se=>ns(Se,!0);document.addEventListener("pointermove",es),document.addEventListener("pointerup",ss),document.addEventListener("pointercancel",rs)},Xe=c==="auto",te={"--ok-float-size":Xe?void 0:vo(c),"--ok-float-gap":d!=null?d+"px":void 0};return n.jsx(it,{container:b,children:n.jsxs("div",{ref:J,className:P("ok-float",v&&"ok-float--contained",a&&"ok-float--modal"),"data-ok-layer":"","data-state":z,"data-placement":r,"data-stretch":u?"":void 0,"data-align":p,"data-size":Xe?"auto":void 0,"data-zoom":de?"":void 0,style:te,children:[a&&n.jsx("div",{ref:X,className:"ok-float__scrim","aria-hidden":"true",onClick:i?V:void 0}),n.jsx(Ps,{scopeRef:W,trap:a,autoFocus:a||o,restoreFocus:m&&a,initialFocus:f,children:n.jsxs("div",{...L,ref:xe($,W,G,Y),className:P("ok-float__card",R),style:M,role:h,"aria-modal":a&&(h==="dialog"||h==="alertdialog")?!0:void 0,"aria-label":T,"aria-labelledby":C??(ne&&!T?F:void 0),"aria-describedby":j??(se?q:void 0),"data-draggable":we?"":void 0,"data-swipe":Te?"":void 0,tabIndex:-1,onPointerDown:et,onFocus:Ye,onBlur:He,children:[n.jsx(fr.Provider,{value:Ue,children:E}),ve&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close ok-float__close--auto","aria-label":A,onClick:V,children:n.jsx(he,{name:"x"})})]})}),a&&!v&&n.jsx(bo,{active:e,layerRef:J})]})})}),hr=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{ref:r,className:P("ok-float__grip",e),"aria-hidden":"true","data-ok-drag-handle":"",...s,children:n.jsx("span",{})})}),yo=l.forwardRef(function({title:e,description:s,icon:r,level:a=2,closable:o,closeLabel:i,onClose:c,className:d,children:u,...p},h){const f=pe().messages.common.close,m=i??f,b=pr(),v=l.useId(),g=(b==null?void 0:b.titleId)??v+"title",N=(b==null?void 0:b.descriptionId)??v+"desc",x=e!=null&&e!==!1,w=s!=null&&s!==!1,_=b==null?void 0:b.setTitled,k=b==null?void 0:b.setDescribed;ge(()=>{if(!(!x||!_))return _(!0),()=>_(!1)},[x,_]),ge(()=>{if(!(!w||!k))return k(!0),()=>k(!1)},[w,k]);const R="h"+a,M=o??(b==null?void 0:b.dismissible)??!0,E=b==null?void 0:b.setHeaderClose;return ge(()=>{if(!(!M||!E))return E(!0),()=>E(!1)},[M,E]),n.jsxs("div",{ref:h,className:P("ok-float__header",d),"data-ok-drag-handle":b!=null&&b.draggable?"":void 0,...p,children:[r!=null&&r!==!1&&n.jsx("span",{className:"ok-float__icon",children:r}),n.jsxs("div",{className:"ok-float__heading",children:[x&&n.jsx(R,{id:g,className:"ok-float__title",children:e}),w&&n.jsx("p",{id:N,className:"ok-float__desc",children:s})]}),u,M&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-float__close","aria-label":m,onClick:c??(b==null?void 0:b.close),children:n.jsx(he,{name:"x"})})]})}),_o=l.forwardRef(function({padded:e=!0,className:s,...r},a){return n.jsx("div",{ref:a,className:P("ok-float__body ok-scroll",!e&&"ok-float__body--flush",s),...r})}),jo=l.forwardRef(function({align:e="end",className:s,...r},a){return n.jsx("div",{ref:a,className:P("ok-float__footer",s),"data-align":e,...r})}),wo={sm:320,md:400,lg:560},mr=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,size:a="md",icon:o,tone:i="accent",title:c,description:d,actions:u,align:p="start",role:h="dialog",closable:f=!1,closeLabel:m,dismissible:b=!0,as:v="div",onSubmit:g,origin:N,className:x,children:w,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const T=pe().messages.common.close,C=m??T,[j,y]=le(e,s,r),S=l.useId(),O=c!=null&&c!==!1,L=d!=null&&d!==!1,$=o!=null&&o!==!1,D=n.jsxs(n.Fragment,{children:[(O||$||f)&&n.jsxs("div",{className:"ok-dialog__head",children:[$&&n.jsx("div",{className:P("ok-dialog__icon",i!=="accent"&&"ok-dialog__icon--"+i),children:o}),O&&n.jsx("h2",{id:S+"title",className:"ok-dialog__title",children:c}),f&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-dialog__close","aria-label":C,onClick:()=>y(!1),children:n.jsx(he,{name:"x"})})]}),L&&n.jsx("p",{id:S+"desc",className:"ok-dialog__desc",children:d}),w!=null&&w!==!1&&n.jsx("div",{className:"ok-dialog__body ok-scroll",children:w}),u!=null&&u!==!1&&n.jsx("div",{className:"ok-dialog__actions",children:u})]});return n.jsx(Je,{...M,ref:E,open:j,onOpenChange:y,placement:"center",origin:N,size:Qt(a,wo),role:h,dismissible:b,className:P("ok-dialog__panel ok-scroll",p==="center"&&"ok-dialog__panel--center",x),"aria-label":_,"aria-labelledby":k??(O&&!_?S+"title":void 0),"aria-describedby":R??(L?S+"desc":void 0),children:v==="form"?n.jsx("form",{className:"ok-dialog__form",onSubmit:A=>{A.preventDefault(),A.stopPropagation(),g==null||g(A)},children:D}):D})});let Ze=[],br=0,No=0;const Nn=new Set,mt=[];let gs=!1;const At=()=>{br++,Nn.forEach(t=>t())},Ro=t=>(Nn.add(t),()=>{Nn.delete(t)}),xs=()=>br,Mo=()=>{var t;return(t=mt.find(e=>!e.auto)??mt[0])==null?void 0:t.id};function mn(t,e){const s=Ze.find(r=>r.id===t);!s||!s.open||(s.resolve(e),Ze=Ze.map(r=>r.id===t?{...r,open:!1}:r),At())}function So(t){Ze=Ze.filter(e=>e.id!==t),At()}function Co(t){if(!Ae)return Promise.resolve(!1);const e=typeof t=="string"?{title:t}:t;return ur(),new Promise(s=>{if(Ze=[...Ze,{id:++No,options:e,open:!0,resolve:s}],!mt.some(r=>!r.auto)&&!gs){gs=!0;const r=document.createElement("div");r.setAttribute("data-ok-confirmer",""),document.body.appendChild(r),Xr.createRoot(r).render(n.jsx(vr,{auto:!0}))}At()})}function vr({auto:t=!1}){const e=l.useRef();e.current||(e.current=Symbol("confirmer")),l.useSyncExternalStore(Ro,xs,xs);const{messages:s}=pe();return l.useEffect(()=>{const r={id:e.current,auto:t};return mt.push(r),At(),()=>{const a=mt.indexOf(r);a>=0&&mt.splice(a,1),At()}},[t]),Mo()!==e.current?null:n.jsx(n.Fragment,{children:Ze.map(r=>{const a=r.options,o=a.tone==="danger";return n.jsx(mr,{role:"alertdialog",open:r.open,onOpenChange:i=>{i||mn(r.id,!1)},onExited:()=>So(r.id),title:a.title,description:a.description,icon:a.icon,tone:a.tone,size:a.size,align:a.align??(a.icon==null?"center":"start"),dismissible:a.dismissible??!0,origin:a.origin,actions:n.jsxs(n.Fragment,{children:[n.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable","data-autofocus":o?"":void 0,onClick:()=>mn(r.id,!1),children:a.cancelText??s.confirm.cancel}),n.jsx("button",{type:"button",className:"ok-btn ok-btn--lg ok-focusable "+(o?"ok-btn--danger":"ok-btn--primary"),"data-autofocus":o?void 0:"",onClick:()=>mn(r.id,!0),children:a.confirmText??s.confirm.confirm})]})},r.id)})})}const Eo={sm:280,md:360,lg:480},Ao={sm:240,md:360,lg:520},To=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,placement:a="right",size:o="md",modal:i=!0,className:c,...d},u){const[p,h]=le(e,s,r),f=a==="left"||a==="right";return n.jsx(Je,{...d,ref:u,open:p,onOpenChange:h,placement:a,modal:i,size:Qt(o,f?Eo:Ao),className:P("ok-drawer",c)})}),ks={auto:void 0,sm:"40%",md:"60%",lg:"85%",full:"100%"},Io=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,size:a="auto",grip:o=!0,dragToDismiss:i=!0,stretch:c=!1,modal:d=!0,className:u,children:p,...h},f){const[m,b]=le(e,s,r),v=typeof a=="string"&&a in ks?ks[a]:a;return n.jsxs(Je,{...h,ref:f,open:m,onOpenChange:b,placement:"bottom",modal:d,stretch:c,size:v,dragToDismiss:i,className:P("ok-sheet",u),children:[o&&n.jsx(hr,{}),p]})}),Po={sm:280,md:320,lg:400},Lo={sm:200,md:280,lg:400},gr=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,placement:a="right",size:o="md",role:i="complementary",className:c,...d},u){const[p,h]=le(e,s,r),f=a==="left"||a==="right";return n.jsx(Je,{...d,ref:u,open:p,onOpenChange:h,placement:a,modal:!1,role:i,size:Qt(o,f?Po:Lo),className:P("ok-panel-float",c)})}),$o=gr;let Ee=[],Do=0;const Rn=new Set,Fn=()=>Rn.forEach(t=>t());function ft(t,e){const s=typeof t=="string"?{title:t}:t,r=e?{...s,tone:e}:s,a=r.id??"ok-toast-"+ ++Do;return Ee=Ee.some(i=>i.id===a&&!i.leaving)?Ee.map(i=>i.id===a&&!i.leaving?{...r,id:a,leaving:!1,createdAt:i.createdAt,rev:i.rev+1,closable:r.closable??i.closable,live:r.live??i.live,onDismiss:r.onDismiss??i.onDismiss}:i):[{...r,id:a,leaving:!1,createdAt:Date.now(),rev:0},...Ee],Fn(),a}function rt(t){let e=!1;Ee=Ee.map(s=>s.leaving||t!=null&&s.id!==t?s:(e=!0,{...s,leaving:!0})),e&&Fn()}function Oo(t){var s;const e=Ee.find(r=>r.id===t);e&&(Ee=Ee.filter(r=>r.id!==t),Fn(),(s=e.onDismiss)==null||s.call(e))}const Bo=Object.assign(t=>ft(t),{success:t=>ft(t,"success"),warning:t=>ft(t,"warning"),danger:t=>ft(t,"danger"),error:t=>ft(t,"danger"),info:t=>ft(t,"info"),dismiss:rt}),Fo={success:n.jsx("path",{pathLength:1,d:"M5 10.5l3.2 3.2L15 6.5"}),danger:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M6 6l8 8"}),n.jsx("path",{pathLength:1,d:"M14 6l-8 8"})]}),warning:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M10 5v6"}),n.jsx("path",{pathLength:1,d:"M10 14.5v.1"})]}),info:n.jsxs(n.Fragment,{children:[n.jsx("path",{pathLength:1,d:"M10 9v5.5"}),n.jsx("path",{pathLength:1,d:"M10 5.8v.1"})]}),default:n.jsx("path",{pathLength:1,d:"M4 4.5c0 6.500 4.500 11 9 11 2.800 0 4.500-2 4.500-4.200S15.700 7.500 13.500 7.500c-2 0-3.400 1.400-3.600 3.200"})};function Ho({record:t,position:e,defaultDuration:s,pauseOnHover:r,closeLabel:a,register:o}){const i=l.useRef(null),[c,d]=l.useState(!1),u=l.useRef(!1),p=l.useRef(!1),h=t.duration??s,f=l.useRef(h),{id:m,leaving:b}=t,v=e.startsWith("top");ge(()=>{Ne(i.current,[{opacity:0,transform:`translateY(${v?-32:32}px) scale(.84)`},{opacity:1,transform:"none"}],{spring:"bouncy"})},[]),l.useEffect(()=>{f.current=h},[h,t.rev]),l.useEffect(()=>{if(b||c||h<=0)return;const R=Date.now(),M=setTimeout(()=>rt(m),f.current);return()=>{clearTimeout(M),f.current=Math.max(800,f.current-(Date.now()-R))}},[b,c,h,m,t.rev]),l.useEffect(()=>{if(!b)return;const R=e.endsWith("right")?56:e.endsWith("left")?-56:0,M=R?0:v?-24:24,E=Ne(i.current,[{opacity:1,transform:"none"},{opacity:0,transform:`translate(${R}px, ${M}px) scale(.92)`}],{duration:170,easing:De.in,fill:"forwards"});let T=!1;const C=()=>{T||(T=!0,Oo(m))};E!=null&&E.finished&&E.finished.then(C,C);const j=setTimeout(C,170*Fe()+80);return()=>clearTimeout(j)},[b,m]);const g=()=>d(u.current||p.current),N=t.tone&&t.tone!=="neutral"&&t.tone!=="accent"?t.tone:"default",x=t.live??(t.tone==="danger"?"assertive":"polite"),w=t.closable??h<=0,_=t.action,k=t.description!=null&&t.description!==!1;return n.jsxs("div",{ref:xe(i,R=>o(m,R)),className:P("ok-toast","ok-toast--"+N),role:x==="assertive"?"alert":"status","aria-live":x,"aria-atomic":"true","data-leaving":b?"":void 0,onClick:()=>rt(m),onKeyDown:R=>{R.key==="Escape"&&(R.stopPropagation(),rt(m))},onPointerEnter:r?()=>{u.current=!0,g()}:void 0,onPointerLeave:r?()=>{u.current=!1,g()}:void 0,onFocus:()=>{p.current=!0,g()},onBlur:R=>{R.currentTarget.contains(R.relatedTarget)||(p.current=!1,g())},children:[t.icon!==!1&&n.jsx("span",{className:"ok-toast__icon","aria-hidden":"true",children:t.icon??n.jsx("svg",{className:"ok-toast__glyph",viewBox:"0 0 20 20",children:Fo[N]})}),n.jsxs("div",{className:"ok-toast__body",children:[n.jsx("div",{className:"ok-toast__title",children:t.title}),k&&n.jsx("div",{className:"ok-toast__desc",children:t.description})]}),_&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-focusable ok-toast__action",onClick:R=>{var M;R.stopPropagation(),(M=_.onClick)==null||M.call(_),_.dismiss!==!1&&rt(m)},children:_.label}),w&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--icon ok-btn--sm ok-focusable ok-toast__close","aria-label":a,onClick:R=>{R.stopPropagation(),rt(m)},children:n.jsx(he,{name:"x"})})]})}const zo=l.forwardRef(function({position:e,mobilePosition:s,max:r=4,duration:a=4200,pauseOnHover:o=!0,offset:i,label:c,closeLabel:d,container:u,className:p,style:h,...f},m){const{messages:b}=pe(),v=c??b.toast.label,g=d??b.common.close,N=at("sm"),x=at("md"),w=at("lg"),_=at("xl");let k;if(typeof e=="object"&&e!==null){const y=e;k=(_?y.xl:void 0)??(w?y.lg:void 0)??(x?y.md:void 0)??(N?y.sm:void 0)??y.base??(N?"top-right":"bottom-center")}else k=(N?e:s??e)??(N?"top-right":"bottom-center");const[R,M]=l.useState(()=>Ee),E=l.useRef(new Map),T=l.useRef(null),C=ke((y,S)=>{S?E.current.set(y,S):E.current.delete(y)});l.useEffect(()=>{const y=()=>{const S=new Map;E.current.forEach(O=>S.set(O,O.getBoundingClientRect())),T.current=S,M(Ee)};return Rn.add(y),Ee.length&&M(Ee),()=>{Rn.delete(y)}},[]),ge(()=>{T.current&&(Yt(T.current),T.current=null)},[R]),l.useEffect(()=>{const y=R.filter(S=>!S.leaving);r>0&&y.length>r&&y.slice(r).forEach(S=>rt(S.id))},[R,r]);const j=i!=null?{...h,"--ok-toast-offset":i+"px"}:h;return n.jsx(it,{container:u,children:n.jsx("div",{ref:m,className:P("ok-toasts",p),role:"region","aria-label":v,"data-position":k,"data-ok-layer":"",style:j,...f,children:R.map(y=>n.jsx(Ho,{record:y,position:k,defaultDuration:a,pauseOnHover:o,closeLabel:g,register:C},y.id))})})});function en(t,e,s){const r=t.props,a={...e};for(const i in e){const c=e[i],d=r[i];/^on[A-Z]/.test(i)&&typeof d=="function"&&typeof c=="function"?a[i]=It(d,c):i==="className"?a[i]=P(d,c):i==="style"?a[i]={...c,...d}:c===void 0&&d!==void 0&&(a[i]=d)}const o=parseInt(l.version,10)>=19?r.ref:t.ref;return s&&(a.ref=o?xe(o,s):s),l.cloneElement(t,a)}function Hn(t){return t==null||t===!1?null:typeof t=="string"&&t in Tn?n.jsx(he,{name:t}):l.isValidElement(t)?t:null}function zn(){return n.jsx("svg",{className:"ok-menu__check",viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.900-6.400",pathLength:1})})}function qn(){const t=l.useRef(null),e=l.useRef(!1),s=l.useCallback(r=>{const a=t.current,o=a==null?void 0:a.parentElement;if(!a||!o)return;if(!r||r.getAttribute("aria-disabled")==="true"){e.current=!1,o.removeAttribute("data-hl");return}const i=!e.current;i&&(a.style.transition="none"),a.dataset.tone=r.dataset.tone||"",a.style.setProperty("--y",r.offsetTop+"px"),a.style.height=r.offsetHeight+"px",i&&(a.offsetWidth,a.style.transition=""),e.current=!0,o.setAttribute("data-hl","")},[]);return{hlRef:t,moveTo:s}}function Vn(t,e){const s=l.useRef(t);return ge(()=>{e||(s.current=t)}),e?s.current:t}function qo(t,e,s,r){const a=(p,h,f)=>(p.x-f.x)*(h.y-f.y)-(h.x-f.x)*(p.y-f.y),o=a(t,e,s),i=a(t,s,r),c=a(t,r,e),d=o<0||i<0||c<0,u=o>0||i>0||c>0;return!(d&&u)}function Vo(t,e,s){if(t.x===e.x&&t.y===e.y)return!1;const r=s.left>=t.x,a=r?s.left:s.right;if(r?e.x>s.right:e.x<s.left)return!1;const o=4;return qo(e,t,{x:a,y:s.top-o},{x:a,y:s.bottom+o})}const xr=t=>t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey;function kr(){const t=l.useRef(""),e=l.useRef();l.useEffect(()=>()=>clearTimeout(e.current),[]);const s=l.useCallback((a,o,i)=>{clearTimeout(e.current),e.current=setTimeout(()=>{t.current=""},500),t.current+=a.toLowerCase();const c=t.current,d=c.length>1&&c.split("").every(f=>f===c[0]),u=d?c[0]:c,p=o.length,h=d||c.length===1?i+1:Math.max(i,0);for(let f=0;f<p;f++){const m=((h+f)%p+p)%p;if(o[m].trim().toLowerCase().startsWith(u))return m}return-1},[]),r=l.useCallback(()=>t.current.length>0,[]);return{search:s,pending:r}}const bn="\0none",Go=(t,e)=>{const s=[t.label,t.description,t.group,...t.keywords??[]].filter(Boolean).join(" ").toLowerCase();return e.toLowerCase().split(/\s+/).filter(Boolean).every(r=>s.includes(r))},Wo=l.forwardRef(function({open:e,defaultOpen:s=!1,onOpenChange:r,items:a,query:o,defaultQuery:i="",onQueryChange:c,filter:d,onSelect:u,closeOnSelect:p=!0,placeholder:h,emptyText:f,label:m,width:b,footer:v,origin:g="trigger",className:N,style:x,...w},_){const{messages:k}=pe(),R=h??k.commandPalette.placeholder,M=f===void 0?k.commandPalette.empty:f,E=m??k.commandPalette.label,[T,C]=le(e,s,r),[j,y]=le(o,i,c),[S,O]=l.useState(null),L=l.useRef(null),[$,D]=l.useState(null),{hlRef:A,moveTo:B}=qn(),z=l.useId(),G=z+"list",W=U=>z+"opt-"+U,J=l.useMemo(()=>{const U=d===!1?null:d??Go,H=j.trim(),re=U&&H?a.filter(ee=>U(ee,H)):a,de=[];return re.forEach(ee=>{let oe=de.find(K=>K.label===ee.group);oe||(oe={label:ee.group,items:[]},de.push(oe)),oe.items.push(ee)}),de},[a,j,d]),X=l.useMemo(()=>J.flatMap(U=>U.items).filter(U=>!U.disabled),[J]),I=S===bn?null:X.find(U=>U.id===S)??X[0]??null,F=l.useRef(T);l.useEffect(()=>{T&&!F.current&&(y(""),O(null)),F.current=T},[T,y]),ge(()=>{$&&B(I?$.querySelector("[data-active]"):null)},[$,I,J,B]),ge(()=>{var U;!T||!I||!$||(I===X[0]?$.scrollTop=0:(U=$.querySelector("[data-active]"))==null||U.scrollIntoView({block:"nearest"}))},[T,I==null?void 0:I.id,$]);const q=U=>{var H;U.disabled||((H=U.onSelect)==null||H.call(U),u==null||u(U),p&&C(!1))},ne=U=>{if(!X.length)return;let H;U==="first"?H=0:U==="last"?H=X.length-1:I?H=(X.indexOf(I)+U+X.length)%X.length:H=U>0?0:X.length-1,O(X[H].id)},Z=U=>{if(!X.length)return;const H=I?X.indexOf(I):U>0?-1:X.length;O(X[Math.min(X.length-1,Math.max(0,H+U))].id)},se=U=>{if(!U.nativeEvent.isComposing)switch(U.key){case"ArrowDown":U.preventDefault(),ne(1);break;case"ArrowUp":U.preventDefault(),ne(-1);break;case"Home":X.length&&(U.preventDefault(),ne("first"));break;case"End":X.length&&(U.preventDefault(),ne("last"));break;case"PageDown":U.preventDefault(),Z(5);break;case"PageUp":U.preventDefault(),Z(-5);break;case"Enter":I&&(U.preventDefault(),q(I));break}},ce=b!=null?{...x,"--ok-cmdk-width":typeof b=="number"?b+"px":b}:x;return n.jsxs(Je,{"aria-label":E,...w,ref:_,open:T,onOpenChange:C,placement:"top",stretch:!1,origin:g,initialFocus:L,className:P("ok-cmdk",N),style:ce,children:[n.jsxs("div",{className:"ok-cmdk__search",children:[n.jsx(he,{name:"search",className:"ok-cmdk__search-icon"}),n.jsx("input",{ref:L,className:"ok-cmdk__input",type:"text",role:"combobox","aria-label":E,"aria-expanded":"true","aria-controls":G,"aria-autocomplete":"list","aria-activedescendant":I?W(I.id):void 0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,enterKeyHint:"go",placeholder:R,value:j,onChange:U=>{y(U.target.value),O(null)},onKeyDown:se}),n.jsx("kbd",{className:"ok-kbd ok-cmdk__esc","aria-hidden":"true",children:"Esc"})]}),n.jsxs("div",{ref:D,id:G,className:"ok-cmdk__list ok-scroll",role:"listbox","aria-label":E,hidden:J.length===0,onPointerLeave:()=>O(bn),children:[n.jsx("span",{className:"ok-cmdk__hl",ref:A,"aria-hidden":"true"}),J.map((U,H)=>{const re=z+"group-"+H;return n.jsxs("div",{className:"ok-cmdk__group",role:"group","aria-labelledby":U.label?re:void 0,children:[U.label&&n.jsx("div",{id:re,className:"ok-cmdk__group-label",role:"presentation",children:U.label}),U.items.map(de=>{const ee=(I==null?void 0:I.id)===de.id;return n.jsxs("div",{id:W(de.id),className:"ok-cmdk__item",role:"option","aria-selected":ee,"aria-disabled":de.disabled||void 0,"data-active":ee?"":void 0,onMouseDown:oe=>oe.preventDefault(),onPointerMove:ee?void 0:()=>O(de.disabled?bn:de.id),onClick:()=>q(de),children:[de.icon!=null&&n.jsx("span",{className:"ok-cmdk__item-icon","aria-hidden":"true",children:de.icon}),n.jsxs("span",{className:"ok-cmdk__item-text",children:[n.jsx("span",{className:"ok-cmdk__item-label",children:de.label}),de.description&&n.jsx("span",{className:"ok-cmdk__item-desc",children:de.description})]}),de.shortcut&&de.shortcut.length>0&&n.jsx("span",{className:"ok-cmdk__item-keys","aria-hidden":"true",children:de.shortcut.map((oe,K)=>n.jsx("kbd",{className:"ok-kbd",children:oe},K))})]},de.id)})]},U.label??"\0"+H)})]}),n.jsx("div",{className:"ok-cmdk__empty",role:"status","aria-live":"polite","data-empty":X.length===0&&J.length===0?"":void 0,children:J.length===0?M:n.jsx("span",{className:"ok-sr",children:k.commandPalette.results(X.length)})}),v!=null&&v!==!1&&n.jsx("div",{className:"ok-cmdk__footer",children:v})]})}),ys={top:"bottom",bottom:"top",left:"right",right:"left"},Uo=96;function yr(t){const{anchor:e,floating:s,viewport:r,placement:a="bottom",offset:o=8,alignOffset:i=0,padding:c=8,flip:d=!0,shift:u=!0}=t,p=a.split("-");let h=p[0];const f=p[1]??"center",m=h==="top"||h==="bottom",b=Math.max(0,r.width-c*2),v=Math.max(0,r.height-c*2),g={top:e.top-o-c,bottom:r.height-e.bottom-o-c,left:e.left-o-c,right:r.width-e.right-o-c},N=m?s.height:s.width;d&&N>g[h]&&g[ys[h]]>g[h]&&(h=ys[h]);let x,w,_,k,R=b,M=v;return m?(M=Math.min(v,Math.max(g[h],Uo)),_=Math.min(s.width,b),k=Math.min(s.height,M),w=h==="bottom"?e.bottom+o:e.top-o-k,x=(f==="start"?e.left:f==="end"?e.right-_:e.left+e.width/2-_/2)+i):(_=Math.min(s.width,b),k=Math.min(s.height,v),x=h==="right"?e.right+o:e.left-o-_,w=(f==="start"?e.top:f==="end"?e.bottom-k:e.top+e.height/2-k/2)+i),u&&(x=ye(x,c,Math.max(c,r.width-c-_)),w=ye(w,c,Math.max(c,r.height-c-k))),{x:Math.round(x),y:Math.round(w),side:h,align:f,availableWidth:R,availableHeight:M}}function tn(t){const{open:e,anchorRef:s,floatingRef:r,placement:a="bottom",offset:o=8,alignOffset:i=0,padding:c=8,flip:d=!0,shift:u=!0,matchWidth:p=!1}=t,h=ke(t.onPosition),f=l.useRef(0),m=l.useCallback(()=>{const b=s.current,v=r.current;if(!b||!v)return;const g=b.getBoundingClientRect(),N=document.documentElement,x={width:N.clientWidth||window.innerWidth,height:window.innerHeight||N.clientHeight};p===!0?v.style.width=g.width+"px":p==="min"&&(v.style.minWidth=g.width+"px");const w=v.style.getPropertyValue("--ok-popup-avail-h")?[v,...Array.from(v.querySelectorAll(".ok-scroll"))].map(R=>[R,R.scrollTop]):[];v.style.setProperty("--ok-popup-avail-h","100000px"),v.style.setProperty("--ok-popup-avail-w",Math.max(0,x.width-c*2)+"px");const _={width:v.offsetWidth,height:v.offsetHeight},k=yr({anchor:g,floating:_,viewport:x,placement:a,offset:o,alignOffset:i,padding:c,flip:d,shift:u});v.style.setProperty("--ok-popup-avail-h",k.availableHeight+"px"),v.style.setProperty("--ok-popup-avail-w",k.availableWidth+"px"),v.style.left=k.x+"px",v.style.top=k.y+"px",v.dataset.side=k.side,v.dataset.align=k.align,w.forEach(([R,M])=>{R.scrollTop!==M&&(R.scrollTop=M)}),h({...k,anchor:g,width:Math.min(_.width,k.availableWidth),height:Math.min(_.height,k.availableHeight)})},[s,r,a,o,i,c,d,u,p,h]);return ge(()=>{e&&m()},[e,m]),l.useEffect(()=>{var N;if(!e)return;const b=()=>{f.current||(f.current=requestAnimationFrame(()=>{f.current=0,m()}))},v=x=>{const w=r.current;w&&x.target instanceof Node&&w.contains(x.target)||b()};window.addEventListener("scroll",v,{capture:!0,passive:!0}),window.addEventListener("resize",b),(N=window.visualViewport)==null||N.addEventListener("resize",b);let g;if(typeof ResizeObserver<"u"){g=new ResizeObserver(b);const x=s.current;x instanceof Element&&g.observe(x),r.current&&g.observe(r.current)}return()=>{var x;window.removeEventListener("scroll",v,{capture:!0}),window.removeEventListener("resize",b),(x=window.visualViewport)==null||x.removeEventListener("resize",b),g==null||g.disconnect(),f.current&&(cancelAnimationFrame(f.current),f.current=0)}},[e,m,s,r]),{update:m}}const _s=l.createContext(null),_r=l.createContext(!0),Gn=()=>l.useContext(_r),xt=l.forwardRef(function(e,s){const{open:r,container:a}=e,o=Pt(r,200);return o.mounted?n.jsx(it,{container:a,children:n.jsx(Yo,{...e,ref:s,state:o.state,presenceRef:o.ref})}):null}),Yo=l.forwardRef(function({open:e,anchorRef:s,placement:r="bottom-start",offset:a=8,alignOffset:o=0,padding:i=8,flip:c=!0,shift:d=!0,matchWidth:u=!1,onDismiss:p,insideRefs:h,surface:f=!0,container:m,updateRef:b,onPosition:v,state:g,presenceRef:N,className:x,children:w,..._},k){const R=l.useRef(null),{update:M}=tn({open:!0,anchorRef:s,floatingRef:R,placement:r,offset:a,alignOffset:o,padding:i,flip:c,shift:d,matchWidth:u,onPosition:v});ge(()=>{if(b)return b.current=M,()=>{b.current=null}},[b,M]);const E=l.useContext(_s),T=l.useRef(new Set),C=l.useMemo(()=>({register(S){T.current.add(S);const O=E==null?void 0:E.register(S);return()=>{T.current.delete(S),O==null||O()}}}),[E]);l.useEffect(()=>{const S=R.current;if(!(!S||!E))return E.register(S)},[E]);const j=ke(p),y=l.useRef(h);return y.current=h,l.useEffect(()=>{if(!e)return;const S=O=>{var D,A;const L=O.target;if(!L||(D=R.current)!=null&&D.contains(L))return;const $=s.current;if(!($ instanceof Element&&$.contains(L))&&!((A=y.current)!=null&&A.some(B=>{var z;return(z=B.current)==null?void 0:z.contains(L)}))){for(const B of T.current)if(B.contains(L))return;j("outside",O)}};return document.addEventListener("pointerdown",S,!0),()=>document.removeEventListener("pointerdown",S,!0)},[e,s,j]),Lt(e&&!!p,()=>j("escape",new Event("keydown"))),n.jsx(_s.Provider,{value:C,children:n.jsx(_r.Provider,{value:e,children:n.jsx("div",{..._,ref:xe(k,R,N),className:P("ok-popup",f&&"ok-popup--surface",x),"data-state":g,"data-ok-layer":"",children:w})})})}),Wn=l.forwardRef(function({trigger:e,children:s,open:r,defaultOpen:a=!1,onOpenChange:o,placement:i="bottom",offset:c=8,matchWidth:d=!1,anchorRef:u,initialFocus:p,autoFocus:h=!0,closeOnOutsidePress:f=!0,closeOnEscape:m=!0,id:b,className:v,role:g="dialog",onKeyDown:N,...x},w){const[_,k]=le(r,a,o),R=l.useRef(null),M=l.useId(),E=b??`${M}-popover`,T=(y=!0)=>{var S;y&&((S=R.current)==null||S.focus({preventScroll:!0})),k(!1)},C=en(e,{"aria-haspopup":g==="dialog"?"dialog":"true","aria-expanded":_,"aria-controls":_?E:void 0,"data-state":_?"open":"closed",onClick:()=>_?T(!1):k(!0)},R),j=y=>{if(N==null||N(y),y.defaultPrevented||y.key!=="Tab")return;const S=y.currentTarget;if(!S.contains(y.target))return;const O=St(S),L=document.activeElement,$=!O.length||L===O[O.length-1],D=!O.length||L===O[0]||L===S;(y.shiftKey?D:$)&&(y.shiftKey&&y.preventDefault(),T(!0))};return n.jsxs(n.Fragment,{children:[C,n.jsx(xt,{...x,ref:w,id:E,role:g,tabIndex:-1,open:_,anchorRef:u??R,insideRefs:[R],placement:i,offset:c,matchWidth:d,className:P("ok-popover",v),onKeyDown:j,onDismiss:y=>{y==="escape"?m&&T(!0):f&&T(!1)},children:n.jsx(Xo,{open:_,autoFocus:h,initialFocus:p,children:typeof s=="function"?s({close:()=>T(!0)}):s})})]})});function Xo({open:t,autoFocus:e,initialFocus:s,children:r}){const a=l.useRef(null);return l.useEffect(()=>{var c;if(!t||!e)return;const o=(c=a.current)==null?void 0:c.parentElement;if(!o||o.contains(document.activeElement))return;((s==null?void 0:s.current)??o.querySelector("[data-autofocus]")??St(o)[0]??o).focus({preventScroll:!0})},[t]),n.jsx("div",{className:"ok-popover__body ok-scroll",ref:a,children:r})}const Ce={current:null,hiddenAt:-1/0,lastPos:null},Ko=t=>{try{return t.matches(":focus-visible")}catch{return!0}};function Zo({content:t,shortcut:e,children:s,placement:r="top",offset:a=8,delay:o=380,skipDelayWithin:i=320,hideDelay:c=160,interactive:d=!0,disabled:u,open:p,defaultOpen:h=!1,onOpenChange:f,className:m}){const[b,v]=le(p,h,f),[g,N]=l.useState(!1),[x,w]=l.useState(!1),_=l.useId(),k=l.useRef(null),R=l.useRef(null),M=l.useRef(),E=l.useRef(),T=l.useRef(!1),C=l.useRef(!1),j=l.useRef(!1),y=Pt(b,250);let S=t,O=e;if(typeof t=="string"&&O==null&&t.includes("|")){const W=t.indexOf("|");S=t.slice(0,W),O=t.slice(W+1)}const L=()=>{clearTimeout(M.current),M.current=void 0,clearTimeout(E.current),E.current=void 0},$=ke((W=!1)=>{var J;L(),T.current=!1,j.current=!1,((J=Ce.current)==null?void 0:J.id)===_&&(Ce.current=null,Ce.hiddenAt=performance.now()),w(W),N(!1),v(!1)}),D=ke(()=>{if(L(),u||b)return;const W=Ce.current,J=!!W&&W.id!==_;J?W.hide(!0):Ce.lastPos=null,Ce.current={id:_,hide:$},w(!1),N(J),v(!0)}),A=()=>{if(clearTimeout(E.current),E.current=void 0,u||b||M.current)return;Ce.current&&Ce.current.id!==_||performance.now()-Ce.hiddenAt<i||o<=0?D():M.current=setTimeout(D,o)},B=()=>{clearTimeout(M.current),M.current=void 0,!(!b||E.current)&&(E.current=setTimeout(()=>{E.current=void 0,!(T.current||C.current||j.current)&&$()},c))};l.useEffect(()=>()=>{var W;L(),((W=Ce.current)==null?void 0:W.id)===_&&(Ce.current=null)},[]),l.useEffect(()=>{u&&b&&$()},[u,b,$]),Lt(b,()=>$()),l.useEffect(()=>{if(!b)return;const W=I=>{var F;if((F=R.current)!=null&&F.contains(I.target)){j.current=!0;return}$()},J=()=>{j.current&&(j.current=!1,T.current||B())},X=()=>$();return document.addEventListener("pointerdown",W,!0),document.addEventListener("pointerup",J,!0),document.addEventListener("pointercancel",J,!0),window.addEventListener("scroll",X,{capture:!0,passive:!0}),()=>{document.removeEventListener("pointerdown",W,!0),document.removeEventListener("pointerup",J,!0),document.removeEventListener("pointercancel",J,!0),window.removeEventListener("scroll",X,{capture:!0})}},[b,$]);const z=s.props["aria-describedby"],G=en(s,{"aria-describedby":y.mounted?P(z,_):z,onPointerEnter:W=>{W.pointerType!=="touch"&&(C.current=!0,A())},onPointerLeave:()=>{C.current=!1,B()},onFocus:W=>{Ko(W.currentTarget)&&A()},onBlur:()=>{!T.current&&!j.current&&$()}},k);return n.jsxs(n.Fragment,{children:[G,y.mounted&&S!=null&&S!==""&&n.jsx(it,{children:n.jsxs(Jo,{id:_,anchorRef:k,tipRef:R,presenceRef:y.ref,state:y.state,warm:g,instant:x,placement:r,offset:a,className:m,interactive:d,onPointerEnter:d?()=>{T.current=!0,clearTimeout(E.current),E.current=void 0}:void 0,onPointerLeave:d?()=>{T.current=!1,j.current||B()}:void 0,children:[S,O!=null&&O!==""&&n.jsx("kbd",{children:O})]})})]})}function Jo({id:t,anchorRef:e,tipRef:s,presenceRef:r,state:a,warm:o,instant:i,placement:c,offset:d,className:u,interactive:p,onPointerEnter:h,onPointerLeave:f,children:m}){const b=l.useRef(!0);return tn({open:!0,anchorRef:e,floatingRef:s,placement:c,offset:d,onPosition:g=>{const N=s.current;if(!N)return;N.style.setProperty("--bl",Math.max(0,g.x-g.anchor.left)+"px"),N.style.setProperty("--br",Math.max(0,g.anchor.right-(g.x+g.width))+"px");const x=Ce.lastPos;b.current&&o&&x&&Ne(N,[{translate:`${x.x-g.x}px ${x.y-g.y}px`},{translate:"0 0"}],{spring:"snappy"}),b.current=!1,Ce.lastPos={x:g.x,y:g.y}}}),n.jsx("div",{id:t,role:"tooltip",ref:g=>{s.current=g,r.current=g},className:P("ok-tip",u),"data-state":a,"data-warm":o||void 0,"data-instant":i||void 0,"data-interactive":p?void 0:"false",onPointerEnter:h,onPointerLeave:f,children:m})}const nn=l.createContext(null),Un=l.createContext(null),Vt='[data-ok-item]:not([aria-disabled="true"])',Qo=150,el=t=>{var e;return t.dataset.text??((e=t.querySelector(".ok-menu__label"))==null?void 0:e.textContent)??t.textContent??""},sn=l.forwardRef(function({focusOnOpen:e=null,bare:s=!1,className:r,children:a,onKeyDown:o,onPointerMove:i,onPointerLeave:c,onFocus:d,...u},p){const h=l.useContext(nn),f=l.useRef(null),{hlRef:m,moveTo:b}=qn(),[v,g]=l.useState(null),N=kr(),x=l.useRef(null),w=l.useRef(!1),_=ke(()=>w.current),k=ke(()=>{w.current=!1,g(null),b(null);const C=f.current;C&&C!==document.activeElement&&C.contains(document.activeElement)&&C.focus({preventScroll:!0})}),R=l.useMemo(()=>({highlight:b,openSub:v,setOpenSub:g,holding:_,clear:k}),[b,v,_,k]),M=()=>{var C;return Array.from(((C=f.current)==null?void 0:C.querySelectorAll(Vt))??[])};l.useEffect(()=>{if(!v)return;w.current=!1;let C=!1,j;const y=()=>{var $;return(($=document.getElementById(`${v}-sub`))==null?void 0:$.closest(".ok-popup"))??null},S=()=>{var $;return(($=f.current)==null?void 0:$.querySelector(`[aria-controls="${v}-sub"]`))??null},O=$=>{var B,z;if(!$||(B=y())!=null&&B.contains($)||(z=S())!=null&&z.contains($))return;const D=f.current,A=D!=null&&D.contains($)?$.closest(Vt):null;A?A.focus({preventScroll:!0}):(D!=null&&D.contains($)||!C)&&k()},L=$=>{var G,W;const D={x:$.clientX,y:$.clientY},A=x.current;x.current=D,clearTimeout(j);const B=$.target,z=y();if(w.current=!1,!(!z||!B)){if(z.contains(B)){C=!0;return}if(!((G=S())!=null&&G.contains(B))){if(A&&Vo(A,D,z.getBoundingClientRect())){w.current=!0,j=setTimeout(()=>{w.current=!1,O(B)},Qo);return}(W=f.current)!=null&&W.contains(B)&&B.closest(Vt)||O(B)}}};return document.addEventListener("pointermove",L,!0),()=>{document.removeEventListener("pointermove",L,!0),clearTimeout(j),w.current=!1}},[v,k]),l.useEffect(()=>{var y;if(!e)return;const C=M(),j=e==="first"?C[0]:e==="last"?C[C.length-1]:null;(y=j??f.current)==null||y.focus({preventScroll:!0}),j||b(null)},[e]);const E=h==null?void 0:h.open;l.useEffect(()=>{E===!1&&g(null)},[E]);const T=C=>{if(o==null||o(C),C.defaultPrevented||!C.currentTarget.contains(C.target))return;const j=M(),y=j.length,S=j.indexOf(document.activeElement),O=L=>{C.preventDefault();const $=j[L];$&&($.focus({preventScroll:!0}),$.scrollIntoView({block:"nearest"}))};if(C.key==="ArrowDown")O(S<0?0:(S+1)%y);else if(C.key==="ArrowUp")O(S<0?y-1:(S-1+y)%y);else if(C.key==="Home"||C.key==="PageUp")O(0);else if(C.key==="End"||C.key==="PageDown")O(y-1);else if(C.key==="Tab")h==null||h.close("tab");else if(xr(C)&&(C.key!==" "||N.pending())){const L=N.search(C.key,j.map(el),S);C.preventDefault(),L>=0&&O(L)}};return n.jsx(Un.Provider,{value:R,children:n.jsxs("div",{role:"menu","aria-orientation":"vertical",tabIndex:-1,...u,ref:xe(p,f),className:P("ok-menu ok-scroll",!s&&"ok-menu--static",r),onKeyDown:T,onPointerMove:C=>{i==null||i(C),v||(x.current={x:C.clientX,y:C.clientY})},onFocus:C=>{d==null||d(C),C.target===C.currentTarget&&b(null)},onPointerLeave:C=>{c==null||c(C),!v&&k()},children:[n.jsx("span",{className:"ok-menu__hl",ref:m,"aria-hidden":"true"}),a]})})}),rn=l.forwardRef(function({role:e="menuitem",icon:s,shortcut:r,tone:a,disabled:o,onSelect:i,closeOnSelect:c=!0,textValue:d,trailing:u,subId:p,className:h,children:f,onClick:m,onFocus:b,onPointerMove:v,...g},N){const x=l.useContext(Un),w=l.useContext(nn),_=a&&a!=="neutral"?a:void 0;return n.jsxs("button",{type:"button",role:e,tabIndex:-1,...g,ref:N,className:P("ok-menu__item",_&&`ok-menu__item--${_}`,h),"data-ok-item":"","data-icon":s!=null&&s!==!1?"":void 0,"data-tone":_,"data-text":d,"aria-disabled":o||void 0,onClick:k=>{if(o){k.preventDefault();return}m==null||m(k),!k.defaultPrevented&&(i==null||i(),c&&(w==null||w.close("select")))},onFocus:k=>{b==null||b(k),x==null||x.highlight(k.currentTarget),x&&!p&&x.openSub&&x.setOpenSub(null)},onPointerMove:k=>{if(v==null||v(k),!!x&&!(x.openSub&&x.openSub!==p&&x.holding())){if(o){x.clear();return}document.activeElement!==k.currentTarget&&k.currentTarget.focus({preventScroll:!0})}},children:[Hn(s),n.jsx("span",{className:"ok-menu__label",children:f}),r!=null&&n.jsx("span",{className:"ok-menu__meta",children:r}),u]})}),tl=l.forwardRef(function(e,s){return n.jsx(rn,{...e,ref:s})}),nl=l.forwardRef(function({checked:e,defaultChecked:s=!1,onCheckedChange:r,onSelect:a,closeOnSelect:o=!1,...i},c){const[d,u]=le(e,s,r),p=Vn(d,!Gn());return n.jsx(rn,{...i,ref:c,role:"menuitemcheckbox","aria-checked":p,closeOnSelect:o,onSelect:()=>{u(!d),a==null||a()},trailing:n.jsx(zn,{})})}),jr=l.createContext(null),sl=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,children:a,...o},i){const[c,d]=le(e,s,r),u=l.useMemo(()=>({value:c,set:d}),[c,d]);return n.jsx(jr.Provider,{value:u,children:n.jsx("div",{role:"group",...o,ref:i,children:a})})}),rl=l.forwardRef(function({value:e,onSelect:s,closeOnSelect:r=!1,...a},o){const i=l.useContext(jr),c=Vn((i==null?void 0:i.value)===e,!Gn());return n.jsx(rn,{...a,ref:o,role:"menuitemradio","aria-checked":c,closeOnSelect:r,onSelect:()=>{i==null||i.set(e),s==null||s()},trailing:n.jsx(zn,{})})}),al=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{role:"separator",...s,ref:r,className:P("ok-menu__sep",e)})}),ol=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{role:"presentation",...s,ref:r,className:P("ok-menu__heading",e)})}),ll=l.forwardRef(function({label:e,children:s,disabled:r,onKeyDown:a,...o},i){const c=l.useId(),d=l.useContext(Un),u=l.useRef(null),p=l.useRef(null),h=!!d&&d.openSub===c,[f,m]=l.useState(null),b=g=>{var N,x;if(!(r||!d)){if(h&&g){(x=(N=p.current)==null?void 0:N.querySelector(Vt))==null||x.focus({preventScroll:!0});return}m(g?"first":null),d.setOpenSub(c)}},v=()=>{var g;d==null||d.setOpenSub(null),(g=u.current)==null||g.focus({preventScroll:!0})};return l.useEffect(()=>{h||m(null)},[h]),n.jsxs(n.Fragment,{children:[n.jsx(rn,{...o,ref:xe(i,u),disabled:r,subId:c,closeOnSelect:!1,"aria-haspopup":"menu","aria-expanded":h,"aria-controls":h?`${c}-sub`:void 0,onSelect:()=>b(!0),onPointerMove:()=>{!h&&!(d!=null&&d.holding())&&b(!1)},onKeyDown:g=>{a==null||a(g),g.key==="ArrowRight"&&(g.preventDefault(),b(!0))},trailing:n.jsx(he,{name:"chevron-right",className:"ok-menu__chevron"}),children:e}),n.jsx(xt,{open:h,anchorRef:u,placement:"right-start",offset:8,alignOffset:-6,className:"ok-popup--menu",onDismiss:g=>{g==="escape"&&v()},children:n.jsx(sn,{bare:!0,id:`${c}-sub`,ref:p,focusOnOpen:h?f:null,onKeyDown:g=>{g.key==="ArrowLeft"&&g.currentTarget.contains(g.target)&&(g.preventDefault(),v())},children:s})})]})}),il=l.forwardRef(function({trigger:e,children:s,open:r,defaultOpen:a=!1,onOpenChange:o,placement:i="bottom-start",offset:c=8,matchTriggerWidth:d=!0,id:u,...p},h){const[f,m]=le(r,a,o),[b,v]=l.useState("menu"),g=l.useRef(null),N=l.useId(),x=u??`${N}-menu`,w=M=>{v(M),m(!0)},_=M=>{var E;M&&((E=g.current)==null||E.focus({preventScroll:!0})),m(!1)},k=l.useMemo(()=>({open:f,close:()=>_(!0)}),[f,m]),R=en(e,{"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?x:void 0,"data-state":f?"open":"closed",onClick:M=>f?_(!1):w(M.detail===0?"first":"menu"),onKeyDown:M=>{(M.key==="ArrowDown"||M.key==="ArrowUp")&&(M.preventDefault(),w(M.key==="ArrowDown"?"first":"last"))}},g);return n.jsxs(nn.Provider,{value:k,children:[R,n.jsx(xt,{open:f,anchorRef:g,placement:i,offset:c,matchWidth:d?"min":!1,className:"ok-popup--menu",onDismiss:M=>_(M==="escape"),children:n.jsx(sn,{...p,bare:!0,id:x,ref:h,focusOnOpen:f?b:null,children:s})})]})}),cl=10,dl=l.forwardRef(function({children:e,menu:s,open:r,onOpenChange:a,disabled:o,longPressMs:i=500,id:c,...d},u){const[p,h]=le(r,!1,a),[f,m]=l.useState({x:0,y:0}),b=l.useRef(f);b.current=f;const v=l.useRef({getBoundingClientRect:()=>{const{x:j,y}=b.current;return{left:j,top:y,right:j,bottom:y,width:0,height:0}}}),g=l.useRef(null),N=l.useRef(null),x=l.useRef(null),w=l.useRef(null),_=l.useId(),k=c??`${_}-menu`,R=(j,y)=>{const S=document.activeElement;S!=null&&S.closest(".ok-popup")||(x.current=S),m({x:j,y}),h(!0)},M=j=>{var y;j&&((y=x.current)!=null&&y.isConnected)&&x.current.focus({preventScroll:!0}),h(!1)};ge(()=>{var j;(j=g.current)==null||j.call(g)},[f]);const E=()=>{w.current&&(clearTimeout(w.current.timer),w.current=null)};l.useEffect(()=>E,[]),l.useEffect(()=>{if(!p)return;const j=y=>{y.target instanceof Element&&y.target.closest(".ok-popup")||h(!1)};return window.addEventListener("scroll",j,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",j,{capture:!0})},[p,h]);const T=l.useMemo(()=>({open:p,close:()=>M(!0)}),[p,h]),C=en(e,{"data-state":p?"open":"closed",className:"ok-context-area",onContextMenu:j=>{if(!o)if(j.preventDefault(),E(),j.clientX===0&&j.clientY===0){const y=j.target.getBoundingClientRect();R(y.left,y.bottom)}else R(j.clientX,j.clientY)},onPointerDown:j=>{if(o||j.pointerType!=="touch")return;E();const{clientX:y,clientY:S}=j;w.current={x:y,y:S,timer:setTimeout(()=>{w.current=null,R(y,S)},i)}},onPointerMove:j=>{const y=w.current;y&&Math.hypot(j.clientX-y.x,j.clientY-y.y)>cl&&E()},onPointerUp:E,onPointerCancel:E,onPointerLeave:E},N);return n.jsxs(nn.Provider,{value:T,children:[C,n.jsx(xt,{open:p,anchorRef:v,placement:"bottom-start",offset:2,className:"ok-popup--menu",updateRef:g,onDismiss:j=>M(j==="escape"),children:n.jsx(sn,{...d,bare:!0,id:k,ref:u,focusOnOpen:p?"menu":null,children:s})})]})}),Ut=t=>"options"in t,lt=t=>t.flatMap(e=>Ut(e)?e.options:[e]),bt=t=>t.textValue??(typeof t.label=="string"||typeof t.label=="number"?String(t.label):t.value);function vt(t,e,s){const r=t.length;for(let a=1;a<=r;a++){const o=((e+s*a)%r+r)%r;if(!t[o].disabled)return o}return-1}const Mt=t=>vt(t,-1,1),Mn=t=>vt(t,t.length,-1),Yn=(t,e)=>`${t}-opt-${e}`,wr=l.forwardRef(function({id:e,entries:s,activeIndex:r,onActiveChange:a,isSelected:o,onPick:i,multi:c,lockWidth:d,followActive:u,className:p,...h},f){const m=l.useRef(null),{hlRef:b,moveTo:v}=qn(),g=!Gn(),N=lt(s).filter(k=>o(k.value)).map(k=>k.value),x=new Set(JSON.parse(Vn(JSON.stringify(N),g)));ge(()=>{var R;const k=m.current;if(k){if(d){k.style.minWidth="",k.setAttribute("data-measuring","");const M=Math.ceil(k.getBoundingClientRect().width);k.removeAttribute("data-measuring"),M>0&&(k.style.minWidth=M+"px")}(R=k.querySelector('[aria-selected="true"]'))==null||R.scrollIntoView({block:"nearest"})}},[]),l.useEffect(()=>{var R;const k=r>=0?((R=m.current)==null?void 0:R.querySelector(`[data-index="${r}"]`))??null:null;v(k),k&&u&&k.scrollIntoView({block:"nearest"})},[r,u,v,s]);let w=-1;const _=k=>{w+=1;const R=w,M=x.has(k.value),E=k.tone&&k.tone!=="neutral"?k.tone:void 0;return n.jsxs("div",{role:"option",id:Yn(e,R),className:P("ok-menu__item",E&&`ok-menu__item--${E}`),"data-index":R,"data-value":k.value,"data-icon":k.icon!=null&&k.icon!==!1?"":void 0,"data-tone":E,"data-active":R===r||void 0,"aria-selected":M,"aria-disabled":k.disabled||void 0,onPointerMove:()=>{const T=k.disabled?-1:R;T!==r&&a(T)},onClick:()=>{k.disabled||i(k)},children:[Hn(k.icon),n.jsx("span",{className:"ok-menu__label",children:k.label}),k.meta!=null&&n.jsx("span",{className:"ok-menu__meta",children:k.meta}),n.jsx(zn,{})]},k.value)};return n.jsxs("div",{role:"listbox","aria-multiselectable":c||void 0,tabIndex:-1,...h,id:e,ref:xe(f,m),className:P("ok-menu ok-scroll",p),"data-check":c?void 0:"instant",onMouseDown:k=>k.preventDefault(),onPointerLeave:()=>a(-1),children:[n.jsx("span",{className:"ok-menu__hl",ref:b,"aria-hidden":"true"}),s.map((k,R)=>Ut(k)?n.jsxs("div",{role:"group","aria-labelledby":`${e}-group-${R}`,children:[n.jsx("div",{className:"ok-menu__heading",id:`${e}-group-${R}`,role:"presentation",children:k.label}),k.options.map(_)]},`group-${R}`):_(k))]})}),Nr=l.forwardRef(function({multi:e,selected:s,onPick:r,display:a,options:o,placeholder:i,size:c="md",block:d,disabled:u,required:p,invalid:h,name:f,form:m,open:b,defaultOpen:v=!1,onOpenChange:g,placement:N="bottom-start",id:x,className:w,"aria-label":_,"aria-labelledby":k,"aria-describedby":R,...M},E){const T=pe().messages.select.placeholder,C=i===void 0?T:i,j=l.useContext(Ie),y=_e({id:x,disabled:u,required:p,invalid:h,"aria-describedby":R,"aria-labelledby":k,"aria-label":_}),{disabled:S,invalid:O}=y,L=d??!!j,[$,D]=le(b,v,g),[A,B]=l.useState(-1),[z,G]=l.useState(!1),W=l.useRef(null),X=`${l.useId()}-list`,I=l.useMemo(()=>lt(o),[o]),F=kr(),q=I.findIndex(H=>s.includes(H.value)&&!H.disabled),ne=H=>{B(H),G(H>=0),D(!0)},Z=()=>D(!1),se=H=>{H>=0&&(B(H),G(!0))},ce=H=>{r(H),e||Z()},U=H=>{if(S)return;const re=H.key,de=xr(H)&&(re!==" "||F.pending());if(!$){if(re==="ArrowDown"||re==="ArrowUp"||re==="Enter"||re===" ")H.preventDefault(),ne(q>=0?q:re==="ArrowUp"?Mn(I):Mt(I));else if(de){H.preventDefault();const ee=F.search(re,I.map(bt),q);ne(ee>=0&&!I[ee].disabled?ee:q)}return}if(re==="ArrowDown"||re==="ArrowUp")H.preventDefault(),A<0&&q>=0?se(q):se(re==="ArrowDown"?vt(I,A,1):vt(I,A<0?I.length:A,-1));else if(re==="Home"||re==="PageUp")H.preventDefault(),se(Mt(I));else if(re==="End"||re==="PageDown")H.preventDefault(),se(Mn(I));else if(de){H.preventDefault();const ee=F.search(re,I.map(bt),A);ee>=0&&!I[ee].disabled&&se(ee)}else re==="Enter"||re===" "?(H.preventDefault(),A>=0&&I[A]&&!I[A].disabled?ce(I[A]):Z()):re==="Tab"&&Z()};return n.jsxs("div",{...M,ref:E,className:P("ok-select",L&&"ok-select--block",w),"data-size":c,"data-disabled":S||void 0,children:[n.jsxs("button",{type:"button",ref:W,id:y.id,"data-label-focus":"",className:"ok-select__trigger ok-focusable",role:"combobox","aria-haspopup":"listbox","aria-expanded":$,"aria-controls":$?X:void 0,"aria-activedescendant":$&&A>=0?Yn(X,A):void 0,"aria-label":_,"aria-labelledby":k,"aria-describedby":y.describedBy,"aria-invalid":O||void 0,"aria-required":y.required||void 0,disabled:S,"data-state":$?"open":"closed",onClick:()=>$?Z():ne(-1),onKeyDown:U,onKeyUp:H=>{H.key===" "&&H.preventDefault()},children:[n.jsx("span",{className:"ok-select__value","data-placeholder":s.length?void 0:"",children:s.length?a:C}),n.jsx(he,{name:"chevron-down"})]}),f&&(e?s.map(H=>n.jsx("input",{type:"hidden",name:f,value:H,form:m,disabled:S},H)):n.jsx("input",{type:"hidden",name:f,value:s[0]??"",form:m,disabled:S})),n.jsx(xt,{open:$,anchorRef:W,placement:N,matchWidth:"min",className:"ok-popup--menu",onDismiss:Z,children:n.jsx(wr,{id:X,entries:o,activeIndex:A,onActiveChange:H=>{B(H),G(!1)},followActive:z,isSelected:H=>s.includes(H),onPick:ce,multi:e,lockWidth:!0,"aria-label":_,"aria-labelledby":k??(_||j==null?void 0:j.labelId)})})]})}),ul=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,...a},o){const[i,c]=le(e,s),d=ke(r),u=l.useMemo(()=>lt(a.options).find(p=>p.value===i),[a.options,i]);return n.jsx(Nr,{...a,ref:o,multi:!1,selected:i==null?[]:[i],display:u?u.label:i,onPick:p=>{p.value!==i&&(c(p.value),d(p.value,p))}})}),fl=[],pl=l.forwardRef(function({value:e,defaultValue:s=fl,onChange:r,display:a="chips",maxChips:o=2,renderValue:i,...c},d){const{messages:u}=pe(),[p,h]=le(e,s,r),f=l.useMemo(()=>{const b=lt(c.options);return p.map(v=>b.find(g=>g.value===v)).filter(Boolean)},[c.options,p]);let m;return i?m=i(f):a==="count"?m=u.select.count(p.length):m=n.jsxs("span",{className:"ok-select__chips",children:[f.slice(0,o).map(b=>n.jsx("span",{className:"ok-select__chip",children:b.label},b.value)),f.length>o&&n.jsxs("span",{className:"ok-select__chip ok-select__chip--more",children:["+",f.length-o]})]}),n.jsx(Nr,{...c,ref:d,multi:!0,selected:p,display:m,onPick:b=>h(p.includes(b.value)?p.filter(v=>v!==b.value):[...p,b.value])})}),hl=(t,e)=>bt(t).toLowerCase().includes(e.trim().toLowerCase()),Rr=l.forwardRef(function({options:e,value:s,defaultValue:r=null,onChange:a,inputValue:o,defaultInputValue:i,onInputChange:c,filter:d=hl,loading:u=!1,loadingText:p,emptyText:h,freeSolo:f=!1,clearable:m=!1,icon:b,size:v="md",invalid:g,name:N,form:x,disabled:w,required:_,open:k,defaultOpen:R=!1,onOpenChange:M,placement:E="bottom-start",className:T,style:C,rootRef:j,rootClassName:y,rootStyle:S,id:O,onKeyDown:L,onBlur:$,onClick:D,"aria-describedby":A,...B},z){const{messages:G}=pe(),W=p===void 0?G.combobox.loading:p,J=h===void 0?G.combobox.empty:h,X=l.useContext(Ie),I=_e({id:O,disabled:w,required:_,invalid:g,"aria-describedby":A}),{disabled:F,invalid:q}=I,ne=l.useMemo(()=>lt(e),[e]),Z=ae=>{if(ae==null)return"";const be=ne.find(Re=>Re.value===ae);return be?bt(be):f?ae:""},[se,ce]=le(s,r),U=ke(a),[H,re]=le(o??(f&&s!=null?s:void 0),i??Z(r),c),[de,ee]=le(k,R,M),[oe,K]=l.useState(-1),[Y,V]=l.useState(!1),[ie,ue]=l.useState(!1),we=l.useRef(null),Pe=l.useRef(null),Te=`${l.useId()}-list`,je=(ae,be)=>!d||!be||!ae.trim()?e:e.map(Re=>Ut(Re)?{...Re,options:Re.options.filter(Ke=>d(Ke,ae))}:Re).filter(Re=>Ut(Re)?Re.options.length>0:d(Re,ae)),Me=je(H,ie),ve=lt(Me),Ue=(ae,be)=>{ae!==se&&(ce(ae),U(ae,be))},Ye=(ae,be)=>{K(ae),V(be),ee(!0)},He=()=>{ee(!1),K(-1),ue(!1)},et=ae=>{re(bt(ae)),Ue(f?bt(ae):ae.value,ae),He()},Xe=ve.findIndex(ae=>ae.value===se&&!ae.disabled),te=ve.map(ae=>ae.disabled?`${ae.value}`:ae.value).join("\0");l.useEffect(()=>{!de||!ie||u||(K(Mt(ve)),V(!0))},[te,u]);const Q=ae=>{if(L==null||L(ae),ae.defaultPrevented||F)return;const be=ae.key;be==="ArrowDown"||be==="ArrowUp"?(ae.preventDefault(),de?(V(!0),K(be==="ArrowDown"?vt(ve,oe,1):vt(ve,oe<0?ve.length:oe,-1))):Ye(Xe>=0?Xe:be==="ArrowDown"?Mt(ve):Mn(ve),!0)):be==="Enter"?de&&oe>=0&&ve[oe]&&!ve[oe].disabled?(ae.preventDefault(),et(ve[oe])):de&&He():be==="Tab"&&de&&He()},me=u||ve.length>0||J!=null,fe=de&&me&&!F;return n.jsxs("div",{ref:xe(j,we),className:P("ok-input ok-combobox",v==="lg"&&"ok-input--lg",H&&m&&"has-value",y,T),style:{...S,...C},"data-size":v,"data-disabled":F||void 0,"data-invalid":q||void 0,onClick:ae=>{var be;ae.target===ae.currentTarget&&((be=Pe.current)==null||be.focus())},children:[b!=null&&n.jsx("span",{className:"ok-input__icon ok-combobox__icon",children:Hn(b)}),n.jsx("input",{type:"text",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,...B,ref:xe(z,Pe),id:I.id,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":fe,"aria-controls":fe?Te:void 0,"aria-activedescendant":fe&&oe>=0?Yn(Te,oe):void 0,"aria-invalid":q||void 0,"aria-describedby":I.describedBy,"aria-busy":u||void 0,disabled:F,required:I.required||void 0,name:f?N:void 0,form:f?x:void 0,value:H,onChange:ae=>{const be=ae.target.value;re(be),ue(!0),f?Ue(be):be===""&&se!=null&&Ue(null),Ye(Mt(lt(je(be,!0))),!0)},onClick:ae=>{D==null||D(ae),de||Ye(-1,!1)},onKeyDown:Q,onBlur:ae=>{$==null||$(ae),de&&He(),!f&&H!==Z(se)&&re(Z(se))}}),m&&n.jsx("button",{type:"button",className:"ok-input__clear","aria-label":G.common.clear,tabIndex:-1,disabled:F||!H,onMouseDown:ae=>ae.preventDefault(),onClick:()=>{var ae;re(""),Ue(f?"":null),(ae=Pe.current)==null||ae.focus()},children:n.jsx(he,{name:"x"})}),N&&!f&&n.jsx("input",{type:"hidden",name:N,form:x,value:se??"",disabled:F}),n.jsxs(xt,{open:fe,anchorRef:we,placement:E,matchWidth:"min",className:"ok-popup--menu",onDismiss:He,onMouseDown:ae=>ae.preventDefault(),children:[u&&n.jsx("div",{className:"ok-menu__empty",role:"status",children:W}),!u&&ve.length===0&&n.jsx("div",{className:"ok-menu__empty",role:"status",children:J}),n.jsx(wr,{id:Te,entries:Me,hidden:ve.length===0,activeIndex:oe,onActiveChange:ae=>{K(ae),V(!1)},followActive:Y,isSelected:ae=>!f&&ae===se,onPick:et,"aria-label":B["aria-label"]??G.combobox.listbox,"aria-labelledby":B["aria-labelledby"]??(B["aria-label"]||X==null?void 0:X.labelId)})]})]})}),ml=l.forwardRef(function(e,s){return n.jsx(Rr,{...e,ref:s,freeSolo:!0})}),Ge=t=>new Date(t.getFullYear(),t.getMonth(),t.getDate()),qe=(t,e)=>new Date(t.getFullYear(),t.getMonth(),t.getDate()+e);function wt(t,e){const s=new Date(t.getFullYear(),t.getMonth()+e,1),r=new Date(s.getFullYear(),s.getMonth()+1,0).getDate();return new Date(s.getFullYear(),s.getMonth(),Math.min(t.getDate(),r))}const $e=(t,e)=>!!t&&!!e&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate(),Nt=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),vn=(t,e=2)=>String(t).padStart(e,"0"),Be=t=>`${vn(t.getFullYear(),4)}-${vn(t.getMonth()+1)}-${vn(t.getDate())}`;function Xn(t){const e=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*[-/.月]\s*(\d{1,2})\s*日?\s*$/.exec(t);if(!e)return null;const[s,r,a]=[Number(e[1]),Number(e[2]),Number(e[3])],o=new Date(s,r-1,a);return o.setFullYear(s),o.getFullYear()===s&&o.getMonth()===r-1&&o.getDate()===a?o:null}const Mr=l.forwardRef(function({anchorDate:e,isSelected:s,rangePart:r,onPick:a,onHoverDate:o,onFocusDate:i,multiselectable:c,month:d,defaultMonth:u,onMonthChange:p,min:h,max:f,isDateDisabled:m,weekStartsOn:b=1,locale:v,today:g,autoFocus:N,disabled:x,className:w,"aria-label":_,...k},R){const{locale:M,messages:E}=pe(),T=v??M,C=l.useMemo(()=>Ge(g??new Date),[g]),j=l.useMemo(()=>h?Ge(h):null,[h]),y=l.useMemo(()=>f?Ge(f):null,[f]),S=K=>j&&K<j?j:y&&K>y?y:K,O=K=>!!x||!!j&&K<j||!!y&&K>y||!!(m!=null&&m(K)),L=S(Ge(e??u??d??C)),[$,D]=l.useState(L),[A,B]=le(d,u??L,p),z=new Date(A.getFullYear(),A.getMonth(),1),G=l.useRef(null),W=l.useRef(!!N),J=l.useId(),X=e?Be(e):"";l.useEffect(()=>{if(!e)return;const K=Ge(e);D(K),Nt(K,A)||B(K)},[X]);const I=Nt($,z)?$:z,F=Be(I);l.useEffect(()=>{var K,Y;W.current&&(W.current=!1,(Y=(K=G.current)==null?void 0:K.querySelector(`[data-date="${F}"]`))==null||Y.focus({preventScroll:!0}))});const q=K=>{const Y=S(K);W.current=!0,D(Y),Nt(Y,z)||B(Y)},ne=K=>{const Y=wt(z,K);B(Y),D(S(wt(I,K)))},Z=K=>{const Y=K.target.closest("[data-date]");if(!Y)return;const V=Xn(Y.dataset.date),ie=(V.getDay()-b+7)%7;let ue=null;switch(K.key){case"ArrowLeft":ue=qe(V,-1);break;case"ArrowRight":ue=qe(V,1);break;case"ArrowUp":ue=qe(V,-7);break;case"ArrowDown":ue=qe(V,7);break;case"Home":ue=qe(V,-ie);break;case"End":ue=qe(V,6-ie);break;case"PageUp":ue=wt(V,K.shiftKey?-12:-1);break;case"PageDown":ue=wt(V,K.shiftKey?12:1);break;default:return}K.preventDefault(),q(ue)},se=l.useMemo(()=>new Intl.DateTimeFormat(T,{year:"numeric",month:"long"}),[T]),ce=l.useMemo(()=>new Intl.DateTimeFormat(T,{dateStyle:"full"}),[T]),U=l.useMemo(()=>{const K=new Intl.DateTimeFormat(T,{weekday:"narrow"}),Y=new Intl.DateTimeFormat(T,{weekday:"long"});return Array.from({length:7},(V,ie)=>{const ue=new Date(2023,0,1+(ie+b)%7);return{short:K.format(ue),long:Y.format(ue)}})},[T,b]),H=(z.getDay()-b+7)%7,re=qe(z,-H),de=Array.from({length:6},(K,Y)=>Array.from({length:7},(V,ie)=>qe(re,Y*7+ie))),ee=!!j&&qe(z,-1)<j,oe=!!y&&wt(z,1)>y;return n.jsxs("div",{...k,ref:xe(R,G),className:P("ok-calendar",w),"data-disabled":x||void 0,children:[n.jsxs("div",{className:"ok-calendar__head",children:[n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":E.calendar.prevMonth,disabled:x||ee,onClick:()=>ne(-1),children:n.jsx(he,{children:n.jsx("path",{d:"M12.5 4.5L7 10l5.500 5.500"})})}),n.jsx("div",{className:"ok-calendar__title",id:`${J}-title`,"aria-live":"polite",children:se.format(z)}),n.jsx("button",{type:"button",className:"ok-btn ok-btn--ghost ok-btn--sm ok-btn--icon ok-focusable","aria-label":E.calendar.nextMonth,disabled:x||oe,onClick:()=>ne(1),children:n.jsx(he,{name:"chevron-right"})})]}),n.jsxs("table",{role:"grid",className:"ok-calendar__grid","aria-label":_,"aria-labelledby":_?void 0:`${J}-title`,"aria-multiselectable":c||void 0,onKeyDown:Z,onPointerLeave:()=>o==null?void 0:o(null),children:[n.jsx("thead",{children:n.jsx("tr",{children:U.map(K=>n.jsxs("th",{scope:"col",abbr:K.long,children:[n.jsx("span",{"aria-hidden":"true",children:K.short}),n.jsx("span",{className:"ok-sr",children:K.long})]},K.long))})}),n.jsx("tbody",{children:de.map(K=>n.jsx("tr",{children:K.map(Y=>{const V=Be(Y),ie=O(Y),ue=s(Y),we=r==null?void 0:r(Y);return n.jsx("td",{role:"gridcell","aria-selected":ue,"aria-disabled":ie||void 0,"data-range":we,children:n.jsx("button",{type:"button",className:"ok-calendar__day ok-focusable",tabIndex:V===F?0:-1,"data-date":V,"data-autofocus":N&&V===F?"":void 0,"data-outside":Nt(Y,z)?void 0:"","data-today":$e(Y,C)?"":void 0,"data-selected":ue?"":void 0,"aria-label":ce.format(Y)+($e(Y,C)?E.calendar.todaySuffix:""),"aria-current":$e(Y,C)?"date":void 0,"aria-pressed":ue,"aria-disabled":ie||void 0,onFocus:()=>{D(Y),i==null||i(Y)},onPointerEnter:()=>o==null?void 0:o(Y),onClick:()=>{ie||(D(Y),Nt(Y,z)||(W.current=!0,B(Y)),a(Y))},children:Y.getDate()})},V)})},Be(K[0])))})]})]})}),Sr=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,...a},o){const[i,c]=le(e,s,r);return n.jsx(Mr,{...a,ref:o,anchorDate:i,isSelected:d=>$e(d,i),onPick:d=>c(d)})}),bl={start:null,end:null},Cr=l.forwardRef(function({value:e,defaultValue:s=bl,onChange:r,...a},o){const[i,c]=le(e,s,r),[d,u]=l.useState(null),[p,h]=l.useState(null),{start:f,end:m}=i,b=d??p,v=m??(f&&b?b:null),g=f&&v?f<=v?f:v:f,N=f&&v&&f<=v?v:f;return n.jsx(Mr,{...a,ref:o,multiselectable:!0,anchorDate:f,isSelected:x=>$e(x,f)||$e(x,m)||!!f&&!!m&&x>f&&x<m,rangePart:x=>{if(!(!g||!N))return $e(g,N)?$e(x,g)?"single":void 0:$e(x,g)?"start":$e(x,N)?"end":x>g&&x<N?"in":void 0},onHoverDate:u,onFocusDate:x=>{u(null),h(x)},onPick:x=>{c(!f||m?{start:x,end:null}:x<f?{start:x,end:f}:{start:f,end:x})}})});function js(t,e){const s=e(t);if(s)return new Date(s.getFullYear(),s.getMonth(),1);const r=/^\s*(\d{4})\s*[-/.年]\s*(\d{1,2})\s*([-/.月])?\s*$/.exec(t);if(!r)return null;const[,a,o,i]=r;if(o.length===1&&!i&&(o==="0"||o==="1"))return null;const c=Number(o);return c>=1&&c<=12?new Date(Number(a),c-1,1):null}const vl=(t,e)=>t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth(),Er=()=>n.jsxs(he,{children:[n.jsx("rect",{x:"3.500",y:"4.500",width:"13",height:"12",rx:"2.500"}),n.jsx("path",{d:"M3.500 8.500h13M7 3v3M13 3v3"})]}),gl=l.forwardRef(function({value:e,defaultValue:s=null,onChange:r,parse:a=Xn,format:o=Be,min:i,max:c,isDateDisabled:d,weekStartsOn:u,locale:p,today:h,size:f="md",invalid:m,name:b,form:v,disabled:g,required:N,readOnly:x,open:w,defaultOpen:_=!1,onOpenChange:k,placement:R="bottom-start",className:M,style:E,placeholder:T,id:C,onBlur:j,onKeyDown:y,"aria-describedby":S,...O},L){const{messages:$}=pe(),D=T??$.datePicker.placeholder,A=_e({id:C,disabled:g,required:N,invalid:m,"aria-describedby":S}),{disabled:B,invalid:z}=A,[G,W]=le(e,s,r),[J,X]=le(w,_,k),[I,F]=l.useState(G?o(G):""),q=l.useRef(null),ne=l.useRef(null),Z=`${l.useId()}-calendar`,[se,ce]=l.useState(!1),[U,H]=l.useState(()=>Ge(G??h??new Date));l.useEffect(()=>{if(!J)return;const V=js(I,a);H(Ge(V??G??h??new Date))},[J]),l.useEffect(()=>{J||ce(!1)},[J]);const re=()=>{J||B||x||(ce(!0),X(!0))},de=V=>{F(V);const ie=js(V,a);ie&&!vl(ie,U)&&H(ie)},ee=G?Be(G):"";l.useEffect(()=>{F(G?o(G):"")},[ee]);const oe=V=>!(i&&V<Ge(i))&&!(c&&V>Ge(c))&&!(d!=null&&d(V)),K=(()=>{if(I.trim()==="")return null;const V=a(I);return V&&oe(V)?V:G&&I===o(G)?G:null})(),Y=()=>{if(I.trim()===""){G&&W(null);return}const V=a(I);V&&oe(V)?$e(V,G)?F(o(V)):W(V):F(G?o(G):"")};return n.jsxs("div",{ref:xe(L,q),className:P("ok-input ok-datepicker",f==="lg"&&"ok-input--lg",M),style:E,"data-size":f,"data-disabled":B||void 0,"data-invalid":z||void 0,children:[n.jsx("input",{type:"text",inputMode:"numeric",autoComplete:"off",...O,id:A.id,placeholder:D,disabled:B,readOnly:x,required:A.required||void 0,"aria-invalid":z||void 0,"aria-describedby":A.describedBy,ref:ne,"aria-haspopup":"dialog","aria-expanded":J,"aria-controls":J?Z:void 0,value:I,onChange:V=>de(V.target.value),onClick:re,onBlur:V=>{var ue,we;j==null||j(V),Y();const ie=V.relatedTarget;J&&se&&!(ie&&((ue=q.current)!=null&&ue.contains(ie)||(we=document.getElementById(Z))!=null&&we.contains(ie)))&&X(!1)},onKeyDown:V=>{var ie,ue;y==null||y(V),!V.defaultPrevented&&(V.key==="Enter"?(Y(),J&&se&&X(!1)):V.key==="Escape"&&J?(V.preventDefault(),X(!1)):V.key==="ArrowDown"&&V.altKey&&!B&&!x?(V.preventDefault(),ce(!1),X(!0)):V.key==="ArrowDown"&&J&&(V.preventDefault(),(ue=(ie=document.getElementById(Z))==null?void 0:ie.querySelector('.ok-calendar__day[tabindex="0"]'))==null||ue.focus()))}}),b&&n.jsx("input",{type:"hidden",name:b,form:v,value:ee,disabled:B}),n.jsx(Wn,{id:Z,open:J,onOpenChange:V=>{V&&ce(!1),X(V)},autoFocus:!se,anchorRef:q,placement:R,"aria-label":$.datePicker.dialog,className:"ok-popover--calendar",trigger:n.jsx("button",{type:"button",className:"ok-datepicker__btn ok-focusable","aria-label":$.datePicker.open,disabled:B||x,children:n.jsx(Er,{})}),children:({close:V})=>n.jsx(Sr,{autoFocus:!se,value:K,month:U,onMonthChange:H,onChange:ie=>{var ue;W(ie),se?(X(!1),(ue=ne.current)==null||ue.focus()):V()},min:i,max:c,isDateDisabled:d,weekStartsOn:u,locale:p,today:h})})]})}),xl={start:null,end:null},kl=l.forwardRef(function({value:e,defaultValue:s=xl,onChange:r,placeholder:a,startName:o,endName:i,form:c,separator:d=" – ",format:u=Be,min:p,max:h,isDateDisabled:f,weekStartsOn:m,locale:b,today:v,size:g="md",invalid:N,disabled:x,required:w,open:_,defaultOpen:k=!1,onOpenChange:R,placement:M="bottom-start",className:E,id:T,"aria-label":C,"aria-labelledby":j,"aria-describedby":y,...S},O){const{messages:L}=pe(),$=a===void 0?L.datePicker.rangePlaceholder:a,D=l.useContext(Ie),A=_e({id:T,disabled:x,required:w,invalid:N,"aria-describedby":y,"aria-labelledby":j,"aria-label":C}),{disabled:B,invalid:z}=A,[G,W]=le(e,s,r),[J,X]=le(_,k,R),[I,F]=l.useState(null);l.useEffect(()=>{J||F(null)},[J]);const{start:q,end:ne}=G,Z=J&&I||G,se=Z.start?`${u(Z.start)}${d}${Z.end?u(Z.end):"…"}`:null,ce=l.useRef(null),U=`${l.useId()}-value`,[H,re]=l.useState(!1);l.useEffect(()=>{var oe,K;re(!!((K=(oe=ce.current)==null?void 0:oe.labels)!=null&&K.length))});const ee=[(!!C||!!j||!!(D!=null&&D.labelId)||H)&&U,A.describedBy].filter(Boolean).join(" ")||void 0;return n.jsxs(n.Fragment,{children:[n.jsx(Wn,{open:J,onOpenChange:X,placement:M,"aria-label":L.datePicker.rangeDialog,className:"ok-popover--calendar",trigger:n.jsxs("button",{type:"button",...S,ref:xe(O,ce),id:A.id,className:P("ok-input ok-daterange ok-focusable",g==="lg"&&"ok-input--lg",E),"data-size":g,"data-label-focus":"","data-invalid":z||void 0,"aria-label":C,"aria-labelledby":j,"aria-describedby":ee,"aria-invalid":z||void 0,"aria-required":A.required||void 0,disabled:B,children:[n.jsx("span",{className:"ok-daterange__value",id:U,"data-placeholder":se?void 0:"",children:se??$}),n.jsx(Er,{})]}),children:({close:oe})=>n.jsx(Cr,{autoFocus:!0,value:I??G,onChange:K=>{K.start&&K.end?(F(null),W(K),oe()):F(K)},min:p,max:h,isDateDisabled:f,weekStartsOn:m,locale:b,today:v})}),o&&n.jsx("input",{type:"hidden",name:o,form:c,value:q?Be(q):"",disabled:B}),i&&n.jsx("input",{type:"hidden",name:i,form:c,value:ne?Be(ne):"",disabled:B})]})}),yl=l.forwardRef(function({variant:e="body",as:s="span",tone:r="default",truncate:a,lineClamp:o,align:i,className:c,style:d,...u},p){const h=s,f=o&&o>0?{"--ok-clamp":o}:void 0;return n.jsx(h,{ref:p,className:P("ok-text",`ok-t-${e}`,c),"data-tone":r==="default"?void 0:r,"data-truncate":a?"":void 0,"data-clamp":f?"":void 0,"data-align":i,style:f?{...f,...d}:d,...u})}),_l=l.forwardRef(function({level:e=2,variant:s,tone:r="default",truncate:a,align:o,className:i,...c},d){const u=`h${e}`;return n.jsx(u,{ref:d,className:P("ok-text ok-heading",`ok-t-${s??`h${e}`}`,i),"data-tone":r==="default"?void 0:r,"data-truncate":a?"":void 0,"data-align":o,...c})}),jl=l.forwardRef(function({as:e="div",size:s="md",className:r,...a},o){const i=e;return n.jsx(i,{ref:o,className:P("ok-panel",s!=="md"&&`ok-panel--${s}`,r),...a})}),wl=t=>t===void 0?void 0:typeof t=="number"?String(t):t,Ar=l.forwardRef(function({src:e,alt:s,ratio:r,fit:a="cover",radius:o=3,fallback:i,placeholder:c="skeleton",loading:d="lazy",children:u,className:p,style:h,onLoad:f,onError:m,decoding:b="async",...v},g){const N=l.useRef(null),[x,w]=l.useState({src:e,status:"loading"}),_=u!=null&&u!==!1;let k;e?k=x.src===e?x.status:"loading":k=_?"content":"empty",l.useEffect(()=>{const j=N.current;e&&j&&j.complete&&j.naturalWidth>0&&w({src:e,status:"loaded"})},[e]);const R=j=>{w({src:e,status:"loaded"}),f==null||f(j)},M=j=>{w({src:e,status:"error"}),m==null||m(j)},T=k==="content"||k==="error"||k==="empty"?s?{role:"img","aria-label":s}:{"aria-hidden":!0}:null,C=wl(r);return n.jsxs("span",{ref:g,className:P("ok-image",p),"data-status":k,"data-fit":a,"data-radius":o,"data-placeholder":c,"data-ratio":C!==void 0?"":void 0,style:C!==void 0?{aspectRatio:C,...h}:h,...T,children:[e&&k!=="error"&&n.jsx("img",{...v,ref:N,className:"ok-image__img",src:e,alt:s,loading:d,decoding:b,onLoad:R,onError:M}),(k==="error"||k==="empty")&&n.jsx("span",{className:"ok-image__fallback",children:i??n.jsx(he,{name:"image",className:"ok-image__icon"})}),_&&n.jsx("span",{className:e?"ok-image__overlay":"ok-image__content",children:u})]})}),Nl=l.forwardRef(function({as:e="div",size:s="md",href:r,target:a,rel:o,interactive:i,disabled:c,chevron:d,className:u,children:p,...h},f){const m=r!==void 0,b=!m&&!!i,v=m?"a":b?"button":e,g=b?"span":"div",N=m?{href:r,target:a,rel:o}:b?{type:"button",disabled:c}:null;return n.jsx(v,{ref:f,className:P("ok-card",s!=="md"&&`ok-card--${s}`,(m||b)&&"ok-card--interactive ok-focusable",d&&"ok-card--chev",u),...N,...h,children:d?n.jsxs(n.Fragment,{children:[n.jsx(g,{className:"ok-card__main",children:p}),n.jsx(he,{name:"chevron-right",className:"ok-card__chev"})]}):p})}),Rl=l.forwardRef(function({href:e,className:s,...r},a){const o=e!==void 0?"a":"button",i=e!==void 0?{href:e}:{type:"button"};return n.jsx(o,{ref:a,className:P("ok-card__link",s),...i,...r})}),Ml=l.forwardRef(function({title:e,description:s,titleAs:r="h3",titleId:a,actions:o,className:i,children:c,...d},u){return n.jsxs("div",{ref:u,className:P("ok-card__header",i),...d,children:[n.jsxs("div",{className:"ok-card__heading",children:[e!=null&&n.jsx(r,{id:a,className:"ok-card__title",children:e}),s!=null&&n.jsx("p",{className:"ok-card__desc",children:s}),c]}),o!=null&&n.jsx("div",{className:"ok-card__actions",children:o})]})}),Sl=l.forwardRef(function({className:e,...s},r){return n.jsx("div",{ref:r,className:P("ok-card__body",e),...s})}),Cl=l.forwardRef(function({align:e="start",className:s,...r},a){return n.jsx("div",{ref:a,className:P("ok-card__footer",s),"data-align":e,...r})}),El=l.forwardRef(function({ratio:e=16/9,position:s="top",className:r,...a},o){return n.jsx(Ar,{ref:o,ratio:e,radius:0,className:P("ok-card__media",s==="start"&&"ok-card__media--start",r),...a})}),Al=l.forwardRef(function({as:e="div",compact:s,className:r,...a},o){const i=e;return n.jsx(i,{ref:o,className:P("ok-group",s&&"ok-group--compact",r),...a})}),Tl=l.forwardRef(function({as:e="div",label:s,description:r,leading:a,stack:o,controlWidth:i="auto",href:c,target:d,rel:u,interactive:p,disabled:h,className:f,children:m,...b},v){const g=c!==void 0,N=!g&&!!p,x=g||N,w=g?"a":N?"button":e,_=g?{href:c,target:d,rel:u}:N?{type:"button",disabled:h}:null,k=s!=null||r!=null,R=!x&&i!=="auto"&&m!=null,M=R&&i==="fill",E=R&&!M,T=R?n.jsx("span",{className:"ok-row__control",style:E?{"--_cw":typeof i=="number"?`${i}px`:i}:void 0,children:m}):m;return n.jsxs(w,{ref:v,className:P("ok-row",o===!0&&"ok-row--stack",o==="auto"&&"ok-row--wrap",M&&"ok-row--fill",E&&"ok-row--fixed",x&&"ok-row--link ok-focusable",f),..._,...b,children:[a!=null&&n.jsx("span",{className:"ok-row__leading",children:a}),k&&n.jsxs("span",{className:"ok-row__text",children:[s!=null&&n.jsx("span",{className:"ok-row__label",children:s}),r!=null&&n.jsx("span",{className:"ok-row__desc",children:r})]}),x&&m!=null?n.jsx("span",{className:"ok-row__value",children:m}):T,x&&n.jsx(he,{name:"chevron-right",className:"ok-row__chev"})]})}),Il=l.forwardRef(function({as:e,marker:s="none",divided:r,size:a="md",className:o,...i},c){const d=e??(s==="number"?"ol":"ul");return n.jsx(d,{ref:c,role:"list",className:P("ok-list",a!=="md"&&`ok-list--${a}`,o),"data-marker":s,"data-divided":r?"":void 0,...i})}),Pl=l.forwardRef(function({leading:e,trailing:s,title:r,description:a,className:o,children:i,...c},d){return n.jsxs("li",{ref:d,className:P("ok-list__item",o),...c,children:[e!=null&&n.jsx("span",{className:"ok-list__leading",children:e}),n.jsxs("div",{className:"ok-list__content",children:[r!=null&&n.jsx("span",{className:"ok-list__title",children:r}),a!=null&&n.jsx("span",{className:"ok-list__desc",children:a}),i]}),s!=null&&n.jsx("span",{className:"ok-list__trailing",children:s})]})}),Ll=l.forwardRef(function({items:e,layout:s="auto",divided:r,className:a,children:o,...i},c){return n.jsxs("dl",{ref:c,className:P("ok-dl",a),"data-layout":s,"data-divided":r?"":void 0,...i,children:[e==null?void 0:e.map((d,u)=>n.jsx(Tr,{term:d.term,children:d.description},d.key??u)),o]})}),Tr=l.forwardRef(function({term:e,className:s,children:r,...a},o){return n.jsxs("div",{ref:o,className:P("ok-dl__item",s),...a,children:[n.jsx("dt",{className:"ok-dl__term",children:e}),n.jsx("dd",{className:"ok-dl__desc",children:r})]})});function Ir(t,e,s=1,r=1){const a=r*2+s*2+3;if(t<=a)return Array.from({length:t},(f,m)=>m+1);const o=Math.max(e-s,r+2),i=Math.min(e+s,t-r-1),c=o>r+2,d=i<t-r-1,u=(f,m)=>Array.from({length:Math.max(0,m-f+1)},(b,v)=>f+v),p=u(1,r),h=u(t-r+1,t);return!c&&d?[...u(1,r+s*2+2),0,...h]:c&&!d?[...p,0,...u(t-r-s*2-1,t)]:[...p,0,...u(o,i),0,...h]}const Pr=l.forwardRef(function({count:e,page:s,defaultPage:r=1,onChange:a,siblings:o=1,boundaries:i=1,label:c,size:d="md",disabled:u,className:p,...h},f){const{messages:m}=pe(),b=c??m.pagination.label,v=Math.max(1,Math.floor(e)),[g,N]=le(s,r,a),x=ye(g,1,v),w=k=>{u||N(ye(k,1,v))},_=Ir(v,x,o,i);return n.jsxs("nav",{ref:f,"aria-label":b,className:P("ok-pagination",d==="sm"&&"ok-pagination--sm",p),...h,children:[n.jsxs("ul",{className:"ok-pagination__list",children:[n.jsx("li",{children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":m.pagination.prev,disabled:u||x<=1,onClick:()=>w(x-1),children:n.jsx(he,{children:n.jsx("path",{d:"M12.500 4.500L7 10l5.500 5.500"})})})}),_.map((k,R)=>k===0?n.jsx("li",{className:"ok-pagination__gap","aria-hidden":"true",children:"…"},`gap-${R}`):n.jsx("li",{className:"ok-pagination__page",children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-focusable","aria-label":m.pagination.page(k),"aria-current":k===x?"page":void 0,disabled:u,onClick:()=>w(k),children:k})},k)),n.jsxs("li",{className:"ok-pagination__status","aria-hidden":"true",children:[x," / ",v]}),n.jsx("li",{children:n.jsx("button",{type:"button",className:"ok-pagination__btn ok-pagination__btn--nav ok-focusable","aria-label":m.pagination.next,disabled:u||x>=v,onClick:()=>w(x+1),children:n.jsx(he,{name:"chevron-right"})})})]}),n.jsx("span",{className:"ok-sr",role:"status",children:m.pagination.status(x,v)})]})}),ws=n.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:n.jsx("path",{d:"M3.6 8.4l2.9 2.9 5.9-6.4",pathLength:1})}),Ht=(t,e)=>t.accessor?t.accessor(e):e[t.key],$l=t=>t.label??(typeof t.header=="string"?t.header:t.key);function Dl(t,e){return t==null&&e==null?0:t==null?1:e==null?-1:typeof t=="number"&&typeof e=="number"?t-e:t instanceof Date&&e instanceof Date?t.getTime()-e.getTime():String(t).localeCompare(String(e),void 0,{numeric:!0})}function Ol({columns:t,data:e,rowKey:s,label:r,caption:a,sort:o,defaultSort:i=null,onSortChange:c,manualSort:d,selectable:u,selectedKeys:p,defaultSelectedKeys:h,onSelectionChange:f,getRowLabel:m,scroll:b,maxHeight:v,stackOnMobile:g,empty:N,noHighlight:x,rowAction:w,pageSize:_,page:k,defaultPage:R=1,onPageChange:M,className:E,style:T,onScroll:C,...j},y){const{messages:S}=pe(),O=N===void 0?S.table.empty:N,L=l.useId(),$=l.useRef(null),D=l.useRef(null),A=l.useRef(null),[B,z]=le(o,i,c),[G,W]=le(p,h??[],f),[J,X]=l.useState(!1),I=(te,Q)=>typeof s=="function"?s(te,Q):s!=null?String(te[s]):String(Q),F=l.useMemo(()=>{const te=e.map((ae,be)=>({row:ae,index:be})),Q=B&&t.find(ae=>ae.key===B.key);if(!B||!Q||d)return te;const me=B.direction==="desc"?-1:1,fe=Q.compare??((ae,be)=>Dl(Ht(Q,ae),Ht(Q,be)));return te.sort((ae,be)=>me*fe(ae.row,be.row)||ae.index-be.index)},[e,t,B,d]),q=_!=null&&_>0,ne=q?Math.max(1,Math.floor(_)):0,Z=q?Math.max(1,Math.ceil(F.length/ne)):1,[se,ce]=le(k,R,M),U=ye(se,1,Z),H=l.useMemo(()=>q?F.slice((U-1)*ne,U*ne):F,[F,q,U,ne]),re=H.map(te=>I(te.row,te.index)),de=new Set(G),ee=re.filter(te=>de.has(te)).length,oe=re.length>0&&ee===re.length,K=ee>0&&!oe;ge(()=>{A.current&&(A.current.indeterminate=K)},[K]),l.useEffect(()=>{const te=$.current,Q=D.current;if(!te||!Q||typeof ResizeObserver>"u")return;const me=()=>X(te.scrollWidth>te.clientWidth+1);me();const fe=new ResizeObserver(me);return fe.observe(te),fe.observe(Q),()=>fe.disconnect()},[]);const Y=l.useRef({cur:null,x:0,y:0,top:0,calm:void 0}),V=te=>{const Q=D.current,me=Y.current;if(!Q||te===me.cur)return;if(me.cur=te,!te){delete Q.dataset.hl;return}const fe=()=>{const ae=te.getBoundingClientRect();Q.style.setProperty("--hl-y",(ae.top-Q.getBoundingClientRect().top).toFixed(2)+"px"),Q.style.setProperty("--hl-h",ae.height.toFixed(2)+"px")};Q.dataset.hl!==void 0?fe():(Q.dataset.noAnim="",fe(),Q.offsetWidth,delete Q.dataset.noAnim,Q.dataset.hl="")},ie=te=>{var me,fe;const Q=(me=te==null?void 0:te.closest)==null?void 0:me.call(te,"tr");return Q&&((fe=Q.parentElement)==null?void 0:fe.tagName)==="TBODY"&&!Q.hasAttribute("data-empty")?Q:null},ue=te=>{if(te.pointerType==="touch")return;Y.current.x=te.clientX,Y.current.y=te.clientY;const Q=ie(te.target);Q&&V(Q)},we=te=>{const Q=te.currentTarget,me=D.current,fe=Y.current;me&&(Q.scrollTop!==fe.top&&(fe.top=Q.scrollTop,me.dataset.jumping="",clearTimeout(fe.calm),fe.calm=setTimeout(()=>{delete me.dataset.jumping},140)),!(!fe.cur||typeof document.elementFromPoint!="function")&&V(ie(document.elementFromPoint(fe.x,fe.y))))};l.useEffect(()=>()=>clearTimeout(Y.current.calm),[]),ge(()=>{V(null)},[H]);const Pe=te=>{!B||B.key!==te?z({key:te,direction:"asc"}):B.direction==="asc"?z({key:te,direction:"desc"}):z(null),q&&ce(1)},dt=()=>{W(oe?G.filter(te=>!re.includes(te)):Array.from(new Set([...G,...re])))},Te=te=>W(de.has(te)?G.filter(Q=>Q!==te):[...G,te]),je=b||J,Me=r??(typeof a=="string"?a:void 0),ve=te=>g?{role:te}:null,Ue=t.length+(u?1:0),Ye=te=>P(te.numeric&&"is-num",te.align&&`ok-table__cell--${te.align}`)||void 0,He=t.some(te=>te.hideBelow),et=v!=null?{"--ok-table-h":typeof v=="number"?`${v}px`:v}:void 0,Xe=n.jsxs("div",{ref:xe(y,$),className:P("ok-table",b&&"ok-table--scroll ok-scroll",g&&"ok-table--stack",E),"data-ready":x?void 0:"","data-responsive":He?"":void 0,style:et?{...et,...T}:T,...je?{role:"region",tabIndex:0,"aria-label":Me??S.table.label}:null,onScroll:It(C,x?void 0:we),...j,children:[n.jsxs("table",{ref:D,"aria-label":a==null?Me:void 0,...ve("table"),children:[a!=null&&n.jsx("caption",{className:"ok-table__caption",children:a}),n.jsx("thead",{...ve("rowgroup"),children:n.jsxs("tr",{...ve("row"),children:[u&&n.jsx("th",{className:"ok-table__select",scope:"col",...ve("columnheader"),children:n.jsxs("label",{className:"ok-check",children:[n.jsx("input",{ref:A,type:"checkbox",checked:oe,onChange:dt,disabled:re.length===0,"aria-label":S.table.selectAll}),n.jsx("span",{className:"ok-check__box",children:ws})]})}),t.map(te=>{const Q=B&&B.key===te.key?B.direction:null;return n.jsx("th",{scope:"col",className:Ye(te),"data-hide-below":te.hideBelow,style:te.width!=null?{width:te.width}:void 0,"aria-sort":te.sortable?Q==="asc"?"ascending":Q==="desc"?"descending":"none":void 0,...ve("columnheader"),children:te.sortable?n.jsxs("button",{type:"button",className:"ok-table__sort ok-focusable","data-dir":Q??void 0,onClick:()=>Pe(te.key),children:[te.header,n.jsx(he,{className:"ok-table__sort-icon",children:n.jsx("path",{d:"M10 15.500v-11M5.500 9L10 4.500 14.500 9"})})]}):te.header},te.key)})]})}),n.jsxs("tbody",{onPointerMove:x?void 0:ue,onPointerLeave:x?void 0:()=>V(null),...ve("rowgroup"),children:[H.length===0&&n.jsx("tr",{"data-empty":"",...ve("row"),children:n.jsx("td",{className:"ok-table__empty",colSpan:Ue,...ve("cell"),children:O})}),H.map(({row:te,index:Q},me)=>{const fe=re[me],ae=de.has(fe),be=t[0]?Ht(t[0],te):void 0,Re=m?m(te,Q):typeof be=="string"||typeof be=="number"?String(be):S.table.row(me+1),Ke=(w==null?void 0:w(te,Q))??null;return n.jsxs("tr",{"data-selected":u&&ae?"":void 0,"data-action":Ke?"":void 0,"aria-selected":u?ae:void 0,...ve("row"),children:[u&&n.jsx("td",{className:"ok-table__select","data-label":S.table.selectColumn,...ve("cell"),children:n.jsxs("label",{className:"ok-check",children:[n.jsx("input",{type:"checkbox",checked:ae,onChange:()=>Te(fe),"aria-label":S.table.selectRow(Re)}),n.jsx("span",{className:"ok-check__box",children:ws})]})}),t.map((ze,tt)=>{const kt=ze.render?ze.render(te,Q):Ht(ze,te);return n.jsxs("td",{className:P(Ye(ze),tt===0&&"ok-table__primary")||void 0,"data-label":$l(ze),"data-hide-below":ze.hideBelow,...ve("cell"),children:[tt===0&&Ke&&n.jsx("button",{type:"button",className:"ok-table__row-action ok-focusable","aria-label":Ke.label,onClick:Ke.onSelect}),g?n.jsx("span",{className:"ok-table__value",children:kt}):kt]},ze.key)})]},fe)})]})]}),u&&n.jsx("span",{className:"ok-sr",role:"status",id:`${L}-count`,children:G.length>0?S.table.selected(G.length):""})]});return q?n.jsxs("div",{className:"ok-table-paged",children:[Xe,Z>1&&n.jsx(Pr,{className:"ok-table__pagination",label:S.table.pagination(Me??S.table.label),count:Z,page:U,onChange:ce})]}):Xe}const Bl=l.forwardRef(Ol),Fl=l.forwardRef(function({items:e,value:s,defaultValue:r,onChange:a,activation:o="auto",label:i,keepMounted:c=!1,unmountInactive:d,className:u,...p},h){var C;const f=d??!c,m=l.useId(),[b,v]=le(s,r??((C=e.find(j=>!j.disabled))==null?void 0:C.value)??"",a),g=Math.max(0,e.findIndex(j=>j.value===b)),N=l.useRef(null),x=l.useRef(null),w=l.useRef([]),_=l.useRef([]),k=l.useRef(null),R=l.useRef(null),M=l.useRef(g),E=ke(()=>{const j=N.current,y=w.current[g];!j||!y||(j.style.setProperty("--x",y.offsetLeft+"px"),j.style.setProperty("--w",y.offsetWidth+"px"))});ge(()=>{const j=M.current;M.current=g,E();const y=N.current,S=w.current[j],O=w.current[g];if(j===g||!y||!S||!O)return;const L=g>j?1:-1,$=S.offsetLeft,D=S.offsetWidth,A=O.offsetLeft,B=O.offsetWidth,z=Math.min($,A),G=Math.max($+D,A+B);if(Ne(x.current,[{transform:`translateX(${$}px)`,width:D+"px"},{transform:`translateX(${z}px)`,width:G-z+"px",offset:.42},{transform:`translateX(${A}px)`,width:B+"px"}],{duration:420,easing:De.inOut}),y.scrollWidth>y.clientWidth&&typeof y.scrollTo=="function"){const q=Fe()===0?"auto":"smooth";A<y.scrollLeft?y.scrollTo({left:A-16,behavior:q}):A+B>y.scrollLeft+y.clientWidth&&y.scrollTo({left:A+B-y.clientWidth+16,behavior:q})}const W=_.current[j],J=_.current[g];if(W&&W!==J){W.dataset.leaving="";const q=()=>{delete W.dataset.leaving},ne=Ne(W,[{opacity:1,transform:"none"},{opacity:0,transform:`translateX(${-20*L}px)`}],{duration:150,easing:De.in});ne?ne.finished.then(q,q):q()}J&&Ne(J,[{opacity:0,transform:`translateX(${24*L}px)`},{opacity:1,transform:"none"}],{spring:"spring",delay:f?0:110});const X=k.current,I=R.current,F=(X==null?void 0:X.offsetHeight)??0;X&&I!==null&&Math.abs(F-I)>=1&&Ne(X,[{height:I+"px",overflow:"hidden"},{height:F+"px",overflow:"hidden"}],{spring:"soft"})},[g]),ge(()=>{var j;R.current=((j=k.current)==null?void 0:j.offsetHeight)??null}),l.useEffect(()=>{E();const j=N.current;if(!j||typeof ResizeObserver>"u")return;const y=new ResizeObserver(()=>E());return y.observe(j),w.current.forEach(S=>S&&y.observe(S)),()=>y.disconnect()},[e.length,E]);const T=j=>{var $;const y=e.map((D,A)=>D.disabled?-1:A).filter(D=>D>=0);if(!y.length)return;const S=w.current.findIndex(D=>D===document.activeElement),O=y.indexOf(S>=0?S:g);let L;if(j.key==="ArrowRight")L=y[(O+1)%y.length];else if(j.key==="ArrowLeft")L=y[(O-1+y.length)%y.length];else if(j.key==="Home")L=y[0];else if(j.key==="End")L=y[y.length-1];else return;j.preventDefault(),($=w.current[L])==null||$.focus(),o==="auto"&&v(e[L].value)};return n.jsxs("div",{ref:h,className:P("ok-tabs",u),...p,children:[n.jsxs("div",{ref:N,className:"ok-tabs__list",role:"tablist","aria-label":i,"aria-orientation":"horizontal",onKeyDown:T,children:[e.map((j,y)=>n.jsx("button",{ref:S=>{w.current[y]=S},type:"button",role:"tab",id:`${m}-tab-${y}`,className:"ok-tabs__tab ok-focusable","aria-selected":y===g,"aria-controls":f&&y!==g?void 0:`${m}-panel-${y}`,tabIndex:y===g?0:-1,disabled:j.disabled,onClick:()=>v(j.value),children:j.label},j.value)),n.jsx("span",{ref:x,className:"ok-tabs__ink","aria-hidden":"true"})]}),n.jsx("div",{ref:k,className:"ok-tabs__panels","data-keep-mounted":f?void 0:"",children:e.map((j,y)=>f&&y!==g?null:n.jsx("div",{ref:S=>{_.current[y]=S},role:"tabpanel",id:`${m}-panel-${y}`,"aria-labelledby":`${m}-tab-${y}`,className:"ok-tabs__panel","data-state":y===g?"active":"inactive",tabIndex:y===g?0:-1,children:j.content},j.value))})]})}),Hl=l.forwardRef(function({items:e,type:s="multiple",value:r,defaultValue:a,onChange:o,collapsible:i=!0,headingLevel:c=3,variant:d="group",className:u,...p},h){const f=l.useId(),[m,b]=le(r,a??[],o),v=l.useRef([]),g=`h${c}`,N=w=>{const _=m.includes(w);s==="single"?_?i&&b([]):b([w]):b(_?m.filter(k=>k!==w):[...m,w])},x=w=>{const _=v.current.filter(M=>!!M&&!M.disabled),k=_.indexOf(w.target);if(k<0)return;let R;if(w.key==="ArrowDown")R=(k+1)%_.length;else if(w.key==="ArrowUp")R=(k-1+_.length)%_.length;else if(w.key==="Home")R=0;else if(w.key==="End")R=_.length-1;else return;w.preventDefault(),_[R].focus()};return n.jsx("div",{ref:h,className:P("ok-accordion",d==="group"?"ok-group":"ok-accordion--plain",u),onKeyDown:x,...p,children:e.map((w,_)=>{const k=m.includes(w.value),R=s==="single"&&k&&!i;return n.jsxs("div",{className:"ok-accordion__item","data-state":k?"open":"closed",children:[n.jsx(g,{className:"ok-accordion__heading",children:n.jsxs("button",{ref:M=>{v.current[_]=M},type:"button",id:`${f}-head-${_}`,className:"ok-accordion__head ok-focusable","aria-expanded":k,"aria-controls":`${f}-body-${_}`,"aria-disabled":R||void 0,disabled:w.disabled,onClick:()=>N(w.value),children:[n.jsx("span",{className:"ok-accordion__title",children:w.title}),n.jsx(he,{name:"chevron-right"})]})}),n.jsx("div",{className:"ok-accordion__body",id:`${f}-body-${_}`,role:"region","aria-labelledby":`${f}-head-${_}`,children:n.jsx("div",{children:n.jsx("div",{className:"ok-accordion__content",children:w.content})})})]},w.value)})})}),zl=l.forwardRef(function({items:e,label:s,maxItems:r,separator:a,className:o,...i},c){const{messages:d}=pe(),u=s??d.breadcrumb.label,[p,h]=l.useState(!1),f=l.useRef(null),m=l.useRef(!1),b=e.length-1,v=e.length>2,g=r!=null&&e.length>r,N=n.jsx("span",{className:"ok-breadcrumb__sep","aria-hidden":"true",children:a??n.jsx(he,{name:"chevron-right"})});return ge(()=>{var x,w;!p||!m.current||(m.current=!1,(w=(x=f.current)==null?void 0:x.querySelector("[data-middle] a, [data-middle] button"))==null||w.focus())},[p]),n.jsx("nav",{ref:c,"aria-label":u,className:P("ok-breadcrumb",o),"data-collapse":!v||p?void 0:g?"always":"narrow",...i,children:n.jsx("ol",{ref:f,className:"ok-breadcrumb__list",children:e.map((x,w)=>{const k=w===b?n.jsx("span",{className:"ok-breadcrumb__current","aria-current":"page",children:x.label}):x.href!==void 0?n.jsx("a",{className:"ok-breadcrumb__link ok-focusable",href:x.href,onClick:x.onClick,children:x.label}):x.onClick?n.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable",onClick:x.onClick,children:x.label}):n.jsx("span",{className:"ok-breadcrumb__text",children:x.label});return[n.jsxs("li",{className:"ok-breadcrumb__item","data-middle":w>0&&w<b?"":void 0,children:[w>0&&N,k]},w),w===0&&v&&!p?n.jsxs("li",{className:"ok-breadcrumb__item ok-breadcrumb__more",children:[N,n.jsx("button",{type:"button",className:"ok-breadcrumb__link ok-focusable","aria-label":d.breadcrumb.expand(e.length-2),"aria-expanded":!1,onClick:()=>{m.current=!0,h(!0)},children:n.jsx(he,{name:"more"})})]},"more"):null]})})})}),ql=l.forwardRef(function({items:e,current:s=0,orientation:r="horizontal",status:a="default",label:o,className:i,...c},d){const{messages:u}=pe(),p=o??u.steps.label;return n.jsx("ol",{ref:d,"aria-label":p,className:P("ok-steps",i),"data-orientation":r,...c,children:e.map((h,f)=>{const m=f<s?"complete":f===s?"current":"upcoming",b=m==="current"&&a==="error";return n.jsxs("li",{className:"ok-steps__item","data-state":m,"data-error":b?"":void 0,"aria-current":m==="current"?"step":void 0,children:[n.jsx("span",{className:"ok-steps__marker","aria-hidden":"true",children:m==="complete"?n.jsx(he,{name:"check"}):b?n.jsx(he,{name:"x"}):h.icon??f+1}),n.jsxs("span",{className:"ok-steps__text",children:[n.jsxs("span",{className:"ok-steps__title",children:[n.jsx("span",{className:"ok-sr",children:u.steps.prefix(f+1,b?u.steps.error:u.steps.state[m])}),h.title]}),h.description!=null&&n.jsx("span",{className:"ok-steps__desc",children:h.description})]})]},f)})})}),Vl=l.forwardRef(function({items:e,className:s,...r},a){return n.jsx("ol",{ref:a,className:P("ok-timeline",s),...r,children:e.map((o,i)=>n.jsxs("li",{className:"ok-timeline__item","data-tone":o.tone??"neutral",children:[n.jsx("span",{className:"ok-timeline__marker","data-icon":o.icon!=null?"":void 0,"aria-hidden":"true",children:o.icon}),n.jsxs("div",{className:"ok-timeline__content",children:[n.jsxs("div",{className:"ok-timeline__head",children:[n.jsx("span",{className:"ok-timeline__title",children:o.title}),o.time!=null&&n.jsx("time",{className:"ok-timeline__time",dateTime:o.dateTime,children:o.time})]}),o.description!=null&&n.jsx("div",{className:"ok-timeline__desc",children:o.description})]})]},o.key??i))})}),Gl=l.forwardRef(function({items:e,expanded:s,defaultExpanded:r,onExpandedChange:a,selected:o,defaultSelected:i=null,onSelect:c,label:d,className:u,...p},h){var y;const[f,m]=le(s,r??[],a),[b,v]=le(o,i,c),[g,N]=l.useState(b),x=l.useRef(new Map),w=new Set(f),_=[],k=(S,O,L)=>S.forEach($=>{var D;_.push({node:$,level:O,parent:L}),(D=$.children)!=null&&D.length&&w.has($.id)&&k($.children,O+1,$.id)});k(e,1,null);const R=_.filter(S=>!S.node.disabled),M=R.some(S=>S.node.id===g)?g:((y=R[0])==null?void 0:y.node.id)??null,E=S=>{var O;S!=null&&(N(S),(O=x.current.get(S))==null||O.focus())},T=(S,O)=>m(O?[...f.filter(L=>L!==S),S]:f.filter(L=>L!==S)),C=S=>{var z,G,W,J;const O=S.target;if(O.getAttribute("role")!=="treeitem")return;const L=R.findIndex(X=>X.node.id===O.dataset.id);if(L<0)return;const{node:$,parent:D}=R[L],A=!!((z=$.children)!=null&&z.length);let B=!0;switch(S.key){case"ArrowDown":E((G=R[L+1])==null?void 0:G.node.id);break;case"ArrowUp":E((W=R[L-1])==null?void 0:W.node.id);break;case"Home":E(R[0].node.id);break;case"End":E(R[R.length-1].node.id);break;case"ArrowRight":A&&!w.has($.id)?T($.id,!0):A&&E((J=$.children.find(X=>!X.disabled))==null?void 0:J.id);break;case"ArrowLeft":A&&w.has($.id)?T($.id,!1):D&&E(D);break;case"Enter":case" ":v($.id),A&&T($.id,!w.has($.id));break;default:B=!1}B&&S.preventDefault()},j=(S,O)=>S.map((L,$)=>{var B;const D=!!((B=L.children)!=null&&B.length),A=D&&w.has(L.id);return n.jsxs("li",{ref:z=>{z?x.current.set(L.id,z):x.current.delete(L.id)},role:"treeitem","data-id":L.id,className:"ok-tree__item","aria-level":O,"aria-setsize":S.length,"aria-posinset":$+1,"aria-expanded":D?A:void 0,"aria-selected":b===L.id,"aria-disabled":L.disabled||void 0,tabIndex:M===L.id?0:-1,onFocus:z=>{z.target===z.currentTarget&&N(L.id)},children:[n.jsxs("div",{className:"ok-tree__row",onClick:()=>{L.disabled||(N(L.id),v(L.id),D&&T(L.id,!A))},children:[n.jsx("span",{className:"ok-tree__chev","aria-hidden":"true",children:D&&n.jsx(he,{name:"chevron-right"})}),L.icon!=null&&n.jsx("span",{className:"ok-tree__icon","aria-hidden":"true",children:L.icon}),n.jsx("span",{className:"ok-tree__label",children:L.label})]}),A&&n.jsx("ul",{role:"group",className:"ok-tree__group",children:j(L.children,O+1)})]},L.id)});return n.jsx("ul",{ref:h,role:"tree","aria-label":d,className:P("ok-tree",u),onKeyDown:C,...p,children:j(e,1)})}),Wl=l.forwardRef(function({tone:e="neutral",variant:s="soft",dot:r,ping:a,className:o,children:i,...c},d){return n.jsxs("span",{ref:d,className:P("ok-badge",e!=="neutral"&&`ok-badge--${e}`,s==="solid"&&"ok-badge--solid",s==="ink"&&"ok-badge--ink",o),...c,children:[(r||a)&&n.jsx("span",{className:P("ok-dot",a&&"ok-dot--live"),"aria-hidden":"true"}),i]})}),Ul=l.forwardRef(function({tone:e="neutral",size:s="md",icon:r,onRemove:a,removeLabel:o,className:i,children:c,...d},u){const{messages:p}=pe(),h=typeof c=="string"||typeof c=="number"?String(c):"";return n.jsxs("span",{ref:u,className:P("ok-tag",s==="sm"&&"ok-tag--sm",i),"data-tone":e,...d,children:[r!=null&&n.jsx("span",{className:"ok-tag__icon","aria-hidden":"true",children:r}),n.jsx("span",{className:"ok-tag__label",children:c}),a&&n.jsx("button",{type:"button",className:"ok-tag__remove ok-focusable","aria-label":o??p.tag.remove(h),onClick:a,children:n.jsx(he,{name:"x"})})]})}),an=l.forwardRef(function({value:e,direction:s="auto",className:r,...a},o){const i=l.useRef(null),c=l.useRef(null),d=l.useRef(e);return ge(()=>{const u=d.current;if(u===e)return;d.current=e;const p=i.current,h=c.current;if(!p||!h)return;const f=s==="auto"?Number(e)<Number(u)?-1:1:s,m=document.createElement("span");m.textContent=String(u),m.setAttribute("aria-hidden","true"),p.insertBefore(m,h);const b=()=>m.remove(),v=Ne(m,[{transform:"translateY(0)",opacity:1},{transform:`translateY(${-f*80}%)`,opacity:0}],{duration:150,easing:De.in,fill:"forwards"});v?v.finished.then(b,b):b(),Ne(h,[{transform:`translateY(${f*80}%)`,opacity:0},{transform:"translateY(0)",opacity:1}],{spring:"spring"})},[e,s]),n.jsx("span",{ref:xe(o,i),className:P("ok-roll",r),...a,children:n.jsx("span",{ref:c,children:e})})}),Yl=l.forwardRef(function({value:e,max:s=99,showZero:r,tone:a="accent",label:o,className:i,...c},d){const u=l.useRef(null),p=l.useRef(e);if(ge(()=>{p.current!==e&&(p.current=e,Ne(u.current,[{transform:"scale(1)"},{transform:"scale(1.35)",offset:.3},{transform:"scale(1)"}],{duration:Cn.bouncy.duration,easing:De.out}))},[e]),e===0&&!r)return null;const h=e>s?`${s}+`:String(e);return n.jsxs("span",{ref:xe(d,u),className:P("ok-count",i),"data-tone":a==="accent"?void 0:a,...c,children:[n.jsx(an,{value:h,direction:e>=p.current?1:-1,"aria-hidden":o?!0:void 0}),o&&n.jsx("span",{className:"ok-sr",children:o})]})}),Xl={neutral:"info",accent:"sparkle",info:"info",success:"check",warning:"alert",danger:"alert"},Kl=l.forwardRef(function({tone:e="accent",title:s,icon:r,action:a,closable:o,open:i,defaultOpen:c=!0,onOpenChange:d,onClose:u,closeLabel:p,className:h,children:f,...m},b){const{messages:v}=pe(),g=p??v.common.close,[N,x]=le(i,c,d),{mounted:w,ref:_}=Pt(N,700);if(!w)return null;const k=n.jsxs("div",{ref:b,role:e==="warning"||e==="danger"?"alert":"status",className:P("ok-alert",e!=="accent"&&`ok-alert--${e}`,h),...m,children:[r!==!1&&(r??n.jsx(he,{name:Xl[e]})),n.jsxs("div",{className:"ok-alert__body",children:[s!=null&&n.jsx("b",{className:"ok-alert__title",children:s}),f]}),a!=null&&n.jsx("div",{className:"ok-alert__action",children:a}),o&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-alert__close","aria-label":g,onClick:()=>{u==null||u(),x(!1)},children:n.jsx(he,{name:"x"})})]});return n.jsx("div",{ref:_,className:"ok-collapse ok-alert-wrap","data-state":N?"open":"closed",children:k})}),Zl=l.forwardRef(function({value:e,max:s=100,label:r,tone:a="accent",size:o="md",noDoneState:i,className:c,style:d,...u},p){const h=e!=null,f=h?ye(e/(s||1),0,1):0;return n.jsx("div",{ref:p,role:"progressbar","aria-label":r,"aria-valuemin":h?0:void 0,"aria-valuemax":h?s:void 0,"aria-valuenow":h?ye(e,0,s):void 0,className:P("ok-progress",!h&&"ok-progress--indeterminate",o!=="md"&&`ok-progress--${o}`,c),"data-tone":a==="accent"?void 0:a,"data-done":h&&f>=1&&!i?"":void 0,style:{"--v":f,...d},...u,children:n.jsx("div",{className:"ok-progress__bar"})})}),Jl={sm:40,md:64,lg:96},Ql=l.forwardRef(function({value:e=0,max:s=100,label:r,size:a="md",thickness:o=6,showValue:i,noDoneState:c,className:d,style:u,children:p,...h},f){const m=ye(e/(s||1),0,1),b=typeof a=="number"?a:Jl[a],v=i??b>=56;return n.jsxs("div",{ref:f,role:"progressbar","aria-label":r,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":ye(e,0,s),className:P("ok-ring",d),"data-done":m>=1&&!c?"":void 0,style:{"--v":m,"--size":`${b}px`,...u},...h,children:[n.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",style:{strokeWidth:o},children:[n.jsx("circle",{className:"ok-ring__track",cx:"18",cy:"18",r:"15"}),n.jsx("circle",{className:"ok-ring__bar",cx:"18",cy:"18",r:"15",pathLength:100})]}),p!=null?n.jsx("span",{className:"ok-ring__label",children:p}):v?n.jsx(an,{className:"ok-ring__label",value:Math.round(m*100),"aria-hidden":"true"}):null]})}),ei=l.forwardRef(function({value:e,min:s=0,max:r=100,segments:a=10,label:o,valueText:i,tone:c,warnAt:d,dangerAt:u,size:p="md",className:h,...f},m){const b=Math.max(1,Math.floor(a)),v=ye(e,s,r),g=Math.round((v-s)/(r-s||1)*b);return n.jsx("div",{ref:m,role:"meter","aria-label":o,"aria-valuemin":s,"aria-valuemax":r,"aria-valuenow":v,"aria-valuetext":i,className:P("ok-level",p!=="md"&&`ok-level--${p}`,h),"data-tone":c,...f,children:Array.from({length:b},(N,x)=>{const w=s+(r-s)*x/b,_=u!=null&&w>=u?"danger":d!=null&&w>=d?"warning":void 0;return n.jsx("i",{className:"ok-level__seg","data-on":x<g?"":void 0,"data-zone":_},x)})})}),pt=t=>typeof t=="number"?`${t}px`:t,ti=l.forwardRef(function({variant:e="text",width:s,height:r,lines:a=1,className:o,style:i,...c},d){const u=P("ok-skel",e==="circle"&&"ok-skel--circle",e==="rect"&&"ok-skel--rect");if(e==="text"&&a>1)return n.jsx("span",{ref:d,"aria-hidden":"true",className:P("ok-skel-lines",o),style:{width:pt(s),...i},...c,children:Array.from({length:a},(h,f)=>n.jsx("span",{className:u,style:{height:pt(r),width:f===a-1?"70%":void 0}},f))});const p=e==="circle"?{width:pt(s??r),height:pt(r??s)}:{width:pt(s),height:pt(r)};return n.jsx("span",{ref:d,"aria-hidden":"true",className:P(u,o),style:{...p,...i},...c})}),ni={sm:20,md:28,lg:40},si=l.forwardRef(function({variant:e="tail",size:s="md",label:r,className:a,style:o,...i},c){const{messages:d}=pe(),u=r??d.common.loading,p=typeof s=="number"?s:ni[s];return n.jsxs("span",{ref:c,role:"status",className:P("ok-loader",a),style:{"--size":`${p}px`,...o},...i,children:[e==="tail"?n.jsx(Ln,{className:"ok-tail"}):n.jsx("span",{className:"ok-spinner","aria-hidden":"true"}),n.jsx("span",{className:"ok-sr",children:u})]})}),ri=l.forwardRef(function({label:e,className:s,...r},a){const{messages:o}=pe(),i=e??o.common.loading;return n.jsxs("span",{ref:a,role:"status",className:P("ok-dots",s),...r,children:[n.jsx("i",{"aria-hidden":"true"}),n.jsx("i",{"aria-hidden":"true"}),n.jsx("i",{"aria-hidden":"true"}),n.jsx("span",{className:"ok-sr",children:i})]})}),ai=l.forwardRef(function({icon:e,title:s,description:r,actions:a,titleAs:o="h3",size:i="md",className:c,children:d,...u},p){return n.jsxs("div",{ref:p,className:P("ok-empty",i!=="md"&&`ok-empty--${i}`,c),...u,children:[e!=null&&n.jsx("div",{className:"ok-empty__media","aria-hidden":"true",children:e}),n.jsx(o,{className:"ok-empty__title",children:s}),r!=null&&n.jsx("p",{className:"ok-empty__desc",children:r}),d,a!=null&&n.jsx("div",{className:"ok-empty__actions",children:a})]})}),oi=l.forwardRef(function({label:e,value:s,delta:r,trend:a,positive:o="up",hint:i,icon:c,variant:d="card",className:u,...p},h){const f=pe().messages.stat.trend,m=a??(r!=null?"flat":void 0),b=!m||m==="flat"?"neutral":m===o?"good":"bad";return n.jsxs("div",{ref:h,className:P("ok-stat",d==="card"&&"ok-card",u),...p,children:[n.jsxs("div",{className:"ok-stat__label",children:[c!=null&&n.jsx("span",{className:"ok-stat__icon","aria-hidden":"true",children:c}),n.jsx("span",{children:e})]}),n.jsx("div",{className:"ok-stat__value",children:s}),(m||i!=null)&&n.jsxs("div",{className:"ok-stat__foot",children:[m&&n.jsxs("span",{className:"ok-stat__delta","data-trend":m,"data-mood":b,children:[n.jsx(he,{children:m==="flat"?n.jsx("path",{d:"M4.500 10h11"}):n.jsx("path",{d:m==="up"?"M10 15.500v-11M5.500 9L10 4.500 14.500 9":"M10 4.500v11M5.500 11l4.500 4.500 4.500-4.500"})}),n.jsx("span",{className:"ok-sr",children:f[m]}),r]}),i!=null&&n.jsx("span",{className:"ok-stat__hint",children:i})]})]})}),li={sm:28,md:36,lg:48},Ns=["#FF8FA9","#FFBE3B","#4CD787","#D9A6FF","#7FB0FF","#FF9A5C"];function Lr(t){const e=t.trim();if(!e)return"";const s=Array.from(e)[0];if(/[⺀-鿿가-豈-]/.test(s))return s;const r=e.split(/[\s._-]+/).filter(Boolean),a=Array.from(r[0])[0]??"",o=r.length>1?Array.from(r[r.length-1])[0]:"";return(a+o).toUpperCase()}const $r=l.createContext(void 0),Kn=l.forwardRef(function({src:e,name:s,alt:r,size:a,color:o,status:i,statusLabel:c,decorative:d,className:u,style:p,children:h,...f},m){const b=l.useContext($r),v=a??b??"md",g=typeof v=="number"?v:li[v],[N,x]=l.useState(!1);l.useEffect(()=>{x(!1)},[e]);const{messages:w}=pe(),k=[r??s,i?c??w.avatar.status[i]:void 0].filter(Boolean).join(w.common.separator);let R=o;if(o==="auto"){let E=0;for(const T of s??"")E=E*31+(T.codePointAt(0)??0)>>>0;R=Ns[E%Ns.length]}const M={"--size":`${g}px`,...R?{"--c":R}:null};return n.jsxs("span",{ref:m,className:P("ok-avatar",u),style:{...M,...p},...k&&!d?{role:"img","aria-label":k}:{"aria-hidden":!0},...f,children:[n.jsx("span",{className:"ok-avatar__fallback","aria-hidden":"true",children:h??(s?Lr(s):n.jsxs(he,{children:[n.jsx("circle",{cx:"10",cy:"7.500",r:"3"}),n.jsx("path",{d:"M4 16.500c.8-2.800 3.100-4.300 6-4.300s5.200 1.500 6 4.300"})]}))}),e&&!N&&n.jsx("img",{className:"ok-avatar__img",src:e,alt:"",onError:()=>x(!0),draggable:!1}),i&&n.jsx("span",{className:"ok-avatar__status","data-status":i,"aria-hidden":"true"})]})});function ii({extra:t,members:e,label:s,total:r}){const{messages:a}=pe(),[o,i]=l.useState(!1),c=l.useRef(null),d=l.useRef(null),u=l.useRef(),p=l.useId();tn({open:o,anchorRef:c,floatingRef:d,placement:"bottom",offset:8}),Lt(o,()=>i(!1)),l.useEffect(()=>()=>clearTimeout(u.current),[]);const h=x=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!0),x)},f=()=>{clearTimeout(u.current),u.current=setTimeout(()=>i(!1),160)},[m,b]=l.useState("closed"),[v,g]=l.useState(!1);l.useEffect(()=>{if(o){g(!0);const w=requestAnimationFrame(()=>requestAnimationFrame(()=>b("open")));return()=>cancelAnimationFrame(w)}b("closed");const x=setTimeout(()=>g(!1),200*Fe());return()=>clearTimeout(x)},[o]);const N=e.map(x=>x.props.name||x.props.alt).filter(Boolean);return n.jsxs(n.Fragment,{children:[n.jsx("button",{ref:c,type:"button",className:"ok-avatars__more ok-focusable","aria-expanded":o,"aria-controls":v?p:void 0,"aria-label":a.avatar.moreButton(t,s),onPointerEnter:x=>{x.pointerType!=="touch"&&h(120)},onPointerLeave:f,onFocus:()=>h(0),onBlur:f,onClick:()=>i(x=>!x),children:n.jsxs(Kn,{className:"ok-avatar--more",decorative:!0,children:["+",t]})}),v&&n.jsx(it,{children:n.jsxs("div",{ref:d,id:p,className:"ok-popup ok-popup--surface ok-avatars__panel","data-state":m,role:"group","aria-label":a.avatar.panel(r,s),onPointerEnter:()=>clearTimeout(u.current),onPointerLeave:f,children:[n.jsx("ul",{className:"ok-avatars__list ok-scroll",children:e.map((x,w)=>n.jsxs("li",{className:"ok-avatars__item",children:[l.cloneElement(x,{size:"sm",decorative:!0}),n.jsx("span",{className:"ok-avatars__name",children:x.props.name||x.props.alt})]},x.key??w))}),r>N.length&&n.jsx("p",{className:"ok-avatars__rest",children:a.avatar.rest(r-N.length)})]})})]})}const ci=l.forwardRef(function({max:e,total:s,size:r,label:a,overflowList:o=!0,className:i,children:c,...d},u){const{messages:p}=pe(),h=l.Children.toArray(c),f=e!=null&&h.length>e?h.slice(0,e):h,m=Math.max(0,(s??h.length)-f.length),b=h.filter(g=>l.isValidElement(g)),v=o&&b.some(g=>g.props.name||g.props.alt);return n.jsx("div",{ref:u,role:"group","aria-label":a,className:P("ok-avatars",i),...d,children:n.jsxs($r.Provider,{value:r,children:[f,m>0&&(v?n.jsx(ii,{extra:m,members:b,label:a,total:s??h.length}):n.jsxs(Kn,{className:"ok-avatar--more",alt:p.avatar.more(m),children:["+",m]}))]})})});function Dr(t,e,s={}){if(typeof document>"u"||Fe()===0)return;const r=s.count??12,a=getComputedStyle(s.source??document.documentElement),o=s.colors??[a.getPropertyValue("--ok-accent").trim()||"#FF6B8E",a.getPropertyValue("--ok-accent-tint-2").trim()||"#FFC4D2",a.getPropertyValue("--ok-text").trim()||"#1B1C22"];for(let i=0;i<r;i++){const c=document.createElement("i");c.className="ok-particle",c.setAttribute("aria-hidden","true");const d=4+Math.random()*6,u=i/r*Math.PI*2+(Math.random()-.5)*.5,p=(s.distance??46)*(.6+Math.random()*.7);c.style.cssText=`width:${d}px;height:${d}px;margin:${-d/2}px 0 0 ${-d/2}px;background:${o[i%o.length]}`,document.body.appendChild(c);const h=Math.cos(u)*p,f=Math.sin(u)*p,m=()=>c.remove(),b=Ne(c,[{transform:`translate(${t}px,${e}px) scale(0)`,opacity:1},{transform:`translate(${t+h*.8}px,${e+f*.8}px) scale(1)`,opacity:1,offset:.4},{transform:`translate(${t+h}px,${e+f+14}px) scale(0)`,opacity:0}],{duration:620+Math.random()*260,easing:De.out,fill:"forwards"});b?b.finished.then(m,m):m()}}const di=n.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[n.jsx("ellipse",{cx:"12",cy:"12",rx:"8.5",ry:"6.5"}),n.jsx("ellipse",{className:"nostril",cx:"9",cy:"12",rx:"1.2",ry:"1.9"}),n.jsx("ellipse",{className:"nostril",cx:"15",cy:"12",rx:"1.2",ry:"1.9"})]}),ui=l.forwardRef(function({pressed:e,defaultPressed:s=!1,onChange:r,count:a,label:o,icon:i,noBurst:c,className:d,onClick:u,children:p,...h},f){const{messages:m}=pe(),b=o??m.reaction.label,[v,g]=le(e,s,r),N=l.useRef(null),x=w=>{var k,R;const _=!v;if(g(_),_&&!c){const M=(R=(k=N.current)==null?void 0:k.querySelector(".ok-react__icon"))==null?void 0:R.getBoundingClientRect();M&&Dr(M.left+M.width/2,M.top+M.height/2,{source:N.current??void 0})}};return n.jsxs("button",{ref:xe(f,N),type:"button",className:P("ok-react ok-focusable",d),"aria-pressed":v,"data-icon-only":a==null&&p==null?"":void 0,onClick:It(u,x),...h,children:[n.jsx("span",{className:"ok-react__icon",children:i??di}),n.jsx("span",{className:"ok-sr",children:b}),p,a!=null&&n.jsx(an,{className:"ok-react__count",value:a+(v?1:0)})]})}),fi=l.forwardRef(function({className:e,...s},r){return n.jsx("code",{ref:r,className:P("ok-code",e),...s})});async function pi(t){var r;if((r=navigator.clipboard)!=null&&r.writeText)return navigator.clipboard.writeText(t);const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly",""),e.style.cssText="position:fixed;left:-9999px;top:0;opacity:0",document.body.appendChild(e),e.select();const s=document.execCommand("copy");if(e.remove(),!s)throw new Error("copy failed")}const hi=l.forwardRef(function({code:e,children:s,language:r,title:a,copyable:o=!0,wrap:i,maxHeight:c,label:d,onCopy:u,className:p,...h},f){const{messages:m}=pe(),b=e??s??"",[v,g]=l.useState("idle"),N=l.useRef();l.useEffect(()=>()=>clearTimeout(N.current),[]);const x=async()=>{let k="copied";try{await pi(b),u==null||u(b)}catch{k="failed"}g(k),clearTimeout(N.current),N.current=setTimeout(()=>g("idle"),2e3)},w=a!=null||!!r,_=d??(typeof a=="string"?a:void 0)??r??m.code.label;return n.jsxs("div",{ref:f,className:P("ok-codeblock",p),"data-head":w?"":void 0,...h,children:[(w||o)&&n.jsxs("div",{className:"ok-codeblock__head",children:[a!=null&&n.jsx("span",{className:"ok-codeblock__title",children:a}),r&&n.jsx("span",{className:"ok-codeblock__lang",children:r}),o&&n.jsx("button",{type:"button",className:"ok-btn ok-btn--sm ok-btn--ghost ok-btn--icon ok-focusable ok-codeblock__copy","aria-label":m.code.copy,"data-state":v,onClick:x,children:n.jsx(he,{name:v==="copied"?"check":v==="failed"?"x":"copy"})})]}),n.jsx("pre",{className:"ok-codeblock__pre ok-scroll",tabIndex:0,role:"group","aria-label":_,"data-wrap":i?"":void 0,style:c!=null?{maxHeight:typeof c=="number"?`${c}px`:c}:void 0,children:n.jsx("code",{className:r?`language-${r}`:void 0,children:b})}),n.jsx("span",{className:"ok-sr",role:"status","aria-live":"polite",children:v==="copied"?m.code.copied:v==="failed"?m.code.copyFailed:""})]})}),Or=t=>{const e=t!=null&&t!==l.Fragment;return{Tag:e?t:"div",box:e}},mi=l.forwardRef(function({as:e,above:s,below:r,className:a,...o},i){const{Tag:c,box:d}=Or(e);return n.jsx(c,{ref:i,className:P("ok-show",a),"data-box":d?"":void 0,"data-ok-hide-below":s,"data-ok-hide-above":r,...o})}),bi=l.forwardRef(function({as:e,above:s,below:r,className:a,...o},i){const{Tag:c,box:d}=Or(e);return n.jsx(c,{ref:i,className:P("ok-show",a),"data-box":d?"":void 0,"data-ok-hide-below":r,"data-ok-hide-above":s,...o})}),vi=["base","sm","md","lg","xl"];function gi(t){return typeof t=="object"&&t!==null}const We=t=>t===0?"0px":`var(--ok-s-${t})`,xi=t=>t*4,ki={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},yi={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"},_i=t=>ki[t],ji=t=>yi[t];function Le(t,e,s){const r={};if(e==null)return r;const a=`--ok-l-${t}`;if(!gi(e))return r[a]=String(s(e)),r;let o;for(const i of vi){const c=e[i];c!==void 0&&(o=String(s(c))),o!==void 0&&(r[i==="base"?a:`${a}-${i}`]=o)}return r}function Qe(t,e){return{...Le("gap",t.gap,We),...Le("rgap",t.rowGap,We),...Le("p",t.padding,We),...Le("px",t.paddingX,We),...Le("py",t.paddingY,We),...Le("align",t.align,_i),...Le("justify",t.justify,ji),...e}}const $t=t=>t.padding!==void 0||t.paddingX!==void 0||t.paddingY!==void 0?"":void 0,wi=l.forwardRef(function({as:e,padding:s,paddingX:r,paddingY:a,radius:o,surface:i,border:c,highlight:d,className:u,style:p,...h},f){const m=e??"div",b={};return o!==void 0&&(b["--ok-box-r"]=o===0?"0px":`var(--ok-r-${o})`),i&&(b["--ok-box-bg"]=`var(--ok-${i})`),n.jsx(m,{ref:f,className:P("ok-l ok-box",u),"data-pad":$t({padding:s,paddingX:r,paddingY:a}),"data-radius":o,"data-surface":i,"data-border":c?c==="strong"?"strong":"line":void 0,"data-highlight":d?"":void 0,style:Qe({padding:s,paddingX:r,paddingY:a},{...b,...p}),...h})}),Br=l.forwardRef(function({orientation:e="horizontal",labelAlign:s="center",decorative:r,className:a,children:o,...i},c){const d=o!=null&&o!==!1&&e==="horizontal";return n.jsx("div",{ref:c,role:r?"none":"separator","aria-orientation":!r&&e==="vertical"?"vertical":void 0,"aria-label":!r&&d&&typeof o=="string"?o:void 0,className:P("ok-divider",d&&"ok-divider--label",a),"data-orientation":e,"data-label-align":d?s:void 0,...i,children:d?n.jsx("span",{className:"ok-divider__label",children:o}):null})}),Ni=l.forwardRef(function({as:e,gap:s,align:r,justify:a,divider:o,padding:i,paddingX:c,paddingY:d,className:u,style:p,children:h,...f},m){const b=e??"div";let v=h;return o&&(v=l.Children.toArray(h).filter(N=>N!=null&&typeof N!="boolean").map((N,x)=>n.jsxs(l.Fragment,{children:[x>0&&(o===!0?n.jsx(Br,{}):o),N]},l.isValidElement(N)&&N.key!=null?N.key:x))),n.jsx(b,{ref:m,className:P("ok-l ok-stack",u),"data-pad":$t({padding:i,paddingX:c,paddingY:d}),style:Qe({gap:s,align:r,justify:a,padding:i,paddingX:c,paddingY:d},p),...f,children:v})}),Fr=l.forwardRef(function({as:e,gap:s,rowGap:r,align:a,justify:o,wrap:i=!0,padding:c,paddingX:d,paddingY:u,className:p,style:h,...f},m){const b=e??"div";return n.jsx(b,{ref:m,className:P("ok-l ok-inline",p),"data-nowrap":i?void 0:"","data-pad":$t({padding:c,paddingX:d,paddingY:u}),style:Qe({gap:s,rowGap:r,align:a,justify:o,padding:c,paddingX:d,paddingY:u},h),...f})}),Ri=Fr,Mi={start:"start",center:"center",end:"end",stretch:"stretch"},Si={start:"start",center:"center",end:"end",stretch:"stretch",baseline:"baseline"},Ci=l.forwardRef(function({as:e,columns:s,minItemWidth:r,gap:a,rowGap:o,align:i,justify:c,padding:d,paddingX:u,paddingY:p,className:h,style:f,...m},b){const v=e??"div",g=r!==void 0,N={...Le("cols",g?void 0:s,x=>Math.max(1,Math.round(x))),...Le("align",i,x=>Si[x]),...Le("justify",c,x=>Mi[x]),...g?{"--ok-grid-min":typeof r=="number"?`${r}px`:r}:null};return n.jsx(v,{ref:b,className:P("ok-l ok-grid",h),"data-auto":g?"":void 0,"data-pad":$t({padding:d,paddingX:u,paddingY:p}),style:Qe({gap:a,rowGap:o,padding:d,paddingX:u,paddingY:p},{...N,...f}),...m})}),Ei=l.forwardRef(function({as:e,span:s,rowSpan:r,className:a,style:o,...i},c){const d=e??"div",u=Le("span",s,p=>p==="full"?"1 / -1":`span ${Math.max(1,Math.round(p))}`);return n.jsx(d,{ref:c,className:P("ok-l ok-grid__item",a),style:{...u,...r?{gridRow:`span ${r}`}:null,...o},...i})}),Ai=l.forwardRef(function({as:e,size:s="lg",gutter:r=!0,center:a=!0,className:o,...i},c){const d=e??"div";return n.jsx(d,{ref:c,className:P("ok-container",o),"data-size":s,"data-gutter":r?void 0:"false","data-center":a?void 0:"false",...i})}),Ti=l.forwardRef(function({as:e,axis:s="both",inline:r,padding:a,paddingX:o,paddingY:i,className:c,style:d,...u},p){const h=e??"div";return n.jsx(h,{ref:p,className:P("ok-l ok-center",c),"data-axis":s,"data-inline":r?"":void 0,"data-pad":$t({padding:a,paddingX:o,paddingY:i}),style:Qe({padding:a,paddingX:o,paddingY:i},d),...u})}),Ii=l.forwardRef(function({size:e,className:s,style:r,...a},o){return n.jsx("div",{ref:o,"aria-hidden":"true",className:P("ok-spacer",s),style:e!==void 0?{flex:`0 0 ${We(e)}`,...r}:r,...a})}),Pi=l.forwardRef(function({ratio:e=16/9,className:s,style:r,...a},o){return n.jsx("div",{ref:o,className:P("ok-aspect",s),style:{aspectRatio:String(e),...r},...a})}),Li=l.forwardRef(function({as:e,edge:s="top",offset:r=0,className:a,style:o,...i},c){const d=e??"div";return n.jsx(d,{ref:c,className:P("ok-sticky",a),"data-edge":s,style:{[s]:typeof r=="number"?We(r):r,...o},...i})}),$i=l.forwardRef(function({direction:e="vertical",label:s,focusable:r=!0,className:a,role:o,tabIndex:i,...c},d){const u=!!(s??c["aria-label"]??c["aria-labelledby"]);return n.jsx("div",{ref:d,role:o??(u?"region":"group"),"aria-label":s,tabIndex:i??(r?0:void 0),className:P("ok-scroll ok-scroll-area",a),"data-direction":e,...c})}),Di=l.forwardRef(function({as:e,size:s="lg",gap:r,padded:a=!0,className:o,style:i,...c},d){const u=e??"div";return n.jsx(u,{ref:d,className:P("ok-l ok-container ok-page",o),"data-size":s,"data-padded":a?void 0:"false",style:Qe({gap:r},i),...c})}),Oi=l.forwardRef(function({title:e,description:s,breadcrumb:r,actions:a,headingLevel:o=1,titleId:i,className:c,children:d,...u},p){const h=`h${o}`;return n.jsxs("header",{ref:p,className:P("ok-page-header",c),...u,children:[r?n.jsx("div",{className:"ok-page-header__breadcrumb",children:r}):null,n.jsxs("div",{className:"ok-page-header__row",children:[n.jsxs("div",{className:"ok-page-header__text",children:[n.jsx(h,{id:i,className:"ok-page-header__title",children:e}),s?n.jsx("p",{className:"ok-page-header__desc",children:s}):null]}),a?n.jsx("div",{className:"ok-page-header__actions",children:a}):null]}),d]})}),Bi=l.forwardRef(function({title:e,description:s,actions:r,headingLevel:a=2,gap:o,className:i,style:c,children:d,...u},p){const h=l.useId(),f=`h${a}`,m=e!=null&&e!==!1,b=u["aria-labelledby"]??(m&&!u["aria-label"]?h:void 0);return n.jsxs("section",{ref:p,className:P("ok-l ok-section",i),style:Qe({gap:o},c),...u,"aria-labelledby":b,children:[m||r?n.jsxs("div",{className:"ok-section__head",children:[n.jsxs("div",{className:"ok-section__text",children:[m?n.jsx(f,{id:h,className:"ok-section__title",children:e}):null,s?n.jsx("p",{className:"ok-section__desc",children:s}):null]}),r?n.jsx("div",{className:"ok-section__actions",children:r}):null]}):null,d]})}),Fi='a[href], button, input:not([type="hidden"]), select, textarea, [tabindex]';function gn(t){return Array.from(t.querySelectorAll(Fi)).filter(e=>!e.disabled&&e.getAttribute("aria-hidden")!=="true"&&!e.closest("[hidden], [inert]"))}function Hi(t){const e=t;if(!e||!e.tagName)return!1;if(e.isContentEditable||e.tagName==="TEXTAREA"||e.tagName==="SELECT")return!0;if(e.tagName!=="INPUT")return!1;const s=e.type;return!["button","checkbox","radio","submit","reset","image","file","color"].includes(s)}function Hr(t,e,s,r,a=!0){if(s===0)return null;const o=r==="horizontal"?"ArrowLeft":"ArrowUp",i=r==="horizontal"?"ArrowRight":"ArrowDown";return t==="Home"?0:t==="End"?s-1:t===i?e+1<s?e+1:a?0:e:t===o?e>0?e-1:a?s-1:e:null}const zi=l.forwardRef(function({orientation:e="horizontal",gap:s,loop:r=!0,wrap:a=!1,className:o,style:i,onKeyDown:c,onFocus:d,...u},p){const h=l.useRef(null),f=l.useRef(null),m=()=>{const g=h.current;if(!g)return;const N=gn(g);if(!N.length)return;const x=f.current&&N.includes(f.current)?f.current:N[0];f.current=x,N.forEach(w=>{w.tabIndex=w===x?0:-1})};ge(m);const b=g=>{d==null||d(g);const N=h.current,x=g.target;N&&x!==N&&gn(N).includes(x)&&(f.current=x,m())},v=g=>{c==null||c(g);const N=h.current;if(g.defaultPrevented||!N||g.altKey||g.ctrlKey||g.metaKey||Hi(g.target))return;const x=gn(N),w=x.indexOf(g.target);if(w<0)return;const _=Hr(g.key,w,x.length,e,r);_!==null&&(g.preventDefault(),x[_].focus())};return n.jsx("div",{ref:xe(p,h),role:"toolbar","aria-orientation":e,className:P("ok-l ok-toolbar",o),"data-orientation":e,"data-wrap":a&&e==="horizontal"?"":void 0,style:Qe({gap:s},i),onFocus:b,onKeyDown:v,...u})}),Tt=l.createContext(!1),qi=l.forwardRef(function({collapsed:e,className:s,children:r,...a},o){const i=l.useContext(Tt),c=e??i,d=l.useRef(null);return ge(()=>{const u=d.current;if(!u)return;const p=()=>{const m=u.querySelector('.ok-nav__item[aria-current]:not([aria-current="false"])');if(!m){u.removeAttribute("data-ready");return}u.style.setProperty("--y",m.offsetTop+"px"),u.style.setProperty("--h",m.offsetHeight+"px"),u.hasAttribute("data-ready")||(u.offsetWidth,u.setAttribute("data-ready",""))};p();const h=typeof ResizeObserver<"u"?new ResizeObserver(p):null;h==null||h.observe(u);const f=typeof MutationObserver<"u"?new MutationObserver(p):null;return f==null||f.observe(u,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-current"]}),()=>{h==null||h.disconnect(),f==null||f.disconnect()}},[]),n.jsx(Tt.Provider,{value:c,children:n.jsxs("nav",{ref:xe(o,d),className:P("ok-nav",s),"data-collapsed":c?"":void 0,...a,children:[n.jsx("span",{className:"ok-nav__pill","aria-hidden":"true"}),r]})})}),Vi=l.forwardRef(function({label:e,className:s,children:r,...a},o){const i=l.useId(),c=e!=null&&e!==!1;return n.jsxs("div",{ref:o,role:"group","aria-labelledby":c?i:void 0,className:P("ok-nav__group",s),...a,children:[c?n.jsx("div",{id:i,className:"ok-nav__group-label",children:n.jsx("span",{children:e})}):null,r]})}),Gi=l.forwardRef(function({as:e,current:s,icon:r,badge:a,sub:o,label:i,disabled:c,href:d,className:u,children:p,onClick:h,title:f,...m},b){const v=l.useContext(Tt),g=e??(d!==void 0?"a":"button"),N=i??(typeof p=="string"||typeof p=="number"?String(p):void 0),x=a!=null&&a!==!1,w=k=>{if(c){k.preventDefault();return}h==null||h(k)},_={...d!==void 0&&!c?{href:d}:null,...g==="button"?{type:"button",...c?{disabled:!0}:null}:null};return n.jsxs(g,{ref:b,className:P("ok-nav__item ok-focusable",o&&"ok-nav__item--sub",u),..._,"aria-current":s?"page":void 0,"aria-disabled":c?!0:void 0,"aria-label":v?N:void 0,title:f??(v?N:void 0),"data-has-badge":x?"":void 0,onClick:w,...m,children:[r?n.jsx("span",{className:"ok-nav__icon","aria-hidden":"true",children:r}):null,n.jsx("span",{className:"ok-nav__label",children:p}),x?n.jsx("span",{className:"ok-nav__badge",children:a}):null]})}),zr=l.createContext(null);function ct(t){const e=l.useContext(zr);if(!e)throw new Error(`${t} 必须放在 <AppShell> 里面`);return e}function Wi(){const{root:t,floatGap:e,...s}=ct("useAppShell()");return s}const Ui=l.forwardRef(function({contained:e=!1,collapsed:s="auto",collapseBelow:r="md",asideCollapseBelow:a="lg",sidebarOpen:o,defaultSidebarOpen:i=!1,onSidebarOpenChange:c,asideOpen:d,defaultAsideOpen:u,onAsideOpenChange:p,rail:h,defaultRail:f=!1,onRailChange:m,gap:b,skipLinkLabel:v,mainId:g,className:N,style:x,children:w,..._},k){const R=pe().messages.appShell.skipLink,M=v??R,E=l.useId(),T=g??`ok-main-${E.replace(/[^a-zA-Z0-9_-]/g,"")}`,[C,j]=l.useState(null),[y,S]=le(o,i,c),[O,L]=le(h,f,m),$=at(r),D=at(a),[A,B]=l.useState(null);ge(()=>{if(!C||!e){B(null);return}const se=()=>{const U=C.getBoundingClientRect().width;B(U>0?U:null)};if(se(),typeof ResizeObserver>"u")return;const ce=new ResizeObserver(se);return ce.observe(C),()=>ce.disconnect()},[C,e]);const z=(se,ce)=>e?A===null||A>=Kt[se]:ce,G=s==="auto"?!z(r,$):s,W=s==="auto"?!z(a,D):s,[J,X]=le(d,u??!W,p),I=d!==void 0,F=l.useRef(W),q=F.current===W?J:W?!1:I?J:u??!0;l.useEffect(()=>{!G&&y&&S(!1)},[G,y,S]),l.useEffect(()=>{F.current!==W&&(F.current=W,W?X(!1):I||X(u??!0))},[W,I,u,X]);const ne=l.useMemo(()=>({sidebarCollapsed:G,asideCollapsed:W,sidebarOpen:y,setSidebarOpen:S,openSidebar:()=>S(!0),closeSidebar:()=>S(!1),toggleSidebar:()=>G?S(se=>!se):L(se=>!se),rail:O,setRail:L,toggleRail:()=>L(se=>!se),asideOpen:q,setAsideOpen:X,toggleAside:()=>X(se=>!se),contained:e,mainId:T,root:C,floatGap:b!==void 0?xi(b):void 0}),[G,W,y,S,O,L,q,X,e,T,C,b]),Z=se=>{const ce=document.getElementById(T);ce&&(se.preventDefault(),ce.focus())};return n.jsx(zr.Provider,{value:ne,children:n.jsxs("div",{ref:xe(k,j),className:P("ok-shell",N),"data-contained":e?"":void 0,"data-collapsed":String(s),"data-collapse-below":r,"data-aside-collapse-below":a,style:b!==void 0?{"--ok-shell-gap":We(b),...x}:x,..._,children:[n.jsx("a",{className:"ok-skip-link ok-focusable",href:`#${T}`,onClick:Z,children:M}),w]})})}),Yi=l.forwardRef(function({variant:e="plain",className:s,...r},a){return ct("<AppShell.Header>"),n.jsx("header",{ref:a,className:P("ok-shell__header",s),"data-variant":e,...r})}),Xi=l.forwardRef(function({variant:e="plain",className:s,...r},a){return ct("<AppShell.Footer>"),n.jsx("footer",{ref:a,className:P("ok-shell__footer",s),"data-variant":e,...r})});function qr(t){const{role:e,...s}=t;return s}const Ki=t=>typeof t=="number"?`${t}px`:t;function Vr(t,e,s,r){return{...e!==void 0?{[`--ok-shell-${t}-w`]:Ki(e)}:null,...s!==void 0?{"--ok-shell-card-pad":We(s)}:null,...r}}const Zi=l.forwardRef(function({label:e,width:s,drawerWidth:r=300,padding:a,closeOnNavigate:o=!0,className:i,style:c,children:d,...u},p){const h=pe().messages.appShell.sidebar,f=e??h,m=ct("<AppShell.Sidebar>"),b=Vr("sidebar",s,a,c);return m.sidebarCollapsed?n.jsx(Je,{...qr(u),ref:p,open:m.sidebarOpen,onOpenChange:m.setSidebarOpen,placement:"left",modal:!0,size:r,gap:m.floatGap,container:m.contained?m.root:void 0,contained:m.contained,"aria-label":f,className:P("ok-shell-card ok-shell__drawer ok-scroll",i),style:b,children:n.jsx(Tt.Provider,{value:!1,children:n.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Gr(v,m.setSidebarOpen):void 0,children:d})})}):n.jsx("aside",{ref:p,"aria-label":f,className:P("ok-shell__sidebar ok-shell-card ok-scroll",i),"data-rail":m.rail?"":void 0,style:b,...u,children:n.jsx(Tt.Provider,{value:m.rail,children:d})})}),Ji=l.forwardRef(function({label:e,width:s,drawerWidth:r=360,padding:a,closeOnNavigate:o=!1,className:i,style:c,children:d,...u},p){const h=pe().messages.appShell.aside,f=e??h,m=ct("<AppShell.Aside>"),b=Vr("aside",s,a,c);return m.asideCollapsed?n.jsx(Je,{...qr(u),ref:p,open:m.asideOpen,onOpenChange:m.setAsideOpen,placement:"right",modal:!0,size:r,gap:m.floatGap,container:m.contained?m.root:void 0,contained:m.contained,"aria-label":f,className:P("ok-shell-card ok-shell__drawer ok-scroll",i),style:b,children:n.jsx("div",{className:"ok-shell__drawer-body",onClick:o?v=>Gr(v,m.setAsideOpen):void 0,children:d})}):m.asideOpen?n.jsx("aside",{ref:p,"aria-label":f,className:P("ok-shell__aside ok-shell-card ok-scroll",i),style:b,...u,children:d}):null});function Gr(t,e){var r,a;const s=(a=(r=t.target).closest)==null?void 0:a.call(r,"a[href], .ok-nav__item");s&&s.getAttribute("aria-disabled")!=="true"&&e(!1)}const Qi=l.forwardRef(function({className:e,id:s,tabIndex:r,...a},o){const i=ct("<AppShell.Main>");return n.jsx("main",{ref:o,id:s??i.mainId,tabIndex:r??-1,className:P("ok-shell__main ok-scroll",e),...a})}),ec=l.forwardRef(function({target:e="sidebar",label:s,drawerOnly:r,className:a,children:o,onClick:i,...c},d){const{messages:u}=pe(),p=ct("<AppShell.Trigger>"),h=e==="sidebar",f=h?p.sidebarCollapsed:p.asideCollapsed;if(!f&&r)return null;const m=h?f?p.sidebarOpen:!p.rail:p.asideOpen;return n.jsx("button",{ref:d,type:"button",className:P("ok-btn ok-btn--ghost ok-btn--icon ok-focusable",a),"aria-label":s??(h?u.appShell.toggleSidebar:u.appShell.toggleAside),"aria-expanded":m,"aria-haspopup":f?"dialog":void 0,onClick:It(i,()=>h?p.toggleSidebar():p.toggleAside()),...c,children:o??n.jsx(he,{children:n.jsx("path",{d:"M3.5 6h13M3.5 10h13M3.5 14h13"})})})}),tc=Object.assign(Ui,{Header:Yi,Sidebar:Zi,Main:Qi,Aside:Ji,Footer:Xi,Trigger:ec}),Wr=l.createContext(null),Rs=t=>typeof t=="number"?`${t}px`:t,nc=l.forwardRef(function({value:e,defaultValue:s,onChange:r,action:a,position:o="fixed",layout:i="auto",insetStart:c,insetEnd:d,className:u,style:p,children:h,onKeyDown:f,...m},b){const[v,g]=le(e,s,r),N=l.useRef(null),[x,w]=l.useState(0),_=()=>{const M=N.current;if(!M)return;const E=M.querySelector('.ok-tabbar__item[aria-current="page"]');if(!E){M.removeAttribute("data-ready");return}M.style.setProperty("--x",E.offsetLeft+"px"),M.style.setProperty("--w",E.offsetWidth+"px"),M.hasAttribute("data-ready")||(M.offsetWidth,M.setAttribute("data-ready",""))},k=l.useRef(_);k.current=_,ge(()=>{var E;const M=(E=N.current)!=null&&E.querySelector(".ok-tabbar__label")?N.current.querySelectorAll(".ok-tabbar__item").length:0;M!==x&&w(M),_()}),ge(()=>{const M=N.current;if(!M||typeof ResizeObserver>"u")return;const E=new ResizeObserver(()=>k.current());return E.observe(M),()=>E.disconnect()},[]);const R=M=>{f==null||f(M);const E=N.current;if(M.defaultPrevented||!E||M.altKey||M.ctrlKey||M.metaKey)return;const T=Array.from(E.querySelectorAll('.ok-tabbar__item:not([aria-disabled="true"])')),C=T.indexOf(M.target);if(C<0)return;const j=Hr(M.key,C,T.length,"horizontal");j!==null&&(M.preventDefault(),T[j].focus())};return n.jsx(Wr.Provider,{value:{value:v,select:g},children:n.jsxs("nav",{ref:b,className:P("ok-tabbar",u),"data-position":o,"data-layout":i==="auto"?x>=4?"stacked":"inline":i,style:c!==void 0||d!==void 0?{"--ok-tabbar-inset-start":Rs(c),"--ok-tabbar-inset-end":Rs(d),...p}:p,onKeyDown:R,...m,children:[n.jsxs("div",{ref:N,className:"ok-tabbar__list",children:[n.jsx("span",{className:"ok-tabbar__thumb","aria-hidden":"true"}),h]}),a?n.jsx("div",{className:"ok-tabbar__action",children:a}):null]})})}),Ur=l.forwardRef(function({value:e,as:s,icon:r,badge:a,label:o,disabled:i,href:c,className:d,children:u,onClick:p,...h},f){const m=l.useContext(Wr),b=s??(c!==void 0?"a":"button"),v=(m==null?void 0:m.value)===e,g=w=>{if(i){w.preventDefault();return}p==null||p(w),w.defaultPrevented||m==null||m.select(e)},N=u!=null&&u!==!1,x={...c!==void 0&&!i?{href:c}:null,...b==="button"?{type:"button",...i?{disabled:!0}:null}:null};return n.jsxs(b,{ref:f,className:P("ok-tabbar__item ok-focusable",d),...x,"aria-current":v?"page":void 0,"aria-disabled":i?!0:void 0,"aria-label":N?void 0:o,"data-value":e,onClick:g,...h,children:[r?n.jsx("span",{className:"ok-tabbar__icon","aria-hidden":"true",children:r}):null,N?n.jsx("span",{className:"ok-tabbar__label",children:u}):null,a!=null&&a!==!1?n.jsx("span",{className:"ok-tabbar__badge",children:a}):null]})}),sc=Object.assign(nc,{Item:Ur}),rc=l.forwardRef(function({orientation:e="horizontal",value:s,defaultValue:r=50,onChange:a,min:o=20,max:i=80,step:c=2,stackBelow:d="md",stacked:u,separatorLabel:p,className:h,style:f,children:m,...b},v){const{messages:g}=pe(),N=p??g.splitPane.separator,[x,w]=le(s,r,a),_=l.useRef(null),k=l.useRef(null),R=l.useRef(!1),[M,E]=l.useState(!1),[T,C]=l.useState(!1),j=l.useId(),[y,S]=l.Children.toArray(m),O=ye(x,o,i),L=e==="horizontal",$=L?d:!1;ge(()=>{const I=_.current;if(!I||u!==void 0||$===!1){C(!1);return}const F=Kt[$],q=()=>{const Z=I.getBoundingClientRect().width;C(Z>0&&Z<F)};if(q(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(q);return ne.observe(I),()=>ne.disconnect()},[u,$]);const D=u??T,A=I=>w(ye(Math.round(I*10)/10,o,i)),B=I=>{const F=k.current;if(!F)return;const q=F.getBoundingClientRect(),ne=L?q.width:q.height;if(ne<=0)return;let Z=L?(I.clientX-q.left)/ne:(I.clientY-q.top)/ne;L&&getComputedStyle(F).direction==="rtl"&&(Z=1-Z),A(Z*100)},z=I=>{var F,q;D||I.button!==0||(I.preventDefault(),I.currentTarget.focus(),(q=(F=I.currentTarget).setPointerCapture)==null||q.call(F,I.pointerId),R.current=!0,E(!0))},G=I=>{R.current&&B(I)},W=I=>{var F,q;R.current&&(R.current=!1,E(!1),(q=(F=I.currentTarget).releasePointerCapture)==null||q.call(F,I.pointerId))},J=I=>{if(D)return;const F=I.shiftKey?10:c,q=L?"ArrowLeft":"ArrowUp",ne=L?"ArrowRight":"ArrowDown";let Z=null;I.key===q?Z=O-F:I.key===ne?Z=O+F:I.key==="Home"?Z=o:I.key==="End"?Z=i:I.key==="Enter"&&(Z=r),Z!==null&&(I.preventDefault(),A(Z))},X=!D;return n.jsx("div",{ref:xe(v,_),className:P("ok-split",h),"data-orientation":e,"data-stack-below":u===void 0&&$?$:void 0,"data-stacked":u!==void 0?String(u):T?"true":void 0,"data-dragging":M?"":void 0,style:{"--ok-split-size":O,...f},...b,children:n.jsxs("div",{ref:k,className:"ok-split__track",children:[n.jsx("div",{id:j,className:"ok-split__pane ok-split__pane--first",children:y}),n.jsx("div",{role:"separator",className:"ok-split__sep ok-focusable",tabIndex:X?0:void 0,"aria-orientation":D?"horizontal":L?"vertical":"horizontal","aria-label":X?N:void 0,"aria-controls":X?j:void 0,"aria-valuenow":X?Math.round(O):void 0,"aria-valuemin":X?o:void 0,"aria-valuemax":X?i:void 0,onPointerDown:z,onPointerMove:G,onPointerUp:W,onPointerCancel:W,onDoubleClick:X?()=>A(r):void 0,onKeyDown:J}),n.jsx("div",{className:"ok-split__pane ok-split__pane--second",children:S})]})})});exports.ACCENTS=Ys;exports.Accordion=Hl;exports.Alert=Kl;exports.AppShell=tc;exports.AspectRatio=Pi;exports.Autocomplete=ml;exports.Avatar=Kn;exports.AvatarGroup=ci;exports.BREAKPOINTS=Kt;exports.Badge=Wl;exports.Box=wi;exports.Breadcrumb=zl;exports.Button=er;exports.ButtonGroup=ja;exports.Calendar=Sr;exports.Card=Nl;exports.CardBody=Sl;exports.CardFooter=Cl;exports.CardHeader=Ml;exports.CardLink=Rl;exports.CardMedia=El;exports.Center=Ti;exports.Checkbox=Oa;exports.CheckboxGroup=Fa;exports.Chip=Ya;exports.ChipGroup=Za;exports.Cluster=Ri;exports.Code=fi;exports.CodeBlock=hi;exports.ColorPicker=so;exports.ColorSwatches=or;exports.Combobox=Rr;exports.CommandPalette=Wo;exports.Confirmer=vr;exports.Container=Ai;exports.ContextMenu=dl;exports.Count=Yl;exports.DatePicker=gl;exports.DateRangePicker=kl;exports.DescriptionItem=Tr;exports.DescriptionList=Ll;exports.Dialog=mr;exports.Divider=Br;exports.Dots=ri;exports.Drawer=To;exports.DropdownMenu=il;exports.EmptyState=ai;exports.Field=Ia;exports.FieldContext=Ie;exports.Fieldset=Pa;exports.FileDrop=uo;exports.FloatingBody=_o;exports.FloatingCard=Je;exports.FloatingFooter=jo;exports.FloatingGrip=hr;exports.FloatingHeader=yo;exports.FloatingPanel=$o;exports.FocusScope=Ps;exports.Form=$a;exports.FormActions=Da;exports.Grid=Ci;exports.GridItem=Ei;exports.Group=Al;exports.Heading=_l;exports.Hide=bi;exports.Hotkey=oo;exports.ICONS=Tn;exports.Icon=he;exports.Image=Ar;exports.Inline=Fr;exports.Input=On;exports.KEY_SYMBOL=lr;exports.Kbd=ro;exports.LOGO_SNOUT_MIN_CONTRAST=kn;exports.Label=La;exports.List=Il;exports.ListItem=Pl;exports.LocaleProvider=Us;exports.Menu=sn;exports.MenuCheckboxItem=nl;exports.MenuItem=tl;exports.MenuLabel=ol;exports.MenuRadioGroup=sl;exports.MenuRadioItem=rl;exports.MenuSeparator=al;exports.MenuSub=ll;exports.Meter=ei;exports.MultiSelect=pl;exports.Nav=qi;exports.NavGroup=Vi;exports.NavItem=Gi;exports.NumberInput=Ea;exports.OINK_LOGO_INK_PATH=Js;exports.OINK_LOGO_NOSTRILS=wn;exports.OINK_LOGO_SNOUT=zt;exports.OINK_MESSAGES=Et;exports.ON_ACCENT_THRESHOLD=Hs;exports.OinkLogo=ka;exports.OinkProvider=ga;exports.OptionCard=Ja;exports.OptionCardGroup=Qa;exports.Page=Di;exports.PageHeader=Oi;exports.Pagination=Pr;exports.Panel=gr;exports.PinInput=Aa;exports.Popover=Wn;exports.Portal=it;exports.Progress=Zl;exports.ProgressRing=Ql;exports.Radio=Ha;exports.RadioGroup=za;exports.RangeCalendar=Cr;exports.RangeSlider=Ga;exports.Rating=io;exports.Reaction=ui;exports.Roll=an;exports.Row=Tl;exports.SERVER_LOCALE=Gs;exports.ScrollArea=$i;exports.SearchInput=Ma;exports.Section=Bi;exports.Segmented=Ua;exports.Select=ul;exports.Sheet=Io;exports.Show=mi;exports.Skeleton=ti;exports.Slider=Va;exports.Spacer=Ii;exports.Spinner=si;exports.SplitPane=rc;exports.Stack=Ni;exports.Stat=oi;exports.Steps=ql;exports.Sticky=Li;exports.Surface=jl;exports.Switch=qa;exports.TAIL_PATH=qs;exports.THEME_REVEAL_MS=Ks;exports.TabBar=sc;exports.TabBarItem=Ur;exports.Table=Bl;exports.Tabs=Fl;exports.Tag=Ul;exports.TailGlyph=Ln;exports.TailProvider=Vs;exports.Text=yl;exports.Textarea=Ra;exports.Timeline=Vl;exports.Toaster=zo;exports.ToggleButton=wa;exports.Toolbar=zi;exports.Tooltip=Zo;exports.Tree=Gl;exports.VisuallyHidden=In;exports.accentVars=_n;exports.animate=Ne;exports.burst=Dr;exports.canUseDOM=Ae;exports.captureFocusTrail=En;exports.chain=It;exports.clamp=ye;exports.computePosition=yr;exports.confirm=Co;exports.contrastRatio=Ct;exports.cx=P;exports.detectLocale=Ws;exports.ease=De;exports.flip=Qr;exports.floatMotion=Es;exports.formatISODate=Be;exports.getFocusable=St;exports.hexToHsv=Os;exports.hsvToHex=Bs;exports.hsvToRgb=Ds;exports.initialsOf=Lr;exports.isAccent=Xs;exports.isCustomAccent=Rt;exports.keyName=Wt;exports.keySymbol=Bn;exports.logoSnoutColors=yn;exports.luminance=xn;exports.mergeRefs=xe;exports.normalizeAccent=$n;exports.normalizeHex=Ve;exports.onAccentColor=zs;exports.paginationRange=Ir;exports.parseHex=gt;exports.parseISODate=Xn;exports.perceivedLightness=Pn;exports.playFlip=Yt;exports.presets=Cn;exports.resolveFloatSize=Qt;exports.resolveTriggerPoint=cr;exports.restoreFocusTo=An;exports.rgbToHsv=$s;exports.speed=Fe;exports.spring=Sn;exports.supportsLinear=Cs;exports.toHex=ot;exports.toast=Bo;exports.useAppShell=Wi;exports.useBreakpoint=at;exports.useBusy=Na;exports.useControllable=le;exports.useEscape=Lt;exports.useEvent=ke;exports.useFieldControl=_e;exports.useFloatingCard=pr;exports.useInertOthers=Ts;exports.useIsoLayoutEffect=ge;exports.useLocale=pe;exports.useMediaQuery=Xt;exports.useOink=xa;exports.useOutsidePress=ea;exports.usePosition=tn;exports.usePresence=Pt;exports.useScrollLock=As;exports.useTail=la;exports.wait=Zr;
|