@nice2dev/ui 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/CHANGELOG.md +150 -0
  2. package/README.md +27 -34
  3. package/dist/NiceButton-5tWvfXKl.cjs +1 -0
  4. package/dist/NiceButton-DHSgQT1_.js +112 -0
  5. package/dist/NiceCodeEditor-B8At55f5.js +1179 -0
  6. package/dist/NiceCodeEditor-BJSEzhcY.cjs +260 -0
  7. package/dist/NiceCodeEditor-BfkH1bsZ.cjs +260 -0
  8. package/dist/NiceCodeEditor-CduGYggj.js +1179 -0
  9. package/dist/NiceColorPicker-CdUnhM-A.cjs +1 -0
  10. package/dist/NiceColorPicker-DCgmE-3H.cjs +1 -0
  11. package/dist/NiceColorPicker-DK30kJgy.js +486 -0
  12. package/dist/NiceColorPicker-DpXwnDwL.js +598 -0
  13. package/dist/NiceColorPicker-DtPFxDKM.cjs +1 -0
  14. package/dist/NiceColorPicker-bNJBAU_c.js +598 -0
  15. package/dist/NiceConfirmDialog-B7aNRL2K.cjs +1 -0
  16. package/dist/NiceConfirmDialog-BdhWenrO.js +81 -0
  17. package/dist/NiceDataGrid-BOCJr6XF.js +2217 -0
  18. package/dist/NiceDataGrid-BV5Oh-gy.cjs +10 -0
  19. package/dist/NiceDataGrid-CVYEo_nv.cjs +10 -0
  20. package/dist/NiceDataGrid-D-rm4lu8.js +2217 -0
  21. package/dist/NiceDataGrid-Dd7SI-M6.cjs +10 -0
  22. package/dist/NiceDataGrid-DjZchXYG.js +2217 -0
  23. package/dist/NiceDocumentViewer-BgcgLWJ3.cjs +180 -0
  24. package/dist/NiceDocumentViewer-sukmGhRx.js +672 -0
  25. package/dist/NiceForm-BCEXovJR.cjs +1 -0
  26. package/dist/NiceForm-D7oyWHXg.js +4820 -0
  27. package/dist/NiceForm-DUhxXArr.js +4817 -0
  28. package/dist/NiceForm-DVc0Xoly.js +4819 -0
  29. package/dist/NiceForm-qD_RKPYz.cjs +1 -0
  30. package/dist/NiceForm-uCeVmTrD.cjs +1 -0
  31. package/dist/NiceGantt-4UBd4uJ8.cjs +1 -0
  32. package/dist/NiceGantt-B_1lwEsp.js +328 -0
  33. package/dist/NiceHtmlEditor-BYk1roA4.cjs +10 -0
  34. package/dist/NiceHtmlEditor-Bce9Vwe1.cjs +10 -0
  35. package/dist/NiceHtmlEditor-C5kLeF9H.cjs +10 -0
  36. package/dist/NiceHtmlEditor-CFVMIC5L.js +848 -0
  37. package/dist/NiceHtmlEditor-CGRgcu2h.js +848 -0
  38. package/dist/NiceHtmlEditor-mWebBmy1.js +849 -0
  39. package/dist/NiceLoginForm-BHyDY7br.cjs +1 -0
  40. package/dist/NiceLoginForm-BTuQ0eKk.cjs +1 -0
  41. package/dist/NiceLoginForm-BuxFY2Rk.js +750 -0
  42. package/dist/NiceLoginForm-o1A-TBcp.js +736 -0
  43. package/dist/NiceLoginForm.css +1 -0
  44. package/dist/NiceMention-CA7CL5BI.js +11263 -0
  45. package/dist/NiceMention-CHcKRl-L.cjs +430 -0
  46. package/dist/NiceMention-DJD0BLcp.js +11269 -0
  47. package/dist/NiceMention-DcaUEMSg.cjs +430 -0
  48. package/dist/NiceMention-Dds9GQzk.cjs +430 -0
  49. package/dist/NiceMention-DlLXWddO.js +11268 -0
  50. package/dist/NiceMention.css +1 -1
  51. package/dist/NiceModal-C4p8a82e.cjs +1 -0
  52. package/dist/NiceModal-Dr1e3nQZ.cjs +1 -0
  53. package/dist/NiceModal-TNlkaL_i.js +85 -0
  54. package/dist/NiceModal-sihGCfDy.js +95 -0
  55. package/dist/NiceModuleLifecyclePanel-BWbKdVC_.js +7054 -0
  56. package/dist/NiceModuleLifecyclePanel-CZHIzvkE.cjs +1 -0
  57. package/dist/NiceModuleLifecyclePanel-Du7G3-RG.js +7053 -0
  58. package/dist/NiceModuleLifecyclePanel-OC9YK2kG.js +7052 -0
  59. package/dist/NiceModuleLifecyclePanel-_OcfDmtC.cjs +1 -0
  60. package/dist/NiceModuleLifecyclePanel-js1p7LIY.cjs +1 -0
  61. package/dist/NicePagination-8XsBbMNx.js +165 -0
  62. package/dist/NicePagination-CkOoXf0f.js +165 -0
  63. package/dist/NicePagination-D44waj9o.cjs +1 -0
  64. package/dist/NicePagination-D7lek1G7.cjs +1 -0
  65. package/dist/NicePagination-DdxH8KMG.js +179 -0
  66. package/dist/NicePagination-OjTEfZJE.cjs +1 -0
  67. package/dist/NicePivotGrid-B2YHP3Z6.js +1183 -0
  68. package/dist/NicePivotGrid-BJRSciWl.js +1183 -0
  69. package/dist/NicePivotGrid-BtVUWiud.cjs +152 -0
  70. package/dist/NicePivotGrid-CS1dPmNI.cjs +152 -0
  71. package/dist/NicePivotGrid-D2AxqDzJ.js +1183 -0
  72. package/dist/NicePivotGrid-DxQ6Py9D.cjs +152 -0
  73. package/dist/NiceSavedQueryPanel-B5HhqlAI.cjs +586 -0
  74. package/dist/NiceSavedQueryPanel-C0A-eoYN.js +5142 -0
  75. package/dist/NiceSavedQueryPanel-CMStDOKe.js +5125 -0
  76. package/dist/NiceSavedQueryPanel-D2i34e_b.cjs +586 -0
  77. package/dist/NiceSavedQueryPanel-ZrilZRtf.cjs +586 -0
  78. package/dist/NiceSavedQueryPanel-mPO2THs7.js +5142 -0
  79. package/dist/NiceSavedQueryPanel.css +1 -1
  80. package/dist/NiceScheduler-7gP7vcLy.cjs +5 -0
  81. package/dist/NiceScheduler-Cy7F9tgH.js +1693 -0
  82. package/dist/NiceScheduler-DquRUZxD.cjs +5 -0
  83. package/dist/NiceScheduler-KSzaUQxC.js +1693 -0
  84. package/dist/NiceScheduler-O3AwmdGG.cjs +5 -0
  85. package/dist/NiceScheduler-l8N4yCWd.js +1716 -0
  86. package/dist/NiceSelect-BCbWtu1v.js +433 -0
  87. package/dist/NiceSelect-BqtiQbfD.cjs +1 -0
  88. package/dist/NiceSelect-DZB1Rs9x.js +435 -0
  89. package/dist/NiceSelect-tMz9QQUs.cjs +1 -0
  90. package/dist/NiceStreamDashboard.doc-74KUXya1.cjs +8 -0
  91. package/dist/NiceStreamDashboard.doc-k8PQfCM0.js +32 -0
  92. package/dist/NiceWindow-BEov3s9F.js +2094 -0
  93. package/dist/NiceWindow-BU1Ce7gS.js +1623 -0
  94. package/dist/NiceWindow-CDt6PCEg.cjs +1 -0
  95. package/dist/NiceWindow-jjdE6vGy.cjs +1 -0
  96. package/dist/NiceWindow.css +1 -1
  97. package/dist/charts-C047IMVn.cjs +768 -0
  98. package/dist/charts-C44vJber.cjs +768 -0
  99. package/dist/charts-CCXSb3xk.js +4752 -0
  100. package/dist/charts-CqETcUhH.js +4752 -0
  101. package/dist/charts-DouiiHOT.cjs +768 -0
  102. package/dist/charts-XVlDwU0y.js +4732 -0
  103. package/dist/charts.cjs +1 -1
  104. package/dist/charts.mjs +8 -8
  105. package/dist/core-BL-KmGYC.js +795 -0
  106. package/dist/core-BxiH7vkV.cjs +1 -0
  107. package/dist/core-Chg-oYCr.cjs +1 -0
  108. package/dist/core-CxBnKAhs.cjs +1 -0
  109. package/dist/core-DMV6_SEE.js +795 -0
  110. package/dist/core-D_LRh59n.js +795 -0
  111. package/dist/data-branching-Km4lc8P_.cjs +1 -0
  112. package/dist/data-branching-YQtJJEtn.js +6273 -0
  113. package/dist/data-branching-oEH04O3i.js +6273 -0
  114. package/dist/data-branching-wmsbLNfa.cjs +1 -0
  115. package/dist/data-branching.cjs +1 -1
  116. package/dist/data-branching.mjs +1 -1
  117. package/dist/data.cjs +1 -1
  118. package/dist/data.d.ts +2 -53
  119. package/dist/data.mjs +3 -3
  120. package/dist/devops-Bt6EsfPa.cjs +17 -0
  121. package/dist/devops-CnZQ1rU5.js +8312 -0
  122. package/dist/devops-D5yIDM3e.js +8312 -0
  123. package/dist/devops-rVpB0ZAX.cjs +17 -0
  124. package/dist/devops.cjs +1 -1
  125. package/dist/devops.mjs +1 -1
  126. package/dist/editors.cjs +1 -1
  127. package/dist/editors.d.ts +8 -26
  128. package/dist/editors.mjs +55 -54
  129. package/dist/feedback.cjs +1 -1
  130. package/dist/feedback.d.ts +5 -0
  131. package/dist/feedback.mjs +3 -3
  132. package/dist/index.cjs +290 -290
  133. package/dist/index.css +1 -1
  134. package/dist/index.d.ts +239 -234
  135. package/dist/index.mjs +20262 -19440
  136. package/dist/lazy.cjs +1 -1
  137. package/dist/lazy.mjs +29 -29
  138. package/dist/navigation.cjs +1 -1
  139. package/dist/navigation.d.ts +4 -4
  140. package/dist/navigation.mjs +69 -69
  141. package/dist/no-code-4GtIBr6f.js +7503 -0
  142. package/dist/no-code-6WyYb3hL.cjs +331 -0
  143. package/dist/no-code-BH5oVFC6.js +8186 -0
  144. package/dist/no-code-Bdwh1vyS.cjs +332 -0
  145. package/dist/no-code-CnHG5_Vn.js +8186 -0
  146. package/dist/no-code-DMKlg1Zl.cjs +331 -0
  147. package/dist/no-code.cjs +1 -1
  148. package/dist/no-code.css +1 -1
  149. package/dist/no-code.d.ts +25 -18
  150. package/dist/no-code.mjs +3 -3
  151. package/dist/overlays.cjs +1 -1
  152. package/dist/overlays.d.ts +24 -24
  153. package/dist/overlays.mjs +24 -490
  154. package/dist/pickerCommons-0vyK1Knv.js +547 -0
  155. package/dist/pickerCommons-31hyz1gs.js +1122 -0
  156. package/dist/pickerCommons-BFbItm8o.cjs +1 -0
  157. package/dist/pickerCommons-BHirHJyn.js +548 -0
  158. package/dist/pickerCommons-BifIkPdk.cjs +1 -0
  159. package/dist/pickerCommons-Bt8JIaTN.cjs +1 -0
  160. package/dist/pickerCommons.css +1 -1
  161. package/dist/style.css +10 -7
  162. package/package.json +5 -7
  163. package/css/legacy-bg-text-aliases.css +0 -87
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),L=require("@nice2dev/ui-core"),n=require("react"),be=require("react-dom"),pt=({visible:t,onClose:i,title:c,items:o,showCancelButton:u=!0,cancelText:d,size:m="md",disabled:w,readOnly:h,loading:k,error:C,className:R,style:I})=>{const{t:l}=L.useNiceTranslation();if(!t)return null;const p=w||k||h;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-actionsheet__overlay",onClick:i}),e.jsxs("div",{className:`nice-actionsheet nice-actionsheet--${m} ${w?"nice-actionsheet--disabled":""} ${h?"nice-actionsheet--readonly":""} ${k?"nice-actionsheet--loading":""} ${C?"nice-actionsheet--error":""} ${R||""}`,style:I,"aria-disabled":w||void 0,"aria-readonly":h||void 0,"aria-busy":k||void 0,children:[C&&e.jsx("div",{className:"nice-actionsheet__error",role:"alert",children:C}),k&&e.jsx("span",{className:"nice-actionsheet__spinner","aria-hidden":"true",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),c&&e.jsx("div",{className:"nice-actionsheet__title",children:c}),e.jsx("div",{className:"nice-actionsheet__items",children:o.map((_,f)=>e.jsxs("button",{className:`nice-actionsheet__item ${_.type==="danger"?"nice-actionsheet__item--danger":""}`,disabled:_.disabled||p,onClick:()=>{p||(_.onClick?.(),i())},children:[_.icon&&e.jsx("span",{className:"nice-actionsheet__icon",children:_.icon}),_.text]},f))}),u&&e.jsx("button",{className:"nice-actionsheet__cancel",onClick:i,children:d||l("cancel","Cancel")})]})]})},xt=({visible:t,onClose:i,targetRef:c,position:o="bottom",title:u,showArrow:d=!0,width:m,children:w,className:h,style:k,displayStyle:C})=>{L.useComponentDisplayClass("tooltip",C);const R=n.useRef(null),[I,l]=n.useState({top:0,left:0}),p=n.useCallback(()=>{const _=c.current,f=R.current;if(!_||!f)return;const r=_.getBoundingClientRect(),v=f.getBoundingClientRect();let a=0,S=0;const E=8;switch(o){case"top":a=r.top-v.height-E,S=r.left+(r.width-v.width)/2;break;case"bottom":a=r.bottom+E,S=r.left+(r.width-v.width)/2;break;case"left":a=r.top+(r.height-v.height)/2,S=r.left-v.width-E;break;case"right":a=r.top+(r.height-v.height)/2,S=r.right+E;break}l({top:a+window.scrollY,left:S+window.scrollX})},[c,o]);return n.useEffect(()=>{if(t){requestAnimationFrame(p);const _=f=>{R.current&&!R.current.contains(f.target)&&c.current&&!c.current.contains(f.target)&&i()};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)}},[t,p,i,c]),t?e.jsxs("div",{ref:R,className:`nice-popover nice-popover--${o} ${h||""}`,style:{...k,position:"absolute",top:I.top,left:I.left,width:m},children:[d&&e.jsx("div",{className:`nice-popover__arrow nice-popover__arrow--${o}`}),u&&e.jsx("div",{className:"nice-popover__title",children:u}),e.jsx("div",{className:"nice-popover__content",children:w})]}):null},wt=({visible:t,message:i,container:c,showIndicator:o=!0,shading:u=!0,className:d,style:m})=>{const{t:w}=L.useNiceTranslation();if(!t)return null;const h=!!c?.current,k=e.jsxs("div",{className:`nice-loadpanel ${d||""}`,style:m,children:[u&&e.jsx("div",{className:"nice-loadpanel__shade"}),e.jsxs("div",{className:"nice-loadpanel__box",children:[o&&e.jsx("div",{className:"nice-spinner nice-spinner--md"}),e.jsx("span",{className:"nice-loadpanel__text",children:i||w("loading","Loading...")})]})]});if(h&&c.current){const C=c.current;return C.style.position=C.style.position||"relative",k}return k},gt=({direction:t="row",align:i,justify:c,wrap:o,gap:u,flex:d,children:m,className:w,style:h})=>e.jsx("div",{className:`nice-box ${w||""}`,style:{display:"flex",flexDirection:t,alignItems:i,justifyContent:c,flexWrap:o?"wrap":void 0,gap:u,flex:d,...h},children:m}),_t=({direction:t="row",items:i,gap:c,className:o,style:u})=>e.jsx("div",{className:`nice-responsivebox ${o||""}`,style:{display:"flex",flexDirection:t,gap:c,...u},children:i.map((d,m)=>e.jsx("div",{style:{flex:d.ratio??1,flexBasis:d.baseSize,flexShrink:d.shrink??1},children:d.children},m))}),bt=({width:t=200,height:i=200,minWidth:c=50,minHeight:o=50,maxWidth:u=1/0,maxHeight:d=1/0,handles:m=["right","bottom","bottomRight"],onResize:w,children:h,className:k,style:C})=>{const[R,I]=n.useState({width:t,height:i}),l=n.useRef(null),p=(r,v)=>{v.preventDefault();const a=v.clientX,S=v.clientY,E=R.width,Y=R.height,N={n:"top",s:"bottom",e:"right",w:"left",ne:"topRight",se:"bottomRight",sw:"bottomLeft",nw:"topLeft"}[r]??r,s=N==="right"||N==="topRight"||N==="bottomRight",y=N==="left"||N==="topLeft"||N==="bottomLeft",j=N==="bottom"||N==="bottomRight"||N==="bottomLeft",M=N==="top"||N==="topRight"||N==="topLeft",z=P=>{const x=P.clientX-a,b=P.clientY-S;let g=E,X=Y;s&&(g=E+x),y&&(g=E-x),j&&(X=Y+b),M&&(X=Y-b),g=Math.max(c,Math.min(u,g)),X=Math.max(o,Math.min(d,X)),I({width:g,height:X}),w?.({width:g,height:X})},$=()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",$)};document.addEventListener("pointermove",z),document.addEventListener("pointerup",$)},_=r=>{switch(r){case"top":case"bottom":return"ns-resize";case"left":case"right":return"ew-resize";case"topLeft":case"bottomRight":return"nwse-resize";case"topRight":case"bottomLeft":return"nesw-resize";default:return"default"}},f=r=>{const v={position:"absolute",zIndex:1},a=8;return r==="right"?{...v,top:0,right:-a/2,width:a,height:"100%",cursor:_(r)}:r==="bottom"?{...v,left:0,bottom:-a/2,width:"100%",height:a,cursor:_(r)}:r==="left"?{...v,top:0,left:-a/2,width:a,height:"100%",cursor:_(r)}:r==="top"?{...v,top:-a/2,left:0,width:"100%",height:a,cursor:_(r)}:r==="bottomRight"?{...v,bottom:-a/2,right:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="bottomLeft"?{...v,bottom:-a/2,left:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="topRight"?{...v,top:-a/2,right:-a/2,width:a*2,height:a*2,cursor:_(r)}:r==="topLeft"?{...v,top:-a/2,left:-a/2,width:a*2,height:a*2,cursor:_(r)}:v};return e.jsxs("div",{ref:l,className:`nice-resizable ${k||""}`,style:{...C,width:R.width,height:R.height,position:"relative",overflow:"hidden"},children:[h,m.map(r=>e.jsx("div",{style:f(r),onPointerDown:v=>p(r,v)},r))]})},vt=({direction:t="vertical",showScrollbar:i="onInteraction",width:c,height:o,onScroll:u,children:d,className:m,style:w})=>{const h=t==="horizontal"||t==="both"?"auto":"hidden",k=t==="vertical"||t==="both"?"auto":"hidden",C=i==="never"?"nice-scrollview--hide-sb":i==="always"?"nice-scrollview--show-sb":"";return e.jsx("div",{className:`nice-scrollview ${C} ${m||""}`,style:{...w,width:c,height:o,overflowX:h,overflowY:k},onScroll:u,children:d})};function ve(){const t=n.useContext(L.NiceThemeContext);return t?.portalTarget?t.portalTarget:typeof document<"u"?document.body:null}const yt=({open:t,onClose:i,children:c,title:o,size:u="md",closeOnBackdropClick:d=!0,closeOnEscape:m=!0,disableFocusTrap:w=!1,disableBodyScroll:h=!0,zIndex:k=1e3,className:C,style:R})=>{const I=n.useRef(null);L.useFocusTrap(I,t&&!w);const l=ve();n.useEffect(()=>{if(!h&&t){const f=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=f}}},[t,h]),n.useEffect(()=>{if(!m||!t)return;const f=r=>{r.key==="Escape"&&(r.preventDefault(),i())};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[m,t,i]);const p=n.useCallback(f=>{d&&f.target===f.currentTarget&&i()},[d,i]);if(!t)return null;const _={sm:"nice-modal--sm",md:"nice-modal--md",lg:"nice-modal--lg",xl:"nice-modal--xl",full:"nice-modal--full"}[u];return be.createPortal(e.jsx("div",{className:"nice-modal__overlay",style:{zIndex:k},onClick:p,role:"presentation",children:e.jsx("div",{ref:I,className:`nice-modal ${_} ${C||""}`,role:"dialog","aria-modal":"true","aria-label":o,style:R,tabIndex:-1,children:c})}),l)},Nt=({children:t,showClose:i=!0,onClose:c,className:o})=>e.jsxs("div",{className:`nice-modal__header ${o||""}`,children:[e.jsx("div",{className:"nice-modal__title",children:t}),i&&c&&e.jsx("button",{type:"button",className:"nice-modal__close",onClick:c,"aria-label":"Close",children:e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M4 4l12 12M4 16L16 4"})})})]}),kt=({children:t,className:i})=>e.jsx("div",{className:`nice-modal__body ${i||""}`,children:t}),jt=({children:t,className:i})=>e.jsx("div",{className:`nice-modal__footer ${i||""}`,children:t}),Ct=({open:t,onClose:i,children:c,position:o="right",size:u=320,title:d,closeOnBackdropClick:m=!0,closeOnEscape:w=!0,swipeToClose:h=!0,zIndex:k=1e3,className:C,style:R})=>{const I=n.useRef(null),[l,p]=n.useState(!1),[_,f]=n.useState(0);L.useFocusTrap(I,t);const r=ve();n.useEffect(()=>{if(!w||!t)return;const s=y=>{y.key==="Escape"&&(y.preventDefault(),i())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[w,t,i]);const v=n.useCallback(s=>{let y=0;switch(o){case"left":y=Math.min(0,s.deltaX);break;case"right":y=Math.max(0,s.deltaX);break;case"top":y=Math.min(0,s.deltaY);break;case"bottom":y=Math.max(0,s.deltaY);break}f(y)},[o]),a=n.useCallback(s=>{let j=!1;switch(o){case"left":j=s.deltaX<-100;break;case"right":j=s.deltaX>100;break;case"top":j=s.deltaY<-100;break;case"bottom":j=s.deltaY>100;break}j&&(L.triggerHaptic("light"),i()),f(0),p(!1)},[o,i]),{ref:S}=L.usePan({enabled:h&&t,onPanStart:()=>p(!0),onPan:v,onPanEnd:a}),E=n.useCallback(s=>{m&&s.target===s.currentTarget&&i()},[m,i]);if(!t)return null;const Y=o==="left"||o==="right",B=Y?{width:typeof u=="number"?`${u}px`:u}:{height:typeof u=="number"?`${u}px`:u},N=()=>{if(l)return Y?`translateX(${_}px)`:`translateY(${_}px)`};return be.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`nice-drawer__overlay ${t?"nice-drawer__overlay--visible":""}`,style:{zIndex:k},onClick:E}),e.jsx("div",{ref:s=>{I.current=s,S.current=s},className:`nice-drawer nice-drawer--${o} ${t?"nice-drawer--open":""} ${C||""}`,style:{...B,zIndex:k+1,transform:N(),transition:l?"none":void 0,...R},role:"dialog","aria-modal":"true","aria-label":d,tabIndex:-1,children:c})]}),r)},Et=({open:t,onClose:i,children:c,title:o,showHandle:u=!0,snapPoints:d=[.5,.9],initialSnap:m=0,expandable:w=!0,closeOnBackdropClick:h=!0,closeOnEscape:k=!0,hapticFeedback:C=!0,zIndex:R=1e3,className:I,style:l})=>{const p=n.useRef(null),_=n.useRef(null),[f,r]=n.useState(m),[v,a]=n.useState(!1),[S,E]=n.useState(0),Y=n.useRef(0);n.useEffect(()=>{t&&(r(m),E(0))},[t,m]),L.useFocusTrap(p,t);const B=ve();n.useEffect(()=>{if(!k||!t)return;const $=P=>{P.key==="Escape"&&(P.preventDefault(),i())};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[k,t,i]),n.useEffect(()=>{if(t){const $=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$}}},[t]);const N=n.useCallback($=>{const P=$.target.closest(".nice-bottom-sheet__handle"),x=_.current,b=!x||x.scrollTop<=0;!P&&!b||(a(!0),Y.current=$.touches[0].clientY)},[]),s=n.useCallback($=>{if(!v)return;const P=$.touches[0].clientY-Y.current;(P>0||f<d.length-1)&&E(P)},[v,f,d.length]),y=n.useCallback(()=>{if(!v)return;const $=window.innerHeight;d[f]*$;const P=-S,x=$*.15;P>x&&w&&f<d.length-1?(r(f+1),C&&L.triggerHaptic("selection")):P<-x&&(f>0?(r(f-1),C&&L.triggerHaptic("selection")):(C&&L.triggerHaptic("light"),i())),a(!1),E(0)},[v,S,f,d,w,C,i]),j=n.useCallback(()=>{h&&i()},[h,i]);if(!t)return null;const M=d[f]*100,z=v?S:0;return be.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`nice-bottom-sheet__overlay ${t?"nice-bottom-sheet__overlay--visible":""}`,style:{zIndex:R},onClick:j}),e.jsxs("div",{ref:p,className:`nice-bottom-sheet ${t?"nice-bottom-sheet--open":""} ${I||""}`,style:{zIndex:R+1,height:`${M}vh`,transform:`translateY(${Math.max(0,z)}px)`,transition:v?"none":"transform 0.3s ease-out, height 0.3s ease-out",...l},role:"dialog","aria-modal":"true","aria-label":o,tabIndex:-1,onTouchStart:N,onTouchMove:s,onTouchEnd:y,children:[u&&e.jsx("div",{className:"nice-bottom-sheet__handle","aria-hidden":"true"}),o&&e.jsx("div",{className:"nice-bottom-sheet__title",children:o}),e.jsx("div",{ref:_,className:"nice-bottom-sheet__content",children:c})]})]}),B)},Mt=({trigger:t,children:i,placement:c="bottom",triggerMode:o="click",open:u,onOpenChange:d,hoverDelay:m=200,offset:w=8,className:h,showArrow:k=!0})=>{const[C,R]=n.useState(!1),I=n.useRef(null),l=n.useRef(null),p=n.useRef(null),_=ve(),f=u!==void 0,r=f?u:C,v=n.useCallback(N=>{f||R(N),d?.(N)},[f,d]);L.useClickOutside(l,()=>{o!=="manual"&&r&&v(!1)});const a=n.useCallback(()=>{o==="click"&&v(!r)},[o,r,v]),S=n.useCallback(()=>{o==="hover"&&(p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>v(!0),m))},[o,m,v]),E=n.useCallback(()=>{o==="hover"&&(p.current&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>v(!1),m))},[o,m,v]),[Y,B]=n.useState({top:0,left:0});return n.useEffect(()=>{if(!r||!I.current||!l.current)return;const N=I.current.getBoundingClientRect(),s=l.current.getBoundingClientRect(),y=window.innerWidth,j=window.innerHeight;let M=0,z=0;const[$,P="center"]=c.split("-");switch($){case"top":M=N.top-s.height-w,z=N.left+(N.width-s.width)/2;break;case"bottom":M=N.bottom+w,z=N.left+(N.width-s.width)/2;break;case"left":M=N.top+(N.height-s.height)/2,z=N.left-s.width-w;break;case"right":M=N.top+(N.height-s.height)/2,z=N.right+w;break}$==="top"||$==="bottom"?(P==="start"&&(z=N.left),P==="end"&&(z=N.right-s.width)):(P==="start"&&(M=N.top),P==="end"&&(M=N.bottom-s.height)),z=Math.max(8,Math.min(y-s.width-8,z)),M=Math.max(8,Math.min(j-s.height-8,M)),B({top:M,left:z})},[r,c,w]),e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:I,className:"nice-popover__trigger",onClick:a,onMouseEnter:S,onMouseLeave:E,style:{display:"inline-block"},children:t}),r&&be.createPortal(e.jsxs("div",{ref:l,className:`nice-popover nice-popover--${c} ${h||""}`,style:{position:"fixed",top:Y.top,left:Y.left,zIndex:1100},onMouseEnter:S,onMouseLeave:E,role:"tooltip",children:[k&&e.jsx("div",{className:"nice-popover__arrow"}),e.jsx("div",{className:"nice-popover__content",children:i})]}),_)]})},Rt=({items:t,children:i,onOpen:c,onClose:o,className:u})=>{const[d,m]=n.useState(!1),[w,h]=n.useState({x:0,y:0}),k=n.useRef(null),C=n.useRef(null),R=ve();L.useClickOutside(k,()=>{d&&(m(!1),o?.())});const I=n.useCallback(_=>{_.preventDefault(),h({x:_.clientX,y:_.clientY}),m(!0),c?.()},[c]),l=n.useCallback(_=>{!_.disabled&&_.onClick&&(_.onClick(),m(!1),o?.())},[o]);n.useEffect(()=>{if(!d)return;const _=f=>{f.key==="Escape"&&(m(!1),o?.())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[d,o]);const p=_=>e.jsx("ul",{className:"nice-context-menu__list",role:"menu",children:_.map(f=>f.divider?e.jsx("li",{className:"nice-context-menu__divider",role:"separator"},f.key):e.jsx("li",{role:"presentation",children:e.jsxs("button",{type:"button",className:`nice-context-menu__item ${f.disabled?"nice-context-menu__item--disabled":""} ${f.danger?"nice-context-menu__item--danger":""}`,role:"menuitem",disabled:f.disabled,onClick:()=>l(f),children:[f.icon&&e.jsx("span",{className:"nice-context-menu__icon",children:f.icon}),e.jsx("span",{className:"nice-context-menu__label",children:f.label})]})},f.key))});return e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:C,onContextMenu:I,style:{display:"contents"},children:i}),d&&be.createPortal(e.jsx("div",{ref:k,className:`nice-context-menu ${u||""}`,style:{position:"fixed",left:w.x,top:w.y,zIndex:1200},role:"menu",children:p(t)}),R)]})};function ze(t,i){if(!t)return{score:1,indices:[]};const c=t.toLowerCase(),o=i.toLowerCase();let u=0;const d=[];let m=0,w=-1;for(let h=0;h<o.length&&u<c.length;h++)o[h]===c[u]&&(d.push(h),w===h-1&&(m+=3),(h===0||/[\s\-_/.]/.test(i[h-1]))&&(m+=5),i[h]===t[u]&&(m+=1),m+=1,w=h,u++);return u<c.length?null:(m-=d[0]*.1,{score:m,indices:d})}function qe(t,i){if(i.length===0)return[t];const c=[];let o=0;const u=new Set(i);for(let d=0;d<t.length;d++)u.has(d)&&(o<d&&c.push(t.slice(o,d)),c.push(n.createElement("mark",{key:`m-${d}`,className:"nice-command-palette__match"},t[d])),o=d+1);return o<t.length&&c.push(t.slice(o)),c}function It(t,i){switch(i.type){case"REGISTER":{const c=new Map(t.commands);return c.set(i.command.id,i.command),{...t,commands:c}}case"REGISTER_BATCH":{const c=new Map(t.commands);for(const o of i.commands)c.set(o.id,o);return{...t,commands:c}}case"UNREGISTER":{const c=new Map(t.commands);return c.delete(i.id),{...t,commands:c}}case"OPEN":return{...t,isOpen:!0,query:"",selectedIndex:0};case"CLOSE":return{...t,isOpen:!1,query:"",selectedIndex:0};case"SET_QUERY":return{...t,query:i.query,selectedIndex:0};case"SET_SELECTED":return{...t,selectedIndex:i.index};case"ADD_RECENT":{const c=t.recentIds.filter(o=>o!==i.id);return{...t,recentIds:[i.id,...c].slice(0,i.maxRecent)}}default:return t}}const Fe=n.createContext(null);function We(){const t=n.useContext(Fe);if(!t)throw new Error("useCommandPalette must be used within NiceCommandPaletteProvider");return t}const Ae=({children:t,commands:i,placeholder:c,maxVisible:o=10,maxRecent:u=5,className:d,emptyText:m,closeOnAction:w=!0,onOpen:h,onClose:k})=>{const{t:C}=L.useNiceTranslation(),R=C("commandPalette.general","General"),I=ve(),[l,p]=n.useReducer(It,{commands:new Map(i?.map(x=>[x.id,x])??[]),isOpen:!1,query:"",selectedIndex:0,recentIds:[]}),_=n.useRef(null),f=n.useRef(null),[r,v]=n.useState(!1),a=n.useCallback(x=>{p({type:"REGISTER",command:x})},[]),S=n.useCallback(x=>{p({type:"UNREGISTER",id:x})},[]),E=n.useCallback(x=>{p({type:"REGISTER_BATCH",commands:x})},[]),Y=n.useCallback(()=>{p({type:"OPEN"}),h?.()},[h]),B=n.useCallback(()=>{p({type:"CLOSE"}),k?.()},[k]),N=n.useCallback(()=>{l.isOpen?B():Y()},[l.isOpen,B,Y]),y=n.useMemo(()=>{const x=Array.from(l.commands.values()).filter(g=>!g.hidden);if(!l.query.trim()){const g=l.recentIds.map(O=>l.commands.get(O)).filter(O=>!!O&&!O.hidden),X=x.filter(O=>!l.recentIds.includes(O.id));return X.sort((O,V)=>O.label.localeCompare(V.label)),[...g,...X].map(O=>({command:O,match:null,isRecent:l.recentIds.includes(O.id)}))}return x.map(g=>{const X=ze(l.query,g.label),O=g.description?ze(l.query,g.description):null,V=g.keywords?.map(Z=>ze(l.query,Z)).filter(Boolean)[0]??null,Q=[X,O,V].filter(Boolean).sort((Z,ie)=>(ie?.score??0)-(Z?.score??0))[0]??null;return{command:g,match:Q,isRecent:!1}}).filter(g=>g.match!==null).sort((g,X)=>(X.match?.score??0)-(g.match?.score??0))},[l.commands,l.query,l.recentIds]).slice(0,o),j=n.useCallback(async x=>{const b=l.commands.get(x);if(!(!b||b.disabled)){v(!0);try{await b.action(),p({type:"ADD_RECENT",id:x,maxRecent:u})}finally{v(!1),w&&B()}}},[l.commands,u,w,B]);n.useEffect(()=>{const x=b=>{(b.metaKey||b.ctrlKey)&&b.key==="k"&&(b.preventDefault(),N()),b.key==="Escape"&&l.isOpen&&(b.preventDefault(),B())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[N,l.isOpen,B]),n.useEffect(()=>{l.isOpen&&requestAnimationFrame(()=>_.current?.focus())},[l.isOpen]);const M=n.useCallback(x=>{const b=y.length;if(b){if(x.key==="ArrowDown")x.preventDefault(),p({type:"SET_SELECTED",index:(l.selectedIndex+1)%b});else if(x.key==="ArrowUp")x.preventDefault(),p({type:"SET_SELECTED",index:(l.selectedIndex-1+b)%b});else if(x.key==="Enter"){x.preventDefault();const g=y[l.selectedIndex];g&&j(g.command.id)}}},[y,l.selectedIndex,j]);n.useEffect(()=>{if(!f.current)return;f.current.children[l.selectedIndex]?.scrollIntoView({block:"nearest"})},[l.selectedIndex]);const z=n.useMemo(()=>({registerCommand:a,unregisterCommand:S,registerCommands:E,open:Y,close:B,toggle:N,isOpen:l.isOpen,executeCommand:j}),[a,S,E,Y,B,N,l.isOpen,j]),$=n.useMemo(()=>{const x=new Map;for(const b of y){const g=b.command.category??R;x.has(g)||x.set(g,[]),x.get(g).push(b)}return x},[y,R]);let P=0;return e.jsxs(Fe.Provider,{value:z,children:[t,l.isOpen&&be.createPortal(e.jsx("div",{className:`nice-command-palette__overlay ${d??""}`,onClick:B,children:e.jsxs("div",{className:"nice-command-palette",role:"dialog","aria-label":C("commandPalette.title","Command palette"),"aria-modal":"true",onClick:x=>x.stopPropagation(),children:[e.jsx("div",{className:"nice-command-palette__input-wrapper",children:e.jsx("input",{ref:_,className:"nice-command-palette__input",type:"text",placeholder:c??C("commandPalette.placeholder","Type a command..."),value:l.query,onChange:x=>p({type:"SET_QUERY",query:x.target.value}),onKeyDown:M,"aria-label":C("commandPalette.search","Search commands"),"aria-autocomplete":"list","aria-controls":"nice-command-palette-list","aria-activedescendant":y[l.selectedIndex]?`nice-cmd-${y[l.selectedIndex].command.id}`:void 0})}),e.jsxs("div",{ref:f,id:"nice-command-palette-list",className:"nice-command-palette__list",role:"listbox",children:[y.length===0&&e.jsx("div",{className:"nice-command-palette__empty",children:m??C("commandPalette.empty","No commands found")}),Array.from($.entries()).map(([x,b])=>e.jsxs("div",{className:"nice-command-palette__group",children:[e.jsx("div",{className:"nice-command-palette__category",children:x}),b.map(g=>{const X=P++,O=X===l.selectedIndex;return e.jsxs("div",{id:`nice-cmd-${g.command.id}`,className:`nice-command-palette__item ${O?"nice-command-palette__item--selected":""} ${g.command.disabled?"nice-command-palette__item--disabled":""}`,role:"option","aria-selected":O,"aria-disabled":g.command.disabled,onClick:()=>!g.command.disabled&&j(g.command.id),onMouseEnter:()=>p({type:"SET_SELECTED",index:X}),children:[g.command.icon&&e.jsx("span",{className:"nice-command-palette__icon",children:g.command.icon}),e.jsxs("div",{className:"nice-command-palette__label-group",children:[e.jsx("span",{className:"nice-command-palette__label",children:g.match&&l.query?qe(g.command.label,g.match.indices):g.command.label}),g.command.description&&e.jsx("span",{className:"nice-command-palette__description",children:g.command.description})]}),g.command.shortcut&&e.jsx("kbd",{className:"nice-command-palette__shortcut",children:g.command.shortcut}),g.isRecent&&e.jsx("span",{className:"nice-command-palette__recent-badge",children:C("commandPalette.recent","Recent")})]},g.command.id)})]},x))]}),r&&e.jsx("div",{className:"nice-command-palette__executing",children:C("commandPalette.executing","Executing...")})]})}),I)]})};Ae.displayName="NiceCommandPaletteProvider";function St(t){const{registerCommands:i,unregisterCommand:c}=We();n.useEffect(()=>(i(t),()=>{for(const o of t)c(o.id)}),[])}const Ke=n.forwardRef(({blocked:t,message:i,spinner:c,blur:o,children:u,className:d,style:m,id:w},h)=>{const k=L.useControlId(w);return e.jsxs("div",{ref:h,id:k,className:`nice-block-ui ${d||""}`,style:{position:"relative",...m},children:[u,t&&e.jsx("div",{className:`nice-block-ui__overlay${o?" nice-block-ui__overlay--blur":""}`,"aria-busy":"true",role:"alert",children:(c||i)&&e.jsxs("div",{className:"nice-block-ui__content",children:[c&&e.jsx("div",{className:"nice-block-ui__spinner","aria-hidden":"true"}),i&&e.jsx("div",{className:"nice-block-ui__message",children:i})]})})]})});Ke.displayName="NiceBlockUI";const Ue=n.forwardRef(({windows:t,children:i,onChange:c,onClose:o,onFocus:u,showTaskbar:d=!0,size:m="md",className:w,style:h,id:k,...C},R)=>{const I=L.useControlId(k),{t:l}=L.useNiceTranslation(),[p,_]=n.useState(null),f=n.useRef(null),r=t??[],v=Math.max(1,...r.map(s=>s.zIndex??1)),a=n.useCallback((s,y)=>{const j=r.map(M=>M.key===s?{...M,...y}:M);c?.(j)},[r,c]),S=n.useCallback(s=>{a(s,{zIndex:v+1}),u?.(s)},[a,v,u]),E=n.useCallback(s=>{o?.(s),c?.(r.filter(y=>y.key!==s))},[r,c,o]),Y=n.useCallback(s=>{const y=r.find(j=>j.key===s);y&&a(s,{minimized:!y.minimized,maximized:!1})},[r,a]),B=n.useCallback(s=>{const y=r.find(j=>j.key===s);y&&a(s,{maximized:!y.maximized,minimized:!1})},[r,a]);n.useEffect(()=>{if(!p)return;const s=j=>{const M=r.find(z=>z.key===p.key);if(M)if(p.mode==="move")a(p.key,{x:j.clientX-p.offsetX,y:j.clientY-p.offsetY});else{const $=f.current?.getBoundingClientRect(),P=$?.left??0,x=$?.top??0;a(p.key,{width:Math.max(200,j.clientX-P-M.x),height:Math.max(100,j.clientY-x-M.y)})}},y=()=>_(null);return document.addEventListener("mousemove",s),document.addEventListener("mouseup",y),()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",y)}},[p,r,a]);const N=n.useCallback((s,y,j)=>{y.preventDefault();const M=r.find(z=>z.key===s);M&&(S(s),_({key:s,offsetX:j==="move"?y.clientX-M.x:0,offsetY:j==="move"?y.clientY-M.y:0,mode:j}))},[r,S]);return e.jsxs("div",{ref:s=>{f.current=s,typeof R=="function"?R(s):R&&(R.current=s)},id:I,className:`nice-wm nice-wm--${m} ${w??""}`,style:{...h,position:"relative",overflow:"hidden"},...C,children:[r.map(s=>{if(s.minimized)return null;const y=s.maximized,j=y?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:s.zIndex??1}:{position:"absolute",top:s.y,left:s.x,width:s.width,height:s.height,zIndex:s.zIndex??1};return e.jsxs("div",{className:`nice-wm__window ${y?"nice-wm__window--maximized":""}`,style:j,onMouseDown:()=>S(s.key),role:"dialog","aria-label":s.title,children:[e.jsxs("div",{className:"nice-wm__titlebar",onMouseDown:M=>!y&&N(s.key,M,"move"),children:[s.icon&&e.jsx("span",{className:"nice-wm__icon",children:s.icon}),e.jsx("span",{className:"nice-wm__title",children:s.title}),e.jsxs("div",{className:"nice-wm__controls",children:[(s.minimizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--min",onClick:()=>Y(s.key),title:l("wm.minimize","Minimize"),children:e.jsx(L.NiceIcon,{name:"minus",size:14})}),(s.maximizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--max",onClick:()=>B(s.key),title:l("wm.maximize","Maximize"),children:e.jsx(L.NiceIcon,{name:y?"copy":"window",size:14})}),(s.closable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--close",onClick:()=>E(s.key),title:l("wm.close","Close"),children:e.jsx(L.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-wm__body",children:s.content}),(s.resizable??!0)&&!y&&e.jsx("div",{className:"nice-wm__resize-handle",onMouseDown:M=>N(s.key,M,"resize")})]},s.key)}),t===void 0&&i,d&&e.jsx("div",{className:"nice-wm__taskbar",role:"toolbar","aria-label":l("wm.taskbar","Taskbar"),children:r.map(s=>e.jsxs("button",{type:"button",className:`nice-wm__taskbar-btn ${s.minimized?"nice-wm__taskbar-btn--minimized":""}`,onClick:()=>{s.minimized&&Y(s.key),S(s.key)},children:[s.icon&&e.jsx("span",{className:"nice-wm__taskbar-icon",children:s.icon}),e.jsx("span",{className:"nice-wm__taskbar-label",children:s.title})]},s.key))})]})});Ue.displayName="NiceWindowManager";function Tt(t,i){const c=document.querySelector(t);if(!c)return null;const o=c.getBoundingClientRect();return{top:o.top-i+window.scrollY,left:o.left-i+window.scrollX,width:o.width+i*2,height:o.height+i*2}}function zt(t,i,c,o){const d={w:window.innerWidth,h:window.innerHeight+window.scrollY},m={top:{top:t.top-c-12,left:t.left+t.width/2-i/2},bottom:{top:t.top+t.height+12,left:t.left+t.width/2-i/2},left:{top:t.top+t.height/2-c/2,left:t.left-i-12},right:{top:t.top+t.height/2-c/2,left:t.left+t.width+12}};if(o&&o!=="auto")return{...m[o],actualPlacement:o};for(const w of["bottom","top","right","left"]){const h=m[w];if(h.top>=0&&h.left>=0&&h.top+c<=d.h&&h.left+i<=d.w)return{...h,actualPlacement:w}}return{...m.bottom,actualPlacement:"bottom"}}const ye={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function $t(){return e.jsxs("svg",{...ye,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Lt(){return e.jsx("svg",{...ye,children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Pt(){return e.jsx("svg",{...ye,children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Dt(){return e.jsxs("svg",{...ye,children:[e.jsx("polygon",{points:"5 4 15 12 5 20 5 4"}),e.jsx("line",{x1:"19",y1:"5",x2:"19",y2:"19"})]})}function Yt(){return e.jsx("svg",{...ye,children:e.jsx("polygon",{points:"6 4 20 12 6 20 6 4",fill:"currentColor"})})}function Bt(){return e.jsxs("svg",{...ye,children:[e.jsx("rect",{x:"6",y:"4",width:"4",height:"16",fill:"currentColor"}),e.jsx("rect",{x:"14",y:"4",width:"4",height:"16",fill:"currentColor"})]})}function Te(t,i,c){return c==="text"?e.jsx("span",{className:"nice-tutorial__btn-label",children:i}):c==="icon-text"?e.jsxs(e.Fragment,{children:[t,e.jsx("span",{className:"nice-tutorial__btn-label",children:i})]}):t}const Xt=[],Xe=({steps:t=Xt,active:i,onFinish:c,onSkip:o,onStepChange:u,closeOnEscape:d=!0,closeOnOverlayClick:m=!1,showProgress:w=!0,showSkipButton:h=!0,labels:k,animationDuration:C=300,overlayOpacity:R=.6,zIndex:I=1e4,buttonsPlacement:l="floating-bottom",buttonsDisplay:p="icon",showAutoplay:_=!0,autoplayInterval:f=5e3,autoplaySpeedRange:r={min:2e3,max:15e3},onAutoplayChange:v})=>{const[a,S]=n.useState(0),[E,Y]=n.useState(null),[B,N]=n.useState({w:340,h:200}),[s,y]=n.useState(!0),[j,M]=n.useState(!1),[z,$]=n.useState(f),P=n.useRef(null),x=n.useRef(-1),b=t[a],g=a===t.length-1,X=a===0,O=k?.next??"Next",V=k?.back??"Back",Q=k?.finish??"Finish",Z=k?.skip??"Skip",ie=k?.stepOf??"of",he=k?.play??"Play",fe=k?.pause??"Pause",Ie=k?.speed??"Speed",Ne=k?.close??"Close";n.useEffect(()=>{i&&(S(0),M(!1),$(f))},[i,f]),n.useEffect(()=>{if(P.current){const D=P.current.getBoundingClientRect();N({w:D.width,h:D.height})}},[a,i]),n.useEffect(()=>{if(!i||!b)return;const D=b.highlightPadding??0,H=()=>{const A=Tt(b.target,D);Y(A)};if(H(),b.scrollIntoView!==!1){document.querySelector(b.target)?.scrollIntoView({behavior:"smooth",block:"center"});const J=setTimeout(H,350);return()=>clearTimeout(J)}},[i,b,a]),n.useEffect(()=>{!i||!b||x.current!==a&&(x.current>=0&&x.current<t.length&&t[x.current]?.onLeave?.(),b.onEnter?.(),x.current=a)},[i,b,a,t]);const se=n.useCallback(()=>{if(g)b?.onLeave?.(),c?.();else{const D=a+1;S(D),u?.(D)}},[a,g,c,u,b]),pe=n.useCallback(()=>{if(!X){const D=a-1;S(D),u?.(D)}},[a,X,u]);n.useEffect(()=>{if(!i||!b?.advanceOn)return;const D=document.querySelector(b.target);if(!D)return;const H=()=>se();return D.addEventListener(b.advanceOn.event,H),()=>D.removeEventListener(b.advanceOn.event,H)},[i,b,a,se]),n.useEffect(()=>{if(!i)return;const D=H=>{H.key==="Escape"&&d?o?.():H.key==="ArrowRight"?se():H.key==="ArrowLeft"&&pe()};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[i,a,d,se,pe,o]),n.useEffect(()=>{y(!0);const D=setTimeout(()=>y(!1),C);return()=>clearTimeout(D)},[a,C]),n.useEffect(()=>{if(!i||!j)return;const D=setInterval(()=>{S(H=>{if(H>=t.length-1)return M(!1),v?.(!1),t[H]?.onLeave?.(),c?.(),H;const A=H+1;return u?.(A),A})},Math.max(500,z));return()=>clearInterval(D)},[i,j,z,t,v,c,u]);const Se=n.useCallback(()=>{M(D=>{const H=!D;return v?.(H),H})},[v]),xe=n.useMemo(()=>E?zt(E,B.w,B.h,b?.placement):{top:typeof window<"u"?window.innerHeight/2:0,left:typeof window<"u"?window.innerWidth/2:0,actualPlacement:"bottom"},[E,B,b?.placement]),ke=t.length===0?0:(a+1)/t.length*100,G=n.useCallback(D=>{const H=_&&t.length>1,A=h&&!g&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--skip nice-tutorial__btn--${p}`,onClick:o,"aria-label":Z,title:Z,children:Te(e.jsx(Dt,{}),Z,p)}),J=!X&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--back nice-tutorial__btn--${p}`,onClick:pe,"aria-label":V,title:V,children:Te(e.jsx(Lt,{}),V,p)}),we=!b?.waitForAction&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--next nice-tutorial__btn--${p}`,onClick:se,"aria-label":g?Q:O,title:g?Q:O,children:Te(e.jsx(Pt,{}),g?Q:O,p)}),ge=H&&e.jsx("button",{type:"button",className:["nice-tutorial__btn","nice-tutorial__btn--play",`nice-tutorial__btn--${p}`,j?"nice-tutorial__btn--active":""].filter(Boolean).join(" "),onClick:Se,"aria-label":j?fe:he,title:j?fe:he,"aria-pressed":j,children:Te(j?e.jsx(Bt,{}):e.jsx(Yt,{}),j?fe:he,p)});return e.jsxs("div",{className:["nice-tutorial__controls",D?"nice-tutorial__controls--inline":"nice-tutorial__controls--floating-bottom"].join(" "),style:D?void 0:{zIndex:I+2},role:"group","aria-label":"Tutorial controls",children:[A,J,w&&e.jsxs("span",{className:"nice-tutorial__step-label","aria-live":"polite",children:[a+1," ",ie," ",t.length]}),we,H&&e.jsx("div",{className:"nice-tutorial__progress-bar",role:"progressbar","aria-valuenow":Math.round(ke),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${a+1} ${ie} ${t.length}`,children:e.jsx("div",{className:"nice-tutorial__progress-bar-fill",style:{width:`${ke}%`}})}),ge,H&&e.jsxs("label",{className:"nice-tutorial__speed",children:[e.jsx("input",{type:"range",className:"nice-tutorial__speed-slider",min:r.min,max:r.max,step:500,value:r.min+r.max-z,onChange:$e=>$(r.min+r.max-Number($e.target.value)),"aria-label":Ie}),e.jsxs("span",{className:"nice-tutorial__speed-value",children:[(z/1e3).toFixed(1),"s"]})]})]})},[_,h,w,p,X,g,o,Z,V,O,Q,he,fe,Ie,ie,pe,se,b,j,Se,a,t.length,ke,z,r,I]);if(!i||!b)return null;const je=typeof document<"u"?Math.max(document.documentElement.scrollWidth,window.innerWidth):0,F=typeof document<"u"?Math.max(document.documentElement.scrollHeight,window.innerHeight):0;return e.jsxs("div",{className:"nice-tutorial",style:{zIndex:I},"aria-modal":"true",role:"dialog","aria-label":"Tutorial",children:[e.jsxs("svg",{className:"nice-tutorial__overlay",style:{position:"absolute",top:0,left:0,width:je,height:F,pointerEvents:"auto"},onClick:m?o:void 0,children:[e.jsx("defs",{children:e.jsxs("mask",{id:"nice-tutorial-mask",children:[e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),E&&e.jsx("rect",{x:E.left,y:E.top,width:E.width,height:E.height,rx:"4",fill:"black",className:s?"nice-tutorial__spotlight--entering":""})]})}),e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`rgba(0,0,0,${R})`,mask:"url(#nice-tutorial-mask)"})]}),E&&e.jsx("div",{className:`nice-tutorial__highlight ${s?"nice-tutorial__highlight--entering":""}`,style:{position:"absolute",top:E.top,left:E.left,width:E.width,height:E.height,transition:`all ${C}ms ease`}}),b.disableInteraction&&E&&e.jsx("div",{className:"nice-tutorial__blocker",style:{position:"absolute",top:E.top,left:E.left,width:E.width,height:E.height}}),e.jsxs("div",{ref:P,className:`nice-tutorial__tooltip nice-tutorial__tooltip--${xe.actualPlacement} ${s?"nice-tutorial__tooltip--entering":""}`,style:{position:"absolute",top:xe.top,left:xe.left,transition:`all ${C}ms ease`,maxWidth:380,zIndex:I+1},children:[b.showArrow!==!1&&e.jsx("div",{className:`nice-tutorial__arrow nice-tutorial__arrow--${xe.actualPlacement}`}),e.jsxs("div",{className:"nice-tutorial__header",children:[e.jsx("h4",{className:"nice-tutorial__title",children:b.title}),h&&e.jsx("button",{type:"button",className:"nice-tutorial__close",onClick:o,"aria-label":Ne,title:Ne,children:e.jsx($t,{})})]}),e.jsx("div",{className:"nice-tutorial__content",dangerouslySetInnerHTML:{__html:L.sanitizeHtml(b.content)}}),l==="inline"&&G(!0)]}),l==="floating-bottom"&&G(!1)]})};Xe.displayName="NiceTutorial";const Ge=n.createContext({startTutorial:()=>{},stopTutorial:()=>{},isActive:!1,currentStep:0,nextStep:()=>{},prevStep:()=>{},goToStep:()=>{}});function Ot(){return n.useContext(Ge)}const Ve=({children:t})=>{const[i,c]=n.useState([]),[o,u]=n.useState(!1),[d,m]=n.useState(0),w=n.useCallback(l=>{c(l),m(0),u(!0)},[]),h=n.useCallback(()=>{u(!1),m(0),c([])},[]),k=n.useCallback(()=>{m(l=>Math.min(l+1,i.length-1))},[i.length]),C=n.useCallback(()=>{m(l=>Math.max(l-1,0))},[]),R=n.useCallback(l=>{m(Math.max(0,Math.min(l,i.length-1)))},[i.length]),I={startTutorial:w,stopTutorial:h,isActive:o,currentStep:d,nextStep:k,prevStep:C,goToStep:R};return e.jsxs(Ge.Provider,{value:I,children:[t,o&&i.length>0&&e.jsx(Xe,{steps:i,active:o,onFinish:h,onSkip:h,onStepChange:m})]})};Ve.displayName="NiceTutorialProvider";function Ht(t,i,c,o,u){const d=t<=u,m=t+u>=c,w=i<=u,h=i+u>=o;return w&&d?"top-left":w&&m?"top-right":h&&d?"bottom-left":h&&m?"bottom-right":d?"left":m?"right":w?"top":h?"bottom":"none"}function qt(t){switch(t){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{left:"50%",top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,top:"50%",width:"100%",height:"50%"};case"top-left":return{left:0,top:0,width:"50%",height:"50%"};case"top-right":return{left:"50%",top:0,width:"50%",height:"50%"};case"bottom-left":return{left:0,top:"50%",width:"50%",height:"50%"};case"bottom-right":return{left:"50%",top:"50%",width:"50%",height:"50%"};default:return null}}const Qe=n.forwardRef(({windowKey:t,title:i,icon:c,children:o,footer:u,x:d,y:m,defaultPosition:w,width:h=480,height:k=360,minWidth:C=200,minHeight:R=120,maxWidth:I,maxHeight:l,zIndex:p=1,closable:_=!0,minimizable:f=!0,maximizable:r=!0,fullscreenable:v=!1,pinnable:a=!1,resizable:S=!0,draggable:E=!0,snappable:Y=!0,snapThreshold:B=20,minimized:N,maximized:s,fullscreen:y,pinned:j,focused:M,onClose:z,onMinimize:$,onMaximize:P,onFullscreen:x,onPin:b,onFocus:g,onMove:X,onResize:O,onSnap:V,onTitleBarDoubleClick:Q,size:Z="md",statusBar:ie,titleBarActions:he,className:fe,style:Ie,id:Ne,accessMode:se,...pe},Se)=>{const xe=L.useControlId(Ne),ke=L.useNiceAccessMode(se,Ne),{t:G}=L.useNiceTranslation(),je=n.useRef(null);je.current==null&&(je.current=`nice-window-${Math.random().toString(36).slice(2,10)}`);const F=t??je.current,D=d??w?.x??100,H=m??w?.y??100,[A,J]=n.useState({x:D,y:H}),[we,ge]=n.useState({width:h,height:k}),[$e,Ze]=n.useState(!1),[Je,et]=n.useState(!1),[tt,nt]=n.useState(!1),[it,st]=n.useState(!1),[te,Le]=n.useState("none"),ot=N??$e,ee=s??Je,K=y??tt,Ce=j??it,Pe=M??!0,ue=A.x,me=A.y,oe=we.width,ce=we.height,re=n.useRef(null),U=n.useRef(null),q=n.useRef(null),ct=n.useCallback(()=>{z?.(F)},[F,z]),rt=n.useCallback(()=>{Ze(!0),$?.(F)},[F,$]),De=n.useCallback(()=>{const T=!ee;et(T),!T&&q.current?(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h}),q.current=null):T&&(q.current={x:ue,y:me,w:oe,h:ce}),Le("none"),P?.(F,T)},[F,ee,ue,me,oe,ce,P]),Ye=n.useCallback(()=>{const T=!K;nt(T),T?q.current={x:ue,y:me,w:oe,h:ce}:q.current&&(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h}),q.current=null),x?.(F,T)},[F,K,ue,me,oe,ce,x]),at=n.useCallback(()=>{const T=!Ce;st(T),b?.(F,T)},[F,Ce,b]),Ee=n.useCallback(()=>{g?.(F)},[F,g]),lt=n.useCallback(()=>{Q?Q(F):r&&De()},[F,r,De,Q]);n.useEffect(()=>{const T=ae=>{if(!re.current)return;const ne=ae.clientX-re.current.startX+re.current.origX,Me=ae.clientY-re.current.startY+re.current.origY;J({x:ne,y:Me}),X?.(F,{x:ne,y:Me})},W=ae=>{if(re.current){if(Y){const ne=Ht(ae.clientX,ae.clientY,window.innerWidth,window.innerHeight,B);ne!=="none"&&(q.current={x:A.x,y:A.y,w:oe,h:ce},Le(ne),V?.(F,ne))}re.current=null}};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",W)}});const dt=n.useCallback(T=>{!E||ee||K||(T.preventDefault(),te!=="none"&&(q.current&&(J({x:q.current.x,y:q.current.y}),ge({width:q.current.w,height:q.current.h})),Le("none")),Ee(),re.current={startX:T.clientX,startY:T.clientY,origX:ue,origY:me})},[E,ee,K,te,ue,me,Ee]);n.useEffect(()=>{const T=ae=>{if(!U.current)return;const ne=ae.clientX-U.current.startX,Me=ae.clientY-U.current.startY,_e=U.current.handle;let le=U.current.origW,de=U.current.origH;if(_e.includes("e")&&(le=U.current.origW+ne),_e.includes("w")&&(le=U.current.origW-ne),_e.includes("s")&&(de=U.current.origH+Me),_e.includes("n")&&(de=U.current.origH-Me),le=Math.max(C,I?Math.min(I,le):le),de=Math.max(R,l?Math.min(l,de):de),_e.includes("w")){const Be=we.width-le;J(Re=>({...Re,x:Re.x+Be}))}if(_e.includes("n")){const Be=we.height-de;J(Re=>({...Re,y:Re.y+Be}))}ge({width:le,height:de}),O?.(F,{width:le,height:de})},W=()=>{U.current=null};return document.addEventListener("mousemove",T),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",W)}});const ut=n.useCallback((T,W)=>{!S||ee||K||te!=="none"||(W.preventDefault(),W.stopPropagation(),Ee(),U.current={startX:W.clientX,startY:W.clientY,origW:oe,origH:ce,handle:T})},[S,ee,K,te,oe,ce,Ee]);if(n.useEffect(()=>{if(!Pe)return;const T=W=>{W.key==="Escape"&&K&&Ye()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[Pe,K,Ye]),ke==="hidden"||ot)return null;const Oe=te!=="none"?qt(te):null,He=ee||K,mt=K?{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:999999}:ee?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:p}:Oe?{position:"absolute",...Oe,zIndex:p}:{position:"absolute",top:me,left:ue,width:oe,height:ce,zIndex:p},ht=["n","e","s","w","ne","se","sw","nw"],ft={n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize",ne:"nesw-resize",sw:"nesw-resize",nw:"nwse-resize",se:"nwse-resize"};return e.jsxs("div",{ref:Se,id:xe,className:`nice-window nice-window--${Z} ${Pe?"nice-window--focused":""} ${Ce?"nice-window--pinned":""} ${He?"nice-window--maximized":""} ${te!=="none"?`nice-window--snapped-${te}`:""} ${fe??""}`,style:{...mt,...Ie},onMouseDown:Ee,role:"dialog","aria-label":i,...pe,children:[e.jsxs("div",{className:"nice-window__titlebar",onMouseDown:dt,onDoubleClick:lt,children:[c&&e.jsx("span",{className:"nice-window__icon",children:c}),e.jsx("span",{className:"nice-window__title",children:i}),e.jsxs("div",{className:"nice-window__actions",children:[he,a&&e.jsx("button",{type:"button",className:`nice-window__action nice-window__action--pin ${Ce?"nice-window__action--active":""}`,onClick:at,title:Ce?G("window.unpin","Unpin"):G("window.pin","Pin"),children:e.jsx(L.NiceIcon,{name:"paperclip",size:14})}),f&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--minimize",onClick:rt,title:G("window.minimize","Minimize"),children:e.jsx(L.NiceIcon,{name:"minus",size:14})}),r&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--maximize",onClick:De,title:ee?G("window.restore","Restore"):G("window.maximize","Maximize"),children:e.jsx(L.NiceIcon,{name:ee?"copy":"window",size:14})}),v&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--fullscreen",onClick:Ye,title:K?G("window.exitFullscreen","Exit Full Screen"):G("window.fullscreen","Full Screen"),children:e.jsx(L.NiceIcon,{name:K?"collapse":"expand",size:14})}),_&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--close",onClick:ct,title:G("window.close","Close"),children:e.jsx(L.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-window__body",children:o}),u&&e.jsx("div",{className:"nice-window__footer",children:u}),ie&&e.jsx("div",{className:"nice-window__statusbar",children:ie}),S&&!He&&te==="none"&&e.jsx(e.Fragment,{children:ht.map(T=>e.jsx("div",{className:`nice-window__resize nice-window__resize--${T}`,style:{cursor:ft[T]},onMouseDown:W=>ut(T,W)},T))})]})});Qe.displayName="NiceWindow";exports.NiceActionSheet=pt;exports.NiceBlockUI=Ke;exports.NiceBottomSheet=Et;exports.NiceBox=gt;exports.NiceCommandPaletteProvider=Ae;exports.NiceContextMenu=Rt;exports.NiceDrawer=Ct;exports.NiceLoadPanel=wt;exports.NiceModal=yt;exports.NiceModalBody=kt;exports.NiceModalFooter=jt;exports.NiceModalHeader=Nt;exports.NicePopover=Mt;exports.NicePopover$1=xt;exports.NiceResizable=bt;exports.NiceResponsiveBox=_t;exports.NiceScrollView=vt;exports.NiceTutorial=Xe;exports.NiceTutorialProvider=Ve;exports.NiceWindow=Qe;exports.NiceWindowManager=Ue;exports.fuzzyMatch=ze;exports.highlightMatches=qe;exports.useCommandPalette=We;exports.useNiceTutorial=Ot;exports.useRegisterCommands=St;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),X=require("@nice2dev/ui-core"),n=require("react"),ht=({visible:t,onClose:i,title:s,items:l,showCancelButton:h=!0,cancelText:f,size:x="md",disabled:w,readOnly:u,loading:b,error:a,className:v,style:$})=>{const{t:I}=X.useNiceTranslation();if(!t)return null;const N=w||b||u;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-actionsheet__overlay",onClick:i}),e.jsxs("div",{className:`nice-actionsheet nice-actionsheet--${x} ${w?"nice-actionsheet--disabled":""} ${u?"nice-actionsheet--readonly":""} ${b?"nice-actionsheet--loading":""} ${a?"nice-actionsheet--error":""} ${v||""}`,style:$,"aria-disabled":w||void 0,"aria-readonly":u||void 0,"aria-busy":b||void 0,children:[a&&e.jsx("div",{className:"nice-actionsheet__error",role:"alert",children:a}),b&&e.jsx("span",{className:"nice-actionsheet__spinner","aria-hidden":"true",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),s&&e.jsx("div",{className:"nice-actionsheet__title",children:s}),e.jsx("div",{className:"nice-actionsheet__items",children:l.map((j,P)=>e.jsxs("button",{className:`nice-actionsheet__item ${j.type==="danger"?"nice-actionsheet__item--danger":""}`,disabled:j.disabled||N,onClick:()=>{N||(j.onClick?.(),i())},children:[j.icon&&e.jsx("span",{className:"nice-actionsheet__icon",children:j.icon}),j.text]},P))}),h&&e.jsx("button",{className:"nice-actionsheet__cancel",onClick:i,children:f||I("cancel","Cancel")})]})]})},ft=({visible:t,onClose:i,targetRef:s,position:l="bottom",title:h,showArrow:f=!0,width:x,children:w,className:u,style:b,displayStyle:a})=>{X.useComponentDisplayClass("tooltip",a);const v=n.useRef(null),[$,I]=n.useState({top:0,left:0}),N=n.useCallback(()=>{const j=s.current,P=v.current;if(!j||!P)return;const c=j.getBoundingClientRect(),g=P.getBoundingClientRect();let r=0,C=0;const _=8;switch(l){case"top":r=c.top-g.height-_,C=c.left+(c.width-g.width)/2;break;case"bottom":r=c.bottom+_,C=c.left+(c.width-g.width)/2;break;case"left":r=c.top+(c.height-g.height)/2,C=c.left-g.width-_;break;case"right":r=c.top+(c.height-g.height)/2,C=c.right+_;break}I({top:r+window.scrollY,left:C+window.scrollX})},[s,l]);return n.useEffect(()=>{if(t){requestAnimationFrame(N);const j=P=>{v.current&&!v.current.contains(P.target)&&s.current&&!s.current.contains(P.target)&&i()};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)}},[t,N,i,s]),t?e.jsxs("div",{ref:v,className:`nice-popover nice-popover--${l} ${u||""}`,style:{...b,position:"absolute",top:$.top,left:$.left,width:x},children:[f&&e.jsx("div",{className:`nice-popover__arrow nice-popover__arrow--${l}`}),h&&e.jsx("div",{className:"nice-popover__title",children:h}),e.jsx("div",{className:"nice-popover__content",children:w})]}):null},pt=({visible:t,message:i,container:s,showIndicator:l=!0,shading:h=!0,className:f,style:x})=>{const{t:w}=X.useNiceTranslation();if(!t)return null;const u=!!s?.current,b=e.jsxs("div",{className:`nice-loadpanel ${f||""}`,style:x,children:[h&&e.jsx("div",{className:"nice-loadpanel__shade"}),e.jsxs("div",{className:"nice-loadpanel__box",children:[l&&e.jsx("div",{className:"nice-spinner nice-spinner--md"}),e.jsx("span",{className:"nice-loadpanel__text",children:i||w("loading","Loading...")})]})]});if(u&&s.current){const a=s.current;return a.style.position=a.style.position||"relative",b}return b},xt=({direction:t="row",align:i,justify:s,wrap:l,gap:h,flex:f,children:x,className:w,style:u})=>e.jsx("div",{className:`nice-box ${w||""}`,style:{display:"flex",flexDirection:t,alignItems:i,justifyContent:s,flexWrap:l?"wrap":void 0,gap:h,flex:f,...u},children:x}),wt=({direction:t="row",items:i,gap:s,className:l,style:h})=>e.jsx("div",{className:`nice-responsivebox ${l||""}`,style:{display:"flex",flexDirection:t,gap:s,...h},children:i.map((f,x)=>e.jsx("div",{style:{flex:f.ratio??1,flexBasis:f.baseSize,flexShrink:f.shrink??1},children:f.children},x))}),_t=({width:t=200,height:i=200,minWidth:s=50,minHeight:l=50,maxWidth:h=1/0,maxHeight:f=1/0,handles:x=["right","bottom","bottomRight"],onResize:w,children:u,className:b,style:a})=>{const[v,$]=n.useState({width:t,height:i}),I=n.useRef(null),N=(c,g)=>{g.preventDefault();const r=g.clientX,C=g.clientY,_=v.width,U=v.height,M={n:"top",s:"bottom",e:"right",w:"left",ne:"topRight",se:"bottomRight",sw:"bottomLeft",nw:"topLeft"}[c]??c,o=M==="right"||M==="topRight"||M==="bottomRight",E=M==="left"||M==="topLeft"||M==="bottomLeft",k=M==="bottom"||M==="bottomRight"||M==="bottomLeft",R=M==="top"||M==="topRight"||M==="topLeft",d=m=>{const L=m.clientX-r,p=m.clientY-C;let Y=_,O=U;o&&(Y=_+L),E&&(Y=_-L),k&&(O=U+p),R&&(O=U-p),Y=Math.max(s,Math.min(h,Y)),O=Math.max(l,Math.min(f,O)),$({width:Y,height:O}),w?.({width:Y,height:O})},y=()=>{document.removeEventListener("pointermove",d),document.removeEventListener("pointerup",y)};document.addEventListener("pointermove",d),document.addEventListener("pointerup",y)},j=c=>{switch(c){case"top":case"bottom":return"ns-resize";case"left":case"right":return"ew-resize";case"topLeft":case"bottomRight":return"nwse-resize";case"topRight":case"bottomLeft":return"nesw-resize";default:return"default"}},P=c=>{const g={position:"absolute",zIndex:1},r=8;return c==="right"?{...g,top:0,right:-r/2,width:r,height:"100%",cursor:j(c)}:c==="bottom"?{...g,left:0,bottom:-r/2,width:"100%",height:r,cursor:j(c)}:c==="left"?{...g,top:0,left:-r/2,width:r,height:"100%",cursor:j(c)}:c==="top"?{...g,top:-r/2,left:0,width:"100%",height:r,cursor:j(c)}:c==="bottomRight"?{...g,bottom:-r/2,right:-r/2,width:r*2,height:r*2,cursor:j(c)}:c==="bottomLeft"?{...g,bottom:-r/2,left:-r/2,width:r*2,height:r*2,cursor:j(c)}:c==="topRight"?{...g,top:-r/2,right:-r/2,width:r*2,height:r*2,cursor:j(c)}:c==="topLeft"?{...g,top:-r/2,left:-r/2,width:r*2,height:r*2,cursor:j(c)}:g};return e.jsxs("div",{ref:I,className:`nice-resizable ${b||""}`,style:{...a,width:v.width,height:v.height,position:"relative",overflow:"hidden"},children:[u,x.map(c=>e.jsx("div",{style:P(c),onPointerDown:g=>N(c,g)},c))]})},gt=({direction:t="vertical",showScrollbar:i="onInteraction",width:s,height:l,onScroll:h,children:f,className:x,style:w})=>{const u=t==="horizontal"||t==="both"?"auto":"hidden",b=t==="vertical"||t==="both"?"auto":"hidden",a=i==="never"?"nice-scrollview--hide-sb":i==="always"?"nice-scrollview--show-sb":"";return e.jsx("div",{className:`nice-scrollview ${a} ${x||""}`,style:{...w,width:s,height:l,overflowX:u,overflowY:b},onScroll:h,children:f})};function Me(t,i){if(!t)return{score:1,indices:[]};const s=t.toLowerCase(),l=i.toLowerCase();let h=0;const f=[];let x=0,w=-1;for(let u=0;u<l.length&&h<s.length;u++)l[u]===s[h]&&(f.push(u),w===u-1&&(x+=3),(u===0||/[\s\-_/.]/.test(i[u-1]))&&(x+=5),i[u]===t[h]&&(x+=1),x+=1,w=u,h++);return h<s.length?null:(x-=f[0]*.1,{score:x,indices:f})}function qe(t,i){if(i.length===0)return[t];const s=[];let l=0;const h=new Set(i);for(let f=0;f<t.length;f++)h.has(f)&&(l<f&&s.push(t.slice(l,f)),s.push(n.createElement("mark",{key:`m-${f}`,className:"nice-command-palette__match"},t[f])),l=f+1);return l<t.length&&s.push(t.slice(l)),s}function bt(t,i){switch(i.type){case"REGISTER":{const s=new Map(t.commands);return s.set(i.command.id,i.command),{...t,commands:s}}case"REGISTER_BATCH":{const s=new Map(t.commands);for(const l of i.commands)s.set(l.id,l);return{...t,commands:s}}case"UNREGISTER":{const s=new Map(t.commands);return s.delete(i.id),{...t,commands:s}}case"OPEN":return{...t,isOpen:!0,query:"",selectedIndex:0};case"CLOSE":return{...t,isOpen:!1,query:"",selectedIndex:0};case"SET_QUERY":return{...t,query:i.query,selectedIndex:0};case"SET_SELECTED":return{...t,selectedIndex:i.index};case"ADD_RECENT":{const s=t.recentIds.filter(l=>l!==i.id);return{...t,recentIds:[i.id,...s].slice(0,i.maxRecent)}}default:return t}}const Oe=n.createContext(null);function We(){const t=n.useContext(Oe);if(!t)throw new Error("useCommandPalette must be used within NiceCommandPaletteProvider");return t}const Ae=({children:t,commands:i,placeholder:s="Type a command...",maxVisible:l=10,maxRecent:h=5,className:f,emptyText:x="No commands found",closeOnAction:w=!0,onOpen:u,onClose:b})=>{const[a,v]=n.useReducer(bt,{commands:new Map(i?.map(d=>[d.id,d])??[]),isOpen:!1,query:"",selectedIndex:0,recentIds:[]}),$=n.useRef(null),I=n.useRef(null),[N,j]=n.useState(!1),P=n.useCallback(d=>{v({type:"REGISTER",command:d})},[]),c=n.useCallback(d=>{v({type:"UNREGISTER",id:d})},[]),g=n.useCallback(d=>{v({type:"REGISTER_BATCH",commands:d})},[]),r=n.useCallback(()=>{v({type:"OPEN"}),u?.()},[u]),C=n.useCallback(()=>{v({type:"CLOSE"}),b?.()},[b]),_=n.useCallback(()=>{a.isOpen?C():r()},[a.isOpen,C,r]),q=n.useMemo(()=>{const d=Array.from(a.commands.values()).filter(m=>!m.hidden);if(!a.query.trim()){const m=a.recentIds.map(p=>a.commands.get(p)).filter(p=>!!p&&!p.hidden),L=d.filter(p=>!a.recentIds.includes(p.id));return L.sort((p,Y)=>p.label.localeCompare(Y.label)),[...m,...L].map(p=>({command:p,match:null,isRecent:a.recentIds.includes(p.id)}))}return d.map(m=>{const L=Me(a.query,m.label),p=m.description?Me(a.query,m.description):null,Y=m.keywords?.map(K=>Me(a.query,K)).filter(Boolean)[0]??null,O=[L,p,Y].filter(Boolean).sort((K,J)=>(J?.score??0)-(K?.score??0))[0];return{command:m,match:O,isRecent:!1}}).filter(m=>m.match!==null).sort((m,L)=>(L.match?.score??0)-(m.match?.score??0))},[a.commands,a.query,a.recentIds]).slice(0,l),M=n.useCallback(async d=>{const y=a.commands.get(d);if(!(!y||y.disabled)){j(!0);try{await y.action(),v({type:"ADD_RECENT",id:d,maxRecent:h})}finally{j(!1),w&&C()}}},[a.commands,h,w,C]);n.useEffect(()=>{const d=y=>{(y.metaKey||y.ctrlKey)&&y.key==="k"&&(y.preventDefault(),_()),y.key==="Escape"&&a.isOpen&&(y.preventDefault(),C())};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[_,a.isOpen,C]),n.useEffect(()=>{a.isOpen&&requestAnimationFrame(()=>$.current?.focus())},[a.isOpen]);const o=n.useCallback(d=>{const y=q.length;if(y){if(d.key==="ArrowDown")d.preventDefault(),v({type:"SET_SELECTED",index:(a.selectedIndex+1)%y});else if(d.key==="ArrowUp")d.preventDefault(),v({type:"SET_SELECTED",index:(a.selectedIndex-1+y)%y});else if(d.key==="Enter"){d.preventDefault();const m=q[a.selectedIndex];m&&M(m.command.id)}}},[q,a.selectedIndex,M]);n.useEffect(()=>{if(!I.current)return;I.current.children[a.selectedIndex]?.scrollIntoView({block:"nearest"})},[a.selectedIndex]);const E=n.useMemo(()=>({registerCommand:P,unregisterCommand:c,registerCommands:g,open:r,close:C,toggle:_,isOpen:a.isOpen,executeCommand:M}),[P,c,g,r,C,_,a.isOpen,M]),k=n.useMemo(()=>{const d=new Map;for(const y of q){const m=y.command.category??"General";d.has(m)||d.set(m,[]),d.get(m).push(y)}return d},[q]);let R=0;return e.jsxs(Oe.Provider,{value:E,children:[t,a.isOpen&&e.jsx("div",{className:`nice-command-palette__overlay ${f??""}`,onClick:C,children:e.jsxs("div",{className:"nice-command-palette",role:"dialog","aria-label":"Command Palette","aria-modal":"true",onClick:d=>d.stopPropagation(),children:[e.jsx("div",{className:"nice-command-palette__input-wrapper",children:e.jsx("input",{ref:$,className:"nice-command-palette__input",type:"text",placeholder:s,value:a.query,onChange:d=>v({type:"SET_QUERY",query:d.target.value}),onKeyDown:o,"aria-label":"Search commands","aria-autocomplete":"list","aria-controls":"nice-command-palette-list","aria-activedescendant":q[a.selectedIndex]?`nice-cmd-${q[a.selectedIndex].command.id}`:void 0})}),e.jsxs("div",{ref:I,id:"nice-command-palette-list",className:"nice-command-palette__list",role:"listbox",children:[q.length===0&&e.jsx("div",{className:"nice-command-palette__empty",children:x}),Array.from(k.entries()).map(([d,y])=>e.jsxs("div",{className:"nice-command-palette__group",children:[e.jsx("div",{className:"nice-command-palette__category",children:d}),y.map(m=>{const L=R++,p=L===a.selectedIndex;return e.jsxs("div",{id:`nice-cmd-${m.command.id}`,className:`nice-command-palette__item ${p?"nice-command-palette__item--selected":""} ${m.command.disabled?"nice-command-palette__item--disabled":""}`,role:"option","aria-selected":p,"aria-disabled":m.command.disabled,onClick:()=>!m.command.disabled&&M(m.command.id),onMouseEnter:()=>v({type:"SET_SELECTED",index:L}),children:[m.command.icon&&e.jsx("span",{className:"nice-command-palette__icon",children:m.command.icon}),e.jsxs("div",{className:"nice-command-palette__label-group",children:[e.jsx("span",{className:"nice-command-palette__label",children:m.match&&a.query?qe(m.command.label,m.match.indices):m.command.label}),m.command.description&&e.jsx("span",{className:"nice-command-palette__description",children:m.command.description})]}),m.command.shortcut&&e.jsx("kbd",{className:"nice-command-palette__shortcut",children:m.command.shortcut}),m.isRecent&&e.jsx("span",{className:"nice-command-palette__recent-badge",children:"Recent"})]},m.command.id)})]},d))]}),N&&e.jsx("div",{className:"nice-command-palette__executing",children:"Executing..."})]})})]})};Ae.displayName="NiceCommandPaletteProvider";function vt(t){const{registerCommands:i,unregisterCommand:s}=We();n.useEffect(()=>(i(t),()=>{for(const l of t)s(l.id)}),[])}const Fe=n.forwardRef(({blocked:t,message:i,spinner:s,blur:l,children:h,className:f,style:x,id:w},u)=>{const b=X.useControlId(w);return e.jsxs("div",{ref:u,id:b,className:`nice-block-ui ${f||""}`,style:{position:"relative",...x},children:[h,t&&e.jsx("div",{className:`nice-block-ui__overlay${l?" nice-block-ui__overlay--blur":""}`,"aria-busy":"true",role:"alert",children:(s||i)&&e.jsxs("div",{className:"nice-block-ui__content",children:[s&&e.jsx("div",{className:"nice-block-ui__spinner","aria-hidden":"true"}),i&&e.jsx("div",{className:"nice-block-ui__message",children:i})]})})]})});Fe.displayName="NiceBlockUI";const He=n.forwardRef(({windows:t,children:i,onChange:s,onClose:l,onFocus:h,showTaskbar:f=!0,size:x="md",className:w,style:u,id:b,...a},v)=>{const $=X.useControlId(b),{t:I}=X.useNiceTranslation(),[N,j]=n.useState(null),P=n.useRef(null),c=t??[],g=Math.max(1,...c.map(o=>o.zIndex??1)),r=n.useCallback((o,E)=>{const k=c.map(R=>R.key===o?{...R,...E}:R);s?.(k)},[c,s]),C=n.useCallback(o=>{r(o,{zIndex:g+1}),h?.(o)},[r,g,h]),_=n.useCallback(o=>{l?.(o),s?.(c.filter(E=>E.key!==o))},[c,s,l]),U=n.useCallback(o=>{const E=c.find(k=>k.key===o);E&&r(o,{minimized:!E.minimized,maximized:!1})},[c,r]),q=n.useCallback(o=>{const E=c.find(k=>k.key===o);E&&r(o,{maximized:!E.maximized,minimized:!1})},[c,r]);n.useEffect(()=>{if(!N)return;const o=k=>{const R=c.find(d=>d.key===N.key);if(R)if(N.mode==="move")r(N.key,{x:k.clientX-N.offsetX,y:k.clientY-N.offsetY});else{const y=P.current?.getBoundingClientRect(),m=y?.left??0,L=y?.top??0;r(N.key,{width:Math.max(200,k.clientX-m-R.x),height:Math.max(100,k.clientY-L-R.y)})}},E=()=>j(null);return document.addEventListener("mousemove",o),document.addEventListener("mouseup",E),()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",E)}},[N,c,r]);const M=n.useCallback((o,E,k)=>{E.preventDefault();const R=c.find(d=>d.key===o);R&&(C(o),j({key:o,offsetX:k==="move"?E.clientX-R.x:0,offsetY:k==="move"?E.clientY-R.y:0,mode:k}))},[c,C]);return e.jsxs("div",{ref:o=>{P.current=o,typeof v=="function"?v(o):v&&(v.current=o)},id:$,className:`nice-wm nice-wm--${x} ${w??""}`,style:{...u,position:"relative",overflow:"hidden"},...a,children:[c.map(o=>{if(o.minimized)return null;const E=o.maximized,k=E?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:o.zIndex??1}:{position:"absolute",top:o.y,left:o.x,width:o.width,height:o.height,zIndex:o.zIndex??1};return e.jsxs("div",{className:`nice-wm__window ${E?"nice-wm__window--maximized":""}`,style:k,onMouseDown:()=>C(o.key),role:"dialog","aria-label":o.title,children:[e.jsxs("div",{className:"nice-wm__titlebar",onMouseDown:R=>!E&&M(o.key,R,"move"),children:[o.icon&&e.jsx("span",{className:"nice-wm__icon",children:o.icon}),e.jsx("span",{className:"nice-wm__title",children:o.title}),e.jsxs("div",{className:"nice-wm__controls",children:[(o.minimizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--min",onClick:()=>U(o.key),title:I("wm.minimize","Minimize"),children:e.jsx(X.NiceIcon,{name:"minus",size:14})}),(o.maximizable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--max",onClick:()=>q(o.key),title:I("wm.maximize","Maximize"),children:e.jsx(X.NiceIcon,{name:E?"copy":"window",size:14})}),(o.closable??!0)&&e.jsx("button",{type:"button",className:"nice-wm__ctrl-btn nice-wm__ctrl-btn--close",onClick:()=>_(o.key),title:I("wm.close","Close"),children:e.jsx(X.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-wm__body",children:o.content}),(o.resizable??!0)&&!E&&e.jsx("div",{className:"nice-wm__resize-handle",onMouseDown:R=>M(o.key,R,"resize")})]},o.key)}),t===void 0&&i,f&&e.jsx("div",{className:"nice-wm__taskbar",role:"toolbar","aria-label":I("wm.taskbar","Taskbar"),children:c.map(o=>e.jsxs("button",{type:"button",className:`nice-wm__taskbar-btn ${o.minimized?"nice-wm__taskbar-btn--minimized":""}`,onClick:()=>{o.minimized&&U(o.key),C(o.key)},children:[o.icon&&e.jsx("span",{className:"nice-wm__taskbar-icon",children:o.icon}),e.jsx("span",{className:"nice-wm__taskbar-label",children:o.title})]},o.key))})]})});He.displayName="NiceWindowManager";function yt(t,i){const s=document.querySelector(t);if(!s)return null;const l=s.getBoundingClientRect();return{top:l.top-i+window.scrollY,left:l.left-i+window.scrollX,width:l.width+i*2,height:l.height+i*2}}function Nt(t,i,s,l){const f={w:window.innerWidth,h:window.innerHeight+window.scrollY},x={top:{top:t.top-s-12,left:t.left+t.width/2-i/2},bottom:{top:t.top+t.height+12,left:t.left+t.width/2-i/2},left:{top:t.top+t.height/2-s/2,left:t.left-i-12},right:{top:t.top+t.height/2-s/2,left:t.left+t.width+12}};if(l&&l!=="auto")return{...x[l],actualPlacement:l};for(const w of["bottom","top","right","left"]){const u=x[w];if(u.top>=0&&u.left>=0&&u.top+s<=f.h&&u.left+i<=f.w)return{...u,actualPlacement:w}}return{...x.bottom,actualPlacement:"bottom"}}const be={width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function jt(){return e.jsxs("svg",{...be,children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function kt(){return e.jsx("svg",{...be,children:e.jsx("polyline",{points:"15 18 9 12 15 6"})})}function Ct(){return e.jsx("svg",{...be,children:e.jsx("polyline",{points:"9 18 15 12 9 6"})})}function Et(){return e.jsxs("svg",{...be,children:[e.jsx("polygon",{points:"5 4 15 12 5 20 5 4"}),e.jsx("line",{x1:"19",y1:"5",x2:"19",y2:"19"})]})}function zt(){return e.jsx("svg",{...be,children:e.jsx("polygon",{points:"6 4 20 12 6 20 6 4",fill:"currentColor"})})}function It(){return e.jsxs("svg",{...be,children:[e.jsx("rect",{x:"6",y:"4",width:"4",height:"16",fill:"currentColor"}),e.jsx("rect",{x:"14",y:"4",width:"4",height:"16",fill:"currentColor"})]})}function Se(t,i,s){return s==="text"?e.jsx("span",{className:"nice-tutorial__btn-label",children:i}):s==="icon-text"?e.jsxs(e.Fragment,{children:[t,e.jsx("span",{className:"nice-tutorial__btn-label",children:i})]}):t}const St=[],Be=({steps:t=St,active:i,onFinish:s,onSkip:l,onStepChange:h,closeOnEscape:f=!0,closeOnOverlayClick:x=!1,showProgress:w=!0,showSkipButton:u=!0,labels:b,animationDuration:a=300,overlayOpacity:v=.6,zIndex:$=1e4,buttonsPlacement:I="floating-bottom",buttonsDisplay:N="icon",showAutoplay:j=!0,autoplayInterval:P=5e3,autoplaySpeedRange:c={min:2e3,max:15e3},onAutoplayChange:g})=>{const[r,C]=n.useState(0),[_,U]=n.useState(null),[q,M]=n.useState({w:340,h:200}),[o,E]=n.useState(!0),[k,R]=n.useState(!1),[d,y]=n.useState(P),m=n.useRef(null),L=n.useRef(-1),p=t[r],Y=r===t.length-1,O=r===0,K=b?.next??"Next",J=b?.back??"Back",ee=b?.finish??"Finish",ue=b?.skip??"Skip",me=b?.stepOf??"of",he=b?.play??"Play",fe=b?.pause??"Pause",ze=b?.speed??"Speed",ve=b?.close??"Close";n.useEffect(()=>{i&&(C(0),R(!1),y(P))},[i,P]),n.useEffect(()=>{if(m.current){const S=m.current.getBoundingClientRect();M({w:S.width,h:S.height})}},[r,i]),n.useEffect(()=>{if(!i||!p)return;const S=p.highlightPadding??0,T=()=>{const A=yt(p.target,S);U(A)};if(T(),p.scrollIntoView!==!1){document.querySelector(p.target)?.scrollIntoView({behavior:"smooth",block:"center"});const G=setTimeout(T,350);return()=>clearTimeout(G)}},[i,p,r]),n.useEffect(()=>{!i||!p||L.current!==r&&(L.current>=0&&L.current<t.length&&t[L.current]?.onLeave?.(),p.onEnter?.(),L.current=r)},[i,p,r,t]);const te=n.useCallback(()=>{if(Y)p?.onLeave?.(),s?.();else{const S=r+1;C(S),h?.(S)}},[r,Y,s,h,p]),pe=n.useCallback(()=>{if(!O){const S=r-1;C(S),h?.(S)}},[r,O,h]);n.useEffect(()=>{if(!i||!p?.advanceOn)return;const S=document.querySelector(p.target);if(!S)return;const T=()=>te();return S.addEventListener(p.advanceOn.event,T),()=>S.removeEventListener(p.advanceOn.event,T)},[i,p,r,te]),n.useEffect(()=>{if(!i)return;const S=T=>{T.key==="Escape"&&f?l?.():T.key==="ArrowRight"?te():T.key==="ArrowLeft"&&pe()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i,r,f,te,pe,l]),n.useEffect(()=>{E(!0);const S=setTimeout(()=>E(!1),a);return()=>clearTimeout(S)},[r,a]),n.useEffect(()=>{if(!i||!k)return;const S=setInterval(()=>{C(T=>{if(T>=t.length-1)return R(!1),g?.(!1),t[T]?.onLeave?.(),s?.(),T;const A=T+1;return h?.(A),A})},Math.max(500,d));return()=>clearInterval(S)},[i,k,d,t,g,s,h]);const Ie=n.useCallback(()=>{R(S=>{const T=!S;return g?.(T),T})},[g]),xe=n.useMemo(()=>_?Nt(_,q.w,q.h,p?.placement):{top:typeof window<"u"?window.innerHeight/2:0,left:typeof window<"u"?window.innerWidth/2:0,actualPlacement:"bottom"},[_,q,p?.placement]),ye=t.length===0?0:(r+1)/t.length*100,ne=n.useCallback(S=>{const T=j&&t.length>1,A=u&&!Y&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--skip nice-tutorial__btn--${N}`,onClick:l,"aria-label":ue,title:ue,children:Se(e.jsx(Et,{}),ue,N)}),G=!O&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--back nice-tutorial__btn--${N}`,onClick:pe,"aria-label":J,title:J,children:Se(e.jsx(kt,{}),J,N)}),we=!p?.waitForAction&&e.jsx("button",{type:"button",className:`nice-tutorial__btn nice-tutorial__btn--next nice-tutorial__btn--${N}`,onClick:te,"aria-label":Y?ee:K,title:Y?ee:K,children:Se(e.jsx(Ct,{}),Y?ee:K,N)}),_e=T&&e.jsx("button",{type:"button",className:["nice-tutorial__btn","nice-tutorial__btn--play",`nice-tutorial__btn--${N}`,k?"nice-tutorial__btn--active":""].filter(Boolean).join(" "),onClick:Ie,"aria-label":k?fe:he,title:k?fe:he,"aria-pressed":k,children:Se(k?e.jsx(It,{}):e.jsx(zt,{}),k?fe:he,N)});return e.jsxs("div",{className:["nice-tutorial__controls",S?"nice-tutorial__controls--inline":"nice-tutorial__controls--floating-bottom"].join(" "),style:S?void 0:{zIndex:$+2},role:"group","aria-label":"Tutorial controls",children:[A,G,w&&e.jsxs("span",{className:"nice-tutorial__step-label","aria-live":"polite",children:[r+1," ",me," ",t.length]}),we,T&&e.jsx("div",{className:"nice-tutorial__progress-bar",role:"progressbar","aria-valuenow":Math.round(ye),"aria-valuemin":0,"aria-valuemax":100,"aria-label":`${r+1} ${me} ${t.length}`,children:e.jsx("div",{className:"nice-tutorial__progress-bar-fill",style:{width:`${ye}%`}})}),_e,T&&e.jsxs("label",{className:"nice-tutorial__speed",children:[e.jsx("input",{type:"range",className:"nice-tutorial__speed-slider",min:c.min,max:c.max,step:500,value:c.min+c.max-d,onChange:Re=>y(c.min+c.max-Number(Re.target.value)),"aria-label":ze}),e.jsxs("span",{className:"nice-tutorial__speed-value",children:[(d/1e3).toFixed(1),"s"]})]})]})},[j,u,w,N,O,Y,l,ue,J,K,ee,he,fe,ze,me,pe,te,p,k,Ie,r,t.length,ye,d,c,$]);if(!i||!p)return null;const Ne=typeof document<"u"?Math.max(document.documentElement.scrollWidth,window.innerWidth):0,D=typeof document<"u"?Math.max(document.documentElement.scrollHeight,window.innerHeight):0;return e.jsxs("div",{className:"nice-tutorial",style:{zIndex:$},"aria-modal":"true",role:"dialog","aria-label":"Tutorial",children:[e.jsxs("svg",{className:"nice-tutorial__overlay",style:{position:"absolute",top:0,left:0,width:Ne,height:D,pointerEvents:"auto"},onClick:x?l:void 0,children:[e.jsx("defs",{children:e.jsxs("mask",{id:"nice-tutorial-mask",children:[e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),_&&e.jsx("rect",{x:_.left,y:_.top,width:_.width,height:_.height,rx:"4",fill:"black",className:o?"nice-tutorial__spotlight--entering":""})]})}),e.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`rgba(0,0,0,${v})`,mask:"url(#nice-tutorial-mask)"})]}),_&&e.jsx("div",{className:`nice-tutorial__highlight ${o?"nice-tutorial__highlight--entering":""}`,style:{position:"absolute",top:_.top,left:_.left,width:_.width,height:_.height,transition:`all ${a}ms ease`}}),p.disableInteraction&&_&&e.jsx("div",{className:"nice-tutorial__blocker",style:{position:"absolute",top:_.top,left:_.left,width:_.width,height:_.height}}),e.jsxs("div",{ref:m,className:`nice-tutorial__tooltip nice-tutorial__tooltip--${xe.actualPlacement} ${o?"nice-tutorial__tooltip--entering":""}`,style:{position:"absolute",top:xe.top,left:xe.left,transition:`all ${a}ms ease`,maxWidth:380,zIndex:$+1},children:[p.showArrow!==!1&&e.jsx("div",{className:`nice-tutorial__arrow nice-tutorial__arrow--${xe.actualPlacement}`}),e.jsxs("div",{className:"nice-tutorial__header",children:[e.jsx("h4",{className:"nice-tutorial__title",children:p.title}),u&&e.jsx("button",{type:"button",className:"nice-tutorial__close",onClick:l,"aria-label":ve,title:ve,children:e.jsx(jt,{})})]}),e.jsx("div",{className:"nice-tutorial__content",dangerouslySetInnerHTML:{__html:X.sanitizeHtml(p.content)}}),I==="inline"&&ne(!0)]}),I==="floating-bottom"&&ne(!1)]})};Be.displayName="NiceTutorial";const Ue=n.createContext({startTutorial:()=>{},stopTutorial:()=>{},isActive:!1,currentStep:0,nextStep:()=>{},prevStep:()=>{},goToStep:()=>{}});function Mt(){return n.useContext(Ue)}const Ke=({children:t})=>{const[i,s]=n.useState([]),[l,h]=n.useState(!1),[f,x]=n.useState(0),w=n.useCallback(I=>{s(I),x(0),h(!0)},[]),u=n.useCallback(()=>{h(!1),x(0),s([])},[]),b=n.useCallback(()=>{x(I=>Math.min(I+1,i.length-1))},[i.length]),a=n.useCallback(()=>{x(I=>Math.max(I-1,0))},[]),v=n.useCallback(I=>{x(Math.max(0,Math.min(I,i.length-1)))},[i.length]),$={startTutorial:w,stopTutorial:u,isActive:l,currentStep:f,nextStep:b,prevStep:a,goToStep:v};return e.jsxs(Ue.Provider,{value:$,children:[t,l&&i.length>0&&e.jsx(Be,{steps:i,active:l,onFinish:u,onSkip:u,onStepChange:x})]})};Ke.displayName="NiceTutorialProvider";function Rt(t,i,s,l,h){const f=t<=h,x=t+h>=s,w=i<=h,u=i+h>=l;return w&&f?"top-left":w&&x?"top-right":u&&f?"bottom-left":u&&x?"bottom-right":f?"left":x?"right":w?"top":u?"bottom":"none"}function Lt(t){switch(t){case"left":return{left:0,top:0,width:"50%",height:"100%"};case"right":return{left:"50%",top:0,width:"50%",height:"100%"};case"top":return{left:0,top:0,width:"100%",height:"50%"};case"bottom":return{left:0,top:"50%",width:"100%",height:"50%"};case"top-left":return{left:0,top:0,width:"50%",height:"50%"};case"top-right":return{left:"50%",top:0,width:"50%",height:"50%"};case"bottom-left":return{left:0,top:"50%",width:"50%",height:"50%"};case"bottom-right":return{left:"50%",top:"50%",width:"50%",height:"50%"};default:return null}}const Ge=n.forwardRef(({windowKey:t,title:i,icon:s,children:l,footer:h,x:f,y:x,defaultPosition:w,width:u=480,height:b=360,minWidth:a=200,minHeight:v=120,maxWidth:$,maxHeight:I,zIndex:N=1,closable:j=!0,minimizable:P=!0,maximizable:c=!0,fullscreenable:g=!1,pinnable:r=!1,resizable:C=!0,draggable:_=!0,snappable:U=!0,snapThreshold:q=20,minimized:M,maximized:o,fullscreen:E,pinned:k,focused:R,onClose:d,onMinimize:y,onMaximize:m,onFullscreen:L,onPin:p,onFocus:Y,onMove:O,onResize:K,onSnap:J,onTitleBarDoubleClick:ee,size:ue="md",statusBar:me,titleBarActions:he,className:fe,style:ze,id:ve,accessMode:te,...pe},Ie)=>{const xe=X.useControlId(ve),ye=X.useNiceAccessMode(te,ve),{t:ne}=X.useNiceTranslation(),Ne=n.useRef(null);Ne.current==null&&(Ne.current=`nice-window-${Math.random().toString(36).slice(2,10)}`);const D=t??Ne.current,S=f??w?.x??100,T=x??w?.y??100;if(ye==="hidden")return null;const[A,G]=n.useState({x:S,y:T}),[we,_e]=n.useState({width:u,height:b}),[Re,Ve]=n.useState(!1),[Qe,Ze]=n.useState(!1),[Je,et]=n.useState(!1),[tt,nt]=n.useState(!1),[Q,Le]=n.useState("none"),it=M??Re,V=o??Qe,F=E??Je,je=k??tt,Te=R??!0,ae=A.x,de=A.y,ie=we.width,se=we.height,oe=n.useRef(null),H=n.useRef(null),B=n.useRef(null),st=n.useCallback(()=>{d?.(D)},[D,d]),ot=n.useCallback(()=>{Ve(!0),y?.(D)},[D,y]),$e=n.useCallback(()=>{const z=!V;Ze(z),!z&&B.current?(G({x:B.current.x,y:B.current.y}),_e({width:B.current.w,height:B.current.h}),B.current=null):z&&(B.current={x:ae,y:de,w:ie,h:se}),Le("none"),m?.(D,z)},[D,V,ae,de,ie,se,m]),Pe=n.useCallback(()=>{const z=!F;et(z),z?B.current={x:ae,y:de,w:ie,h:se}:B.current&&(G({x:B.current.x,y:B.current.y}),_e({width:B.current.w,height:B.current.h}),B.current=null),L?.(D,z)},[D,F,ae,de,ie,se,L]),ct=n.useCallback(()=>{const z=!je;nt(z),p?.(D,z)},[D,je,p]),ke=n.useCallback(()=>{Y?.(D)},[D,Y]),rt=n.useCallback(()=>{ee?ee(D):c&&$e()},[D,c,$e,ee]);n.useEffect(()=>{const z=ce=>{if(!oe.current)return;const Z=ce.clientX-oe.current.startX+oe.current.origX,Ce=ce.clientY-oe.current.startY+oe.current.origY;G({x:Z,y:Ce}),O?.(D,{x:Z,y:Ce})},W=ce=>{if(oe.current){if(U){const Z=Rt(ce.clientX,ce.clientY,window.innerWidth,window.innerHeight,q);Z!=="none"&&(B.current={x:A.x,y:A.y,w:ie,h:se},Le(Z),J?.(D,Z))}oe.current=null}};return document.addEventListener("mousemove",z),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",W)}});const lt=n.useCallback(z=>{!_||V||F||(z.preventDefault(),Q!=="none"&&(B.current&&(G({x:B.current.x,y:B.current.y}),_e({width:B.current.w,height:B.current.h})),Le("none")),ke(),oe.current={startX:z.clientX,startY:z.clientY,origX:ae,origY:de})},[_,V,F,Q,ae,de,ke]);n.useEffect(()=>{const z=ce=>{if(!H.current)return;const Z=ce.clientX-H.current.startX,Ce=ce.clientY-H.current.startY,ge=H.current.handle;let re=H.current.origW,le=H.current.origH;if(ge.includes("e")&&(re=H.current.origW+Z),ge.includes("w")&&(re=H.current.origW-Z),ge.includes("s")&&(le=H.current.origH+Ce),ge.includes("n")&&(le=H.current.origH-Ce),re=Math.max(a,$?Math.min($,re):re),le=Math.max(v,I?Math.min(I,le):le),ge.includes("w")){const Ye=we.width-re;G(Ee=>({...Ee,x:Ee.x+Ye}))}if(ge.includes("n")){const Ye=we.height-le;G(Ee=>({...Ee,y:Ee.y+Ye}))}_e({width:re,height:le}),K?.(D,{width:re,height:le})},W=()=>{H.current=null};return document.addEventListener("mousemove",z),document.addEventListener("mouseup",W),()=>{document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",W)}});const at=n.useCallback((z,W)=>{!C||V||F||Q!=="none"||(W.preventDefault(),W.stopPropagation(),ke(),H.current={startX:W.clientX,startY:W.clientY,origW:ie,origH:se,handle:z})},[C,V,F,Q,ie,se,ke]);if(n.useEffect(()=>{if(!Te)return;const z=W=>{W.key==="Escape"&&F&&Pe()};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[Te,F,Pe]),it)return null;const De=Q!=="none"?Lt(Q):null,Xe=V||F,dt=F?{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:999999}:V?{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:N}:De?{position:"absolute",...De,zIndex:N}:{position:"absolute",top:de,left:ae,width:ie,height:se,zIndex:N},ut=["n","e","s","w","ne","se","sw","nw"],mt={n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize",ne:"nesw-resize",sw:"nesw-resize",nw:"nwse-resize",se:"nwse-resize"};return e.jsxs("div",{ref:Ie,id:xe,className:`nice-window nice-window--${ue} ${Te?"nice-window--focused":""} ${je?"nice-window--pinned":""} ${Xe?"nice-window--maximized":""} ${Q!=="none"?`nice-window--snapped-${Q}`:""} ${fe??""}`,style:{...dt,...ze},onMouseDown:ke,role:"dialog","aria-label":i,...pe,children:[e.jsxs("div",{className:"nice-window__titlebar",onMouseDown:lt,onDoubleClick:rt,children:[s&&e.jsx("span",{className:"nice-window__icon",children:s}),e.jsx("span",{className:"nice-window__title",children:i}),e.jsxs("div",{className:"nice-window__actions",children:[he,r&&e.jsx("button",{type:"button",className:`nice-window__action nice-window__action--pin ${je?"nice-window__action--active":""}`,onClick:ct,title:ne("window.pin",je?"Unpin":"Pin"),children:e.jsx(X.NiceIcon,{name:"paperclip",size:14})}),P&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--minimize",onClick:ot,title:ne("window.minimize","Minimize"),children:e.jsx(X.NiceIcon,{name:"minus",size:14})}),c&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--maximize",onClick:$e,title:ne("window.maximize",V?"Restore":"Maximize"),children:e.jsx(X.NiceIcon,{name:V?"copy":"window",size:14})}),g&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--fullscreen",onClick:Pe,title:ne("window.fullscreen",F?"Exit Full Screen":"Full Screen"),children:e.jsx(X.NiceIcon,{name:F?"collapse":"expand",size:14})}),j&&e.jsx("button",{type:"button",className:"nice-window__action nice-window__action--close",onClick:st,title:ne("window.close","Close"),children:e.jsx(X.NiceIcon,{name:"close",size:14})})]})]}),e.jsx("div",{className:"nice-window__body",children:l}),h&&e.jsx("div",{className:"nice-window__footer",children:h}),me&&e.jsx("div",{className:"nice-window__statusbar",children:me}),C&&!Xe&&Q==="none"&&e.jsx(e.Fragment,{children:ut.map(z=>e.jsx("div",{className:`nice-window__resize nice-window__resize--${z}`,style:{cursor:mt[z]},onMouseDown:W=>at(z,W)},z))})]})});Ge.displayName="NiceWindow";exports.NiceActionSheet=ht;exports.NiceBlockUI=Fe;exports.NiceBox=xt;exports.NiceCommandPaletteProvider=Ae;exports.NiceLoadPanel=pt;exports.NicePopover=ft;exports.NiceResizable=_t;exports.NiceResponsiveBox=wt;exports.NiceScrollView=gt;exports.NiceTutorial=Be;exports.NiceTutorialProvider=Ke;exports.NiceWindow=Ge;exports.NiceWindowManager=He;exports.fuzzyMatch=Me;exports.highlightMatches=qe;exports.useCommandPalette=We;exports.useNiceTutorial=Mt;exports.useRegisterCommands=vt;
@@ -1 +1 @@
1
- .nice-tutorial{pointer-events:none}.nice-tutorial *{pointer-events:auto}.nice-tutorial__highlight{pointer-events:none;border:2px solid var(--nice-color-primary, #2563eb);border-radius:var(--nice-radius-sm, 4px);box-shadow:0 0 0 2px color-mix(in srgb,var(--nice-color-primary, #2563eb) 30%,transparent)}.nice-tutorial__blocker{background:transparent;cursor:not-allowed}.nice-tutorial__tooltip{background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-md, 8px);box-shadow:0 8px 24px color-mix(in srgb,#000 18%,transparent);padding:var(--nice-space-4, 16px);pointer-events:auto}.nice-tutorial__tooltip--entering{opacity:0;transform:translateY(-4px)}.nice-tutorial__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--nice-space-3, 12px)}.nice-tutorial__title{margin:0;font-size:1rem;font-weight:600;line-height:1.3;color:var(--nice-text-primary);flex:1;min-width:0}.nice-tutorial__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:var(--nice-radius-sm, 4px);color:var(--nice-text-secondary, var(--nice-text-primary));cursor:pointer;transition:background .15s,color .15s}.nice-tutorial__close:hover,.nice-tutorial__close:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-text-primary) 8%, transparent));color:var(--nice-text-primary);outline:none}.nice-tutorial__content{margin-top:var(--nice-space-2, 8px);font-size:.9rem;line-height:1.5;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__content p{margin:0 0 var(--nice-space-2, 8px) 0}.nice-tutorial__content p:last-child{margin-bottom:0}.nice-tutorial__content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.85em;padding:var(--nice-space-px, 1px) var(--nice-space-1, 4px);background:color-mix(in srgb,var(--nice-text-primary) 8%,transparent);border-radius:var(--nice-radius-sm, 4px)}.nice-tutorial__arrow{position:absolute;width:12px;height:12px;background:var(--nice-bg-elevated, var(--nice-bg-primary));border:1px solid var(--nice-border-color);transform:rotate(45deg)}.nice-tutorial__arrow--top{bottom:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-top:none;border-left:none}.nice-tutorial__arrow--bottom{top:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-bottom:none;border-right:none}.nice-tutorial__arrow--left{right:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-left:none;border-bottom:none}.nice-tutorial__arrow--right{left:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-right:none;border-top:none}.nice-tutorial__controls{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-full, 999px);box-shadow:0 8px 24px color-mix(in srgb,#000 25%,transparent);font-size:.85rem;pointer-events:auto}.nice-tutorial__controls--floating-bottom{position:fixed;left:50%;bottom:var(--nice-space-6, 24px);transform:translate(-50%)}.nice-tutorial__controls--inline{display:flex;margin-top:var(--nice-space-3, 12px);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;justify-content:space-between;flex-wrap:wrap}.nice-tutorial__step-label{font-size:.8rem;color:var(--nice-text-secondary, var(--nice-text-primary));padding:0 var(--nice-space-2, 8px);white-space:nowrap;font-variant-numeric:tabular-nums}.nice-tutorial__progress{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px)}.nice-tutorial__dot{display:inline-block;width:6px;height:6px;border-radius:var(--nice-radius-circle, 50%);background:var(--nice-border-color);transition:background .15s}.nice-tutorial__dot--done{background:color-mix(in srgb,var(--nice-color-primary) 60%,transparent)}.nice-tutorial__dot--active{background:var(--nice-color-primary);transform:scale(1.3)}.nice-tutorial__progress-bar{width:120px;height:6px;background:color-mix(in srgb,var(--nice-text-primary) 10%,transparent);border-radius:var(--nice-radius-full, 999px);overflow:hidden}.nice-tutorial__progress-bar-fill{height:100%;background:var(--nice-color-primary);transition:width .2s ease;border-radius:inherit}.nice-tutorial__speed{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px);font-size:.75rem;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__speed-slider{width:80px;accent-color:var(--nice-color-primary)}.nice-tutorial__speed-value{min-width:32px;text-align:right;font-variant-numeric:tabular-nums}.nice-tutorial__btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--nice-space-1, 4px);padding:0;width:32px;height:32px;background:transparent;border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-circle, 50%);color:var(--nice-text-primary);font:inherit;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .05s}.nice-tutorial__btn:hover,.nice-tutorial__btn:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-color-primary) 10%, transparent));border-color:var(--nice-color-primary);color:var(--nice-color-primary);outline:none}.nice-tutorial__btn:active{transform:translateY(1px)}.nice-tutorial__btn[disabled]{opacity:.4;cursor:not-allowed;pointer-events:none}.nice-tutorial__btn--next{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--next:hover,.nice-tutorial__btn--next:focus-visible{background:color-mix(in srgb,var(--nice-color-primary) 85%,#000);color:var(--nice-text-on-primary, #fff)}.nice-tutorial__btn--play.nice-tutorial__btn--active{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--icon-text,.nice-tutorial__btn--text{width:auto;min-width:32px;height:32px;padding:0 var(--nice-space-3, 12px);border-radius:var(--nice-radius-full, 999px)}.nice-tutorial__btn-label{white-space:nowrap}.nice-tutorial__btn svg{flex-shrink:0}.nice-tutorial__controls--inline .nice-tutorial__actions{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px)}@media(prefers-reduced-motion:reduce){.nice-tutorial__tooltip,.nice-tutorial__highlight,.nice-tutorial__progress-bar-fill{transition:none!important}}
1
+ .nice-command-palette__overlay{position:fixed;inset:0;z-index:var(--nice-z-modal);display:flex;align-items:flex-start;justify-content:center;padding:15vh var(--nice-space-4, 16px) var(--nice-space-4, 16px);background:var(--nice-overlay-50);animation:nice-fade-in var(--nice-transition)}.nice-command-palette{display:flex;flex-direction:column;width:min(640px,100%);max-height:70vh;overflow:hidden;background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-xl, 12px);box-shadow:var(--nice-shadow-xl);font-family:var(--nice-font-family)}.nice-command-palette__input-wrapper{padding:var(--nice-space-3, 12px) var(--nice-space-4, 16px);border-bottom:1px solid var(--nice-border-color)}.nice-command-palette__input-wrapper:focus-within{border-bottom-color:var(--nice-color-primary)}.nice-command-palette__input{width:100%;padding:var(--nice-space-1, 4px) 0;border:none;outline:none;background:transparent;color:inherit;font:inherit;font-size:1rem}.nice-command-palette__input::placeholder{color:var(--nice-text-muted)}.nice-command-palette__list{flex:1;min-height:0;overflow-y:auto;padding:var(--nice-space-2, 8px)}.nice-command-palette__group+.nice-command-palette__group{margin-top:var(--nice-space-2, 8px)}.nice-command-palette__category{padding:var(--nice-space-1, 4px) var(--nice-space-3, 12px);color:var(--nice-text-muted);font-size:.75rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.nice-command-palette__item{display:flex;align-items:center;gap:var(--nice-space-3, 12px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);border-radius:var(--nice-radius-md, 8px);cursor:pointer}.nice-command-palette__item--selected{background:var(--nice-primary-tint-15)}.nice-command-palette__item--disabled{opacity:.5;cursor:not-allowed}.nice-command-palette__icon{display:inline-flex;flex-shrink:0;color:var(--nice-text-secondary)}.nice-command-palette__label-group{display:flex;flex:1;flex-direction:column;min-width:0}.nice-command-palette__label,.nice-command-palette__description{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nice-command-palette__label{font-size:.875rem}.nice-command-palette__description{color:var(--nice-text-muted);font-size:.75rem}.nice-command-palette__match{background:transparent;color:var(--nice-color-primary);font-weight:600}.nice-command-palette__shortcut{flex-shrink:0;padding:2px var(--nice-space-1-5, 6px);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg-secondary);color:var(--nice-text-secondary);font-family:var(--nice-font-mono, monospace);font-size:.75rem}.nice-command-palette__recent-badge{flex-shrink:0;padding:2px var(--nice-space-2, 8px);border-radius:999px;background:var(--nice-bg-secondary);color:var(--nice-text-muted);font-size:.6875rem}.nice-command-palette__empty{padding:var(--nice-space-6, 24px);color:var(--nice-text-muted);font-size:.875rem;text-align:center}.nice-command-palette__executing{padding:var(--nice-space-2, 8px) var(--nice-space-4, 16px);border-top:1px solid var(--nice-border-color);color:var(--nice-text-muted);font-size:.75rem}@media(prefers-reduced-motion:reduce){.nice-command-palette__overlay{animation:none}}.nice-tutorial{pointer-events:none}.nice-tutorial *{pointer-events:auto}.nice-tutorial__highlight{pointer-events:none;border:2px solid var(--nice-color-primary, #2563eb);border-radius:var(--nice-radius-sm, 4px);box-shadow:0 0 0 2px color-mix(in srgb,var(--nice-color-primary, #2563eb) 30%,transparent)}.nice-tutorial__blocker{background:transparent;cursor:not-allowed}.nice-tutorial__tooltip{background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-md, 8px);box-shadow:0 8px 24px color-mix(in srgb,#000 18%,transparent);padding:var(--nice-space-4, 16px);pointer-events:auto}.nice-tutorial__tooltip--entering{opacity:0;transform:translateY(-4px)}.nice-tutorial__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--nice-space-3, 12px)}.nice-tutorial__title{margin:0;font-size:1rem;font-weight:600;line-height:1.3;color:var(--nice-text-primary);flex:1;min-width:0}.nice-tutorial__close{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;background:transparent;border:none;border-radius:var(--nice-radius-sm, 4px);color:var(--nice-text-secondary, var(--nice-text-primary));cursor:pointer;transition:background .15s,color .15s}.nice-tutorial__close:hover,.nice-tutorial__close:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-text-primary) 8%, transparent));color:var(--nice-text-primary);outline:none}.nice-tutorial__content{margin-top:var(--nice-space-2, 8px);font-size:.9rem;line-height:1.5;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__content p{margin:0 0 var(--nice-space-2, 8px) 0}.nice-tutorial__content p:last-child{margin-bottom:0}.nice-tutorial__content code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.85em;padding:var(--nice-space-px, 1px) var(--nice-space-1, 4px);background:color-mix(in srgb,var(--nice-text-primary) 8%,transparent);border-radius:var(--nice-radius-sm, 4px)}.nice-tutorial__arrow{position:absolute;width:12px;height:12px;background:var(--nice-bg-elevated, var(--nice-bg-primary));border:1px solid var(--nice-border-color);transform:rotate(45deg)}.nice-tutorial__arrow--top{bottom:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-top:none;border-left:none}.nice-tutorial__arrow--bottom{top:-7px;left:50%;margin-left:calc(var(--nice-space-1-5, 6px) * -1);border-bottom:none;border-right:none}.nice-tutorial__arrow--left{right:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-left:none;border-bottom:none}.nice-tutorial__arrow--right{left:-7px;top:50%;margin-top:calc(var(--nice-space-1-5, 6px) * -1);border-right:none;border-top:none}.nice-tutorial__controls{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px);padding:var(--nice-space-2, 8px) var(--nice-space-3, 12px);background:var(--nice-bg-elevated, var(--nice-bg-primary));color:var(--nice-text-primary);border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-full, 999px);box-shadow:0 8px 24px color-mix(in srgb,#000 25%,transparent);font-size:.85rem;pointer-events:auto}.nice-tutorial__controls--floating-bottom{position:fixed;left:50%;bottom:var(--nice-space-6, 24px);transform:translate(-50%)}.nice-tutorial__controls--inline{display:flex;margin-top:var(--nice-space-3, 12px);padding:0;background:transparent;border:none;border-radius:0;box-shadow:none;justify-content:space-between;flex-wrap:wrap}.nice-tutorial__step-label{font-size:.8rem;color:var(--nice-text-secondary, var(--nice-text-primary));padding:0 var(--nice-space-2, 8px);white-space:nowrap;font-variant-numeric:tabular-nums}.nice-tutorial__progress{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px)}.nice-tutorial__dot{display:inline-block;width:6px;height:6px;border-radius:var(--nice-radius-circle, 50%);background:var(--nice-border-color);transition:background .15s}.nice-tutorial__dot--done{background:color-mix(in srgb,var(--nice-color-primary) 60%,transparent)}.nice-tutorial__dot--active{background:var(--nice-color-primary);transform:scale(1.3)}.nice-tutorial__progress-bar{width:120px;height:6px;background:color-mix(in srgb,var(--nice-text-primary) 10%,transparent);border-radius:var(--nice-radius-full, 999px);overflow:hidden}.nice-tutorial__progress-bar-fill{height:100%;background:var(--nice-color-primary);transition:width .2s ease;border-radius:inherit}.nice-tutorial__speed{display:inline-flex;align-items:center;gap:var(--nice-space-1, 4px);font-size:.75rem;color:var(--nice-text-secondary, var(--nice-text-primary))}.nice-tutorial__speed-slider{width:80px;accent-color:var(--nice-color-primary)}.nice-tutorial__speed-value{min-width:32px;text-align:right;font-variant-numeric:tabular-nums}.nice-tutorial__btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--nice-space-1, 4px);padding:0;width:32px;height:32px;background:transparent;border:1px solid var(--nice-border-color);border-radius:var(--nice-radius-circle, 50%);color:var(--nice-text-primary);font:inherit;cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .05s}.nice-tutorial__btn:hover,.nice-tutorial__btn:focus-visible{background:var(--nice-hover-bg, color-mix(in srgb, var(--nice-color-primary) 10%, transparent));border-color:var(--nice-color-primary);color:var(--nice-color-primary);outline:none}.nice-tutorial__btn:active{transform:translateY(1px)}.nice-tutorial__btn[disabled]{opacity:.4;cursor:not-allowed;pointer-events:none}.nice-tutorial__btn--next{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--next:hover,.nice-tutorial__btn--next:focus-visible{background:color-mix(in srgb,var(--nice-color-primary) 85%,#000);color:var(--nice-text-on-primary, #fff)}.nice-tutorial__btn--play.nice-tutorial__btn--active{background:var(--nice-color-primary);color:var(--nice-text-on-primary, #fff);border-color:var(--nice-color-primary)}.nice-tutorial__btn--icon-text,.nice-tutorial__btn--text{width:auto;min-width:32px;height:32px;padding:0 var(--nice-space-3, 12px);border-radius:var(--nice-radius-full, 999px)}.nice-tutorial__btn-label{white-space:nowrap}.nice-tutorial__btn svg{flex-shrink:0}.nice-tutorial__controls--inline .nice-tutorial__actions{display:inline-flex;align-items:center;gap:var(--nice-space-2, 8px)}@media(prefers-reduced-motion:reduce){.nice-tutorial__tooltip,.nice-tutorial__highlight,.nice-tutorial__progress-bar-fill{transition:none!important}}