@blinkk/root-cms 3.1.6 → 3.1.7

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 (105) hide show
  1. package/dist/app.js +1 -1
  2. package/dist/{chunk-U4TMO2LI.js → chunk-NIBAHWGP.js} +2 -2
  3. package/dist/plugin.js +1 -1
  4. package/dist/ui/AIPage-XPE7F5AF.js +1 -0
  5. package/dist/ui/AssetsPage-C3ZEENBO.js +1 -0
  6. package/dist/ui/CollectionPage-VQ4WJHJB.js +1 -0
  7. package/dist/ui/ComparePage-VKOXKID4.js +1 -0
  8. package/dist/ui/{DataPage-YEIS7HBN.js → DataPage-JXZ2Z3DG.js} +1 -1
  9. package/dist/ui/{DataSourcePage-VD6YBDRW.js → DataSourcePage-X3NSUOTP.js} +1 -1
  10. package/dist/ui/{DocTranslationsPage-6XLREBPQ.js → DocTranslationsPage-AJGT52XQ.js} +1 -1
  11. package/dist/ui/DocumentPage-ZFD2KE3A.js +1 -0
  12. package/dist/ui/{EditDataSourcePage-E4PSKSG3.js → EditDataSourcePage-EMK3F6HD.js} +1 -1
  13. package/dist/ui/EditReleasePage-3IAERDSH.js +1 -0
  14. package/dist/ui/EmbeddedAIPage-2W5F7QFL.js +1 -0
  15. package/dist/ui/EmbeddedDocumentPage-BESFW2YZ.js +1 -0
  16. package/dist/ui/{ImageEditorDialog-YDKOGVJV.js → ImageEditorDialog-JDXMU2FC.js} +1 -1
  17. package/dist/ui/LogsPage-KCD4XZ2N.js +1 -0
  18. package/dist/ui/{NewDataSourcePage-NJJDHGPX.js → NewDataSourcePage-EZDU7HGA.js} +1 -1
  19. package/dist/ui/NewReleasePage-FFTRUIP4.js +1 -0
  20. package/dist/ui/{NotFoundPage-CA7XVXUO.js → NotFoundPage-JGG2NTUE.js} +1 -1
  21. package/dist/ui/{ProjectPage-XUBJSCWB.js → ProjectPage-HT5JKR33.js} +1 -1
  22. package/dist/ui/ReleasePage-OYWLGV4D.js +1 -0
  23. package/dist/ui/{ReleasesPage-OY7OKC3C.js → ReleasesPage-XEII7FBC.js} +1 -1
  24. package/dist/ui/{SettingsPage-5EQUY52A.js → SettingsPage-7GIBTPB5.js} +1 -1
  25. package/dist/ui/SidebarToolsPage-GQYTZDAC.js +1 -0
  26. package/dist/ui/TaskPage-SNDDYDZY.js +1 -0
  27. package/dist/ui/TasksPage-CEVWOY67.js +1 -0
  28. package/dist/ui/{TranslationsArbPage-PG5USRYB.js → TranslationsArbPage-ADRLLAIW.js} +1 -1
  29. package/dist/ui/{TranslationsEditPage-GV3ZJXTY.js → TranslationsEditPage-PSKA7K44.js} +1 -1
  30. package/dist/ui/{TranslationsPage-3AKSMCNF.js → TranslationsPage-NGCLDSK7.js} +2 -2
  31. package/dist/ui/{chunk-75NMQ3LW.js → chunk-3YBRRPAN.js} +1 -1
  32. package/dist/ui/{chunk-QLIIVG5Q.js → chunk-5F5XJPKD.js} +1 -1
  33. package/dist/ui/{chunk-ST6QNIWT.js → chunk-6ZVMJXLE.js} +7 -7
  34. package/dist/ui/chunk-7OU4ERTS.js +87 -0
  35. package/dist/ui/chunk-A2JZYRE3.js +1 -0
  36. package/dist/ui/chunk-B74M7NEV.js +1 -0
  37. package/dist/ui/{chunk-UOKVF54Y.js → chunk-BLHXP3SR.js} +1 -1
  38. package/dist/ui/{chunk-UJX25CXD.js → chunk-BOIY4J2R.js} +1 -1
  39. package/dist/ui/chunk-CEWU5VSJ.js +1 -0
  40. package/dist/ui/{chunk-34W6H4YG.js → chunk-CXMVFNX3.js} +1 -1
  41. package/dist/ui/{chunk-F7RQT4XN.js → chunk-EET5AS64.js} +1 -1
  42. package/dist/ui/{chunk-WASID5UU.js → chunk-GJ7ES2LA.js} +1 -1
  43. package/dist/ui/{chunk-2RRM4HEQ.js → chunk-H5JL376P.js} +1 -1
  44. package/dist/ui/{chunk-H37RXS4R.js → chunk-HKCOKHA2.js} +1 -1
  45. package/dist/ui/{chunk-QGAPMQEJ.js → chunk-HUYP5U4K.js} +1 -1
  46. package/dist/ui/{chunk-NCZD5IWS.js → chunk-HWON6MV4.js} +1 -1
  47. package/dist/ui/{chunk-HXSB6YB2.js → chunk-I3H465Z6.js} +1 -1
  48. package/dist/ui/{chunk-535JU7FU.js → chunk-ILFWJKSS.js} +1 -1
  49. package/dist/ui/chunk-K7IG7PO2.js +1 -0
  50. package/dist/ui/{chunk-LAXQZPE3.js → chunk-LKTN7YVM.js} +1 -1
  51. package/dist/ui/{chunk-PLYSJ7W5.js → chunk-LS2JH5QF.js} +1 -1
  52. package/dist/ui/{chunk-QFDU6FXP.js → chunk-MALK5YEV.js} +1 -1
  53. package/dist/ui/{chunk-YP6ZH3MT.js → chunk-MFRPYPCF.js} +1 -1
  54. package/dist/ui/{chunk-RB23LLKL.js → chunk-OKNBFTYR.js} +1 -1
  55. package/dist/ui/{chunk-A7IZAHBZ.js → chunk-P2RVKNG4.js} +1 -1
  56. package/dist/ui/{chunk-JBLSUM6W.js → chunk-P57AFOMR.js} +1 -1
  57. package/dist/ui/{chunk-HV3JJ5UT.js → chunk-PLTI4NG7.js} +1 -1
  58. package/dist/ui/chunk-PY4JH5SN.js +1 -0
  59. package/dist/ui/{chunk-44ZU5WMI.js → chunk-SBAY52SC.js} +1 -1
  60. package/dist/ui/{chunk-Y5EOMMNI.js → chunk-TCKR2BL4.js} +1 -1
  61. package/dist/ui/{chunk-C5FRMXDS.js → chunk-TCRDGNM4.js} +1 -1
  62. package/dist/ui/chunk-TCWN5YRW.js +1 -0
  63. package/dist/ui/{chunk-U7LSFUHT.js → chunk-TZWCCNSA.js} +1 -1
  64. package/dist/ui/{chunk-2PTLQRTU.js → chunk-U5OXKKBN.js} +1 -1
  65. package/dist/ui/{chunk-O7ESOZQO.js → chunk-VZGDXWRK.js} +1 -1
  66. package/dist/ui/{chunk-3LEYSXZP.js → chunk-X3VDQDHP.js} +1 -1
  67. package/dist/ui/chunk-XBYMUPZF.js +19 -0
  68. package/dist/ui/{chunk-QRAFYIAW.js → chunk-XYXL5HSZ.js} +1 -1
  69. package/dist/ui/chunk-Y7RYSRP7.js +7 -0
  70. package/dist/ui/{chunk-WRA24P66.js.LEGAL.txt → chunk-Y7RYSRP7.js.LEGAL.txt} +1 -0
  71. package/dist/ui/chunk-YIKHJONY.js +1 -0
  72. package/dist/ui/{chunk-UCYWQEAS.js → chunk-ZD3ORGA6.js} +1 -1
  73. package/dist/ui/{chunk-YBHFGQ3Z.js → chunk-ZQDUWURP.js} +1 -1
  74. package/dist/ui/{chunk-PIJ3E47R.js → chunk-ZYSR5UIW.js} +1 -1
  75. package/dist/ui/ui.css +1 -1
  76. package/dist/ui/ui.js +1 -1
  77. package/package.json +3 -3
  78. package/dist/ui/AIPage-EO5WH25R.js +0 -1
  79. package/dist/ui/AssetsPage-ESLB4R3I.js +0 -1
  80. package/dist/ui/CollectionPage-MXN7XKUX.js +0 -1
  81. package/dist/ui/ComparePage-TY7VJVE3.js +0 -1
  82. package/dist/ui/DocumentPage-2HNNEGRI.js +0 -1
  83. package/dist/ui/EditReleasePage-DOMXJXCU.js +0 -1
  84. package/dist/ui/EmbeddedAIPage-U5LONYH2.js +0 -1
  85. package/dist/ui/EmbeddedDocumentPage-HYV5GPK6.js +0 -1
  86. package/dist/ui/LogsPage-6KV3CQLH.js +0 -1
  87. package/dist/ui/NewReleasePage-FXHPFUVG.js +0 -1
  88. package/dist/ui/ReleasePage-NLGRYJX7.js +0 -1
  89. package/dist/ui/SidebarToolsPage-FWG6TIDI.js +0 -1
  90. package/dist/ui/TaskPage-APNRUOYG.js +0 -1
  91. package/dist/ui/TasksPage-FTEELXVZ.js +0 -1
  92. package/dist/ui/chunk-235TRWJF.js +0 -81
  93. package/dist/ui/chunk-56NMZYX6.js +0 -19
  94. package/dist/ui/chunk-6WJQBFN5.js +0 -1
  95. package/dist/ui/chunk-EYJ6GKZR.js +0 -1
  96. package/dist/ui/chunk-G5647K25.js +0 -1
  97. package/dist/ui/chunk-OWYV43BT.js +0 -1
  98. package/dist/ui/chunk-QWB6MAPJ.js +0 -7
  99. package/dist/ui/chunk-VJRMR2JM.js +0 -1
  100. package/dist/ui/chunk-WRA24P66.js +0 -7
  101. package/dist/ui/chunk-Z3ZJJWFT.js +0 -1
  102. package/dist/ui/chunk-ZAJPNVYS.js +0 -1
  103. /package/dist/ui/{ImageEditorDialog-YDKOGVJV.js.LEGAL.txt → ImageEditorDialog-JDXMU2FC.js.LEGAL.txt} +0 -0
  104. /package/dist/ui/{chunk-ST6QNIWT.js.LEGAL.txt → chunk-6ZVMJXLE.js.LEGAL.txt} +0 -0
  105. /package/dist/ui/{chunk-235TRWJF.js.LEGAL.txt → chunk-7OU4ERTS.js.LEGAL.txt} +0 -0
