@nice2dev/ui 1.0.21 → 1.0.23

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 (123) hide show
  1. package/CHANGELOG.md +198 -0
  2. package/dist/NiceErrorBoundary-B0262Ffc.js +770 -0
  3. package/dist/NiceErrorBoundary-BNhkOZtq.cjs +1 -0
  4. package/dist/NiceErrorBoundary-BXOLv-zG.cjs +1 -0
  5. package/dist/NiceErrorBoundary-DsreAsON.cjs +1 -0
  6. package/dist/NiceErrorBoundary-DyPWyuki.js +770 -0
  7. package/dist/NiceErrorBoundary-HMfrXIir.js +770 -0
  8. package/dist/NiceForm-B7D1MASh.js +5383 -0
  9. package/dist/NiceForm-BA9zZdm8.cjs +382 -0
  10. package/dist/NiceForm-Ba9rvBoT.cjs +382 -0
  11. package/dist/NiceForm-DAGMJpgx.js +5383 -0
  12. package/dist/NiceForm-D_ifvkIf.js +5386 -0
  13. package/dist/NiceForm-kd4essRP.cjs +382 -0
  14. package/dist/NiceForm.css +1 -1
  15. package/dist/NiceModal-4DLpDmAl.js +95 -0
  16. package/dist/NiceModal-BVT9cZbf.cjs +1 -0
  17. package/dist/NiceModal-CiOYOWJy.cjs +1 -0
  18. package/dist/NiceModal-D2xJTZZf.cjs +1 -0
  19. package/dist/NiceModal-DZbHCdKq.js +95 -0
  20. package/dist/NiceModal-MeC1cNtW.js +95 -0
  21. package/dist/NiceModuleLifecyclePanel-BZMUuDad.js +6807 -0
  22. package/dist/NiceModuleLifecyclePanel-BiX4KxaK.js +6781 -0
  23. package/dist/NiceModuleLifecyclePanel-C54g5eV_.cjs +1 -0
  24. package/dist/NiceModuleLifecyclePanel-CDo0iVfr.js +6781 -0
  25. package/dist/NiceModuleLifecyclePanel-DEJpoz5a.cjs +1 -0
  26. package/dist/NiceModuleLifecyclePanel-DrDTpH6K.cjs +1 -0
  27. package/dist/NiceModuleLifecyclePanel.css +1 -1
  28. package/dist/NicePagination-3be3_sVK.js +171 -0
  29. package/dist/NicePagination-BCRsVzkR.cjs +1 -0
  30. package/dist/NicePagination-C8gx6Bcl.js +171 -0
  31. package/dist/NicePagination-CNxEAb4C.cjs +1 -0
  32. package/dist/NicePagination-Cg_WEf-R.cjs +1 -0
  33. package/dist/NicePagination-DQXdzx7W.js +171 -0
  34. package/dist/NicePinCodeInput-3WugpLHi.js +12240 -0
  35. package/dist/NicePinCodeInput-BD2bMmVF.cjs +696 -0
  36. package/dist/NicePinCodeInput-CSfRHs4v.cjs +419 -0
  37. package/dist/NicePinCodeInput-CjwFvOEQ.js +13092 -0
  38. package/dist/NicePinCodeInput-DCLRLR8a.js +13097 -0
  39. package/dist/NicePinCodeInput-DoBQnMj9.cjs +694 -0
  40. package/dist/NiceSavedQueryPanel-DFDDuKWd.js +6597 -0
  41. package/dist/NiceSavedQueryPanel-DT9v7kUB.cjs +596 -0
  42. package/dist/NiceSavedQueryPanel-DTU4eiIH.cjs +596 -0
  43. package/dist/NiceSavedQueryPanel-RLj3BnDR.js +6866 -0
  44. package/dist/NiceSavedQueryPanel-qtWETcRP.cjs +596 -0
  45. package/dist/NiceSavedQueryPanel-z29D7N_A.js +6584 -0
  46. package/dist/NiceTabs-B4dM77y_.js +1657 -0
  47. package/dist/NiceTabs-BTVTtRZR.cjs +1 -0
  48. package/dist/NiceTabs-BXGmot7J.cjs +1 -0
  49. package/dist/NiceTabs-CFA8DGYR.cjs +1 -0
  50. package/dist/NiceTabs-Cx9DN6QD.js +1657 -0
  51. package/dist/NiceTabs-DJdhKste.js +1657 -0
  52. package/dist/NiceWindow-5VCSBJrc.js +1592 -0
  53. package/dist/NiceWindow-BEFAUTLp.cjs +1 -0
  54. package/dist/NiceWindow-Cs6-Dbci.js +1592 -0
  55. package/dist/NiceWindow-DYw4NCeb.js +1592 -0
  56. package/dist/NiceWindow-O_g8StvA.cjs +1 -0
  57. package/dist/NiceWindow-a4wB_m30.cjs +1 -0
  58. package/dist/NiceWindow.css +1 -0
  59. package/dist/charts-BDr6B81L.js +4657 -0
  60. package/dist/charts-Ci_KrAoU.cjs +761 -0
  61. package/dist/charts-ClxW-i5q.js +4657 -0
  62. package/dist/charts-De7FYS1U.cjs +761 -0
  63. package/dist/charts-DjFvhCdD.js +4657 -0
  64. package/dist/charts-Dr_FIPZT.cjs +761 -0
  65. package/dist/charts.cjs +1 -1
  66. package/dist/charts.mjs +1 -1
  67. package/dist/core-BIz6zQ5u.cjs +122 -0
  68. package/dist/core-BYxnKGOi.js +23141 -0
  69. package/dist/core-CT5vpy5U.js +25248 -0
  70. package/dist/core-CZE5v34h.cjs +122 -0
  71. package/dist/core-Cjw8oBvC.cjs +96 -0
  72. package/dist/core-xcuNJ-DB.js +24948 -0
  73. package/dist/data-branching-B7dCyaWr.cjs +1 -0
  74. package/dist/data-branching-BPAeL45o.js +6133 -0
  75. package/dist/data-branching-Byz79mmA.cjs +1 -0
  76. package/dist/data-branching-DjuerHfS.js +6133 -0
  77. package/dist/data-branching.cjs +1 -1
  78. package/dist/data-branching.d.ts +3 -0
  79. package/dist/data-branching.mjs +1 -1
  80. package/dist/data.cjs +1 -1
  81. package/dist/data.d.ts +45 -7
  82. package/dist/data.mjs +1 -1
  83. package/dist/devops-C3Pmbnxc.js +7684 -0
  84. package/dist/devops-CrXz348W.cjs +17 -0
  85. package/dist/devops-DYFov8j3.js +7684 -0
  86. package/dist/devops-g4qcLXah.cjs +17 -0
  87. package/dist/devops.cjs +1 -1
  88. package/dist/devops.d.ts +5 -0
  89. package/dist/devops.mjs +1 -1
  90. package/dist/editors.cjs +1 -1
  91. package/dist/editors.d.ts +175 -1
  92. package/dist/editors.mjs +44 -41
  93. package/dist/feedback.cjs +1 -1
  94. package/dist/feedback.d.ts +1 -2
  95. package/dist/feedback.mjs +2 -2
  96. package/dist/index-9Gi1mNY7.js +67912 -0
  97. package/dist/index-AEO3cK4T.cjs +5194 -0
  98. package/dist/index-BMQ-F0zE.js +65054 -0
  99. package/dist/index-BNb9q4Ll.cjs +5490 -0
  100. package/dist/index-CjdfogVa.js +66711 -0
  101. package/dist/index-Di3Cgr1P.cjs +5518 -0
  102. package/dist/index.cjs +1 -1
  103. package/dist/index.css +1 -1
  104. package/dist/index.d.ts +752 -62
  105. package/dist/index.mjs +982 -963
  106. package/dist/lazy.cjs +1 -1
  107. package/dist/lazy.d.ts +11 -0
  108. package/dist/lazy.mjs +24 -24
  109. package/dist/navigation.cjs +1 -1
  110. package/dist/navigation.d.ts +30 -4
  111. package/dist/navigation.mjs +34 -34
  112. package/dist/no-code-CHvv1KjZ.cjs +332 -0
  113. package/dist/no-code-CyvddsYt.js +7133 -0
  114. package/dist/no-code-Dl3ima61.cjs +332 -0
  115. package/dist/no-code-ktRzFaET.js +7133 -0
  116. package/dist/no-code.cjs +1 -1
  117. package/dist/no-code.d.ts +11 -0
  118. package/dist/no-code.mjs +1 -1
  119. package/dist/overlays.cjs +1 -1
  120. package/dist/overlays.d.ts +38 -0
  121. package/dist/overlays.mjs +52 -52
  122. package/dist/style.css +7 -4
  123. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),C=require("./core-CZE5v34h.cjs"),i=require("react"),P={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},Z=({variant:s="info",title:t,children:c,closable:r,onClose:n,icon:a,size:l="md",className:h,style:d,displayStyle:p})=>{const f=C.Es("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${f} ${h||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:a||P[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:c})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:"✕"})]})},U=({open:s,onClose:t,title:c,position:r="right",size:n="md",children:a,footer:l,transitionDuration:h,className:d,style:p,displayStyle:f})=>{const g=C.Ns("modal",f),x=C.Es("modal",f),{t:_}=C.Zt(),v=i.useRef(null);return C.js(v,s),i.useEffect(()=>{if(!s)return;const u=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",u),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:u=>{u.target===u.currentTarget&&t()}}),e.jsxs("div",{ref:v,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${d||""}`,style:{...g,...p,...h!=null?{transitionDuration:`${h}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":c,children:[c&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:c}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":_("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]}),e.jsx("div",{className:"nice-drawer__body",children:a}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},Y=({toasts:s,onDismiss:t,position:c="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${c}`,children:s.map(r=>e.jsx(W,{toast:r,onDismiss:t},r.id))}),W=({toast:s,onDismiss:t})=>{const[c,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(c){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[c,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${c?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:P[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),children:"✕"})]})};let G=0;function J(){const[s,t]=i.useState([]),c=i.useCallback((n,a,l)=>{const h=`toast-${++G}`;return t(d=>[...d,{id:h,variant:n,message:a,title:l?.title,duration:l?.duration}]),h},[]),r=i.useCallback(n=>{t(a=>a.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,a)=>c("info",n,a),success:(n,a)=>c("success",n,a),warning:(n,a)=>c("warning",n,a),error:(n,a)=>c("error",n,a)}}const K={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},Q=({visible:s,message:t,header:c,icon:r,variant:n="warning",acceptLabel:a,rejectLabel:l,onAccept:h,onReject:d,closeOnOverlay:p=!1,closeOnEscape:f=!0,size:g="md",className:x,style:_})=>{const{t:v}=C.Zt();if(i.useEffect(()=>{if(!s||!f)return;const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,f,d]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),!s)return null;const u=r??K[n],o=a??v("confirm.accept","Yes"),w=l??v("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:p?d:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${n} nice-confirm--${g} ${x||""}`,style:_,role:"alertdialog","aria-modal":"true","aria-label":c,"aria-describedby":"nice-confirm-message",onClick:j=>j.stopPropagation(),children:[c&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:c})}),e.jsxs("div",{className:"nice-confirm__body",children:[u&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${n}`,children:u}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:t})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:d,children:w}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${n==="error"?"error":"primary"} nice-btn--md`,onClick:h,autoFocus:!0,children:o})]})]})})},X=({error:s,onRetry:t,retryLabel:c="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:a="error",icon:l,size:h="md",className:d,style:p,"data-testid":f})=>{const[g,x]=i.useState(n??0),_=i.useRef(),v=typeof s=="string"?s:s.message,u=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),_.current=setInterval(()=>{x(o=>o<=1?(clearInterval(_.current),t(),0):o-1)},1e3),()=>clearInterval(_.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${a} nice-retry-panel--${h} ${d||""}`,style:p,role:"alert","data-testid":f,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??"⚠️"}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:v})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:u,children:c}),n&&g>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",g,"s"]})]})]})};function ee(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function se(){return navigator.onLine}function ne(){return!0}const te=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:c,size:r="md",className:n,style:a,"data-testid":l})=>i.useSyncExternalStore(ee,se,ne)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:a,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:c??"📡"}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function q({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,autoRetry:r=!1,autoRetryCount:n=3}={}){const[a,l]=i.useState(!1),[h,d]=i.useState(!1),[p,f]=i.useState(!1),[g,x]=i.useState(0),[_,v]=i.useState(0),u=i.useRef(null),o=i.useRef(null),w=i.useRef(null),j=i.useRef(0),N=i.useCallback(()=>{u.current&&clearTimeout(u.current),o.current&&clearTimeout(o.current),w.current&&clearInterval(w.current)},[]),k=i.useCallback(()=>{N(),l(!0),d(!1),f(!1),x(0),j.current=Date.now(),w.current=setInterval(()=>{x(Date.now()-j.current)},200),u.current=setTimeout(()=>{d(!0)},t),o.current=setTimeout(()=>{f(!0),l(!1),d(!1),N(),c?.()},s)},[N,t,s,c]),$=i.useCallback(()=>{N(),l(!1),d(!1)},[N]),m=i.useCallback(()=>{v(y=>y+1),f(!1),k()},[k]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&_<n){const y=Math.pow(2,_)*1e3,T=setTimeout(()=>m(),y);return()=>clearTimeout(T)}},[r,n,p,_,m]),{isLoading:a,isSlow:h,isTimedOut:p,elapsed:g,retryCount:_,start:k,stop:$,retry:m}}const ie=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,onRetry:r,autoRetry:n=!1,autoRetryCount:a=3,showProgress:l=!0,slowMessage:h="Operacja trwa dłużej niż zwykle…",timeoutMessage:d="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:f,size:g="md",className:x,style:_,"data-testid":v})=>{const{isSlow:u,isTimedOut:o,elapsed:w,retry:j}=q({timeoutMs:s,slowThresholdMs:t,onTimeout:c,autoRetry:n,autoRetryCount:a}),N=()=>{j(),r?.()};if(!p)return e.jsx(e.Fragment,{children:f});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${g} ${x??""}`,style:_,role:"alert","data-testid":v,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const k=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${g} ${u?"nice-timeout-feedback--slow":""} ${x??""}`,style:_,"data-testid":v,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),u&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":k,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${k}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:c,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:a,position:l="bottom",size:h="md",policyUrl:d,showDetails:p=!1,className:f,style:g,id:x,..._},v)=>{const u=C._s(x),{t:o}=C.Zt(),[w,j]=i.useState(!0),N=s??w,[k,$]=i.useState(p),[m,y]=i.useState(()=>{const b={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return a&&Object.assign(b,a),b.necessary=!0,b}),T={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},S={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},I=i.useCallback(()=>{const b={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(b),j(!1)},[t,r]),L=i.useCallback(()=>{const b={necessary:!0,analytics:!1,marketing:!1,preferences:!1};c?.(),r?.(b),j(!1)},[c,r]),R=i.useCallback(()=>{r?.({...m,necessary:!0}),j(!1)},[m,r]);return N?e.jsx("div",{ref:v,id:u,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${h} ${f??""}`,style:g,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",..._,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),d&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:d,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),k&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(b=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:m[b],disabled:b==="necessary",onChange:D=>y(z=>({...z,[b]:D.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:T[b]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:S[b]})]})]},b))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:R,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:L,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:I,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:c,loading:r=!1,error:n,variant:a="primary",size:l="md",showRememberMe:h=!0,showForgotPassword:d=!0,showRegister:p=!1,title:f,logo:g,usernameLabel:x,passwordLabel:_,usernamePlaceholder:v,passwordPlaceholder:u,className:o,style:w,id:j,...N},k)=>{const $=C._s(j),{t:m}=C.Zt(),[y,T]=i.useState(""),[S,I]=i.useState(""),[L,R]=i.useState(!1),[b,D]=i.useState(!1),z=`${$}-user`,F=`${$}-pass`,B=`${$}-remember`,V=i.useCallback(E=>{E.preventDefault(),!r&&s?.({username:y,password:S,rememberMe:L})},[r,y,S,L,s]);return e.jsxs("form",{ref:k,id:$,className:`nice-login nice-login--${a} nice-login--${l} ${o??""}`,style:w,onSubmit:V,noValidate:!0,...N,children:[g&&e.jsx("div",{className:"nice-login__logo",children:g}),f&&e.jsx("h2",{className:"nice-login__title",children:f??m("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:z,className:"nice-login__label",children:x??m("login.username","Username")}),e.jsx("input",{id:z,className:"nice-login__input",type:"text",value:y,onChange:E=>T(E.target.value),placeholder:v??m("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:r,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:F,className:"nice-login__label",children:_??m("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:b?"text":"password",value:S,onChange:E=>I(E.target.value),placeholder:u??m("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:r,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>D(!b),"aria-label":b?m("login.hidePassword","Hide password"):m("login.showPassword","Show password"),tabIndex:-1,children:b?"🙈":"👁"})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:B,children:[e.jsx("input",{id:B,type:"checkbox",checked:L,onChange:E=>R(E.target.checked),disabled:r}),e.jsx("span",{children:m("login.rememberMe","Remember me")})]}),d&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:m("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${a}`,disabled:r||!y||!S,children:r?m("login.loading","Signing in..."):m("login.submit","Sign In")}),p&&c&&e.jsxs("p",{className:"nice-login__register",children:[m("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:c,disabled:r,children:m("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const A=class A extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,c){this.props.onError?.(t,c)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:c=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:"⚠️"}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),c&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};A.displayName="NiceErrorBoundary";let M=A;exports.NiceAlert=Z;exports.NiceConfirmDialog=Q;exports.NiceCookieConsent=O;exports.NiceDrawer=U;exports.NiceErrorBoundary=M;exports.NiceLoginForm=H;exports.NiceOfflineBanner=te;exports.NiceRetryPanel=X;exports.NiceTimeoutFeedback=ie;exports.NiceToastContainer=Y;exports.alertIcons=P;exports.useNiceTimeout=q;exports.useNiceToast=J;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),C=require("./core-BIz6zQ5u.cjs"),i=require("react"),P={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},Z=({variant:s="info",title:t,children:c,closable:r,onClose:n,icon:a,size:l="md",className:h,style:d,displayStyle:p})=>{const f=C.Ms("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${f} ${h||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:a||P[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:c})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:"✕"})]})},U=({open:s,onClose:t,title:c,position:r="right",size:n="md",children:a,footer:l,transitionDuration:h,className:d,style:p,displayStyle:f})=>{const g=C.ks("modal",f),x=C.Ms("modal",f),{t:b}=C.Zt(),v=i.useRef(null);return C.Ws(v,s),i.useEffect(()=>{if(!s)return;const u=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",u),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:u=>{u.target===u.currentTarget&&t()}}),e.jsxs("div",{ref:v,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${d||""}`,style:{...g,...p,...h!=null?{transitionDuration:`${h}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":c,children:[c&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:c}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":b("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]}),e.jsx("div",{className:"nice-drawer__body",children:a}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},W=({toasts:s,onDismiss:t,position:c="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${c}`,children:s.map(r=>e.jsx(Y,{toast:r,onDismiss:t},r.id))}),Y=({toast:s,onDismiss:t})=>{const[c,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(c){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[c,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${c?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:P[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),children:"✕"})]})};let G=0;function J(){const[s,t]=i.useState([]),c=i.useCallback((n,a,l)=>{const h=`toast-${++G}`;return t(d=>[...d,{id:h,variant:n,message:a,title:l?.title,duration:l?.duration}]),h},[]),r=i.useCallback(n=>{t(a=>a.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,a)=>c("info",n,a),success:(n,a)=>c("success",n,a),warning:(n,a)=>c("warning",n,a),error:(n,a)=>c("error",n,a)}}const K={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},Q=({visible:s,message:t,header:c,icon:r,variant:n="warning",acceptLabel:a,rejectLabel:l,onAccept:h,onReject:d,closeOnOverlay:p=!1,closeOnEscape:f=!0,size:g="md",className:x,style:b})=>{const{t:v}=C.Zt();if(i.useEffect(()=>{if(!s||!f)return;const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,f,d]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),!s)return null;const u=r??K[n],o=a??v("confirm.accept","Yes"),w=l??v("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:p?d:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${n} nice-confirm--${g} ${x||""}`,style:b,role:"alertdialog","aria-modal":"true","aria-label":c,"aria-describedby":"nice-confirm-message",onClick:j=>j.stopPropagation(),children:[c&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:c})}),e.jsxs("div",{className:"nice-confirm__body",children:[u&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${n}`,children:u}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:t})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:d,children:w}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${n==="error"?"error":"primary"} nice-btn--md`,onClick:h,autoFocus:!0,children:o})]})]})})},X=({error:s,onRetry:t,retryLabel:c="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:a="error",icon:l,size:h="md",className:d,style:p,"data-testid":f})=>{const[g,x]=i.useState(n??0),b=i.useRef(),v=typeof s=="string"?s:s.message,u=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),b.current=setInterval(()=>{x(o=>o<=1?(clearInterval(b.current),t(),0):o-1)},1e3),()=>clearInterval(b.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${a} nice-retry-panel--${h} ${d||""}`,style:p,role:"alert","data-testid":f,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??"⚠️"}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:v})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:u,children:c}),n&&g>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",g,"s"]})]})]})};function ee(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function se(){return navigator.onLine}function ne(){return!0}const te=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:c,size:r="md",className:n,style:a,"data-testid":l})=>i.useSyncExternalStore(ee,se,ne)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:a,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:c??"📡"}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function q({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,autoRetry:r=!1,autoRetryCount:n=3}={}){const[a,l]=i.useState(!1),[h,d]=i.useState(!1),[p,f]=i.useState(!1),[g,x]=i.useState(0),[b,v]=i.useState(0),u=i.useRef(null),o=i.useRef(null),w=i.useRef(null),j=i.useRef(0),N=i.useCallback(()=>{u.current&&clearTimeout(u.current),o.current&&clearTimeout(o.current),w.current&&clearInterval(w.current)},[]),k=i.useCallback(()=>{N(),l(!0),d(!1),f(!1),x(0),j.current=Date.now(),w.current=setInterval(()=>{x(Date.now()-j.current)},200),u.current=setTimeout(()=>{d(!0)},t),o.current=setTimeout(()=>{f(!0),l(!1),d(!1),N(),c?.()},s)},[N,t,s,c]),$=i.useCallback(()=>{N(),l(!1),d(!1)},[N]),m=i.useCallback(()=>{v(y=>y+1),f(!1),k()},[k]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&b<n){const y=Math.pow(2,b)*1e3,L=setTimeout(()=>m(),y);return()=>clearTimeout(L)}},[r,n,p,b,m]),{isLoading:a,isSlow:h,isTimedOut:p,elapsed:g,retryCount:b,start:k,stop:$,retry:m}}const ie=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,onRetry:r,autoRetry:n=!1,autoRetryCount:a=3,showProgress:l=!0,slowMessage:h="Operacja trwa dłużej niż zwykle…",timeoutMessage:d="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:f,size:g="md",className:x,style:b,"data-testid":v})=>{const{isSlow:u,isTimedOut:o,elapsed:w,retry:j}=q({timeoutMs:s,slowThresholdMs:t,onTimeout:c,autoRetry:n,autoRetryCount:a}),N=()=>{j(),r?.()};if(!p)return e.jsx(e.Fragment,{children:f});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${g} ${x??""}`,style:b,role:"alert","data-testid":v,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const k=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${g} ${u?"nice-timeout-feedback--slow":""} ${x??""}`,style:b,"data-testid":v,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),u&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":k,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${k}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:c,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:a,position:l="bottom",size:h="md",policyUrl:d,showDetails:p=!1,className:f,style:g,id:x,...b},v)=>{const u=C.Ds(x),{t:o}=C.Zt(),[w,j]=i.useState(!0),N=s??w,[k,$]=i.useState(p),[m,y]=i.useState(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return a&&Object.assign(_,a),_.necessary=!0,_}),L={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},T={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},D=i.useCallback(()=>{const _={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(_),j(!1)},[t,r]),E=i.useCallback(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};c?.(),r?.(_),j(!1)},[c,r]),I=i.useCallback(()=>{r?.({...m,necessary:!0}),j(!1)},[m,r]);return N?e.jsx("div",{ref:v,id:u,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${h} ${f??""}`,style:g,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",...b,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),d&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:d,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),k&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(_=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:m[_],disabled:_==="necessary",onChange:R=>y(z=>({...z,[_]:R.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:L[_]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:T[_]})]})]},_))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:I,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:E,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:D,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:c,loading:r=!1,error:n,variant:a="primary",size:l="md",showRememberMe:h=!0,showForgotPassword:d=!0,showRegister:p=!1,title:f,logo:g,usernameLabel:x,passwordLabel:b,usernamePlaceholder:v,passwordPlaceholder:u,className:o,style:w,id:j,...N},k)=>{const $=C.Ds(j),{t:m}=C.Zt(),[y,L]=i.useState(""),[T,D]=i.useState(""),[E,I]=i.useState(!1),[_,R]=i.useState(!1),z=`${$}-user`,F=`${$}-pass`,B=`${$}-remember`,V=i.useCallback(S=>{S.preventDefault(),!r&&s?.({username:y,password:T,rememberMe:E})},[r,y,T,E,s]);return e.jsxs("form",{ref:k,id:$,className:`nice-login nice-login--${a} nice-login--${l} ${o??""}`,style:w,onSubmit:V,noValidate:!0,...N,children:[g&&e.jsx("div",{className:"nice-login__logo",children:g}),f&&e.jsx("h2",{className:"nice-login__title",children:f??m("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:z,className:"nice-login__label",children:x??m("login.username","Username")}),e.jsx("input",{id:z,className:"nice-login__input",type:"text",value:y,onChange:S=>L(S.target.value),placeholder:v??m("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:r,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:F,className:"nice-login__label",children:b??m("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:_?"text":"password",value:T,onChange:S=>D(S.target.value),placeholder:u??m("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:r,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>R(!_),"aria-label":_?m("login.hidePassword","Hide password"):m("login.showPassword","Show password"),tabIndex:-1,children:_?"🙈":"👁"})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:B,children:[e.jsx("input",{id:B,type:"checkbox",checked:E,onChange:S=>I(S.target.checked),disabled:r}),e.jsx("span",{children:m("login.rememberMe","Remember me")})]}),d&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:m("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${a}`,disabled:r||!y||!T,children:r?m("login.loading","Signing in..."):m("login.submit","Sign In")}),p&&c&&e.jsxs("p",{className:"nice-login__register",children:[m("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:c,disabled:r,children:m("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const A=class A extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,c){this.props.onError?.(t,c)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:c=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:"⚠️"}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),c&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};A.displayName="NiceErrorBoundary";let M=A;exports.NiceAlert=Z;exports.NiceConfirmDialog=Q;exports.NiceCookieConsent=O;exports.NiceDrawer=U;exports.NiceErrorBoundary=M;exports.NiceLoginForm=H;exports.NiceOfflineBanner=te;exports.NiceRetryPanel=X;exports.NiceTimeoutFeedback=ie;exports.NiceToastContainer=W;exports.alertIcons=P;exports.useNiceTimeout=q;exports.useNiceToast=J;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),C=require("./core-Cjw8oBvC.cjs"),i=require("react"),P={info:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})}),success:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})}),warning:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})}),error:e.jsx("svg",{viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})})},J=({variant:s="info",title:t,children:c,closable:r,onClose:n,icon:a,size:l="md",className:h,style:d,displayStyle:p})=>{const f=C.Ss("card",p);return e.jsxs("div",{className:`nice-alert nice-alert--${s} nice-alert--${l} nice-alert--ds-${f} ${h||""}`,style:d,role:"alert",children:[e.jsx("div",{className:`nice-alert__icon nice-alert__icon--${s}`,children:a||P[s]}),e.jsxs("div",{className:"nice-alert__content",children:[t&&e.jsx("div",{className:"nice-alert__title",children:t}),e.jsx("div",{children:c})]}),r&&e.jsx("button",{type:"button",className:"nice-alert__close",onClick:n,"aria-label":"Close",children:"✕"})]})},U=({open:s,onClose:t,title:c,position:r="right",size:n="md",children:a,footer:l,transitionDuration:h,className:d,style:p,displayStyle:f})=>{const g=C.vs("modal",f),x=C.Ss("modal",f),{t:b}=C.Jo(),v=i.useRef(null);return C.Ps(v,s),i.useEffect(()=>{if(!s)return;const u=o=>{o.key==="Escape"&&t()};return document.addEventListener("keydown",u),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",u),document.body.style.overflow=""}},[s,t]),s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"nice-drawer-overlay",onMouseDown:u=>{u.target===u.currentTarget&&t()}}),e.jsxs("div",{ref:v,className:`nice-drawer nice-drawer--${r} nice-drawer--${n} nice-drawer--ds-${x} ${d||""}`,style:{...g,...p,...h!=null?{transitionDuration:`${h}ms`}:{}},role:"dialog","aria-modal":"true","aria-label":c,children:[c&&e.jsxs("div",{className:"nice-drawer__header",children:[e.jsx("h3",{className:"nice-drawer__title",children:c}),e.jsx("button",{type:"button",className:"nice-drawer__close",onClick:t,"aria-label":b("controls.close","Close"),children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})})]}),e.jsx("div",{className:"nice-drawer__body",children:a}),l&&e.jsx("div",{className:"nice-drawer__footer",children:l})]})]}):null},Y=({toasts:s,onDismiss:t,position:c="top-right"})=>e.jsx("div",{className:`nice-toast-container nice-toast-container--${c}`,children:s.map(r=>e.jsx(W,{toast:r,onDismiss:t},r.id))}),W=({toast:s,onDismiss:t})=>{const[c,r]=i.useState(!1);return i.useEffect(()=>{if(!s.duration&&s.duration!==0){const n=setTimeout(()=>r(!0),4e3);return()=>clearTimeout(n)}if(s.duration>0){const n=setTimeout(()=>r(!0),s.duration);return()=>clearTimeout(n)}},[s.duration]),i.useEffect(()=>{if(c){const n=setTimeout(()=>t(s.id),200);return()=>clearTimeout(n)}},[c,s.id,t]),e.jsxs("div",{className:`nice-toast nice-toast--${s.variant} ${c?"nice-toast--exiting":""}`,role:"alert",style:{position:"relative"},children:[e.jsx("div",{className:"nice-toast__icon",children:P[s.variant]}),e.jsxs("div",{className:"nice-toast__content",children:[s.title&&e.jsx("div",{className:"nice-toast__title",children:s.title}),e.jsx("div",{className:"nice-toast__message",children:s.message})]}),e.jsx("button",{type:"button",className:"nice-toast__close",onClick:()=>r(!0),children:"✕"})]})};let G=0;function K(){const[s,t]=i.useState([]),c=i.useCallback((n,a,l)=>{const h=`toast-${++G}`;return t(d=>[...d,{id:h,variant:n,message:a,title:l?.title,duration:l?.duration}]),h},[]),r=i.useCallback(n=>{t(a=>a.filter(l=>l.id!==n))},[]);return{toasts:s,dismiss:r,info:(n,a)=>c("info",n,a),success:(n,a)=>c("success",n,a),warning:(n,a)=>c("warning",n,a),error:(n,a)=>c("error",n,a)}}const Q={info:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})}),warning:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})}),error:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})}),success:e.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})},X=({visible:s,message:t,header:c,icon:r,variant:n="warning",acceptLabel:a,rejectLabel:l,onAccept:h,onReject:d,closeOnOverlay:p=!1,closeOnEscape:f=!0,size:g="md",className:x,style:b})=>{const{t:v}=C.Jo();if(i.useEffect(()=>{if(!s||!f)return;const j=N=>{N.key==="Escape"&&d()};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[s,f,d]),i.useEffect(()=>(s?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[s]),!s)return null;const u=r??Q[n],o=a??v("confirm.accept","Yes"),w=l??v("confirm.reject","No");return e.jsx("div",{className:"nice-modal-overlay",onClick:p?d:void 0,children:e.jsxs("div",{className:`nice-confirm nice-confirm--${n} nice-confirm--${g} ${x||""}`,style:b,role:"alertdialog","aria-modal":"true","aria-label":c,"aria-describedby":"nice-confirm-message",onClick:j=>j.stopPropagation(),children:[c&&e.jsx("div",{className:"nice-confirm__header",children:e.jsx("h3",{className:"nice-confirm__title",children:c})}),e.jsxs("div",{className:"nice-confirm__body",children:[u&&e.jsx("div",{className:`nice-confirm__icon nice-confirm__icon--${n}`,children:u}),e.jsx("div",{id:"nice-confirm-message",className:"nice-confirm__message",children:t})]}),e.jsxs("div",{className:"nice-confirm__footer",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--ghost nice-btn--md",onClick:d,children:w}),e.jsx("button",{type:"button",className:`nice-btn nice-btn--${n==="error"?"error":"primary"} nice-btn--md`,onClick:h,autoFocus:!0,children:o})]})]})})},Z=({error:s,onRetry:t,retryLabel:c="Retry",title:r="Operation failed",autoRetrySeconds:n,variant:a="error",icon:l,size:h="md",className:d,style:p,"data-testid":f})=>{const[g,x]=i.useState(n??0),b=i.useRef(),v=typeof s=="string"?s:s.message,u=i.useCallback(()=>{x(n??0),t()},[t,n]);return i.useEffect(()=>{if(!(!n||n<=0))return x(n),b.current=setInterval(()=>{x(o=>o<=1?(clearInterval(b.current),t(),0):o-1)},1e3),()=>clearInterval(b.current)},[n,t]),e.jsxs("div",{className:`nice-retry-panel nice-retry-panel--${a} nice-retry-panel--${h} ${d||""}`,style:p,role:"alert","data-testid":f,children:[e.jsx("div",{className:"nice-retry-panel__icon",children:l??"⚠️"}),e.jsxs("div",{className:"nice-retry-panel__content",children:[e.jsx("div",{className:"nice-retry-panel__title",children:r}),e.jsx("p",{className:"nice-retry-panel__message",children:v})]}),e.jsxs("div",{className:"nice-retry-panel__actions",children:[e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary nice-btn--sm",onClick:u,children:c}),n&&g>0&&e.jsxs("span",{className:"nice-retry-panel__countdown",children:["Auto-retry in ",g,"s"]})]})]})};function ee(s){return window.addEventListener("online",s),window.addEventListener("offline",s),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",s)}}function se(){return navigator.onLine}function ne(){return!0}const te=({message:s="You are offline. Some features may be unavailable.",variant:t="warning",icon:c,size:r="md",className:n,style:a,"data-testid":l})=>i.useSyncExternalStore(ee,se,ne)?null:e.jsxs("div",{className:`nice-offline-banner nice-offline-banner--${t} nice-offline-banner--${r} ${n||""}`,style:a,role:"alert","aria-live":"assertive","data-testid":l,children:[e.jsx("span",{className:"nice-offline-banner__icon",children:c??"📡"}),e.jsx("span",{className:"nice-offline-banner__message",children:s})]});function q({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,autoRetry:r=!1,autoRetryCount:n=3}={}){const[a,l]=i.useState(!1),[h,d]=i.useState(!1),[p,f]=i.useState(!1),[g,x]=i.useState(0),[b,v]=i.useState(0),u=i.useRef(null),o=i.useRef(null),w=i.useRef(null),j=i.useRef(0),N=i.useCallback(()=>{u.current&&clearTimeout(u.current),o.current&&clearTimeout(o.current),w.current&&clearInterval(w.current)},[]),k=i.useCallback(()=>{N(),l(!0),d(!1),f(!1),x(0),j.current=Date.now(),w.current=setInterval(()=>{x(Date.now()-j.current)},200),u.current=setTimeout(()=>{d(!0)},t),o.current=setTimeout(()=>{f(!0),l(!1),d(!1),N(),c?.()},s)},[N,t,s,c]),$=i.useCallback(()=>{N(),l(!1),d(!1)},[N]),m=i.useCallback(()=>{v(y=>y+1),f(!1),k()},[k]);return i.useEffect(()=>()=>N(),[N]),i.useEffect(()=>{if(r&&p&&b<n){const y=Math.pow(2,b)*1e3,L=setTimeout(()=>m(),y);return()=>clearTimeout(L)}},[r,n,p,b,m]),{isLoading:a,isSlow:h,isTimedOut:p,elapsed:g,retryCount:b,start:k,stop:$,retry:m}}const ie=({timeoutMs:s=1e4,slowThresholdMs:t=3e3,onTimeout:c,onRetry:r,autoRetry:n=!1,autoRetryCount:a=3,showProgress:l=!0,slowMessage:h="Operacja trwa dłużej niż zwykle…",timeoutMessage:d="Przekroczono limit czasu. Spróbuj ponownie.",loading:p,children:f,size:g="md",className:x,style:b,"data-testid":v})=>{const{isSlow:u,isTimedOut:o,elapsed:w,retry:j}=q({timeoutMs:s,slowThresholdMs:t,onTimeout:c,autoRetry:n,autoRetryCount:a}),N=()=>{j(),r?.()};if(!p)return e.jsx(e.Fragment,{children:f});if(o)return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--timeout nice-timeout-feedback--${g} ${x??""}`,style:b,role:"alert","data-testid":v,children:[e.jsx("p",{className:"nice-timeout-feedback__message",children:d}),e.jsx("button",{className:"nice-timeout-feedback__retry-btn",onClick:N,type:"button",children:"Spróbuj ponownie"})]});const k=Math.min(100,w/s*100);return e.jsxs("div",{className:`nice-timeout-feedback nice-timeout-feedback--${g} ${u?"nice-timeout-feedback--slow":""} ${x??""}`,style:b,"data-testid":v,children:[e.jsx("div",{className:"nice-timeout-feedback__spinner","aria-busy":"true"}),u&&e.jsx("p",{className:"nice-timeout-feedback__slow-msg",children:h}),l&&e.jsx("div",{className:"nice-timeout-feedback__progress",role:"progressbar","aria-valuenow":k,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"nice-timeout-feedback__progress-bar",style:{width:`${k}%`}})})]})},O=i.forwardRef(({visible:s,onAcceptAll:t,onRejectAll:c,onSave:r,categories:n=["necessary","analytics","marketing","preferences"],defaults:a,position:l="bottom",size:h="md",policyUrl:d,showDetails:p=!1,className:f,style:g,id:x,...b},v)=>{const u=C.Hs(x),{t:o}=C.Jo(),[w,j]=i.useState(!0),N=s??w,[k,$]=i.useState(p),[m,y]=i.useState(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};return a&&Object.assign(_,a),_.necessary=!0,_}),L={necessary:o("cookie.necessary","Necessary"),analytics:o("cookie.analytics","Analytics"),marketing:o("cookie.marketing","Marketing"),preferences:o("cookie.preferences","Preferences")},T={necessary:o("cookie.necessaryDesc","Required for the website to function. Cannot be disabled."),analytics:o("cookie.analyticsDesc","Help us understand how visitors interact with the website."),marketing:o("cookie.marketingDesc","Used to deliver relevant advertisements."),preferences:o("cookie.preferencesDesc","Allow the website to remember your choices.")},I=i.useCallback(()=>{const _={necessary:!0,analytics:!0,marketing:!0,preferences:!0};t?.(),r?.(_),j(!1)},[t,r]),E=i.useCallback(()=>{const _={necessary:!0,analytics:!1,marketing:!1,preferences:!1};c?.(),r?.(_),j(!1)},[c,r]),R=i.useCallback(()=>{r?.({...m,necessary:!0}),j(!1)},[m,r]);return N?e.jsx("div",{ref:v,id:u,className:`nice-cookie-consent nice-cookie-consent--${l} nice-cookie-consent--${h} ${f??""}`,style:g,role:"dialog","aria-label":o("cookie.label","Cookie Consent"),"aria-modal":"true",...b,children:e.jsxs("div",{className:"nice-cookie-consent__content",children:[e.jsxs("p",{className:"nice-cookie-consent__message",children:[o("cookie.message","We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."),d&&e.jsxs(e.Fragment,{children:[" ",e.jsx("a",{href:d,className:"nice-cookie-consent__link",target:"_blank",rel:"noopener noreferrer",children:o("cookie.learnMore","Learn more")})]})]}),k&&e.jsx("div",{className:"nice-cookie-consent__details",children:n.map(_=>e.jsxs("label",{className:"nice-cookie-consent__category",children:[e.jsx("input",{type:"checkbox",checked:m[_],disabled:_==="necessary",onChange:D=>y(z=>({...z,[_]:D.target.checked})),className:"nice-cookie-consent__checkbox"}),e.jsxs("div",{className:"nice-cookie-consent__cat-info",children:[e.jsx("strong",{children:L[_]}),e.jsx("span",{className:"nice-cookie-consent__cat-desc",children:T[_]})]})]},_))}),e.jsxs("div",{className:"nice-cookie-consent__actions",children:[!k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--details",onClick:()=>$(!0),children:o("cookie.customize","Customize")}),k&&e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--save",onClick:R,children:o("cookie.savePreferences","Save preferences")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--reject",onClick:E,children:o("cookie.rejectAll","Reject all")}),e.jsx("button",{type:"button",className:"nice-cookie-consent__btn nice-cookie-consent__btn--accept",onClick:I,children:o("cookie.acceptAll","Accept all")})]})]})}):null});O.displayName="NiceCookieConsent";const H=i.forwardRef(({onSubmit:s,onForgotPassword:t,onRegister:c,loading:r=!1,error:n,variant:a="primary",size:l="md",showRememberMe:h=!0,showForgotPassword:d=!0,showRegister:p=!1,title:f,logo:g,usernameLabel:x,passwordLabel:b,usernamePlaceholder:v,passwordPlaceholder:u,className:o,style:w,id:j,...N},k)=>{const $=C.Hs(j),{t:m}=C.Jo(),[y,L]=i.useState(""),[T,I]=i.useState(""),[E,R]=i.useState(!1),[_,D]=i.useState(!1),z=`${$}-user`,F=`${$}-pass`,B=`${$}-remember`,V=i.useCallback(S=>{S.preventDefault(),!r&&s?.({username:y,password:T,rememberMe:E})},[r,y,T,E,s]);return e.jsxs("form",{ref:k,id:$,className:`nice-login nice-login--${a} nice-login--${l} ${o??""}`,style:w,onSubmit:V,noValidate:!0,...N,children:[g&&e.jsx("div",{className:"nice-login__logo",children:g}),f&&e.jsx("h2",{className:"nice-login__title",children:f??m("login.title","Sign In")}),n&&e.jsx("div",{className:"nice-login__error",role:"alert",children:n}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:z,className:"nice-login__label",children:x??m("login.username","Username")}),e.jsx("input",{id:z,className:"nice-login__input",type:"text",value:y,onChange:S=>L(S.target.value),placeholder:v??m("login.usernamePlaceholder","Enter your username"),autoComplete:"username",required:!0,disabled:r,"aria-required":"true"})]}),e.jsxs("div",{className:"nice-login__field",children:[e.jsx("label",{htmlFor:F,className:"nice-login__label",children:b??m("login.password","Password")}),e.jsxs("div",{className:"nice-login__password-wrap",children:[e.jsx("input",{id:F,className:"nice-login__input",type:_?"text":"password",value:T,onChange:S=>I(S.target.value),placeholder:u??m("login.passwordPlaceholder","Enter your password"),autoComplete:"current-password",required:!0,disabled:r,"aria-required":"true"}),e.jsx("button",{type:"button",className:"nice-login__toggle-password",onClick:()=>D(!_),"aria-label":_?m("login.hidePassword","Hide password"):m("login.showPassword","Show password"),tabIndex:-1,children:_?"🙈":"👁"})]})]}),e.jsxs("div",{className:"nice-login__options",children:[h&&e.jsxs("label",{className:"nice-login__remember",htmlFor:B,children:[e.jsx("input",{id:B,type:"checkbox",checked:E,onChange:S=>R(S.target.checked),disabled:r}),e.jsx("span",{children:m("login.rememberMe","Remember me")})]}),d&&t&&e.jsx("button",{type:"button",className:"nice-login__forgot",onClick:t,disabled:r,children:m("login.forgotPassword","Forgot password?")})]}),e.jsx("button",{type:"submit",className:`nice-login__submit nice-login__submit--${a}`,disabled:r||!y||!T,children:r?m("login.loading","Signing in..."):m("login.submit","Sign In")}),p&&c&&e.jsxs("p",{className:"nice-login__register",children:[m("login.noAccount","Don't have an account?")," ",e.jsx("button",{type:"button",className:"nice-login__register-link",onClick:c,disabled:r,children:m("login.register","Register")})]})]})});H.displayName="NiceLoginForm";const A=class A extends i.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null},this.handleReset=()=>{this.setState({hasError:!1,error:null})}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,c){this.props.onError?.(t,c)}render(){if(this.state.hasError&&this.state.error){const{fallback:t,showRetry:c=!0,retryLabel:r="Retry",title:n="Something went wrong"}=this.props;return typeof t=="function"?t(this.state.error,this.handleReset):t||e.jsxs("div",{className:"nice-error-boundary",role:"alert",children:[e.jsx("div",{className:"nice-error-boundary__icon",children:"⚠️"}),e.jsx("h2",{className:"nice-error-boundary__title",children:n}),e.jsx("p",{className:"nice-error-boundary__message",children:this.state.error.message}),c&&e.jsx("button",{type:"button",className:"nice-btn nice-btn--primary",onClick:this.handleReset,children:r})]})}return this.props.children}};A.displayName="NiceErrorBoundary";let M=A;exports.NiceAlert=J;exports.NiceConfirmDialog=X;exports.NiceCookieConsent=O;exports.NiceDrawer=U;exports.NiceErrorBoundary=M;exports.NiceLoginForm=H;exports.NiceOfflineBanner=te;exports.NiceRetryPanel=Z;exports.NiceTimeoutFeedback=ie;exports.NiceToastContainer=Y;exports.alertIcons=P;exports.useNiceTimeout=q;exports.useNiceToast=K;