@@ -79,6 +79,7 @@ react-is/cjs/react-is.production.min.js:
79
79
  @tabler/icons-preact/dist/esm/icons/IconDots.mjs:
80
80
  @tabler/icons-preact/dist/esm/icons/IconDownload.mjs:
81
81
  @tabler/icons-preact/dist/esm/icons/IconFileDiff.mjs:
82
+ @tabler/icons-preact/dist/esm/icons/IconFileOff.mjs:
82
83
  @tabler/icons-preact/dist/esm/icons/IconFile.mjs:
83
84
  @tabler/icons-preact/dist/esm/icons/IconFilter.mjs:
84
85
  @tabler/icons-preact/dist/esm/icons/IconFolderPlus.mjs:
@@ -0,0 +1 @@
1
+ import{c as C,d as P}from"./chunk-7OU4ERTS.js";import{f as h}from"./chunk-5MV6XVGA.js";import{a as x}from"./chunk-HWON6MV4.js";import{a as z}from"./chunk-AAHM6RYJ.js";import{U as b,Y as A,Z as I}from"./chunk-ISUGBMXC.js";import{e as D}from"./chunk-GJ7ES2LA.js";import{Kc as N,U as y,V as u,a as t,bd as k,c as v,da as S,e as w,fd as e,j as V}from"./chunk-Y7RYSRP7.js";import{d as g}from"./chunk-KUCVLANF.js";V();V();function R(o){let r=o.docId,[i,d]=t("idle"),[c,f]=t(""),[s,l]=t(""),m=w(!1);async function p(){d("loading");try{let n=await I(r,{beforeVersion:o.beforeVersion,afterVersion:o.afterVersion});f(n),d("success")}catch(n){console.error(n),l(n instanceof Error?n.message:"Unknown error"),d("error")}}function _(){m.current||(m.current=!0,p())}let a;return i==="idle"||i==="loading"?a=e("div",{className:"AiSummary__loading",children:e(u,{size:"md",color:"gray"})}):i==="error"?a=e(x,{className:"AiSummary__content",size:"body-sm",color:"gray",children:["Failed to load AI summary.",s&&e(g,{children:[e("br",{}),s]})]}):c?a=e(C,{className:"AiSummary__content",code:c}):a=e(x,{className:"AiSummary__content",size:"body-sm",color:"gray",children:"No AI summary available for this draft yet."}),e("div",{className:D(o.className,"AiSummary"),children:e(y,{iconPosition:"right",onChange:()=>_(),disableIconRotation:!0,children:e(y.Item,{label:"Summarize changes",icon:e(N,{stroke:"1.5"}),iconPosition:"left",children:a})})})}function me(o){let r=o.left,i=o.right,[d,c]=t(!1),[f,s]=t(null),[l,m]=t(null),p=z()&&r.docId===i.docId&&o.showAiSummary!==!1,_=h(E(f?.fields||{})),a=h(E(l?.fields||{})),n=!d&&f&&l&&_===a,M=`/cms/compare?left=${F(r)}&right=${F(i)}`;async function $(){c(!0);let[j,T]=await Promise.all([b(r.docId,r.versionId),b(i.docId,i.versionId)]);s(j),m(T),c(!1)}return v(()=>{$()},[]),d?e("div",{className:"DocDiffViewer DocDiffViewer--loading",children:e(u,{size:"md",color:"gray"})}):e(g,{children:[p&&e(R,{className:"DocDiffViewer__aiSummary",docId:r.docId,beforeVersion:String(r.versionId),afterVersion:String(i.versionId)}),e("div",{className:D(o.className,"DocDiffViewer"),children:[o.showExpandButton&&e("div",{className:"DocDiffViewer__expand",children:e(S,{component:"a",variant:"default",size:"xs",compact:!0,href:M,target:"_blank",children:"Open in new tab"})}),e("div",{className:"DocDiffViewer__header",children:[e("div",{className:"DocDiffViewer__header__label",children:[e("div",{className:"DocDiffViewer__header__label__title",children:[o.left.docId,"@",o.left.versionId]}),e("div",{className:"DocDiffViewer__header__label__meta",children:B(f)})]}),e("div",{className:"DocDiffViewer__header__label",children:[e("div",{className:"DocDiffViewer__header__label__title",children:[o.right.docId,"@",o.right.versionId]}),e("div",{className:"DocDiffViewer__header__label__meta",children:B(l)})]})]}),e("div",{className:"DocDiffViewer__diff",children:n?e("div",{className:"DocDiffViewer__identical",children:[e(k,{size:20}),e("span",{children:"No changes. Both versions are identical."})]}):e(P,{oldCode:_,newCode:a})})]})]})}function B(o){if(!o?.sys?.modifiedAt)return"never";let r=o.sys.modifiedAt.toDate();return`${new Intl.DateTimeFormat("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(r)} by ${o.sys.modifiedBy}`}function E(o){return A(o,{removeArrayKey:!0})}function F(o){return encodeURIComponent(`${o.docId}@${o.versionId}`).replaceAll("%2F","/").replaceAll("%40","@")}export{R as a,me as b};
@@ -1 +1 @@
1
- import{b as C}from"./chunk-HV3JJ5UT.js";import{e as F}from"./chunk-ATTW36EM.js";import{c,e as y,p as w,q as U,s as m}from"./chunk-XOWWPE7X.js";import{Ab as k,Ga as d,a as f,c as g,da as v,h as S,i as p,j as b}from"./chunk-WRA24P66.js";import{j as a,k as h}from"./chunk-KUCVLANF.js";h();b();var z=[{name:"Google Drive Folder",key:"googleDriveFolder",placeholder:"https://drive.google.com/drive/folders/...",description:`Where Google Sheets created by Root CMS's localization process are stored. If unspecified, they will be created in your "My Drive".`,ui:e=>d(v,{disabled:!e,variant:"default",size:"xs",compact:!0,rightIcon:d(k,{size:14}),onClick:()=>{e&&window.open(e,F(e))},children:"Open"})}],D=a(null);function X(e){let{db:r,user:s}=C(),o=window.__ROOT_CTX.rootConfig.projectId,[P,u]=f({});g(()=>{let n=c(r,"Projects",o),i=m(n,t=>{if(t.exists()){let l=t.data()||{};u(l.settings||{})}else u({})},t=>{console.error("Failed to subscribe to site settings:",t)});return()=>i()},[r,o,s.uid]);let x=S(async(n,i)=>{let t=c(r,"Projects",o);try{await U(t,new y("settings",n),i)}catch(l){console.error("Failed to set setting",n,l)}},[r,o,s.uid]);return d(D.Provider,{value:{settings:P,setSettings:x},children:e.children})}function B(){let e=p(D);if(!e)throw new Error("useSiteSettings must be used within a <SiteSettingsProvider>");return e}h();b();var I=a(null);function H(e){let{db:r,user:s}=C(),o=window.__ROOT_CTX.rootConfig.projectId,[P,u]=f({});g(()=>{let n=c(r,"Projects",o,"Users",s.uid),i=m(n,t=>{t.exists()?u(t.data()):u({})},t=>{console.error("Failed to subscribe to user preferences:",t)});return()=>i()},[r,o,s.uid]);let x=S(async(n,i)=>{let t=c(r,"Projects",o,"Users",s.uid);try{await w(t,{[n]:i},{merge:!0})}catch(l){console.error("Failed to set user preference",n,l)}},[r,o,s.uid]);return d(I.Provider,{value:{preferences:P,setPreference:x},children:e.children})}function K(){let e=p(I);if(!e)throw new Error("useUserPreferences must be used within a <UserPreferencesProvider>");return e}export{z as a,X as b,B as c,H as d,K as e};
1
+ import{b as C}from"./chunk-PLTI4NG7.js";import{e as F}from"./chunk-ATTW36EM.js";import{c,e as y,p as w,q as U,s as m}from"./chunk-XOWWPE7X.js";import{a as f,c as g,da as v,fd as d,h as S,i as p,j as b,zb as k}from"./chunk-Y7RYSRP7.js";import{j as a,k as h}from"./chunk-KUCVLANF.js";h();b();var z=[{name:"Google Drive Folder",key:"googleDriveFolder",placeholder:"https://drive.google.com/drive/folders/...",description:`Where Google Sheets created by Root CMS's localization process are stored. If unspecified, they will be created in your "My Drive".`,ui:e=>d(v,{disabled:!e,variant:"default",size:"xs",compact:!0,rightIcon:d(k,{size:14}),onClick:()=>{e&&window.open(e,F(e))},children:"Open"})}],D=a(null);function X(e){let{db:r,user:s}=C(),o=window.__ROOT_CTX.rootConfig.projectId,[P,u]=f({});g(()=>{let n=c(r,"Projects",o),i=m(n,t=>{if(t.exists()){let l=t.data()||{};u(l.settings||{})}else u({})},t=>{console.error("Failed to subscribe to site settings:",t)});return()=>i()},[r,o,s.uid]);let x=S(async(n,i)=>{let t=c(r,"Projects",o);try{await U(t,new y("settings",n),i)}catch(l){console.error("Failed to set setting",n,l)}},[r,o,s.uid]);return d(D.Provider,{value:{settings:P,setSettings:x},children:e.children})}function B(){let e=p(D);if(!e)throw new Error("useSiteSettings must be used within a <SiteSettingsProvider>");return e}h();b();var I=a(null);function H(e){let{db:r,user:s}=C(),o=window.__ROOT_CTX.rootConfig.projectId,[P,u]=f({});g(()=>{let n=c(r,"Projects",o,"Users",s.uid),i=m(n,t=>{t.exists()?u(t.data()):u({})},t=>{console.error("Failed to subscribe to user preferences:",t)});return()=>i()},[r,o,s.uid]);let x=S(async(n,i)=>{let t=c(r,"Projects",o,"Users",s.uid);try{await w(t,{[n]:i},{merge:!0})}catch(l){console.error("Failed to set user preference",n,l)}},[r,o,s.uid]);return d(I.Provider,{value:{preferences:P,setPreference:x},children:e.children})}function K(){let e=p(I);if(!e)throw new Error("useUserPreferences must be used within a <UserPreferencesProvider>");return e}export{z as a,X as b,B as c,H as d,K as e};
@@ -1 +1 @@
1
- import{c as a,n as d}from"./chunk-XOWWPE7X.js";import{a as s,c as i,j as l}from"./chunk-WRA24P66.js";l();var r=null;function R(){return r||(r=(async()=>{let o=window.firebase.db,e=window.__ROOT_CTX.rootConfig.projectId||"default",t=a(o,"Projects",e);return((await d(t)).data()||{}).roles||{}})()),r}function m(){let[o,e]=s({}),[t,n]=s(!0);return i(()=>{R().then(c=>{e(c),n(!1)})},[]),{roles:o,loading:t}}export{m as a};
1
+ import{c as a,n as d}from"./chunk-XOWWPE7X.js";import{a as s,c as i,j as l}from"./chunk-Y7RYSRP7.js";l();var r=null;function R(){return r||(r=(async()=>{let o=window.firebase.db,e=window.__ROOT_CTX.rootConfig.projectId||"default",t=a(o,"Projects",e);return((await d(t)).data()||{}).roles||{}})()),r}function m(){let[o,e]=s({}),[t,n]=s(!0);return i(()=>{R().then(c=>{e(c),n(!1)})},[]),{roles:o,loading:t}}export{m as a};
@@ -1 +1 @@
1
- import{C as at,D as st,G as pt,J as ut,K as ft,M as lt,N as ct,R as dt,X as mt,c as T,e as w,ma as M,n as ot,s as S,t as C,ta as ht,v as l,y as h,z as it}from"./chunk-WRA24P66.js";import{j as rt}from"./chunk-KUCVLANF.js";h();var R={show:"mantine:show-notification",hide:"mantine:hide-notification",update:"mantine:update-notification",clean:"mantine:clean-notifications",cleanQueue:"mantine:clean-notifications-queue"};function G(t,e){return new CustomEvent(t,{detail:e})}function $t(t){window.dispatchEvent(G(R.show,t))}function Yt(t){window.dispatchEvent(G(R.update,t))}function Bt(t){window.dispatchEvent(G(R.hide,t))}function Et(t){let e={show:n=>t.showNotification(n.detail),hide:n=>t.hideNotification(n.detail),update:n=>t.updateNotification(n.detail.id,n.detail),clean:t.clean,cleanQueue:t.cleanQueue};T(()=>(Object.keys(e).forEach(n=>{window.addEventListener(R[n],e[n])}),()=>{Object.keys(e).forEach(n=>{window.removeEventListener(R[n],e[n])})}),[])}h();function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j(t,e)}function L(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,j(t,e)}h();h();var W={disabled:!1};h();var O=l.createContext(null);var vt=function(e){return e.scrollTop};var D="unmounted",y="exited",_="entering",b="entered",Q="exiting",E=(function(t){L(e,t);function e(i,o){var r;r=t.call(this,i,o)||this;var a=o,s=a&&!a.isMounting?i.enter:i.appear,p;return r.appearStatus=null,i.in?s?(p=y,r.appearStatus=_):p=b:i.unmountOnExit||i.mountOnEnter?p=D:p=y,r.state={status:p},r.nextCallback=null,r}e.getDerivedStateFromProps=function(o,r){var a=o.in;return a&&r.status===D?{status:y}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var r=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==_&&a!==b&&(r=_):(a===_||a===b)&&(r=Q)}this.updateStatus(!1,r)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,r,a,s;return r=a=s=o,o!=null&&typeof o!="number"&&(r=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:r,enter:a,appear:s}},n.updateStatus=function(o,r){if(o===void 0&&(o=!1),r!==null)if(this.cancelNextCallback(),r===_){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this);a&&vt(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:D})},n.performEnter=function(o){var r=this,a=this.props.enter,s=this.context?this.context.isMounting:o,p=this.props.nodeRef?[s]:[l.findDOMNode(this),s],u=p[0],f=p[1],c=this.getTimeouts(),d=s?c.appear:c.enter;if(!o&&!a||W.disabled){this.safeSetState({status:b},function(){r.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:_},function(){r.props.onEntering(u,f),r.onTransitionEnd(d,function(){r.safeSetState({status:b},function(){r.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,r=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:l.findDOMNode(this);if(!r||W.disabled){this.safeSetState({status:y},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Q},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:y},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,r){r=this.setNextCallback(r),this.setState(o,r)},n.setNextCallback=function(o){var r=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,r.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,r){this.setNextCallback(r);var a=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var p=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=p[0],f=p[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===D)return null;var r=this.props,a=r.children,s=r.in,p=r.mountOnEnter,u=r.unmountOnExit,f=r.appear,c=r.enter,d=r.exit,v=r.timeout,m=r.addEndListener,U=r.onEnter,N=r.onEntering,Y=r.onEntered,B=r.onExit,Z=r.onExiting,H=r.onExited,J=r.nodeRef,I=M(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(O.Provider,{value:null},typeof a=="function"?a(o,I):l.cloneElement(l.Children.only(a),I))},e})(l.Component);E.contextType=O;E.propTypes={};function P(){}E.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:P,onEntering:P,onEntered:P,onExit:P,onExiting:P,onExited:P};E.UNMOUNTED=D;E.EXITED=y;E.ENTERING=_;E.ENTERED=b;E.EXITING=Q;var X=E;function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}h();h();function k(t,e){var n=function(r){return e&&S(r)?e(r):r},i=Object.create(null);return t&&ot.map(t,function(o){return o}).forEach(function(o){i[o.key]=n(o)}),i}function Zt(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var i=Object.create(null),o=[];for(var r in t)r in e?o.length&&(i[r]=o,o=[]):o.push(r);var a,s={};for(var p in e){if(i[p])for(a=0;a<i[p].length;a++){var u=i[p][a];s[i[p][a]]=n(u)}s[p]=n(p)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function g(t,e,n){return n[e]!=null?n[e]:t.props[e]}function yt(t,e){return k(t.children,function(n){return C(n,{onExited:e.bind(null,n),in:!0,appear:g(n,"appear",t),enter:g(n,"enter",t),exit:g(n,"exit",t)})})}function _t(t,e,n){var i=k(t.children),o=Zt(e,i);return Object.keys(o).forEach(function(r){var a=o[r];if(S(a)){var s=r in e,p=r in i,u=e[r],f=S(u)&&!u.props.in;p&&(!s||f)?o[r]=C(a,{onExited:n.bind(null,a),in:!0,exit:g(a,"exit",t),enter:g(a,"enter",t)}):!p&&s&&!f?o[r]=C(a,{in:!1}):p&&s&&S(u)&&(o[r]=C(a,{onExited:n.bind(null,a),in:u.props.in,exit:g(a,"exit",t),enter:g(a,"enter",t)}))}}),o}var Jt=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},Kt={component:"div",childFactory:function(e){return e}},q=(function(t){L(e,t);function e(i,o){var r;r=t.call(this,i,o)||this;var a=r.handleExited.bind(xt(r));return r.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},r}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,r){var a=r.children,s=r.handleExited,p=r.firstRender;return{children:p?yt(o,s):_t(o,a,s),firstRender:!1}},n.handleExited=function(o,r){var a=k(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(r),this.mounted&&this.setState(function(s){var p=it({},s.children);return delete p[o.key],{children:p}}))},n.render=function(){var o=this.props,r=o.component,a=o.childFactory,s=M(o,["component","childFactory"]),p=this.state.contextValue,u=Jt(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,r===null?l.createElement(O.Provider,{value:p},u):l.createElement(O.Provider,{value:p},l.createElement(r,s,u))},e})(l.Component);q.propTypes={};q.defaultProps=Kt;var z=q;h();var A=rt(null);A.displayName="@mantine/notifications/NotificationsContext";function te([t,e],n,i){let o={};return t==="top"&&(o.top=i),t==="bottom"&&(o.bottom=i),e==="left"&&(o.left=i),e==="right"&&(o.right=i),e==="center"&&(o.left="50%",o.transform="translateX(-50%)"),o}var gt=te;var ee=Object.defineProperty,Nt=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Ot=(t,e,n)=>e in t?ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pt=(t,e)=>{for(var n in e||(e={}))ne.call(e,n)&&Ot(t,n,e[n]);if(Nt)for(var n of Nt(e))re.call(e,n)&&Ot(t,n,e[n]);return t},bt={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},oe={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function ie({state:t,maxHeight:e,positioning:n,transitionDuration:i}){let[o,r]=n,a=r==="center"?`${o}-center`:r,s={opacity:0,maxHeight:e,transform:bt[a],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},p={opacity:1,transform:oe[a]},u={opacity:0,maxHeight:0,transform:bt[a]},f={entering:p,entered:p,exiting:u,exited:u};return Pt(Pt({},s),f[t])}var Tt=ie;h();function ae(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}var wt=ae;var se=Object.defineProperty,pe=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,St=(t,e,n)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ct=(t,e)=>{for(var n in e||(e={}))Dt.call(e,n)&&St(t,n,e[n]);if(V)for(var n of V(e))It.call(e,n)&&St(t,n,e[n]);return t},fe=(t,e)=>pe(t,ue(e)),Rt=(t,e)=>{var n={};for(var i in t)Dt.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&V)for(var i of V(t))e.indexOf(i)<0&&It.call(t,i)&&(n[i]=t[i]);return n};function Mt(t){var e=t,{notification:n,autoClose:i,onHide:o,innerRef:r}=e,a=Rt(e,["notification","autoClose","onHide","innerRef"]);let s=n,{autoClose:p}=s,u=Rt(s,["autoClose"]),f=wt(i,p),c=w(),d=()=>{o(n.id),window.clearTimeout(c.current)},v=()=>{clearTimeout(c.current)},m=()=>{typeof f=="number"&&(c.current=window.setTimeout(d,f))};return T(()=>{typeof n.onOpen=="function"&&n.onOpen(n)},[]),T(()=>(m(),v),[i,n.autoClose]),l.createElement(ht,fe(Ct(Ct({},u),a),{onClose:d,onMouseEnter:v,onMouseLeave:m,ref:r}),n.message)}Mt.displayName="@mantine/notifications/NotificationContainer";var jt=Mt;var le=st(t=>({notifications:{width:`calc(100% - ${t.spacing.md*2}px)`,boxSizing:"border-box",position:"fixed",zIndex:1e3},notification:{"&:not(:first-of-type)":{marginTop:t.spacing.sm}}})),Lt=le;var ce=Object.defineProperty,de=Object.defineProperties,me=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Vt=(t,e,n)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ve=(t,e)=>{for(var n in e||(e={}))he.call(e,n)&&Vt(t,n,e[n]);if(kt)for(var n of kt(e))Ee.call(e,n)&&Vt(t,n,e[n]);return t},xe=(t,e)=>de(t,me(e));function ye({limit:t}){let{state:e,queue:n,update:i,cleanQueue:o}=lt({initialValues:[],limit:t});return{notifications:e,queue:n,showNotification:u=>{let f=u.id||ft();return i(c=>u.id&&c.some(d=>d.id===u.id)?c:[...c,xe(ve({},u),{id:f})]),f},updateNotification:(u,f)=>i(c=>{let d=c.findIndex(m=>m.id===u);if(d===-1)return c;let v=[...c];return v[d]=f,v}),hideNotification:u=>i(f=>f.filter(c=>c.id===u?(typeof c.onClose=="function"&&c.onClose(c),!1):!0)),cleanQueue:o,clean:()=>i(()=>[])}}var Ft=ye;var _e=Object.defineProperty,F=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Ut=(t,e,n)=>e in t?_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Ht.call(e,n)&&Ut(t,n,e[n]);if(F)for(var n of F(e))Gt.call(e,n)&&Ut(t,n,e[n]);return t},ge=(t,e)=>{var n={};for(var i in t)Ht.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&F)for(var i of F(t))e.indexOf(i)<0&&Gt.call(t,i)&&(n[i]=t[i]);return n},Ne=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"];function Wt(t){var e=t,{className:n,position:i="bottom-right",autoClose:o=4e3,transitionDuration:r=250,containerWidth:a=440,notificationMaxHeight:s=200,limit:p=5,zIndex:u=at("overlay"),style:f,children:c}=e,d=ge(e,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children"]);let v=ut(),m=w({}),U=w(0),{notifications:N,queue:Y,showNotification:B,updateNotification:Z,hideNotification:H,clean:J,cleanQueue:I}=Ft({limit:p}),K=ct()?1:r,{classes:tt,cx:Qt,theme:Xt}=Lt(),et=(Ne.includes(i)?i:"bottom-right").split("-"),nt={notifications:N,queue:Y,showNotification:B,hideNotification:H,updateNotification:Z,clean:J,cleanQueue:I};pt(()=>{N.length>U.current&&setTimeout(()=>v(),0),U.current=N.length},[N]),Et(nt);let qt=N.map(x=>l.createElement(X,{key:x.id,timeout:K,onEnter:()=>m.current[x.id].offsetHeight,nodeRef:{current:m.current[x.id]}},zt=>l.createElement(jt,{innerRef:At=>{m.current[x.id]=At},notification:x,onHide:H,className:tt.notification,autoClose:o,sx:[$({},Tt({state:zt,positioning:et,transitionDuration:K,maxHeight:s})),...Array.isArray(x.sx)?x.sx:[x.sx]]})));return l.createElement(A.Provider,{value:nt},l.createElement(mt,{zIndex:u},l.createElement(dt,$({className:Qt(tt.notifications,n),style:f,sx:$({maxWidth:a},gt(et,a,Xt.spacing.md))},d),l.createElement(z,null,qt))),c)}Wt.displayName="@mantine/notifications/NotificationsProvider";export{$t as a,Yt as b,Bt as c,Wt as d};
1
+ import{C as at,D as st,G as pt,J as ut,K as ft,M as lt,N as ct,R as dt,X as mt,c as T,e as w,ma as M,n as ot,s as S,t as C,ta as ht,v as l,y as h,z as it}from"./chunk-Y7RYSRP7.js";import{j as rt}from"./chunk-KUCVLANF.js";h();var R={show:"mantine:show-notification",hide:"mantine:hide-notification",update:"mantine:update-notification",clean:"mantine:clean-notifications",cleanQueue:"mantine:clean-notifications-queue"};function G(t,e){return new CustomEvent(t,{detail:e})}function $t(t){window.dispatchEvent(G(R.show,t))}function Yt(t){window.dispatchEvent(G(R.update,t))}function Bt(t){window.dispatchEvent(G(R.hide,t))}function Et(t){let e={show:n=>t.showNotification(n.detail),hide:n=>t.hideNotification(n.detail),update:n=>t.updateNotification(n.detail.id,n.detail),clean:t.clean,cleanQueue:t.cleanQueue};T(()=>(Object.keys(e).forEach(n=>{window.addEventListener(R[n],e[n])}),()=>{Object.keys(e).forEach(n=>{window.removeEventListener(R[n],e[n])})}),[])}h();function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},j(t,e)}function L(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,j(t,e)}h();h();var W={disabled:!1};h();var O=l.createContext(null);var vt=function(e){return e.scrollTop};var D="unmounted",y="exited",_="entering",b="entered",Q="exiting",E=(function(t){L(e,t);function e(i,o){var r;r=t.call(this,i,o)||this;var a=o,s=a&&!a.isMounting?i.enter:i.appear,p;return r.appearStatus=null,i.in?s?(p=y,r.appearStatus=_):p=b:i.unmountOnExit||i.mountOnEnter?p=D:p=y,r.state={status:p},r.nextCallback=null,r}e.getDerivedStateFromProps=function(o,r){var a=o.in;return a&&r.status===D?{status:y}:null};var n=e.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var r=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==_&&a!==b&&(r=_):(a===_||a===b)&&(r=Q)}this.updateStatus(!1,r)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,r,a,s;return r=a=s=o,o!=null&&typeof o!="number"&&(r=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:r,enter:a,appear:s}},n.updateStatus=function(o,r){if(o===void 0&&(o=!1),r!==null)if(this.cancelNextCallback(),r===_){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this);a&&vt(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===y&&this.setState({status:D})},n.performEnter=function(o){var r=this,a=this.props.enter,s=this.context?this.context.isMounting:o,p=this.props.nodeRef?[s]:[l.findDOMNode(this),s],u=p[0],f=p[1],c=this.getTimeouts(),d=s?c.appear:c.enter;if(!o&&!a||W.disabled){this.safeSetState({status:b},function(){r.props.onEntered(u)});return}this.props.onEnter(u,f),this.safeSetState({status:_},function(){r.props.onEntering(u,f),r.onTransitionEnd(d,function(){r.safeSetState({status:b},function(){r.props.onEntered(u,f)})})})},n.performExit=function(){var o=this,r=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:l.findDOMNode(this);if(!r||W.disabled){this.safeSetState({status:y},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Q},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:y},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,r){r=this.setNextCallback(r),this.setState(o,r)},n.setNextCallback=function(o){var r=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,r.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,r){this.setNextCallback(r);var a=this.props.nodeRef?this.props.nodeRef.current:l.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var p=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],u=p[0],f=p[1];this.props.addEndListener(u,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===D)return null;var r=this.props,a=r.children,s=r.in,p=r.mountOnEnter,u=r.unmountOnExit,f=r.appear,c=r.enter,d=r.exit,v=r.timeout,m=r.addEndListener,U=r.onEnter,N=r.onEntering,Y=r.onEntered,B=r.onExit,Z=r.onExiting,H=r.onExited,J=r.nodeRef,I=M(r,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return l.createElement(O.Provider,{value:null},typeof a=="function"?a(o,I):l.cloneElement(l.Children.only(a),I))},e})(l.Component);E.contextType=O;E.propTypes={};function P(){}E.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:P,onEntering:P,onEntered:P,onExit:P,onExiting:P,onExited:P};E.UNMOUNTED=D;E.EXITED=y;E.ENTERING=_;E.ENTERED=b;E.EXITING=Q;var X=E;function xt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}h();h();function k(t,e){var n=function(r){return e&&S(r)?e(r):r},i=Object.create(null);return t&&ot.map(t,function(o){return o}).forEach(function(o){i[o.key]=n(o)}),i}function Zt(t,e){t=t||{},e=e||{};function n(f){return f in e?e[f]:t[f]}var i=Object.create(null),o=[];for(var r in t)r in e?o.length&&(i[r]=o,o=[]):o.push(r);var a,s={};for(var p in e){if(i[p])for(a=0;a<i[p].length;a++){var u=i[p][a];s[i[p][a]]=n(u)}s[p]=n(p)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function g(t,e,n){return n[e]!=null?n[e]:t.props[e]}function yt(t,e){return k(t.children,function(n){return C(n,{onExited:e.bind(null,n),in:!0,appear:g(n,"appear",t),enter:g(n,"enter",t),exit:g(n,"exit",t)})})}function _t(t,e,n){var i=k(t.children),o=Zt(e,i);return Object.keys(o).forEach(function(r){var a=o[r];if(S(a)){var s=r in e,p=r in i,u=e[r],f=S(u)&&!u.props.in;p&&(!s||f)?o[r]=C(a,{onExited:n.bind(null,a),in:!0,exit:g(a,"exit",t),enter:g(a,"enter",t)}):!p&&s&&!f?o[r]=C(a,{in:!1}):p&&s&&S(u)&&(o[r]=C(a,{onExited:n.bind(null,a),in:u.props.in,exit:g(a,"exit",t),enter:g(a,"enter",t)}))}}),o}var Jt=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},Kt={component:"div",childFactory:function(e){return e}},q=(function(t){L(e,t);function e(i,o){var r;r=t.call(this,i,o)||this;var a=r.handleExited.bind(xt(r));return r.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},r}var n=e.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(o,r){var a=r.children,s=r.handleExited,p=r.firstRender;return{children:p?yt(o,s):_t(o,a,s),firstRender:!1}},n.handleExited=function(o,r){var a=k(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(r),this.mounted&&this.setState(function(s){var p=it({},s.children);return delete p[o.key],{children:p}}))},n.render=function(){var o=this.props,r=o.component,a=o.childFactory,s=M(o,["component","childFactory"]),p=this.state.contextValue,u=Jt(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,r===null?l.createElement(O.Provider,{value:p},u):l.createElement(O.Provider,{value:p},l.createElement(r,s,u))},e})(l.Component);q.propTypes={};q.defaultProps=Kt;var z=q;h();var A=rt(null);A.displayName="@mantine/notifications/NotificationsContext";function te([t,e],n,i){let o={};return t==="top"&&(o.top=i),t==="bottom"&&(o.bottom=i),e==="left"&&(o.left=i),e==="right"&&(o.right=i),e==="center"&&(o.left="50%",o.transform="translateX(-50%)"),o}var gt=te;var ee=Object.defineProperty,Nt=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,Ot=(t,e,n)=>e in t?ee(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pt=(t,e)=>{for(var n in e||(e={}))ne.call(e,n)&&Ot(t,n,e[n]);if(Nt)for(var n of Nt(e))re.call(e,n)&&Ot(t,n,e[n]);return t},bt={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},oe={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function ie({state:t,maxHeight:e,positioning:n,transitionDuration:i}){let[o,r]=n,a=r==="center"?`${o}-center`:r,s={opacity:0,maxHeight:e,transform:bt[a],transitionDuration:`${i}ms, ${i}ms, ${i}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},p={opacity:1,transform:oe[a]},u={opacity:0,maxHeight:0,transform:bt[a]},f={entering:p,entered:p,exiting:u,exited:u};return Pt(Pt({},s),f[t])}var Tt=ie;h();function ae(t,e){return typeof e=="number"?e:e===!1||t===!1?!1:t}var wt=ae;var se=Object.defineProperty,pe=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,St=(t,e,n)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ct=(t,e)=>{for(var n in e||(e={}))Dt.call(e,n)&&St(t,n,e[n]);if(V)for(var n of V(e))It.call(e,n)&&St(t,n,e[n]);return t},fe=(t,e)=>pe(t,ue(e)),Rt=(t,e)=>{var n={};for(var i in t)Dt.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&V)for(var i of V(t))e.indexOf(i)<0&&It.call(t,i)&&(n[i]=t[i]);return n};function Mt(t){var e=t,{notification:n,autoClose:i,onHide:o,innerRef:r}=e,a=Rt(e,["notification","autoClose","onHide","innerRef"]);let s=n,{autoClose:p}=s,u=Rt(s,["autoClose"]),f=wt(i,p),c=w(),d=()=>{o(n.id),window.clearTimeout(c.current)},v=()=>{clearTimeout(c.current)},m=()=>{typeof f=="number"&&(c.current=window.setTimeout(d,f))};return T(()=>{typeof n.onOpen=="function"&&n.onOpen(n)},[]),T(()=>(m(),v),[i,n.autoClose]),l.createElement(ht,fe(Ct(Ct({},u),a),{onClose:d,onMouseEnter:v,onMouseLeave:m,ref:r}),n.message)}Mt.displayName="@mantine/notifications/NotificationContainer";var jt=Mt;var le=st(t=>({notifications:{width:`calc(100% - ${t.spacing.md*2}px)`,boxSizing:"border-box",position:"fixed",zIndex:1e3},notification:{"&:not(:first-of-type)":{marginTop:t.spacing.sm}}})),Lt=le;var ce=Object.defineProperty,de=Object.defineProperties,me=Object.getOwnPropertyDescriptors,kt=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,Vt=(t,e,n)=>e in t?ce(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ve=(t,e)=>{for(var n in e||(e={}))he.call(e,n)&&Vt(t,n,e[n]);if(kt)for(var n of kt(e))Ee.call(e,n)&&Vt(t,n,e[n]);return t},xe=(t,e)=>de(t,me(e));function ye({limit:t}){let{state:e,queue:n,update:i,cleanQueue:o}=lt({initialValues:[],limit:t});return{notifications:e,queue:n,showNotification:u=>{let f=u.id||ft();return i(c=>u.id&&c.some(d=>d.id===u.id)?c:[...c,xe(ve({},u),{id:f})]),f},updateNotification:(u,f)=>i(c=>{let d=c.findIndex(m=>m.id===u);if(d===-1)return c;let v=[...c];return v[d]=f,v}),hideNotification:u=>i(f=>f.filter(c=>c.id===u?(typeof c.onClose=="function"&&c.onClose(c),!1):!0)),cleanQueue:o,clean:()=>i(()=>[])}}var Ft=ye;var _e=Object.defineProperty,F=Object.getOwnPropertySymbols,Ht=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Ut=(t,e,n)=>e in t?_e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$=(t,e)=>{for(var n in e||(e={}))Ht.call(e,n)&&Ut(t,n,e[n]);if(F)for(var n of F(e))Gt.call(e,n)&&Ut(t,n,e[n]);return t},ge=(t,e)=>{var n={};for(var i in t)Ht.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&F)for(var i of F(t))e.indexOf(i)<0&&Gt.call(t,i)&&(n[i]=t[i]);return n},Ne=["top-left","top-right","top-center","bottom-left","bottom-right","bottom-center"];function Wt(t){var e=t,{className:n,position:i="bottom-right",autoClose:o=4e3,transitionDuration:r=250,containerWidth:a=440,notificationMaxHeight:s=200,limit:p=5,zIndex:u=at("overlay"),style:f,children:c}=e,d=ge(e,["className","position","autoClose","transitionDuration","containerWidth","notificationMaxHeight","limit","zIndex","style","children"]);let v=ut(),m=w({}),U=w(0),{notifications:N,queue:Y,showNotification:B,updateNotification:Z,hideNotification:H,clean:J,cleanQueue:I}=Ft({limit:p}),K=ct()?1:r,{classes:tt,cx:Qt,theme:Xt}=Lt(),et=(Ne.includes(i)?i:"bottom-right").split("-"),nt={notifications:N,queue:Y,showNotification:B,hideNotification:H,updateNotification:Z,clean:J,cleanQueue:I};pt(()=>{N.length>U.current&&setTimeout(()=>v(),0),U.current=N.length},[N]),Et(nt);let qt=N.map(x=>l.createElement(X,{key:x.id,timeout:K,onEnter:()=>m.current[x.id].offsetHeight,nodeRef:{current:m.current[x.id]}},zt=>l.createElement(jt,{innerRef:At=>{m.current[x.id]=At},notification:x,onHide:H,className:tt.notification,autoClose:o,sx:[$({},Tt({state:zt,positioning:et,transitionDuration:K,maxHeight:s})),...Array.isArray(x.sx)?x.sx:[x.sx]]})));return l.createElement(A.Provider,{value:nt},l.createElement(mt,{zIndex:u},l.createElement(dt,$({className:Qt(tt.notifications,n),style:f,sx:$({maxWidth:a},gt(et,a,Xt.spacing.md))},d),l.createElement(z,null,qt))),c)}Wt.displayName="@mantine/notifications/NotificationsProvider";export{$t as a,Yt as b,Bt as c,Wt as d};