ghost 6.17.0 → 6.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/components/tryghost-i18n-6.17.2.tgz +0 -0
  2. package/components/{tryghost-parse-email-address-6.17.0.tgz → tryghost-parse-email-address-6.17.2.tgz} +0 -0
  3. package/content/themes/source/package.json +1 -1
  4. package/core/built/admin/assets/{PolarAngleAxis-sYvwhg8d.js → PolarAngleAxis-B8JrAxf_.js} +1 -1
  5. package/core/built/admin/assets/{_baseAssignValue-DKQ9pw63.js → _baseAssignValue-Bbalamaq.js} +1 -1
  6. package/core/built/admin/assets/{a-large-small-CCJbivJB.js → a-large-small-CgWPeKpi.js} +1 -1
  7. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  8. package/core/built/admin/assets/admin-x-settings/{code-editor-view-CdDTmDO_.mjs → code-editor-view-BzvYs1fs.mjs} +2 -2
  9. package/core/built/admin/assets/admin-x-settings/{index-D19Kl7F3.mjs → index-BXChUyr6.mjs} +5703 -5668
  10. package/core/built/admin/assets/admin-x-settings/{index-NuuHxngw.mjs → index-DYEF3NiM.mjs} +2 -2
  11. package/core/built/admin/assets/admin-x-settings/{index-DWAeZxhW.mjs → index-DdMo_pvD.mjs} +2 -2
  12. package/core/built/admin/assets/admin-x-settings/{modals-C-PAZhri.mjs → modals-Ck3AHDx3.mjs} +8065 -8057
  13. package/core/built/admin/assets/{at-sign-BpRvqAQI.js → at-sign-BottTo2X.js} +1 -1
  14. package/core/built/admin/assets/{audience-DyCuv1si.js → audience-CcGOt5Fb.js} +1 -1
  15. package/core/built/admin/assets/{avatar-flipboard-BfziFfAR.js → avatar-flipboard-MxW2k124.js} +1 -1
  16. package/core/built/admin/assets/{bluesky-sharing-D-LC_G4e.js → bluesky-sharing-BBmDBlxr.js} +1 -1
  17. package/core/built/admin/assets/{chart-BvckKrZJ.js → chart-pimL5Chk.js} +1 -1
  18. package/core/built/admin/assets/{chunk.524.c76823170fc310a35d9a.js → chunk.524.9a8f5123fd3ecf3e4451.js} +7 -7
  19. package/core/built/admin/assets/{chunk.582.78cee8a07d88a486d8d3.js → chunk.582.41886d06af2895d571bd.js} +9 -9
  20. package/core/built/admin/assets/{code-editor-view-BEwQJYgg.js → code-editor-view-tCZOpc_h.js} +1 -1
  21. package/core/built/admin/assets/{comments-1fqIGh0f.js → comments-OXqhcC0t.js} +1 -1
  22. package/core/built/admin/assets/{copy-BywnwlHN.js → copy-aC0WUVtq.js} +1 -1
  23. package/core/built/admin/assets/{data-list--hSCIzLC.js → data-list-BOdyZGWI.js} +1 -1
  24. package/core/built/admin/assets/{deleted-feed-item-DYKurQBy.js → deleted-feed-item-BnUJ8bWP.js} +1 -1
  25. package/core/built/admin/assets/{edit-profile-yzEMlJ_t.js → edit-profile-CEgPhWMJ.js} +1 -1
  26. package/core/built/admin/assets/{empty-indicator-1p7S45xr.js → empty-indicator-CR_9BHAH.js} +1 -1
  27. package/core/built/admin/assets/{en-DtAty2DP.js → en-ajofhc7o.js} +1 -1
  28. package/core/built/admin/assets/{feed-DB25J9B-.js → feed-Ci-ODCHE.js} +1 -1
  29. package/core/built/admin/assets/{filters-cN8zP798.js → filters-CmJJOv3I.js} +1 -1
  30. package/core/built/admin/assets/{gh-chart-CVItDGhq.js → gh-chart-hn7wEnik.js} +1 -1
  31. package/core/built/admin/assets/{ghost-f424e37f7e8f90122e3a13866d2b1f91.css → ghost-78b420974adc056bf1c9570275a46535.css} +1 -1
  32. package/core/built/admin/assets/{ghost-10e648bbdbb5f2e55418e88f15d302e2.js → ghost-a9268074d0a9b02198594a05ecd7a626.js} +2 -2
  33. package/core/built/admin/assets/{growth-Lbkwu9SJ.js → growth-CQceZQ1g.js} +1 -1
  34. package/core/built/admin/assets/{hash-BQl75WLf.js → hash-BcaWmkw5.js} +1 -1
  35. package/core/built/admin/assets/{inbox-BMxFzv7J.js → inbox-D9hID-rO.js} +1 -1
  36. package/core/built/admin/assets/{index-BrYABbTV.js → index-B1rKIiOr.js} +1 -1
  37. package/core/built/admin/assets/{index-KqwA5am_.css → index-BBrewxpF.css} +1 -1
  38. package/core/built/admin/assets/{index-BQ6KbriB.js → index-BJS8H75W.js} +1 -1
  39. package/core/built/admin/assets/{index-oanahlHO.js → index-BmK6ThYl.js} +1 -1
  40. package/core/built/admin/assets/{index-8pnhFllL.js → index-CZ3lARQ2.js} +1 -1
  41. package/core/built/admin/assets/{index-SafJnMjy.js → index-Cl2eSBwg.js} +1 -1
  42. package/core/built/admin/assets/{index-CoyIDbjB.js → index-D8syEvSm.js} +1 -1
  43. package/core/built/admin/assets/{index-DR3xU0-B.js → index-DJDgMk-T.js} +1 -1
  44. package/core/built/admin/assets/{index-C6_sy_zU.js → index-DO76vL0R.js} +1 -1
  45. package/core/built/admin/assets/{index-DQny1_Ij.js → index-DYM1MbXR.js} +1 -1
  46. package/core/built/admin/assets/{index-CIheyf0S.js → index-Do091GLu.js} +1 -1
  47. package/core/built/admin/assets/{index-DG5ENBXM.js → index-d_UH71zm.js} +1 -1
  48. package/core/built/admin/assets/{index-BeAhXwae.js → index-f5Lv9kLb.js} +3 -3
  49. package/core/built/admin/assets/{index-oARkCq-e.js → index-g4BWcHhl.js} +1 -1
  50. package/core/built/admin/assets/{index-C5Mf4zlN.js → index-kXF42nga.js} +1 -1
  51. package/core/built/admin/assets/{index-voIsrI4j.js → index-rluYcfd-.js} +1 -1
  52. package/core/built/admin/assets/{koenig-lexical-uhDY2cN7.js → koenig-lexical-D2XHvS2J.js} +1 -1
  53. package/core/built/admin/assets/{kpi-card-DieTCZ1Z.js → kpi-card-Dga9rFZ5.js} +1 -1
  54. package/core/built/admin/assets/{kpis-Dg2Sav4t.js → kpis-BbnqD1za.js} +1 -1
  55. package/core/built/admin/assets/{label-Cs4FoZGu.js → label-D8WHEOe0.js} +1 -1
  56. package/core/built/admin/assets/{links-DwbtAH6y.js → links-dgwx7ko1.js} +1 -1
  57. package/core/built/admin/assets/{lucide-react-CTYGYE5A.js → lucide-react-BARFK2PZ.js} +1 -1
  58. package/core/built/admin/assets/{main-layout-DgFdHzFw.js → main-layout-CcjtCuF_.js} +1 -1
  59. package/core/built/admin/assets/{message-square-text-42zfcaLO.js → message-square-text-BxquqPhA.js} +1 -1
  60. package/core/built/admin/assets/{minus-vbx9q5AE.js → minus-Ziy4LSYD.js} +1 -1
  61. package/core/built/admin/assets/{modals-B1LK0GFs.js → modals-fMQzR7L6.js} +2 -2
  62. package/core/built/admin/assets/{moderation-DBHou9Tg.js → moderation-Ci9UNwiZ.js} +1 -1
  63. package/core/built/admin/assets/{newsletter-C_C5cbBQ.js → newsletter-DnrS7Fvi.js} +1 -1
  64. package/core/built/admin/assets/{newsletters-COhRGj2b.js → newsletters-D78pgnas.js} +1 -1
  65. package/core/built/admin/assets/{note-Bs7yEUc9.js → note-BAfNweZN.js} +1 -1
  66. package/core/built/admin/assets/{overview-DgkHUK_G.js → overview-CWQPNOF0.js} +1 -1
  67. package/core/built/admin/assets/{pagemenu-aMfaU2cA.js → pagemenu-DjSqq3Wu.js} +1 -1
  68. package/core/built/admin/assets/{post-analytics-BFOeo-LR.js → post-analytics-c8kRV0YB.js} +1 -1
  69. package/core/built/admin/assets/{post-analytics-context-BR5b-9nb.js → post-analytics-context-CEqWyqgm.js} +1 -1
  70. package/core/built/admin/assets/{post-analytics-header-Cj_Vf_UF.js → post-analytics-header-CpPPBAz4.js} +1 -1
  71. package/core/built/admin/assets/{post-share-modal-CP1NDQhS.js → post-share-modal-Dln0kZhn.js} +1 -1
  72. package/core/built/admin/assets/{posts-BQJit53V.js → posts-C1Eh5Ypq.js} +1 -1
  73. package/core/built/admin/assets/{repeat-DBbPJ4Vq.js → repeat-CN4fiG5H.js} +1 -1
  74. package/core/built/admin/assets/{reply-DlcWrPL1.js → reply-BfWgvH7y.js} +1 -1
  75. package/core/built/admin/assets/{select-wir-gl-P.js → select-B_0NBkLz.js} +1 -1
  76. package/core/built/admin/assets/{settings-CpDtcACU.js → settings-BqaVcJee.js} +25 -25
  77. package/core/built/admin/assets/{settings-CtzZEQJ2.js → settings-Dk9E7Fqv.js} +1 -1
  78. package/core/built/admin/assets/{sort-button-CecMSgfo.js → sort-button-C2M35dLh.js} +1 -1
  79. package/core/built/admin/assets/{source-icon-CveBuH3b.js → source-icon-DkGi13e_.js} +1 -1
  80. package/core/built/admin/assets/{sprout-Beunj00B.js → sprout-BKiwQsGn.js} +1 -1
  81. package/core/built/admin/assets/{square-DTB79BvA.js → square-BEpRc_fY.js} +1 -1
  82. package/core/built/admin/assets/{stats-C2A4PNUn.js → stats-CRgy_cWm.js} +1 -1
  83. package/core/built/admin/assets/{stats-view-XXduvFiP.js → stats-view-CTQ4qO3S.js} +1 -1
  84. package/core/built/admin/assets/{step-1-Dhctc4sb.js → step-1-CNbdmB8C.js} +1 -1
  85. package/core/built/admin/assets/{step-2-CfG-dkZM.js → step-2-Ddrl2uae.js} +1 -1
  86. package/core/built/admin/assets/{step-3-D_7ttapi.js → step-3-CbqkEtwh.js} +1 -1
  87. package/core/built/admin/assets/{table-D-JhwxMn.js → table-Dw9xFlFd.js} +1 -1
  88. package/core/built/admin/assets/{tabs-DvTZ848X.js → tabs-DCHagOip.js} +1 -1
  89. package/core/built/admin/assets/{tags-Pad-cSDy.js → tags-BsDlfsPN.js} +1 -1
  90. package/core/built/admin/assets/{tags-dgsPPBjR.js → tags-DV2SSdMK.js} +1 -1
  91. package/core/built/admin/assets/{tiers-DFi-MWJ-.js → tiers-tc5tafWV.js} +1 -1
  92. package/core/built/admin/assets/{toggle-group-DMvy3Ce1.js → toggle-group-DS-ZVhCr.js} +1 -1
  93. package/core/built/admin/assets/{topic-filter-Is3xj8qt.js → topic-filter-BfoEqHRD.js} +1 -1
  94. package/core/built/admin/assets/{trash-CT37Asdf.js → trash-CpnxYen-.js} +1 -1
  95. package/core/built/admin/assets/{url-helpers-Bf57BBzr.js → url-helpers-wKPPeCtD.js} +1 -1
  96. package/core/built/admin/assets/{use-growth-stats-DXoeaAKq.js → use-growth-stats-CbHIETF_.js} +1 -1
  97. package/core/built/admin/assets/{use-infinite-virtual-scroll-COKeWLQm.js → use-infinite-virtual-scroll-DU1EUhyj.js} +1 -1
  98. package/core/built/admin/assets/{use-simple-pagination-BQBxprZe.js → use-simple-pagination-X6kmRz2u.js} +1 -1
  99. package/core/built/admin/assets/{user-round-check-C5Iux98g.js → user-round-check-DYkrjHxF.js} +1 -1
  100. package/core/built/admin/assets/{wallet-cards-Hfikexmn.js → wallet-cards-CSdWOmJE.js} +1 -1
  101. package/core/built/admin/assets/{web-B-GYQeG7.js → web-C39IKnvl.js} +1 -1
  102. package/core/built/admin/index.html +6 -6
  103. package/core/server/services/email-address/email-address-service-wrapper.js +3 -0
  104. package/core/server/services/email-address/email-address-service.js +11 -0
  105. package/core/server/services/email-address/email-address-service.ts +13 -0
  106. package/core/server/services/members/api.js +3 -1
  107. package/core/server/services/members/members-api/controllers/router-controller.js +5 -2
  108. package/core/server/services/members/members-api/members-api.js +4 -2
  109. package/package.json +5 -5
  110. package/tsconfig.tsbuildinfo +1 -1
  111. package/components/tryghost-i18n-6.17.0.tgz +0 -0
@@ -1 +1 @@
1
- import{r as a,j as u,as as D,az as L,au as I,ar as O,aE as S,ay as j,aF as z,aG as G}from"./index-BeAhXwae.js";var R="Checkbox",[H]=D(R),[K,P]=H(R);function U(t){const{__scopeCheckbox:c,checked:s,children:l,defaultChecked:r,disabled:e,form:f,name:h,onCheckedChange:d,required:C,value:k="on",internal_do_not_use_render:i}=t,[p,v]=O({prop:s,defaultProp:r??!1,onChange:d,caller:R}),[x,m]=a.useState(null),[E,o]=a.useState(null),n=a.useRef(!1),_=x?!!f||!!x.closest("form"):!0,y={checked:p,disabled:e,setChecked:v,control:x,setControl:m,name:h,form:f,value:k,hasConsumerStoppedPropagationRef:n,required:C,defaultChecked:b(r)?!1:r,isFormControl:_,bubbleInput:E,setBubbleInput:o};return u.jsx(K,{scope:c,...y,children:Q(i)?i(y):l})}var N="CheckboxTrigger",w=a.forwardRef(({__scopeCheckbox:t,onKeyDown:c,onClick:s,...l},r)=>{const{control:e,value:f,disabled:h,checked:d,required:C,setControl:k,setChecked:i,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:x}=P(N,t),m=S(r,k),E=a.useRef(d);return a.useEffect(()=>{const o=e?.form;if(o){const n=()=>i(E.current);return o.addEventListener("reset",n),()=>o.removeEventListener("reset",n)}},[e,i]),u.jsx(I.button,{type:"button",role:"checkbox","aria-checked":b(d)?"mixed":d,"aria-required":C,"data-state":q(d),"data-disabled":h?"":void 0,disabled:h,value:f,...l,ref:m,onKeyDown:j(c,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:j(s,o=>{i(n=>b(n)?!0:!n),x&&v&&(p.current=o.isPropagationStopped(),p.current||o.stopPropagation())})})});w.displayName=N;var X=a.forwardRef((t,c)=>{const{__scopeCheckbox:s,name:l,checked:r,defaultChecked:e,required:f,disabled:h,value:d,onCheckedChange:C,form:k,...i}=t;return u.jsx(U,{__scopeCheckbox:s,checked:r,defaultChecked:e,disabled:h,required:f,onCheckedChange:C,name:l,form:k,value:d,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(w,{...i,ref:c,__scopeCheckbox:s}),p&&u.jsx(T,{__scopeCheckbox:s})]})})});X.displayName=R;var B="CheckboxIndicator",J=a.forwardRef((t,c)=>{const{__scopeCheckbox:s,forceMount:l,...r}=t,e=P(B,s);return u.jsx(L,{present:l||b(e.checked)||e.checked===!0,children:u.jsx(I.span,{"data-state":q(e.checked),"data-disabled":e.disabled?"":void 0,...r,ref:c,style:{pointerEvents:"none",...t.style}})})});J.displayName=B;var M="CheckboxBubbleInput",T=a.forwardRef(({__scopeCheckbox:t,...c},s)=>{const{control:l,hasConsumerStoppedPropagationRef:r,checked:e,defaultChecked:f,required:h,disabled:d,name:C,value:k,form:i,bubbleInput:p,setBubbleInput:v}=P(M,t),x=S(s,v),m=z(e),E=G(l);a.useEffect(()=>{const n=p;if(!n)return;const _=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(_,"checked").set,A=!r.current;if(m!==e&&g){const F=new Event("click",{bubbles:A});n.indeterminate=b(e),g.call(n,b(e)?!1:e),n.dispatchEvent(F)}},[p,m,e,r]);const o=a.useRef(b(e)?!1:e);return u.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??o.current,required:h,disabled:d,name:C,value:k,form:i,...c,tabIndex:-1,ref:x,style:{...c.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});T.displayName=M;function Q(t){return typeof t=="function"}function b(t){return t==="indeterminate"}function q(t){return b(t)?"indeterminate":t?"checked":"unchecked"}export{X as C,J as a};
1
+ import{r as a,j as u,as as D,az as L,au as I,ar as O,aE as S,ay as j,aF as z,aG as G}from"./index-f5Lv9kLb.js";var R="Checkbox",[H]=D(R),[K,P]=H(R);function U(t){const{__scopeCheckbox:c,checked:s,children:l,defaultChecked:r,disabled:e,form:f,name:h,onCheckedChange:d,required:C,value:k="on",internal_do_not_use_render:i}=t,[p,v]=O({prop:s,defaultProp:r??!1,onChange:d,caller:R}),[x,m]=a.useState(null),[E,o]=a.useState(null),n=a.useRef(!1),_=x?!!f||!!x.closest("form"):!0,y={checked:p,disabled:e,setChecked:v,control:x,setControl:m,name:h,form:f,value:k,hasConsumerStoppedPropagationRef:n,required:C,defaultChecked:b(r)?!1:r,isFormControl:_,bubbleInput:E,setBubbleInput:o};return u.jsx(K,{scope:c,...y,children:Q(i)?i(y):l})}var N="CheckboxTrigger",w=a.forwardRef(({__scopeCheckbox:t,onKeyDown:c,onClick:s,...l},r)=>{const{control:e,value:f,disabled:h,checked:d,required:C,setControl:k,setChecked:i,hasConsumerStoppedPropagationRef:p,isFormControl:v,bubbleInput:x}=P(N,t),m=S(r,k),E=a.useRef(d);return a.useEffect(()=>{const o=e?.form;if(o){const n=()=>i(E.current);return o.addEventListener("reset",n),()=>o.removeEventListener("reset",n)}},[e,i]),u.jsx(I.button,{type:"button",role:"checkbox","aria-checked":b(d)?"mixed":d,"aria-required":C,"data-state":q(d),"data-disabled":h?"":void 0,disabled:h,value:f,...l,ref:m,onKeyDown:j(c,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:j(s,o=>{i(n=>b(n)?!0:!n),x&&v&&(p.current=o.isPropagationStopped(),p.current||o.stopPropagation())})})});w.displayName=N;var X=a.forwardRef((t,c)=>{const{__scopeCheckbox:s,name:l,checked:r,defaultChecked:e,required:f,disabled:h,value:d,onCheckedChange:C,form:k,...i}=t;return u.jsx(U,{__scopeCheckbox:s,checked:r,defaultChecked:e,disabled:h,required:f,onCheckedChange:C,name:l,form:k,value:d,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(w,{...i,ref:c,__scopeCheckbox:s}),p&&u.jsx(T,{__scopeCheckbox:s})]})})});X.displayName=R;var B="CheckboxIndicator",J=a.forwardRef((t,c)=>{const{__scopeCheckbox:s,forceMount:l,...r}=t,e=P(B,s);return u.jsx(L,{present:l||b(e.checked)||e.checked===!0,children:u.jsx(I.span,{"data-state":q(e.checked),"data-disabled":e.disabled?"":void 0,...r,ref:c,style:{pointerEvents:"none",...t.style}})})});J.displayName=B;var M="CheckboxBubbleInput",T=a.forwardRef(({__scopeCheckbox:t,...c},s)=>{const{control:l,hasConsumerStoppedPropagationRef:r,checked:e,defaultChecked:f,required:h,disabled:d,name:C,value:k,form:i,bubbleInput:p,setBubbleInput:v}=P(M,t),x=S(s,v),m=z(e),E=G(l);a.useEffect(()=>{const n=p;if(!n)return;const _=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(_,"checked").set,A=!r.current;if(m!==e&&g){const F=new Event("click",{bubbles:A});n.indeterminate=b(e),g.call(n,b(e)?!1:e),n.dispatchEvent(F)}},[p,m,e,r]);const o=a.useRef(b(e)?!1:e);return u.jsx(I.input,{type:"checkbox","aria-hidden":!0,defaultChecked:f??o.current,required:h,disabled:d,name:C,value:k,form:i,...c,tabIndex:-1,ref:x,style:{...c.style,...E,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});T.displayName=M;function Q(t){return typeof t=="function"}function b(t){return t==="indeterminate"}function q(t){return b(t)?"indeterminate":t?"checked":"unchecked"}export{X as C,J as a};
@@ -1,4 +1,4 @@
1
- import{r as o,j as n,cq as Cn,cr as Sn,B as A,ch as Wn,ct as zn,cs as Kn,e as rn,cV as Vn,b as En,d1 as gn,S as E,P as Yn,A as Qn,h as Zn,g as fn,d as Jn,n as Xn,bu as Gn,f as pn,F as an,i as on,d2 as ne,o as ee,a as te,u as ae,p as oe,L as re,aR as ie,D as de,t as ce,v as se,w as le,a9 as ge,d3 as pe,d4 as ue,bm as bn,bn as he}from"./index-BeAhXwae.js";import{M as me}from"./minus-vbx9q5AE.js";import{u as ke,D as fe,A as be,S as xn}from"./deleted-feed-item-DYKurQBy.js";import{T as xe}from"./topic-filter-Is3xj8qt.js";import{E as vn}from"./empty-indicator-1p7S45xr.js";import{I as yn}from"./inbox-BMxFzv7J.js";import"./trash-CT37Asdf.js";const un=["1.5rem","1.6rem","1.7rem","1.8rem","2rem"],U={BACKGROUND_COLOR:"ghost-ap-background-color",FONT_SIZE:"ghost-ap-font-size",FONT_STYLE:"ghost-ap-font-style"},P={SYSTEM:{id:"system",color:"#fff",background:"bg-white dark:bg-black",button:"bg-white dark:bg-black",border:"border-black/[8%] dark:border-gray-950"},SEPIA:{id:"sepia",color:"#FCF8F1",background:"bg-[#FCF8F1]",button:"bg-[#FCF8F1] hover:bg-black/[3%] text-black hover:text-black",border:"border-black/[8%]"},LIGHT:{id:"light",color:"#fff",background:"bg-white",button:"hover:bg-black/[3%] text-black hover:text-black",border:"border-black/[8%] dark:border-gray-950"},DARK:{id:"dark",color:"#15171a",background:"bg-black",button:"text-white dark:bg-black dark:hover:bg-gray-900",border:"border-black/[8%] dark:border-gray-950"}},ve=()=>{const[a,s]=o.useState(()=>localStorage.getItem(U.BACKGROUND_COLOR)?.toUpperCase()||"SYSTEM"),[t,p]=o.useState(()=>{const r=localStorage.getItem(U.FONT_SIZE);return r?parseInt(r):2}),[c,k]=o.useState(()=>localStorage.getItem(U.FONT_STYLE)||"sans"),i=r=>{s(r),localStorage.setItem(U.BACKGROUND_COLOR,P[r].id)};return o.useEffect(()=>{localStorage.setItem(U.FONT_SIZE,t.toString())},[t]),o.useEffect(()=>{localStorage.setItem(U.FONT_STYLE,c)},[c]),{backgroundColor:a,currentFontSizeIndex:t,fontStyle:c,handleColorChange:i,setFontStyle:k,increaseFontSize:()=>{p(r=>Math.min(r+1,un.length-1))},decreaseFontSize:()=>{p(r=>Math.max(r-1,0))},resetFontSize:()=>p(2),fontSize:un[t]}},wn=({backgroundColor:a,currentFontSizeIndex:s,fontStyle:t,onColorChange:p,onFontStyleChange:c,onDecreaseFontSize:k,onIncreaseFontSize:i,onResetFontSize:u,onOpenChange:v})=>{const h=l=>a===l,r=l=>t===l;return n.jsx(ye,{backgroundColor:a,currentFontSizeIndex:s,fontStyle:t,isActiveColor:h,isActiveFont:r,onColorChange:p,onDecreaseFontSize:k,onFontStyleChange:c,onIncreaseFontSize:i,onOpenChange:v,onResetFontSize:u})},ye=({backgroundColor:a,isActiveColor:s,isActiveFont:t,onColorChange:p,onFontStyleChange:c,currentFontSizeIndex:k,onDecreaseFontSize:i,onIncreaseFontSize:u,onResetFontSize:v,onOpenChange:h})=>n.jsxs(Cn,{modal:!1,onOpenChange:h,children:[n.jsx(Sn,{asChild:!0,children:n.jsx(A,{className:`size-9 rounded-full ${P[a].button}`,variant:"ghost",children:n.jsx(Wn.Typography,{className:"!size-[18px]"})})}),n.jsx(zn,{align:"end",className:"w-[224px]",onCloseAutoFocus:r=>r.preventDefault(),onOpenAutoFocus:r=>r.preventDefault(),children:n.jsxs("div",{className:"flex flex-col gap-4",children:[n.jsxs("div",{className:"flex items-center justify-between gap-[6px]",children:[n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-gray-200 p-0 text-[1.1rem] text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px] ${s("SYSTEM")?"outline outline-2 outline-green":""}`,variant:"secondary",onClick:()=>p("SYSTEM"),children:"Auto"}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-[#ece6d9] p-0 hover:bg-[#ece6d9] ${s("SEPIA")?"outline outline-2 outline-green":"border border-[#ece6d9]"}`,onClick:()=>p("SEPIA")}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-white p-0 hover:bg-white ${s("LIGHT")?"outline outline-2 outline-green":"border border-gray-200"}`,onClick:()=>p("LIGHT")}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-black p-0 hover:bg-black dark:border dark:border-gray-925 ${s("DARK")?"outline outline-2 outline-green":""}`,onClick:()=>p("DARK")})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(A,{className:`flex h-auto w-full flex-col gap-1 rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 ${t("sans")&&"outline outline-2 outline-green"}`,variant:"secondary",onClick:()=>c("sans"),children:[n.jsx("span",{className:"text-[2rem] font-bold leading-none",children:"Aa"}),n.jsx("span",{className:"text-[1.1rem]",children:"System"})]}),n.jsxs(A,{className:`flex h-auto w-full flex-col gap-1 rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 ${t("serif")&&"outline outline-2 outline-green"}`,variant:"secondary",onClick:()=>c("serif"),children:[n.jsx("span",{className:"pt-1 font-serif text-[2rem] font-bold leading-none",children:"Aa"}),n.jsx("span",{className:"font-serif text-[1.2rem]",children:"Serif"})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px]",disabled:k===0,variant:"secondary",onClick:i,children:n.jsx(me,{})}),n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900",variant:"secondary",onClick:v,children:n.jsx("span",{className:"text-[1.6rem] font-bold",children:"Aa"})}),n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px]",disabled:k===un.length-1,variant:"secondary",onClick:u,children:n.jsx(Kn,{})})]})]})})]}),we=({tocItems:a,iframeElement:s,modalRef:t,className:p="!visible absolute inset-y-0 right-7 z-40 hidden lg:!block",onOpenChange:c})=>{const[k,i]=o.useState(null),u=rn.useRef(!1),v=h=>{if(!s?.contentDocument)return;const r=s.contentDocument.getElementById(h);r&&t.current&&(u.current=!0,i(h),t.current.scrollTo({top:r.offsetTop-20,behavior:"smooth"}),setTimeout(()=>{u.current=!1},1e3))};return o.useEffect(()=>{if(!s?.contentDocument||a.length<=1)return;const h=t.current;if(!h)return;const r=()=>{if(u.current)return;const d=s.contentDocument;if(!d)return;const _=h.scrollTop,F=100,D=a.map(S=>d.getElementById(S.id)).filter(S=>S!==null).map(S=>({id:S.id,top:S.offsetTop}));if(!D.length)return;const L=D.reduce((S,M)=>M.top-F<=_?M:S);i(L?.id||null)},l=()=>{requestAnimationFrame(r)};return h.addEventListener("scroll",l),r(),()=>{h.removeEventListener("scroll",l)}},[s,a,t]),a.length<=1?null:n.jsx("div",{className:p,children:n.jsx("div",{className:"sticky top-1/2 -translate-y-1/2",children:n.jsx(Se,{activeHeading:k||"",items:a,onItemClick:v,onOpenChange:c})})})},je={1:"w-3",2:"w-2",3:"w-1"},Ce={1:"pl-2",2:"pl-6",3:"pl-10"},Se=({items:a,activeHeading:s,onItemClick:t,onOpenChange:p})=>{const[c,k]=o.useState(!1),i=rn.useRef();if(rn.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),a.length===0)return null;const u=d=>Math.min(d,3),v=d=>je[u(d)],h=d=>Ce[u(d)],r=()=>{i.current&&clearTimeout(i.current),k(!0),p?.(!0)},l=()=>{i.current=setTimeout(()=>{k(!1),p?.(!1)},100)};return n.jsxs(Cn,{modal:!1,open:c,onOpenChange:k,children:[n.jsx(Sn,{asChild:!0,children:n.jsx("div",{className:"absolute right-2 top-1/2 flex -translate-y-1/2 flex-col items-end gap-2 rounded-md p-2 text-base dark:bg-black",onMouseEnter:r,onMouseLeave:l,children:a.map(d=>n.jsx("div",{className:`h-[2px] rounded-sm ${s===d.id?"bg-black dark:bg-white":"bg-gray-400 dark:bg-gray-700"} pr-1 transition-all ${v(d.level)}`},d.id))})}),n.jsx(zn,{align:"center",className:"w-[240px] p-2",side:"left",sideOffset:-28,onCloseAutoFocus:d=>d.preventDefault(),onMouseEnter:r,onMouseLeave:l,onOpenAutoFocus:d=>d.preventDefault(),children:n.jsx("nav",{"aria-label":"Table of contents navigation",className:"max-h-[60vh] overflow-y-auto",role:"navigation",children:a.map(d=>n.jsx("button",{className:`line-clamp-2 block w-full cursor-pointer rounded py-1 text-left text-sm leading-tight ${s===d.id?"text-black dark:text-white":"text-gray-700 dark:text-gray-600"} hover:bg-gray-75 hover:text-gray-900 dark:hover:bg-grey-925 dark:hover:text-white ${h(d.level)}`,type:"button",onClick:()=>t(d.id),children:n.jsx("span",{className:"line-clamp-2",children:d.text})},d.id))})})]})},ze=()=>`<style>
1
+ import{r as o,j as n,cq as Cn,cr as Sn,B as A,ch as Wn,ct as zn,cs as Kn,e as rn,cV as Vn,b as En,d1 as gn,S as E,P as Yn,A as Qn,h as Zn,g as fn,d as Jn,n as Xn,bu as Gn,f as pn,F as an,i as on,d2 as ne,o as ee,a as te,u as ae,p as oe,L as re,aR as ie,D as de,t as ce,v as se,w as le,a9 as ge,d3 as pe,d4 as ue,bm as bn,bn as he}from"./index-f5Lv9kLb.js";import{M as me}from"./minus-Ziy4LSYD.js";import{u as ke,D as fe,A as be,S as xn}from"./deleted-feed-item-BnUJ8bWP.js";import{T as xe}from"./topic-filter-BfoEqHRD.js";import{E as vn}from"./empty-indicator-CR_9BHAH.js";import{I as yn}from"./inbox-D9hID-rO.js";import"./trash-CpnxYen-.js";const un=["1.5rem","1.6rem","1.7rem","1.8rem","2rem"],U={BACKGROUND_COLOR:"ghost-ap-background-color",FONT_SIZE:"ghost-ap-font-size",FONT_STYLE:"ghost-ap-font-style"},P={SYSTEM:{id:"system",color:"#fff",background:"bg-white dark:bg-black",button:"bg-white dark:bg-black",border:"border-black/[8%] dark:border-gray-950"},SEPIA:{id:"sepia",color:"#FCF8F1",background:"bg-[#FCF8F1]",button:"bg-[#FCF8F1] hover:bg-black/[3%] text-black hover:text-black",border:"border-black/[8%]"},LIGHT:{id:"light",color:"#fff",background:"bg-white",button:"hover:bg-black/[3%] text-black hover:text-black",border:"border-black/[8%] dark:border-gray-950"},DARK:{id:"dark",color:"#15171a",background:"bg-black",button:"text-white dark:bg-black dark:hover:bg-gray-900",border:"border-black/[8%] dark:border-gray-950"}},ve=()=>{const[a,s]=o.useState(()=>localStorage.getItem(U.BACKGROUND_COLOR)?.toUpperCase()||"SYSTEM"),[t,p]=o.useState(()=>{const r=localStorage.getItem(U.FONT_SIZE);return r?parseInt(r):2}),[c,k]=o.useState(()=>localStorage.getItem(U.FONT_STYLE)||"sans"),i=r=>{s(r),localStorage.setItem(U.BACKGROUND_COLOR,P[r].id)};return o.useEffect(()=>{localStorage.setItem(U.FONT_SIZE,t.toString())},[t]),o.useEffect(()=>{localStorage.setItem(U.FONT_STYLE,c)},[c]),{backgroundColor:a,currentFontSizeIndex:t,fontStyle:c,handleColorChange:i,setFontStyle:k,increaseFontSize:()=>{p(r=>Math.min(r+1,un.length-1))},decreaseFontSize:()=>{p(r=>Math.max(r-1,0))},resetFontSize:()=>p(2),fontSize:un[t]}},wn=({backgroundColor:a,currentFontSizeIndex:s,fontStyle:t,onColorChange:p,onFontStyleChange:c,onDecreaseFontSize:k,onIncreaseFontSize:i,onResetFontSize:u,onOpenChange:v})=>{const h=l=>a===l,r=l=>t===l;return n.jsx(ye,{backgroundColor:a,currentFontSizeIndex:s,fontStyle:t,isActiveColor:h,isActiveFont:r,onColorChange:p,onDecreaseFontSize:k,onFontStyleChange:c,onIncreaseFontSize:i,onOpenChange:v,onResetFontSize:u})},ye=({backgroundColor:a,isActiveColor:s,isActiveFont:t,onColorChange:p,onFontStyleChange:c,currentFontSizeIndex:k,onDecreaseFontSize:i,onIncreaseFontSize:u,onResetFontSize:v,onOpenChange:h})=>n.jsxs(Cn,{modal:!1,onOpenChange:h,children:[n.jsx(Sn,{asChild:!0,children:n.jsx(A,{className:`size-9 rounded-full ${P[a].button}`,variant:"ghost",children:n.jsx(Wn.Typography,{className:"!size-[18px]"})})}),n.jsx(zn,{align:"end",className:"w-[224px]",onCloseAutoFocus:r=>r.preventDefault(),onOpenAutoFocus:r=>r.preventDefault(),children:n.jsxs("div",{className:"flex flex-col gap-4",children:[n.jsxs("div",{className:"flex items-center justify-between gap-[6px]",children:[n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-gray-200 p-0 text-[1.1rem] text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px] ${s("SYSTEM")?"outline outline-2 outline-green":""}`,variant:"secondary",onClick:()=>p("SYSTEM"),children:"Auto"}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-[#ece6d9] p-0 hover:bg-[#ece6d9] ${s("SEPIA")?"outline outline-2 outline-green":"border border-[#ece6d9]"}`,onClick:()=>p("SEPIA")}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-white p-0 hover:bg-white ${s("LIGHT")?"outline outline-2 outline-green":"border border-gray-200"}`,onClick:()=>p("LIGHT")}),n.jsx(A,{className:`h-7 flex-1 rounded-[6px] bg-black p-0 hover:bg-black dark:border dark:border-gray-925 ${s("DARK")?"outline outline-2 outline-green":""}`,onClick:()=>p("DARK")})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsxs(A,{className:`flex h-auto w-full flex-col gap-1 rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 ${t("sans")&&"outline outline-2 outline-green"}`,variant:"secondary",onClick:()=>c("sans"),children:[n.jsx("span",{className:"text-[2rem] font-bold leading-none",children:"Aa"}),n.jsx("span",{className:"text-[1.1rem]",children:"System"})]}),n.jsxs(A,{className:`flex h-auto w-full flex-col gap-1 rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 ${t("serif")&&"outline outline-2 outline-green"}`,variant:"secondary",onClick:()=>c("serif"),children:[n.jsx("span",{className:"pt-1 font-serif text-[2rem] font-bold leading-none",children:"Aa"}),n.jsx("span",{className:"font-serif text-[1.2rem]",children:"Serif"})]})]}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px]",disabled:k===0,variant:"secondary",onClick:i,children:n.jsx(me,{})}),n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900",variant:"secondary",onClick:v,children:n.jsx("span",{className:"text-[1.6rem] font-bold",children:"Aa"})}),n.jsx(A,{className:"h-8 w-full rounded-[6px] bg-gray-200 text-black hover:bg-gray-250 dark:bg-gray-925 dark:text-white dark:hover:bg-gray-900 [&_svg]:size-[14px]",disabled:k===un.length-1,variant:"secondary",onClick:u,children:n.jsx(Kn,{})})]})]})})]}),we=({tocItems:a,iframeElement:s,modalRef:t,className:p="!visible absolute inset-y-0 right-7 z-40 hidden lg:!block",onOpenChange:c})=>{const[k,i]=o.useState(null),u=rn.useRef(!1),v=h=>{if(!s?.contentDocument)return;const r=s.contentDocument.getElementById(h);r&&t.current&&(u.current=!0,i(h),t.current.scrollTo({top:r.offsetTop-20,behavior:"smooth"}),setTimeout(()=>{u.current=!1},1e3))};return o.useEffect(()=>{if(!s?.contentDocument||a.length<=1)return;const h=t.current;if(!h)return;const r=()=>{if(u.current)return;const d=s.contentDocument;if(!d)return;const _=h.scrollTop,F=100,D=a.map(S=>d.getElementById(S.id)).filter(S=>S!==null).map(S=>({id:S.id,top:S.offsetTop}));if(!D.length)return;const L=D.reduce((S,M)=>M.top-F<=_?M:S);i(L?.id||null)},l=()=>{requestAnimationFrame(r)};return h.addEventListener("scroll",l),r(),()=>{h.removeEventListener("scroll",l)}},[s,a,t]),a.length<=1?null:n.jsx("div",{className:p,children:n.jsx("div",{className:"sticky top-1/2 -translate-y-1/2",children:n.jsx(Se,{activeHeading:k||"",items:a,onItemClick:v,onOpenChange:c})})})},je={1:"w-3",2:"w-2",3:"w-1"},Ce={1:"pl-2",2:"pl-6",3:"pl-10"},Se=({items:a,activeHeading:s,onItemClick:t,onOpenChange:p})=>{const[c,k]=o.useState(!1),i=rn.useRef();if(rn.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]),a.length===0)return null;const u=d=>Math.min(d,3),v=d=>je[u(d)],h=d=>Ce[u(d)],r=()=>{i.current&&clearTimeout(i.current),k(!0),p?.(!0)},l=()=>{i.current=setTimeout(()=>{k(!1),p?.(!1)},100)};return n.jsxs(Cn,{modal:!1,open:c,onOpenChange:k,children:[n.jsx(Sn,{asChild:!0,children:n.jsx("div",{className:"absolute right-2 top-1/2 flex -translate-y-1/2 flex-col items-end gap-2 rounded-md p-2 text-base dark:bg-black",onMouseEnter:r,onMouseLeave:l,children:a.map(d=>n.jsx("div",{className:`h-[2px] rounded-sm ${s===d.id?"bg-black dark:bg-white":"bg-gray-400 dark:bg-gray-700"} pr-1 transition-all ${v(d.level)}`},d.id))})}),n.jsx(zn,{align:"center",className:"w-[240px] p-2",side:"left",sideOffset:-28,onCloseAutoFocus:d=>d.preventDefault(),onMouseEnter:r,onMouseLeave:l,onOpenAutoFocus:d=>d.preventDefault(),children:n.jsx("nav",{"aria-label":"Table of contents navigation",className:"max-h-[60vh] overflow-y-auto",role:"navigation",children:a.map(d=>n.jsx("button",{className:`line-clamp-2 block w-full cursor-pointer rounded py-1 text-left text-sm leading-tight ${s===d.id?"text-black dark:text-white":"text-gray-700 dark:text-gray-600"} hover:bg-gray-75 hover:text-gray-900 dark:hover:bg-grey-925 dark:hover:text-white ${h(d.level)}`,type:"button",onClick:()=>t(d.id),children:n.jsx("span",{className:"line-clamp-2",children:d.text})},d.id))})})]})},ze=()=>`<style>
2
2
 
3
3
  /* Variables */
4
4
 
@@ -1 +1 @@
1
- import{aP as Y,r as _,bV as C,bW as W,j as e,S as j,bR as se,B as T,aT as M,aj as u,y as $,ai as Q,cz as te,aQ as oe,cA as O,e as le,cB as q,cC as ce,bE as de,cD as X,bK as me,cE as ue,af as pe,ag as z,aW as I,_ as xe,aX as he}from"./index-BeAhXwae.js";import{g as H,S as ge,a as fe,D as be,b as je}from"./stats-view-XXduvFiP.js";import{C as D,a as E,b as F,f as R,c as V,E as ve,K as Ne,d as we,e as ye,u as ke,j as _e}from"./pagemenu-aMfaU2cA.js";import{E as P}from"./empty-indicator-1p7S45xr.js";import{P as Ce}from"./post-share-modal-CP1NDQhS.js";import{g as Ae,c as Te}from"./post-helpers-gInwAwEv.js";import{S as Le,U as ae}from"./wallet-cards-Hfikexmn.js";import{C as ze,h as K,d as Me,i as We,L as $e,j as J,k as Z,l as De}from"./lucide-react-CTYGYE5A.js";import{G as B}from"./gh-chart-CVItDGhq.js";import{g as Ee}from"./audience-DyCuv1si.js";import{u as Fe}from"./use-growth-stats-DXoeaAKq.js";import{u as Re}from"./posts-BQJit53V.js";import{h as Ve,i as Ue}from"./stats-C2A4PNUn.js";import"./select-wir-gl-P.js";import"./message-square-text-42zfcaLO.js";import"./sprout-Beunj00B.js";import"./a-large-small-CCJbivJB.js";import"./at-sign-BpRvqAQI.js";import"./copy-BywnwlHN.js";import"./hash-BQl75WLf.js";import"./inbox-BMxFzv7J.js";import"./minus-vbx9q5AE.js";import"./tags-dgsPPBjR.js";import"./square-DTB79BvA.js";import"./user-round-check-C5Iux98g.js";import"./repeat-DBbPJ4Vq.js";import"./reply-DlcWrPL1.js";import"./trash-CT37Asdf.js";import"./chart-BvckKrZJ.js";import"./_baseAssignValue-DKQ9pw63.js";import"./currency-fEUUCkj0.js";const Ie=s=>s.email_only?"Sent":s.email?"Published and sent":"Published",Be=({latestPostStats:s,isLoading:o})=>{const t=Y(),[r,i]=_.useState(!1),{site:n,settings:x}=C(),{appSettings:l}=W(),{emailTrackClicks:c,emailTrackOpens:h}=l?.analytics||{},m=n.title||String(x.find(g=>g.key==="title")?.value||"Ghost Site"),a=String(x.find(g=>g.key==="timezone")?.value||"Etc/UTC"),d=s?Ae(s,{membersTrackSources:l?.analytics.membersTrackSources}):null,b="group mr-2 flex flex-col gap-1.5 hover:cursor-pointer";return e.jsxs(D,{className:"group/card bg-gradient-to-tr from-muted/40 to-muted/0 to-50%","data-testid":"latest-post",children:[e.jsxs(E,{children:[e.jsx(F,{className:"flex items-baseline justify-between font-medium leading-snug text-muted-foreground",children:"Latest post performance"}),e.jsx(R,{className:"hidden",children:"How your last post did"})]}),e.jsxs(V,{className:"flex flex-col gap-6 px-0 lg:flex-row xl:grid xl:grid-cols-3",children:[o&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex w-full items-center gap-6 px-6 xl:col-span-2",children:[e.jsx("div",{className:"w-full max-w-[232px] grow",children:e.jsx(j,{className:"aspect-[16/10] rounded-md"})}),e.jsxs("div",{className:"w-full grow",children:[e.jsx(j,{className:"w-full max-w-[420px]"}),e.jsx(j,{className:"w-1/2"})]})]}),e.jsx("div",{className:"flex flex-col items-stretch gap-2 px-6 text-sm",children:e.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]})]})})]}),!o&&s&&d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-6 px-6 transition-all md:flex-row md:items-start xl:col-span-2",children:[s.feature_image&&e.jsx("div",{className:"aspect-[16/10] w-full min-w-[100px] rounded-sm bg-cover bg-center sm:max-w-[170px] lg:max-w-[170px] xl:max-w-[232px]",style:{backgroundImage:`url(${s.feature_image})`}}),e.jsxs("div",{className:"flex grow flex-col items-start justify-center self-stretch",children:[e.jsx("div",{className:"text-lg font-semibold leading-tighter tracking-tight hover:cursor-pointer hover:opacity-75",onClick:()=>{!o&&s&&t(`/posts/analytics/${s.id}`,{crossApp:!0})},children:s.title}),e.jsxs("div",{className:"mt-0.5 text-sm text-muted-foreground",children:[s.authors&&s.authors.length>0&&e.jsxs("div",{children:["By ",s.authors.map(g=>g.name).join(", ")," – ",se(s.published_at,a)]}),e.jsx("div",{className:"mt-0.5",children:Ie(s)})]}),e.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[!s.email_only&&e.jsx(Ce,{author:s.authors?.map(g=>g.name).join(", ")||"",description:"",faviconURL:n.icon||"",featureImageURL:s.feature_image||"",open:r,postExcerpt:s.excerpt||"",postTitle:s.title,postURL:s.url||"",siteTitle:m,onClose:()=>i(!1),onOpenChange:i,children:e.jsxs(T,{onClick:()=>i(!0),children:[e.jsx(Le,{})," Share post"]})}),e.jsxs(T,{className:s.email_only?"w-full":"",variant:"outline",onClick:()=>{t(`/posts/analytics/${s.id}`,{crossApp:!0})},children:[e.jsx(ze,{}),e.jsx("span",{className:"hidden md:!visible md:!block",children:s.email_only?"Post analytics":"Analytics"})]})]})]})]}),e.jsx("div",{className:"-ml-4 flex w-full flex-col items-stretch gap-2 pr-6 text-sm xl:h-full xl:max-w-none",children:e.jsxs("div",{className:"grid grid-cols-2 gap-6 pl-10 lg:border-l xl:h-full",children:[d.showWebMetrics&&l?.analytics.webAnalytics&&e.jsxs("div",{className:b,"data-testid":"latest-post-visitors",onClick:()=>{t(`/posts/analytics/${s.id}/web`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(M,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden md:!visible md:!block",children:"Visitors"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:u(s.visitors)})]}),d.showMemberGrowth&&e.jsxs("div",{className:$(b,d.showEmailMetrics&&(!d.showWebMetrics||!l?.analytics.webAnalytics)&&"row-[2/3] col-[1/2]"),"data-testid":"latest-post-members",onClick:()=>{t(`/posts/analytics/${s.id}/growth`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(ae,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden md:!visible md:!block",children:"Members"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.member_delta?e.jsxs(e.Fragment,{children:["+",u(s.member_delta)]}):0})]}),d.showEmailMetrics&&s.email&&e.jsxs(e.Fragment,{children:[h&&e.jsxs("div",{className:b,onClick:()=>{t(`/posts/analytics/${s.id}/newsletter`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(K,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden whitespace-nowrap md:!visible md:!block",children:"Opens"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.email.email_count?Q((s.email.opened_count||0)/s.email.email_count):"0%"})]}),c&&e.jsxs("div",{className:b,onClick:()=>{t(`/posts/analytics/${s.id}/newsletter`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(Me,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden whitespace-nowrap md:!visible md:!block",children:"Clicks"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.email.email_count&&s.count?.clicks?Q((s.count.clicks||0)/s.email.email_count):"0%"})]})]})]})})]}):!o&&e.jsx(P,{actions:e.jsx(T,{variant:"secondary",onClick:()=>{t("/editor/post",{crossApp:!0})},children:"New post"}),className:"w-full pb-10 xl:col-span-3",description:"Once it's live, you can track performance here",title:"Publish your first post",children:e.jsx(te,{strokeWidth:1.5})})]})]})},Ge=()=>{const{data:s}=C();return{isLimited:t=>{const r=s?.config;return r?.hostSettings?.limits&&t==="limitAnalytics"?r.hostSettings.limits.limitAnalytics?.disabled===!0:!1}}},G=({title:s,iconName:o,description:t,color:r,diffDirection:i,diffValue:n,formattedValue:x,trendingFromValue:l,children:c,onClick:h})=>{const{range:m}=C(),a=o&&$e[o],d=le.useMemo(()=>{if(!i||i==="empty"||m===q.allTime.value||!n)return"";const b=i==="up"?"up":i==="down"?"down":"at",N=H(m).replace("in the ","").replace(/^\(|\)$/g,"");return i==="same"?e.jsxs("span",{children:["You're trending at the same level as ",e.jsx("span",{className:"font-semibold",children:x})," compared to the ",e.jsx("span",{className:"font-semibold",children:N})]}):e.jsxs("span",{children:["You're trending ",e.jsxs("span",{className:"font-semibold",children:[b," ",n]})," from ",e.jsx("span",{className:"font-semibold",children:l})," compared to the ",N]})},[i,n,l,x,m]);return e.jsxs(D,{className:"group","data-testid":s,children:[e.jsxs(E,{className:"hidden",children:[e.jsx(F,{children:s}),e.jsx(R,{children:t})]}),e.jsxs(Ne,{className:"relative flex grow flex-row items-start justify-between gap-5 border-none pb-2 xl:pb-4",children:[e.jsxs("div",{className:"flex grow flex-col gap-1.5 border-none pb-0",children:[e.jsxs(we,{className:h&&"transition-all group-hover:text-foreground",children:[r&&e.jsx("span",{className:"inline-block size-2 rounded-full opacity-50",style:{backgroundColor:r}}),a&&e.jsx(a,{size:16,strokeWidth:1.5}),s]}),e.jsx(ye,{diffDirection:m===q.allTime.value?"hidden":i,diffTooltip:d,diffValue:n,value:x})]}),h&&e.jsx(T,{className:"absolute right-6 translate-x-10 opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100",size:"sm",variant:"outline",onClick:h,children:"View more"})]}),e.jsx(V,{children:c})]})},Se=({kpiValues:s,visitorsChartData:o,visitorsYRange:t,growthTotals:r,membersChartData:i,mrrChartData:n,currencySymbol:x,isLoading:l})=>{const c=Y(),{range:h}=C(),{appSettings:m}=W(),d=Ge().isLimited("limitAnalytics"),b="-mb-3 h-[10vw] max-h-[200px] min-h-[100px] hover:!cursor-pointer";if(l)return e.jsx(ve,{className:"flex h-[calc(10vw+116px)] max-h-[416px] min-h-20 items-center justify-center hover:!cursor-pointer",children:e.jsx(oe,{})});const g=m?.analytics.webAnalytics,N=d&&!g,y=!0,L=m?.paidMembersEnabled,w=[g,N,y,L].filter(Boolean).length;let A="lg:grid-cols-3";w===2?A="lg:grid-cols-2":w===1&&(A="lg:grid-cols-1");const U=`flex flex-col lg:grid ${A} gap-6`;return e.jsxs("div",{className:U,children:[g&&!N&&e.jsx(G,{description:"Number of individual people who visited your website",diffDirection:"empty",formattedValue:s.visits,iconName:"Globe",linkto:"/analytics/web/",title:"Unique visitors",onClick:()=>{c("/analytics/web/")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-blue))",data:o,id:"visitors",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts",yAxisRange:t})}),N&&e.jsxs(D,{children:[e.jsxs(E,{className:"hidden",children:[e.jsx(F,{children:"Unlock web analytics"}),e.jsx(R,{children:"Get the full picture of what's working with detailed, cookie-free traffic analytics."})]}),e.jsx(V,{className:"flex h-full items-center justify-center p-6",children:e.jsx(P,{actions:e.jsx(T,{variant:"outline",onClick:()=>c("/pro",{crossApp:!0}),children:"Upgrade now"}),className:"py-10",description:"Get the full picture of what's working with detailed, cookie-free traffic analytics.",title:"Unlock web analytics",children:e.jsx(We,{})})})]}),e.jsx(G,{description:"How number of members of your publication changed over time",diffDirection:r.directions.total,diffValue:r.percentChanges.total,formattedValue:u(r.totalMembers),iconName:"User",linkto:"/analytics/growth/",title:"Members",trendingFromValue:`${u(i[0].value)}`,onClick:()=>{c("/analytics/growth/?tab=total-members")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-darkblue))",data:i,id:"members",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts"})}),L&&e.jsx(G,{description:"Monthly recurring revenue changes over time",diffDirection:r.directions.mrr,diffValue:r.percentChanges.mrr,formattedValue:`${x}${u(O(r.mrr))}`,iconName:"Coins",linkto:"/analytics/growth/",title:"MRR",trendingFromValue:`${x}${u(n[0].value)}`,onClick:()=>{c("/analytics/growth/?tab=mrr")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-teal))",data:n,id:"mrr",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts"})})]})},Oe=({className:s})=>e.jsx("div",{className:$("rounded-sm bg-muted dark:bg-[#36373a] flex flex-col items-center justify-center gap-1 p-6",s),children:e.jsx(ce,{className:"text-muted-foreground/50",size:18,strokeWidth:1.5})}),S=({className:s,metrics:o,title:t})=>e.jsx(e.Fragment,{children:e.jsxs("div",{className:$("pointer-events-none absolute bottom-[calc(100%+2px)] left-1/2 z-50 min-w-[160px] -translate-x-1/2 rounded-md bg-background p-3 text-sm opacity-0 shadow-md transition-all group-hover/tooltip:bottom-[calc(100%+12px)] group-hover/tooltip:opacity-100",s),children:[e.jsx("div",{className:"mb-1.5 whitespace-nowrap border-b pb-1.5 pr-10 font-medium text-muted-foreground",children:t}),e.jsx("div",{className:"flex flex-col gap-1.5",children:o?.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[r.icon,r.label]}),e.jsx("span",{className:"font-mono",children:r.metric})]},r.label))})]})}),He=({topPostsData:s,isLoading:o})=>{const t=Y(),{range:r,settings:i}=C(),{appSettings:n}=W(),x=String(i.find(a=>a.key==="timezone")?.value||"Etc/UTC"),l=n?.analytics.webAnalytics,c=n?.analytics.emailTrackClicks,h=n?.analytics.emailTrackOpens,m="flex items-center justify-end gap-1 rounded-md px-2 py-1 font-mono text-gray-800 hover:bg-muted-foreground/10 group-hover:text-foreground";return e.jsxs(D,{className:"group/card w-full lg:col-span-2","data-testid":"top-posts-card",children:[e.jsxs(E,{children:[e.jsxs(F,{className:"flex items-baseline justify-between font-medium leading-snug text-muted-foreground",children:["Top posts ",H(r)]}),e.jsx(R,{className:"hidden",children:"Most viewed posts in this period"})]}),e.jsx(V,{children:o?e.jsx(de,{className:"mt-6"}):e.jsxs(e.Fragment,{children:[s?.stats?.map(a=>e.jsxs("div",{className:'group relative flex w-full items-start justify-between gap-5 border-t border-border/50 py-4 before:absolute before:-inset-x-4 before:inset-y-0 before:z-0 before:hidden before:rounded-md before:bg-accent before:opacity-80 before:content-[""] first:!border-border hover:cursor-pointer hover:border-transparent hover:before:block md:items-center dark:before:bg-accent/50 [&+div]:hover:border-transparent',children:[e.jsxs("div",{className:"z-10 flex min-w-[160px] grow items-start gap-4 md:items-center lg:min-w-[320px]",onClick:()=>{t(`/posts/analytics/${a.post_id}`,{crossApp:!0})},children:[a.feature_image?e.jsx("div",{className:"hidden aspect-[16/10] w-[80px] shrink-0 rounded-sm bg-cover bg-center sm:!visible sm:!block lg:w-[100px]",style:{backgroundImage:`url(${a.feature_image})`}}):e.jsx(Oe,{className:"hidden aspect-[16/10] w-[80px] shrink-0 group-hover:bg-muted-foreground/10 sm:!visible sm:!flex lg:w-[100px]"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"line-clamp-2 text-lg font-semibold leading-[1.35em]",children:a.title}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["By ",a.authors," – ",se(a.published_at,x)]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:Te(a)})]})]}),e.jsxs("div",{className:"z-10 flex flex-col items-end justify-center gap-0.5 text-sm md:flex-row md:items-center md:justify-end md:gap-3",children:[l&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]","data-testid":"statistics-visitors",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/web`,{crossApp:!0})},children:[e.jsx(S,{metrics:[{icon:e.jsx(M,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Unique visitors",metric:u(a.views)}],title:"Web traffic"}),e.jsxs("div",{className:m,children:[e.jsx(M,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),X(a.views)]})]}),a.sent_count!==null&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/newsletter`,{crossApp:!0})},children:[e.jsx(S,{className:`${n?.analytics.membersTrackSources?"":"left-auto right-0 translate-x-0"}`,metrics:[{icon:e.jsx(J,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Sent",metric:u(a.sent_count||0)},...h?[{icon:e.jsx(K,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Opens",metric:u(a.opened_count||0)}]:[],...c?[{icon:e.jsx(Z,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Clicks",metric:u(a.clicked_count||0)}]:[]],title:"Newsletter performance"}),e.jsx("div",{className:m,children:h?e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.open_rate?`${Math.round(a.open_rate)}%`:"0%"]}):c?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.click_rate?`${Math.round(a.click_rate)}%`:"0%"]}):e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),X(a.sent_count||0)]})})]}),n?.analytics.membersTrackSources&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]","data-testid":"statistics-members",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/growth`,{crossApp:!0})},children:[e.jsx(S,{className:"left-auto right-0 translate-x-0",metrics:[{icon:e.jsx(me,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Free",metric:a.free_members>0?`+${u(a.free_members)}`:"0"},...n?.paidMembersEnabled?[{icon:e.jsx(ue,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Paid",metric:a.paid_members>0?`+${u(a.paid_members)}`:"0"}]:[]],title:"New members"}),e.jsxs("div",{className:m,children:[e.jsx(ae,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.members>0?`+${u(a.members)}`:"0"]})]})]})]},a.post_id)),(!s?.stats||s.stats.length===0)&&e.jsx(P,{className:"w-full pb-10",title:`No posts ${H(r)}`,children:e.jsx(te,{strokeWidth:1.5})})]})})]})},Ke=()=>{const{data:{posts:[s]}={posts:[]},isLoading:o}=Re({searchParams:{filter:"status:[published,sent]",order:"published_at DESC",limit:"1",include:"authors,email,count.clicks"}}),t=s,r=Ve(t?.id||"",{enabled:!!t?.id}),{data:i,isLoading:n}=r;return{data:_.useMemo(()=>{if(!t)return null;const l=i?.stats?.[0]||{id:t.id,recipient_count:null,opened_count:null,open_rate:null,member_delta:0,free_members:0,paid_members:0,visitors:0};return{id:t.id,uuid:t.uuid,title:t.title||"",slug:t.slug||"",feature_image:t.feature_image||null,published_at:t.published_at||"",url:t.url||"",excerpt:t.excerpt||"",email_only:t.email_only||!1,status:t.status,email:t.email,count:t.count,authors:t.authors||[],recipient_count:l.recipient_count,opened_count:l.opened_count,open_rate:l.open_rate,member_delta:l.member_delta,free_members:l.free_members,paid_members:l.paid_members,visitors:l.visitors,click_rate:null}},[t,i]),isLoading:o||!!t?.id&&n}},ee=({className:s,title:o,description:t,url:r,children:i})=>e.jsx("a",{className:$("block rounded-xl border bg-card p-6 transition-all hover:shadow-xs hover:bg-accent/50 group/card",s),href:r,rel:"noreferrer",target:"_blank",children:e.jsxs("div",{className:"flex items-center gap-6",children:[i,e.jsxs("div",{className:"flex flex-col gap-0.5 leading-tight",children:[e.jsx("span",{className:"text-base font-semibold",children:o}),e.jsx("span",{className:"text-sm font-normal text-gray-700",children:t})]})]})}),ks=()=>{const{appSettings:s}=W(),{statsConfig:o,isLoading:t,range:r}=C(),{startDate:i,endDate:n,timezone:x}=pe(r),{isLoading:l,chartData:c,totals:h,currencySymbol:m}=Fe(r),{data:a,isLoading:d}=Ke(),{data:b,isLoading:g}=Ue({searchParams:{date_from:z(i),date_to:z(n),limit:"5",timezone:x}}),N={site_uuid:o?.id||"",date_from:z(i),date_to:z(n),timezone:x,member_status:Ee(he)},{data:y,loading:L}=ke({endpoint:"api_kpis",statsConfig:o,params:N}),w=_.useMemo(()=>I(y||[],r,"visits","sum")?.map(f=>{const v=Number(f.visits),k=isNaN(v)?0:v;return{date:String(f.date),value:k,formattedValue:u(k),label:"Visitors"}}),[y,r]),A=_.useMemo(()=>{const f=[0,1];if(!w||w.length===0)return f;const v=w.map(p=>p.value).filter(p=>p>=0);return v.length===0?f:[0,Math.max(...v)||f[1]]},[w]),U=_.useMemo(()=>{if(!c||c.length===0)return[];let f=[];return f=I(c,r,"value","exact"),f.map(p=>({date:p.date,value:p.free+p.paid,formattedValue:u(p.free+p.paid),label:"Members"}))},[c,r]),re=_.useMemo(()=>{if(!s?.paidMembersEnabled||!c||c.length===0)return[];let f=[];return f=I(c,r,"mrr","exact"),f.map(p=>({date:p.date,value:O(p.mrr),formattedValue:`${m}${u(O(p.mrr))}`,label:"MRR"}))},[c,r,m,s]),ie=_.useMemo(()=>{if(!y?.length)return{visits:"0"};const f=y.reduce((v,k)=>{const p=Number(k.visits);return v+(isNaN(p)?0:p)},0);return{visits:u(f)}},[y]),ne=t;return e.jsxs(ge,{children:[e.jsx(fe,{children:e.jsx(_e,{children:e.jsx(be,{excludeRanges:["today"]})})}),e.jsxs(je,{isLoading:ne,loadingComponent:e.jsx(e.Fragment,{}),children:[e.jsx(Se,{currencySymbol:m,growthTotals:h,isLoading:L||l,kpiValues:ie,membersChartData:U,mrrChartData:re,visitorsChartData:w,visitorsYRange:A}),e.jsx(Be,{isLoading:d,latestPostStats:a}),e.jsx(He,{isLoading:g,topPostsData:b}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[e.jsx(xe,{className:"-mb-4 mt-4 lg:col-span-2",children:"Grow your audience"}),e.jsx(ee,{description:"Find out how to review the performance of your content and get the most out of post analytics in Ghost.",title:"Understanding analytics in Ghost",url:"https://ghost.org/help/native-analytics",children:e.jsx("div",{className:"flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tr from-[#14B8FF]/20 to-[#00BBA7]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100",children:e.jsx(De,{className:"text-[#00BBA7]",size:20,strokeWidth:1.5})})}),e.jsx(ee,{description:"Use these content distribution tactics to get more people to discover your work and increase engagement.",title:"How to get your content seen online",url:"https://ghost.org/resources/content-distribution/",children:e.jsx("div",{className:"flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tl from-[#FDC700]/20 to-[#FF2056]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100",children:e.jsx(M,{className:"text-[#FE9A00]",size:20,strokeWidth:1.5})})})]})]})]})};export{ks as default};
1
+ import{aP as Y,r as _,bV as C,bW as W,j as e,S as j,bR as se,B as T,aT as M,aj as u,y as $,ai as Q,cz as te,aQ as oe,cA as O,e as le,cB as q,cC as ce,bE as de,cD as X,bK as me,cE as ue,af as pe,ag as z,aW as I,_ as xe,aX as he}from"./index-f5Lv9kLb.js";import{g as H,S as ge,a as fe,D as be,b as je}from"./stats-view-CTQ4qO3S.js";import{C as D,a as E,b as F,f as R,c as V,E as ve,K as Ne,d as we,e as ye,u as ke,j as _e}from"./pagemenu-DjSqq3Wu.js";import{E as P}from"./empty-indicator-CR_9BHAH.js";import{P as Ce}from"./post-share-modal-Dln0kZhn.js";import{g as Ae,c as Te}from"./post-helpers-gInwAwEv.js";import{S as Le,U as ae}from"./wallet-cards-CSdWOmJE.js";import{C as ze,h as K,d as Me,i as We,L as $e,j as J,k as Z,l as De}from"./lucide-react-BARFK2PZ.js";import{G as B}from"./gh-chart-hn7wEnik.js";import{g as Ee}from"./audience-CcGOt5Fb.js";import{u as Fe}from"./use-growth-stats-CbHIETF_.js";import{u as Re}from"./posts-C1Eh5Ypq.js";import{h as Ve,i as Ue}from"./stats-CRgy_cWm.js";import"./select-B_0NBkLz.js";import"./message-square-text-BxquqPhA.js";import"./sprout-BKiwQsGn.js";import"./a-large-small-CgWPeKpi.js";import"./at-sign-BottTo2X.js";import"./copy-aC0WUVtq.js";import"./hash-BcaWmkw5.js";import"./inbox-D9hID-rO.js";import"./minus-Ziy4LSYD.js";import"./tags-DV2SSdMK.js";import"./square-BEpRc_fY.js";import"./user-round-check-DYkrjHxF.js";import"./repeat-CN4fiG5H.js";import"./reply-BfWgvH7y.js";import"./trash-CpnxYen-.js";import"./chart-pimL5Chk.js";import"./_baseAssignValue-Bbalamaq.js";import"./currency-fEUUCkj0.js";const Ie=s=>s.email_only?"Sent":s.email?"Published and sent":"Published",Be=({latestPostStats:s,isLoading:o})=>{const t=Y(),[r,i]=_.useState(!1),{site:n,settings:x}=C(),{appSettings:l}=W(),{emailTrackClicks:c,emailTrackOpens:h}=l?.analytics||{},m=n.title||String(x.find(g=>g.key==="title")?.value||"Ghost Site"),a=String(x.find(g=>g.key==="timezone")?.value||"Etc/UTC"),d=s?Ae(s,{membersTrackSources:l?.analytics.membersTrackSources}):null,b="group mr-2 flex flex-col gap-1.5 hover:cursor-pointer";return e.jsxs(D,{className:"group/card bg-gradient-to-tr from-muted/40 to-muted/0 to-50%","data-testid":"latest-post",children:[e.jsxs(E,{children:[e.jsx(F,{className:"flex items-baseline justify-between font-medium leading-snug text-muted-foreground",children:"Latest post performance"}),e.jsx(R,{className:"hidden",children:"How your last post did"})]}),e.jsxs(V,{className:"flex flex-col gap-6 px-0 lg:flex-row xl:grid xl:grid-cols-3",children:[o&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex w-full items-center gap-6 px-6 xl:col-span-2",children:[e.jsx("div",{className:"w-full max-w-[232px] grow",children:e.jsx(j,{className:"aspect-[16/10] rounded-md"})}),e.jsxs("div",{className:"w-full grow",children:[e.jsx(j,{className:"w-full max-w-[420px]"}),e.jsx(j,{className:"w-1/2"})]})]}),e.jsx("div",{className:"flex flex-col items-stretch gap-2 px-6 text-sm",children:e.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]}),e.jsxs("div",{children:[e.jsx(j,{className:"w-3/4"}),e.jsx(j,{className:"h-10 w-1/3"})]})]})})]}),!o&&s&&d?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col gap-6 px-6 transition-all md:flex-row md:items-start xl:col-span-2",children:[s.feature_image&&e.jsx("div",{className:"aspect-[16/10] w-full min-w-[100px] rounded-sm bg-cover bg-center sm:max-w-[170px] lg:max-w-[170px] xl:max-w-[232px]",style:{backgroundImage:`url(${s.feature_image})`}}),e.jsxs("div",{className:"flex grow flex-col items-start justify-center self-stretch",children:[e.jsx("div",{className:"text-lg font-semibold leading-tighter tracking-tight hover:cursor-pointer hover:opacity-75",onClick:()=>{!o&&s&&t(`/posts/analytics/${s.id}`,{crossApp:!0})},children:s.title}),e.jsxs("div",{className:"mt-0.5 text-sm text-muted-foreground",children:[s.authors&&s.authors.length>0&&e.jsxs("div",{children:["By ",s.authors.map(g=>g.name).join(", ")," – ",se(s.published_at,a)]}),e.jsx("div",{className:"mt-0.5",children:Ie(s)})]}),e.jsxs("div",{className:"mt-6 flex items-center gap-2",children:[!s.email_only&&e.jsx(Ce,{author:s.authors?.map(g=>g.name).join(", ")||"",description:"",faviconURL:n.icon||"",featureImageURL:s.feature_image||"",open:r,postExcerpt:s.excerpt||"",postTitle:s.title,postURL:s.url||"",siteTitle:m,onClose:()=>i(!1),onOpenChange:i,children:e.jsxs(T,{onClick:()=>i(!0),children:[e.jsx(Le,{})," Share post"]})}),e.jsxs(T,{className:s.email_only?"w-full":"",variant:"outline",onClick:()=>{t(`/posts/analytics/${s.id}`,{crossApp:!0})},children:[e.jsx(ze,{}),e.jsx("span",{className:"hidden md:!visible md:!block",children:s.email_only?"Post analytics":"Analytics"})]})]})]})]}),e.jsx("div",{className:"-ml-4 flex w-full flex-col items-stretch gap-2 pr-6 text-sm xl:h-full xl:max-w-none",children:e.jsxs("div",{className:"grid grid-cols-2 gap-6 pl-10 lg:border-l xl:h-full",children:[d.showWebMetrics&&l?.analytics.webAnalytics&&e.jsxs("div",{className:b,"data-testid":"latest-post-visitors",onClick:()=>{t(`/posts/analytics/${s.id}/web`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(M,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden md:!visible md:!block",children:"Visitors"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:u(s.visitors)})]}),d.showMemberGrowth&&e.jsxs("div",{className:$(b,d.showEmailMetrics&&(!d.showWebMetrics||!l?.analytics.webAnalytics)&&"row-[2/3] col-[1/2]"),"data-testid":"latest-post-members",onClick:()=>{t(`/posts/analytics/${s.id}/growth`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(ae,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden md:!visible md:!block",children:"Members"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.member_delta?e.jsxs(e.Fragment,{children:["+",u(s.member_delta)]}):0})]}),d.showEmailMetrics&&s.email&&e.jsxs(e.Fragment,{children:[h&&e.jsxs("div",{className:b,onClick:()=>{t(`/posts/analytics/${s.id}/newsletter`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(K,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden whitespace-nowrap md:!visible md:!block",children:"Opens"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.email.email_count?Q((s.email.opened_count||0)/s.email.email_count):"0%"})]}),c&&e.jsxs("div",{className:b,onClick:()=>{t(`/posts/analytics/${s.id}/newsletter`,{crossApp:!0})},children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-muted-foreground transition-all group-hover:text-foreground",children:[e.jsx(Me,{size:16,strokeWidth:1.25}),e.jsx("span",{className:"hidden whitespace-nowrap md:!visible md:!block",children:"Clicks"})]}),e.jsx("span",{className:"text-[2.2rem] font-semibold leading-none tracking-tighter",children:s.email.email_count&&s.count?.clicks?Q((s.count.clicks||0)/s.email.email_count):"0%"})]})]})]})})]}):!o&&e.jsx(P,{actions:e.jsx(T,{variant:"secondary",onClick:()=>{t("/editor/post",{crossApp:!0})},children:"New post"}),className:"w-full pb-10 xl:col-span-3",description:"Once it's live, you can track performance here",title:"Publish your first post",children:e.jsx(te,{strokeWidth:1.5})})]})]})},Ge=()=>{const{data:s}=C();return{isLimited:t=>{const r=s?.config;return r?.hostSettings?.limits&&t==="limitAnalytics"?r.hostSettings.limits.limitAnalytics?.disabled===!0:!1}}},G=({title:s,iconName:o,description:t,color:r,diffDirection:i,diffValue:n,formattedValue:x,trendingFromValue:l,children:c,onClick:h})=>{const{range:m}=C(),a=o&&$e[o],d=le.useMemo(()=>{if(!i||i==="empty"||m===q.allTime.value||!n)return"";const b=i==="up"?"up":i==="down"?"down":"at",N=H(m).replace("in the ","").replace(/^\(|\)$/g,"");return i==="same"?e.jsxs("span",{children:["You're trending at the same level as ",e.jsx("span",{className:"font-semibold",children:x})," compared to the ",e.jsx("span",{className:"font-semibold",children:N})]}):e.jsxs("span",{children:["You're trending ",e.jsxs("span",{className:"font-semibold",children:[b," ",n]})," from ",e.jsx("span",{className:"font-semibold",children:l})," compared to the ",N]})},[i,n,l,x,m]);return e.jsxs(D,{className:"group","data-testid":s,children:[e.jsxs(E,{className:"hidden",children:[e.jsx(F,{children:s}),e.jsx(R,{children:t})]}),e.jsxs(Ne,{className:"relative flex grow flex-row items-start justify-between gap-5 border-none pb-2 xl:pb-4",children:[e.jsxs("div",{className:"flex grow flex-col gap-1.5 border-none pb-0",children:[e.jsxs(we,{className:h&&"transition-all group-hover:text-foreground",children:[r&&e.jsx("span",{className:"inline-block size-2 rounded-full opacity-50",style:{backgroundColor:r}}),a&&e.jsx(a,{size:16,strokeWidth:1.5}),s]}),e.jsx(ye,{diffDirection:m===q.allTime.value?"hidden":i,diffTooltip:d,diffValue:n,value:x})]}),h&&e.jsx(T,{className:"absolute right-6 translate-x-10 opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100",size:"sm",variant:"outline",onClick:h,children:"View more"})]}),e.jsx(V,{children:c})]})},Se=({kpiValues:s,visitorsChartData:o,visitorsYRange:t,growthTotals:r,membersChartData:i,mrrChartData:n,currencySymbol:x,isLoading:l})=>{const c=Y(),{range:h}=C(),{appSettings:m}=W(),d=Ge().isLimited("limitAnalytics"),b="-mb-3 h-[10vw] max-h-[200px] min-h-[100px] hover:!cursor-pointer";if(l)return e.jsx(ve,{className:"flex h-[calc(10vw+116px)] max-h-[416px] min-h-20 items-center justify-center hover:!cursor-pointer",children:e.jsx(oe,{})});const g=m?.analytics.webAnalytics,N=d&&!g,y=!0,L=m?.paidMembersEnabled,w=[g,N,y,L].filter(Boolean).length;let A="lg:grid-cols-3";w===2?A="lg:grid-cols-2":w===1&&(A="lg:grid-cols-1");const U=`flex flex-col lg:grid ${A} gap-6`;return e.jsxs("div",{className:U,children:[g&&!N&&e.jsx(G,{description:"Number of individual people who visited your website",diffDirection:"empty",formattedValue:s.visits,iconName:"Globe",linkto:"/analytics/web/",title:"Unique visitors",onClick:()=>{c("/analytics/web/")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-blue))",data:o,id:"visitors",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts",yAxisRange:t})}),N&&e.jsxs(D,{children:[e.jsxs(E,{className:"hidden",children:[e.jsx(F,{children:"Unlock web analytics"}),e.jsx(R,{children:"Get the full picture of what's working with detailed, cookie-free traffic analytics."})]}),e.jsx(V,{className:"flex h-full items-center justify-center p-6",children:e.jsx(P,{actions:e.jsx(T,{variant:"outline",onClick:()=>c("/pro",{crossApp:!0}),children:"Upgrade now"}),className:"py-10",description:"Get the full picture of what's working with detailed, cookie-free traffic analytics.",title:"Unlock web analytics",children:e.jsx(We,{})})})]}),e.jsx(G,{description:"How number of members of your publication changed over time",diffDirection:r.directions.total,diffValue:r.percentChanges.total,formattedValue:u(r.totalMembers),iconName:"User",linkto:"/analytics/growth/",title:"Members",trendingFromValue:`${u(i[0].value)}`,onClick:()=>{c("/analytics/growth/?tab=total-members")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-darkblue))",data:i,id:"members",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts"})}),L&&e.jsx(G,{description:"Monthly recurring revenue changes over time",diffDirection:r.directions.mrr,diffValue:r.percentChanges.mrr,formattedValue:`${x}${u(O(r.mrr))}`,iconName:"Coins",linkto:"/analytics/growth/",title:"MRR",trendingFromValue:`${x}${u(n[0].value)}`,onClick:()=>{c("/analytics/growth/?tab=mrr")},children:e.jsx(B,{className:b,color:"hsl(var(--chart-teal))",data:n,id:"mrr",range:h,showHorizontalLines:!0,showYAxisValues:!1,syncId:"overview-charts"})})]})},Oe=({className:s})=>e.jsx("div",{className:$("rounded-sm bg-muted dark:bg-[#36373a] flex flex-col items-center justify-center gap-1 p-6",s),children:e.jsx(ce,{className:"text-muted-foreground/50",size:18,strokeWidth:1.5})}),S=({className:s,metrics:o,title:t})=>e.jsx(e.Fragment,{children:e.jsxs("div",{className:$("pointer-events-none absolute bottom-[calc(100%+2px)] left-1/2 z-50 min-w-[160px] -translate-x-1/2 rounded-md bg-background p-3 text-sm opacity-0 shadow-md transition-all group-hover/tooltip:bottom-[calc(100%+12px)] group-hover/tooltip:opacity-100",s),children:[e.jsx("div",{className:"mb-1.5 whitespace-nowrap border-b pb-1.5 pr-10 font-medium text-muted-foreground",children:t}),e.jsx("div",{className:"flex flex-col gap-1.5",children:o?.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[r.icon,r.label]}),e.jsx("span",{className:"font-mono",children:r.metric})]},r.label))})]})}),He=({topPostsData:s,isLoading:o})=>{const t=Y(),{range:r,settings:i}=C(),{appSettings:n}=W(),x=String(i.find(a=>a.key==="timezone")?.value||"Etc/UTC"),l=n?.analytics.webAnalytics,c=n?.analytics.emailTrackClicks,h=n?.analytics.emailTrackOpens,m="flex items-center justify-end gap-1 rounded-md px-2 py-1 font-mono text-gray-800 hover:bg-muted-foreground/10 group-hover:text-foreground";return e.jsxs(D,{className:"group/card w-full lg:col-span-2","data-testid":"top-posts-card",children:[e.jsxs(E,{children:[e.jsxs(F,{className:"flex items-baseline justify-between font-medium leading-snug text-muted-foreground",children:["Top posts ",H(r)]}),e.jsx(R,{className:"hidden",children:"Most viewed posts in this period"})]}),e.jsx(V,{children:o?e.jsx(de,{className:"mt-6"}):e.jsxs(e.Fragment,{children:[s?.stats?.map(a=>e.jsxs("div",{className:'group relative flex w-full items-start justify-between gap-5 border-t border-border/50 py-4 before:absolute before:-inset-x-4 before:inset-y-0 before:z-0 before:hidden before:rounded-md before:bg-accent before:opacity-80 before:content-[""] first:!border-border hover:cursor-pointer hover:border-transparent hover:before:block md:items-center dark:before:bg-accent/50 [&+div]:hover:border-transparent',children:[e.jsxs("div",{className:"z-10 flex min-w-[160px] grow items-start gap-4 md:items-center lg:min-w-[320px]",onClick:()=>{t(`/posts/analytics/${a.post_id}`,{crossApp:!0})},children:[a.feature_image?e.jsx("div",{className:"hidden aspect-[16/10] w-[80px] shrink-0 rounded-sm bg-cover bg-center sm:!visible sm:!block lg:w-[100px]",style:{backgroundImage:`url(${a.feature_image})`}}):e.jsx(Oe,{className:"hidden aspect-[16/10] w-[80px] shrink-0 group-hover:bg-muted-foreground/10 sm:!visible sm:!flex lg:w-[100px]"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"line-clamp-2 text-lg font-semibold leading-[1.35em]",children:a.title}),e.jsxs("span",{className:"text-sm text-muted-foreground",children:["By ",a.authors," – ",se(a.published_at,x)]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:Te(a)})]})]}),e.jsxs("div",{className:"z-10 flex flex-col items-end justify-center gap-0.5 text-sm md:flex-row md:items-center md:justify-end md:gap-3",children:[l&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]","data-testid":"statistics-visitors",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/web`,{crossApp:!0})},children:[e.jsx(S,{metrics:[{icon:e.jsx(M,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Unique visitors",metric:u(a.views)}],title:"Web traffic"}),e.jsxs("div",{className:m,children:[e.jsx(M,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),X(a.views)]})]}),a.sent_count!==null&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/newsletter`,{crossApp:!0})},children:[e.jsx(S,{className:`${n?.analytics.membersTrackSources?"":"left-auto right-0 translate-x-0"}`,metrics:[{icon:e.jsx(J,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Sent",metric:u(a.sent_count||0)},...h?[{icon:e.jsx(K,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Opens",metric:u(a.opened_count||0)}]:[],...c?[{icon:e.jsx(Z,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Clicks",metric:u(a.clicked_count||0)}]:[]],title:"Newsletter performance"}),e.jsx("div",{className:m,children:h?e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.open_rate?`${Math.round(a.open_rate)}%`:"0%"]}):c?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.click_rate?`${Math.round(a.click_rate)}%`:"0%"]}):e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),X(a.sent_count||0)]})})]}),n?.analytics.membersTrackSources&&e.jsxs("div",{className:"group/tooltip relative flex w-[66px] lg:w-[92px]","data-testid":"statistics-members",onClick:d=>{d.stopPropagation(),t(`/posts/analytics/${a.post_id}/growth`,{crossApp:!0})},children:[e.jsx(S,{className:"left-auto right-0 translate-x-0",metrics:[{icon:e.jsx(me,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Free",metric:a.free_members>0?`+${u(a.free_members)}`:"0"},...n?.paidMembersEnabled?[{icon:e.jsx(ue,{className:"shrink-0 text-muted-foreground",size:16,strokeWidth:1.5}),label:"Paid",metric:a.paid_members>0?`+${u(a.paid_members)}`:"0"}]:[]],title:"New members"}),e.jsxs("div",{className:m,children:[e.jsx(ae,{className:"text-muted-foreground group-hover:text-foreground",size:16,strokeWidth:1.5}),a.members>0?`+${u(a.members)}`:"0"]})]})]})]},a.post_id)),(!s?.stats||s.stats.length===0)&&e.jsx(P,{className:"w-full pb-10",title:`No posts ${H(r)}`,children:e.jsx(te,{strokeWidth:1.5})})]})})]})},Ke=()=>{const{data:{posts:[s]}={posts:[]},isLoading:o}=Re({searchParams:{filter:"status:[published,sent]",order:"published_at DESC",limit:"1",include:"authors,email,count.clicks"}}),t=s,r=Ve(t?.id||"",{enabled:!!t?.id}),{data:i,isLoading:n}=r;return{data:_.useMemo(()=>{if(!t)return null;const l=i?.stats?.[0]||{id:t.id,recipient_count:null,opened_count:null,open_rate:null,member_delta:0,free_members:0,paid_members:0,visitors:0};return{id:t.id,uuid:t.uuid,title:t.title||"",slug:t.slug||"",feature_image:t.feature_image||null,published_at:t.published_at||"",url:t.url||"",excerpt:t.excerpt||"",email_only:t.email_only||!1,status:t.status,email:t.email,count:t.count,authors:t.authors||[],recipient_count:l.recipient_count,opened_count:l.opened_count,open_rate:l.open_rate,member_delta:l.member_delta,free_members:l.free_members,paid_members:l.paid_members,visitors:l.visitors,click_rate:null}},[t,i]),isLoading:o||!!t?.id&&n}},ee=({className:s,title:o,description:t,url:r,children:i})=>e.jsx("a",{className:$("block rounded-xl border bg-card p-6 transition-all hover:shadow-xs hover:bg-accent/50 group/card",s),href:r,rel:"noreferrer",target:"_blank",children:e.jsxs("div",{className:"flex items-center gap-6",children:[i,e.jsxs("div",{className:"flex flex-col gap-0.5 leading-tight",children:[e.jsx("span",{className:"text-base font-semibold",children:o}),e.jsx("span",{className:"text-sm font-normal text-gray-700",children:t})]})]})}),ks=()=>{const{appSettings:s}=W(),{statsConfig:o,isLoading:t,range:r}=C(),{startDate:i,endDate:n,timezone:x}=pe(r),{isLoading:l,chartData:c,totals:h,currencySymbol:m}=Fe(r),{data:a,isLoading:d}=Ke(),{data:b,isLoading:g}=Ue({searchParams:{date_from:z(i),date_to:z(n),limit:"5",timezone:x}}),N={site_uuid:o?.id||"",date_from:z(i),date_to:z(n),timezone:x,member_status:Ee(he)},{data:y,loading:L}=ke({endpoint:"api_kpis",statsConfig:o,params:N}),w=_.useMemo(()=>I(y||[],r,"visits","sum")?.map(f=>{const v=Number(f.visits),k=isNaN(v)?0:v;return{date:String(f.date),value:k,formattedValue:u(k),label:"Visitors"}}),[y,r]),A=_.useMemo(()=>{const f=[0,1];if(!w||w.length===0)return f;const v=w.map(p=>p.value).filter(p=>p>=0);return v.length===0?f:[0,Math.max(...v)||f[1]]},[w]),U=_.useMemo(()=>{if(!c||c.length===0)return[];let f=[];return f=I(c,r,"value","exact"),f.map(p=>({date:p.date,value:p.free+p.paid,formattedValue:u(p.free+p.paid),label:"Members"}))},[c,r]),re=_.useMemo(()=>{if(!s?.paidMembersEnabled||!c||c.length===0)return[];let f=[];return f=I(c,r,"mrr","exact"),f.map(p=>({date:p.date,value:O(p.mrr),formattedValue:`${m}${u(O(p.mrr))}`,label:"MRR"}))},[c,r,m,s]),ie=_.useMemo(()=>{if(!y?.length)return{visits:"0"};const f=y.reduce((v,k)=>{const p=Number(k.visits);return v+(isNaN(p)?0:p)},0);return{visits:u(f)}},[y]),ne=t;return e.jsxs(ge,{children:[e.jsx(fe,{children:e.jsx(_e,{children:e.jsx(be,{excludeRanges:["today"]})})}),e.jsxs(je,{isLoading:ne,loadingComponent:e.jsx(e.Fragment,{}),children:[e.jsx(Se,{currencySymbol:m,growthTotals:h,isLoading:L||l,kpiValues:ie,membersChartData:U,mrrChartData:re,visitorsChartData:w,visitorsYRange:A}),e.jsx(Be,{isLoading:d,latestPostStats:a}),e.jsx(He,{isLoading:g,topPostsData:b}),e.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[e.jsx(xe,{className:"-mb-4 mt-4 lg:col-span-2",children:"Grow your audience"}),e.jsx(ee,{description:"Find out how to review the performance of your content and get the most out of post analytics in Ghost.",title:"Understanding analytics in Ghost",url:"https://ghost.org/help/native-analytics",children:e.jsx("div",{className:"flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tr from-[#14B8FF]/20 to-[#00BBA7]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100",children:e.jsx(De,{className:"text-[#00BBA7]",size:20,strokeWidth:1.5})})}),e.jsx(ee,{description:"Use these content distribution tactics to get more people to discover your work and increase engagement.",title:"How to get your content seen online",url:"https://ghost.org/resources/content-distribution/",children:e.jsx("div",{className:"flex h-18 w-[100px] min-w-[100px] items-center justify-center rounded-md bg-gradient-to-tl from-[#FDC700]/20 to-[#FF2056]/20 p-4 opacity-80 transition-all group-hover/card:opacity-100",children:e.jsx(M,{className:"text-[#FE9A00]",size:20,strokeWidth:1.5})})})]})]})]})};export{ks as default};
@@ -1,4 +1,4 @@
1
- import{e as R,r as F,aB as uR,aC as ine,aD as fR}from"./index-BeAhXwae.js";var Kd={},rne=Object.defineProperty,one=(t,e,n)=>e in t?rne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,we=(t,e,n)=>one(t,typeof e!="symbol"?e+"":e,n);(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bfe81679-99e3-4b92-baf2-93d0d8b7ea9d",t._sentryDebugIdIdentifier="sentry-dbid-bfe81679-99e3-4b92-baf2-93d0d8b7ea9d")}catch{}})();var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vk(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var hR={exports:{}},bk={};/**
1
+ import{e as R,r as F,aB as uR,aC as ine,aD as fR}from"./index-f5Lv9kLb.js";var Kd={},rne=Object.defineProperty,one=(t,e,n)=>e in t?rne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,we=(t,e,n)=>one(t,typeof e!="symbol"?e+"":e,n);(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bfe81679-99e3-4b92-baf2-93d0d8b7ea9d",t._sentryDebugIdIdentifier="sentry-dbid-bfe81679-99e3-4b92-baf2-93d0d8b7ea9d")}catch{}})();var nn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function vk(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var r=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return t[i]}})}),n}var hR={exports:{}},bk={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -1 +1 @@
1
- import{j as a,y as o,B as s}from"./index-BeAhXwae.js";const i=({children:e,className:r,...t})=>a.jsx("div",{className:o("flex flex-col",r),...t,children:e}),l=({children:e,className:r,...t})=>a.jsx("div",{className:o("[&_svg]:size-4 flex items-center gap-1.5 text-base h-[22px] font-medium transition-all",r,t.onClick&&"hover:cursor-pointer hover:text-black dark:hover:text-white"),...t,children:e}),d=({children:e,className:r,...t})=>a.jsx("div",{className:o("text-[26px] mt-0.5 tracking-tighter leading-none text-foreground font-semibold",r),...t,children:e}),c=({children:e,className:r,...t})=>a.jsx(s,{className:o("absolute right-4 top-4 z-50 hidden translate-x-10 text-black dark:text-white/80 dark:hover:text-white opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100 md:!visible md:!block",r),size:"sm",variant:"outline",...t,children:e}),x=({children:e,className:r,...t})=>a.jsx("div",{className:o("group relative isolate flex flex-col border-r border-border last:border-none items-start gap-2 px-6 py-5 transition-all text-muted-foreground",t.onClick?"hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-auto",r),...t,children:e});export{x as K,l as a,i as b,d as c,c as d};
1
+ import{j as a,y as o,B as s}from"./index-f5Lv9kLb.js";const i=({children:e,className:r,...t})=>a.jsx("div",{className:o("flex flex-col",r),...t,children:e}),l=({children:e,className:r,...t})=>a.jsx("div",{className:o("[&_svg]:size-4 flex items-center gap-1.5 text-base h-[22px] font-medium transition-all",r,t.onClick&&"hover:cursor-pointer hover:text-black dark:hover:text-white"),...t,children:e}),d=({children:e,className:r,...t})=>a.jsx("div",{className:o("text-[26px] mt-0.5 tracking-tighter leading-none text-foreground font-semibold",r),...t,children:e}),c=({children:e,className:r,...t})=>a.jsx(s,{className:o("absolute right-4 top-4 z-50 hidden translate-x-10 text-black dark:text-white/80 dark:hover:text-white opacity-0 transition-all duration-200 group-hover:translate-x-0 group-hover:opacity-100 md:!visible md:!block",r),size:"sm",variant:"outline",...t,children:e}),x=({children:e,className:r,...t})=>a.jsx("div",{className:o("group relative isolate flex flex-col border-r border-border last:border-none items-start gap-2 px-6 py-5 transition-all text-muted-foreground",t.onClick?"hover:bg-accent/50 hover:text-foreground cursor-pointer":"cursor-auto",r),...t,children:e});export{x as K,l as a,i as b,d as c,c as d};
@@ -1 +1 @@
1
- import{e as N,j as s,by as w,bz as T,B as y,bA as D,bB as C,bC as L,bD as S,aS as E,bE as I,aj as u,ai as g,bF as H,bG as $,r as G,aW as O,bH as q,ap as F,bI as W,bJ as k}from"./index-BeAhXwae.js";import{S as K}from"./source-icon-CveBuH3b.js";import{p as J,e as U}from"./source-utils-B1S3ZHA2.js";import{C as M,a as Q,b as X,f as Y,c as P,g as Z}from"./pagemenu-aMfaU2cA.js";import{D as ss,h as es,i as V,a as as,b as ts,c as rs,d as is,e as ls,f as ns,g as cs}from"./data-list--hSCIzLC.js";import{S as os,u as ds}from"./post-analytics-context-BR5b-9nb.js";import{A as hs}from"./lucide-react-CTYGYE5A.js";import{a as ms}from"./wallet-cards-Hfikexmn.js";import{G as us}from"./gh-chart-CVItDGhq.js";import{T as xs,a as ps,K as _,d as x,e as vs}from"./tabs-DvTZ848X.js";const js=i=>{const a=Object.values(os).find(l=>l.value===i);return a?["Last 7 days","Last 30 days","Last 90 days","Last 12 months"].includes(a.name)?`in the ${a.name.toLowerCase()}`:a.name==="All time"?"(all time)":a.name.toLowerCase():""},R="https://www.google.com/s2/favicons?domain=ghost.org&sz=64",p=({dataTableHeader:i,data:a,defaultSourceIconUrl:l=R,onSourceClick:o})=>s.jsxs(ss,{children:[i&&s.jsxs(es,{children:[s.jsx(V,{children:"Source"}),s.jsx(V,{children:"Visitors"})]}),s.jsx(as,{children:a?.map(e=>{const r=!!o,c=e.source?e.source.toLowerCase().replace(/[^a-z0-9]/g,"-"):"direct";return s.jsxs(ts,{className:`group/row ${r?"cursor-pointer":""}`,"data-testid":`source-row-${c}`,onClick:r?()=>o(e.source):void 0,children:[s.jsx(rs,{style:{width:`${e.percentage?Math.round(e.percentage*100):0}%`}}),s.jsx(is,{className:"group-hover/datalist:max-w-[calc(100%-140px)]",children:s.jsx("div",{className:"flex items-center space-x-4 overflow-hidden",children:s.jsx("div",{className:"truncate font-medium",children:e.linkUrl&&!o?s.jsxs("a",{className:"group/link flex items-center gap-2",href:e.linkUrl,rel:"noreferrer",target:"_blank",children:[s.jsx(K,{defaultSourceIconUrl:l,displayName:e.displayName,iconSrc:e.iconSrc}),s.jsx("span",{className:"group-hover/link:underline",children:e.displayName})]}):s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(K,{defaultSourceIconUrl:l,displayName:e.displayName,iconSrc:e.iconSrc}),s.jsx("span",{children:e.displayName})]})})})}),s.jsxs(ls,{children:[s.jsx(ns,{children:u(e.visits)}),s.jsx(cs,{children:g(e.percentage||0)})]})]},e.source)})})]}),ks=({data:i,range:a=30,totalVisitors:l=0,siteUrl:o,siteIcon:e,defaultSourceIconUrl:r=R,tableOnly:c=!1,topSourcesLimit:n=10,onSourceClick:t})=>{const{isPostLoading:h}=ds(),m=N.useMemo(()=>J({data:i,mode:"visits",siteUrl:o,siteIcon:e,defaultSourceIconUrl:r}),[i,o,e,r]),d=N.useMemo(()=>U({processedData:m,totalVisitors:l,mode:"visits"}),[m,l]),f=d.slice(0,n),v="Top sources",j=`How readers found this post ${a&&` ${js(a)}`}`;if(c){const z=d.slice(0,n),B=d.length>n;return s.jsxs("div",{children:[s.jsx(p,{data:z,dataTableHeader:!1,defaultSourceIconUrl:r,range:a,onSourceClick:t}),B&&s.jsx("div",{className:"mt-4",children:s.jsxs(w,{children:[s.jsx(T,{asChild:!0,children:s.jsxs(y,{className:"w-full",size:"sm",variant:"outline",children:["View all (",d.length,") ",s.jsx(hs,{size:14})]})}),s.jsxs(D,{className:"overflow-y-auto pt-0 sm:max-w-[600px]",children:[s.jsxs(C,{className:"sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur",children:[s.jsx(L,{children:v}),s.jsx(S,{children:j})]}),s.jsx("div",{className:"group/datalist",children:s.jsx(p,{data:d,dataTableHeader:!0,defaultSourceIconUrl:r,range:a,onSourceClick:t})})]})]})})]})}const A=h;return s.jsxs(M,{className:"group/datalist","data-testid":"top-sources-card",children:[s.jsxs("div",{className:"flex items-center justify-between p-6",children:[s.jsxs(Q,{className:"p-0",children:[s.jsx(X,{children:v}),s.jsx(Y,{children:j})]}),s.jsx(E,{className:"mr-2",children:"Visitors"})]}),s.jsxs(P,{className:"overflow-hidden",children:[s.jsx("div",{className:"h-[1px] w-full bg-border"}),A?s.jsx(I,{lines:5}):f.length>0?s.jsx(p,{data:f,dataTableHeader:!1,defaultSourceIconUrl:r,range:a,onSourceClick:t}):s.jsx("div",{className:"py-20 text-center text-sm text-gray-700",children:"No sources data available."})]}),d.length>10&&s.jsx(Z,{children:s.jsxs(w,{children:[s.jsx(T,{asChild:!0,children:s.jsxs(y,{variant:"outline",children:["View all ",s.jsx(ms,{})]})}),s.jsxs(D,{className:"overflow-y-auto pt-0 sm:max-w-[600px]",children:[s.jsxs(C,{className:"sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur",children:[s.jsx(L,{children:v}),s.jsx(S,{children:j})]}),s.jsx("div",{className:"group/datalist",children:s.jsx(p,{data:d,dataTableHeader:!0,defaultSourceIconUrl:r,range:a,onSourceClick:t})})]})]})})]})},bs=i=>{if(!i?.length)return{visits:"0",views:"0",bounceRate:"0%",duration:"0s"};const a=n=>{const t=Number(n);return isNaN(t)?0:t},l=i.reduce((n,t)=>n+a(t.visits),0),o=i.reduce((n,t)=>n+a(t.pageviews),0),e=n=>l===0?0:i.reduce((t,h)=>{const m=a(h[n]),d=a(h.visits);return t+m*d/l},0),r=e("bounce_rate"),c=e("avg_session_sec");return{visits:u(l),views:u(o),bounceRate:g(r),duration:H(c)}},b={visits:{dataKey:"visits",label:"Visitors",color:"hsl(var(--chart-blue))",formatter:u},views:{dataKey:"pageviews",label:"Pageviews",color:"hsl(var(--chart-teal))",formatter:u},"bounce-rate":{dataKey:"bounce_rate",label:"Bounce rate",color:"hsl(var(--chart-purple))",formatter:g},duration:{dataKey:"avg_session_sec",label:"Time on page",color:"hsl(var(--chart-orange))",formatter:H}},Ks=({data:i,range:a})=>{const[l]=$(),o=l.get("tab")||"visits",[e,r]=G.useState(o),c=b[e],n=O(i||[],a,c.dataKey,"sum")?.map(h=>{const m=Number(h[c.dataKey]);return{date:String(h.date),value:m,formattedValue:c.formatter(m),label:c.label}}),t=bs(i);return s.jsx(M,{children:s.jsx(P,{children:s.jsxs(xs,{defaultValue:e,variant:"kpis",children:[s.jsxs(ps,{className:"-mx-6 hidden grid-cols-2 md:!visible md:!grid",children:[s.jsx(_,{value:"visits",onClick:()=>{r("visits")},children:s.jsx(x,{color:b.visits.color,label:"Unique visitors",value:t.visits})}),s.jsx(_,{value:"views",onClick:()=>{r("views")},children:s.jsx(x,{color:b.views.color,label:"Total views",value:t.views})})]}),s.jsxs(q,{children:[s.jsx(F,{className:"md:hidden",asChild:!0,children:s.jsxs(vs,{children:[e==="visits"&&s.jsx(x,{color:"hsl(var(--chart-blue))",label:"Unique visitors",value:t.visits}),e==="views"&&s.jsx(x,{color:"hsl(var(--chart-teal))",label:"Total views",value:t.views})]})}),s.jsxs(W,{align:"end",className:"w-56",children:[s.jsx(k,{onClick:()=>r("visits"),children:"Unique visitors"}),s.jsx(k,{onClick:()=>r("views"),children:"Total views"})]})]}),s.jsx("div",{className:"my-4 [&_.recharts-cartesian-axis-tick-value]:fill-gray-500",children:s.jsx(us,{className:"-mb-3 aspect-auto h-[16vw] max-h-[320px] min-h-[180px] w-full",color:c.color,data:n,id:c.dataKey,range:a,showHours:!0,syncId:"overview-charts"})})]})})})};export{b as K,ks as S,Ks as a,js as b,bs as g};
1
+ import{e as N,j as s,by as w,bz as T,B as y,bA as D,bB as C,bC as L,bD as S,aS as E,bE as I,aj as u,ai as g,bF as H,bG as $,r as G,aW as O,bH as q,ap as F,bI as W,bJ as k}from"./index-f5Lv9kLb.js";import{S as K}from"./source-icon-DkGi13e_.js";import{p as J,e as U}from"./source-utils-B1S3ZHA2.js";import{C as M,a as Q,b as X,f as Y,c as P,g as Z}from"./pagemenu-DjSqq3Wu.js";import{D as ss,h as es,i as V,a as as,b as ts,c as rs,d as is,e as ls,f as ns,g as cs}from"./data-list-BOdyZGWI.js";import{S as os,u as ds}from"./post-analytics-context-CEqWyqgm.js";import{A as hs}from"./lucide-react-BARFK2PZ.js";import{a as ms}from"./wallet-cards-CSdWOmJE.js";import{G as us}from"./gh-chart-hn7wEnik.js";import{T as xs,a as ps,K as _,d as x,e as vs}from"./tabs-DCHagOip.js";const js=i=>{const a=Object.values(os).find(l=>l.value===i);return a?["Last 7 days","Last 30 days","Last 90 days","Last 12 months"].includes(a.name)?`in the ${a.name.toLowerCase()}`:a.name==="All time"?"(all time)":a.name.toLowerCase():""},R="https://www.google.com/s2/favicons?domain=ghost.org&sz=64",p=({dataTableHeader:i,data:a,defaultSourceIconUrl:l=R,onSourceClick:o})=>s.jsxs(ss,{children:[i&&s.jsxs(es,{children:[s.jsx(V,{children:"Source"}),s.jsx(V,{children:"Visitors"})]}),s.jsx(as,{children:a?.map(e=>{const r=!!o,c=e.source?e.source.toLowerCase().replace(/[^a-z0-9]/g,"-"):"direct";return s.jsxs(ts,{className:`group/row ${r?"cursor-pointer":""}`,"data-testid":`source-row-${c}`,onClick:r?()=>o(e.source):void 0,children:[s.jsx(rs,{style:{width:`${e.percentage?Math.round(e.percentage*100):0}%`}}),s.jsx(is,{className:"group-hover/datalist:max-w-[calc(100%-140px)]",children:s.jsx("div",{className:"flex items-center space-x-4 overflow-hidden",children:s.jsx("div",{className:"truncate font-medium",children:e.linkUrl&&!o?s.jsxs("a",{className:"group/link flex items-center gap-2",href:e.linkUrl,rel:"noreferrer",target:"_blank",children:[s.jsx(K,{defaultSourceIconUrl:l,displayName:e.displayName,iconSrc:e.iconSrc}),s.jsx("span",{className:"group-hover/link:underline",children:e.displayName})]}):s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(K,{defaultSourceIconUrl:l,displayName:e.displayName,iconSrc:e.iconSrc}),s.jsx("span",{children:e.displayName})]})})})}),s.jsxs(ls,{children:[s.jsx(ns,{children:u(e.visits)}),s.jsx(cs,{children:g(e.percentage||0)})]})]},e.source)})})]}),ks=({data:i,range:a=30,totalVisitors:l=0,siteUrl:o,siteIcon:e,defaultSourceIconUrl:r=R,tableOnly:c=!1,topSourcesLimit:n=10,onSourceClick:t})=>{const{isPostLoading:h}=ds(),m=N.useMemo(()=>J({data:i,mode:"visits",siteUrl:o,siteIcon:e,defaultSourceIconUrl:r}),[i,o,e,r]),d=N.useMemo(()=>U({processedData:m,totalVisitors:l,mode:"visits"}),[m,l]),f=d.slice(0,n),v="Top sources",j=`How readers found this post ${a&&` ${js(a)}`}`;if(c){const z=d.slice(0,n),B=d.length>n;return s.jsxs("div",{children:[s.jsx(p,{data:z,dataTableHeader:!1,defaultSourceIconUrl:r,range:a,onSourceClick:t}),B&&s.jsx("div",{className:"mt-4",children:s.jsxs(w,{children:[s.jsx(T,{asChild:!0,children:s.jsxs(y,{className:"w-full",size:"sm",variant:"outline",children:["View all (",d.length,") ",s.jsx(hs,{size:14})]})}),s.jsxs(D,{className:"overflow-y-auto pt-0 sm:max-w-[600px]",children:[s.jsxs(C,{className:"sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur",children:[s.jsx(L,{children:v}),s.jsx(S,{children:j})]}),s.jsx("div",{className:"group/datalist",children:s.jsx(p,{data:d,dataTableHeader:!0,defaultSourceIconUrl:r,range:a,onSourceClick:t})})]})]})})]})}const A=h;return s.jsxs(M,{className:"group/datalist","data-testid":"top-sources-card",children:[s.jsxs("div",{className:"flex items-center justify-between p-6",children:[s.jsxs(Q,{className:"p-0",children:[s.jsx(X,{children:v}),s.jsx(Y,{children:j})]}),s.jsx(E,{className:"mr-2",children:"Visitors"})]}),s.jsxs(P,{className:"overflow-hidden",children:[s.jsx("div",{className:"h-[1px] w-full bg-border"}),A?s.jsx(I,{lines:5}):f.length>0?s.jsx(p,{data:f,dataTableHeader:!1,defaultSourceIconUrl:r,range:a,onSourceClick:t}):s.jsx("div",{className:"py-20 text-center text-sm text-gray-700",children:"No sources data available."})]}),d.length>10&&s.jsx(Z,{children:s.jsxs(w,{children:[s.jsx(T,{asChild:!0,children:s.jsxs(y,{variant:"outline",children:["View all ",s.jsx(ms,{})]})}),s.jsxs(D,{className:"overflow-y-auto pt-0 sm:max-w-[600px]",children:[s.jsxs(C,{className:"sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur",children:[s.jsx(L,{children:v}),s.jsx(S,{children:j})]}),s.jsx("div",{className:"group/datalist",children:s.jsx(p,{data:d,dataTableHeader:!0,defaultSourceIconUrl:r,range:a,onSourceClick:t})})]})]})})]})},bs=i=>{if(!i?.length)return{visits:"0",views:"0",bounceRate:"0%",duration:"0s"};const a=n=>{const t=Number(n);return isNaN(t)?0:t},l=i.reduce((n,t)=>n+a(t.visits),0),o=i.reduce((n,t)=>n+a(t.pageviews),0),e=n=>l===0?0:i.reduce((t,h)=>{const m=a(h[n]),d=a(h.visits);return t+m*d/l},0),r=e("bounce_rate"),c=e("avg_session_sec");return{visits:u(l),views:u(o),bounceRate:g(r),duration:H(c)}},b={visits:{dataKey:"visits",label:"Visitors",color:"hsl(var(--chart-blue))",formatter:u},views:{dataKey:"pageviews",label:"Pageviews",color:"hsl(var(--chart-teal))",formatter:u},"bounce-rate":{dataKey:"bounce_rate",label:"Bounce rate",color:"hsl(var(--chart-purple))",formatter:g},duration:{dataKey:"avg_session_sec",label:"Time on page",color:"hsl(var(--chart-orange))",formatter:H}},Ks=({data:i,range:a})=>{const[l]=$(),o=l.get("tab")||"visits",[e,r]=G.useState(o),c=b[e],n=O(i||[],a,c.dataKey,"sum")?.map(h=>{const m=Number(h[c.dataKey]);return{date:String(h.date),value:m,formattedValue:c.formatter(m),label:c.label}}),t=bs(i);return s.jsx(M,{children:s.jsx(P,{children:s.jsxs(xs,{defaultValue:e,variant:"kpis",children:[s.jsxs(ps,{className:"-mx-6 hidden grid-cols-2 md:!visible md:!grid",children:[s.jsx(_,{value:"visits",onClick:()=>{r("visits")},children:s.jsx(x,{color:b.visits.color,label:"Unique visitors",value:t.visits})}),s.jsx(_,{value:"views",onClick:()=>{r("views")},children:s.jsx(x,{color:b.views.color,label:"Total views",value:t.views})})]}),s.jsxs(q,{children:[s.jsx(F,{className:"md:hidden",asChild:!0,children:s.jsxs(vs,{children:[e==="visits"&&s.jsx(x,{color:"hsl(var(--chart-blue))",label:"Unique visitors",value:t.visits}),e==="views"&&s.jsx(x,{color:"hsl(var(--chart-teal))",label:"Total views",value:t.views})]})}),s.jsxs(W,{align:"end",className:"w-56",children:[s.jsx(k,{onClick:()=>r("visits"),children:"Unique visitors"}),s.jsx(k,{onClick:()=>r("views"),children:"Total views"})]})]}),s.jsx("div",{className:"my-4 [&_.recharts-cartesian-axis-tick-value]:fill-gray-500",children:s.jsx(us,{className:"-mb-3 aspect-auto h-[16vw] max-h-[320px] min-h-[180px] w-full",color:c.color,data:n,id:c.dataKey,range:a,showHours:!0,syncId:"overview-charts"})})]})})})};export{b as K,ks as S,Ks as a,js as b,bs as g};
@@ -1 +1 @@
1
- import{r as i,bT as E,j as p,bU as x,y as R,an as S}from"./index-BeAhXwae.js";var v=Symbol.for("react.lazy"),u=E[" use ".trim().toString()];function C(e){return typeof e=="object"&&e!==null&&"then"in e}function y(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===v&&"_payload"in e&&C(e._payload)}function w(e){const t=h(e),r=i.forwardRef((o,n)=>{let{children:a,...s}=o;y(a)&&typeof u=="function"&&(a=u(a._payload));const l=i.Children.toArray(a),f=l.find(N);if(f){const c=f.props.children,g=l.map(d=>d===f?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:n,children:i.isValidElement(c)?i.cloneElement(c,void 0,g):null})}return p.jsx(t,{...s,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function h(e){const t=i.forwardRef((r,o)=>{let{children:n,...a}=r;if(y(n)&&typeof u=="function"&&(n=u(n._payload)),i.isValidElement(n)){const s=_(n),l=P(a,n.props);return n.type!==i.Fragment&&(l.ref=o?x(o,s):s),i.cloneElement(n,l)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j=Symbol("radix.slottable");function N(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j}function P(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...l)=>{const f=a(...l);return n(...l),f}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function _(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var L=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=L.reduce((e,t)=>{const r=w(`Primitive.${t}`),o=i.forwardRef((n,a)=>{const{asChild:s,...l}=n,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...l,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),A="Label",m=i.forwardRef((e,t)=>p.jsx($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));m.displayName=A;var b=m;const D=S("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),V=i.forwardRef(({className:e,...t},r)=>p.jsx(b,{ref:r,className:R(D(),e),...t}));V.displayName=b.displayName;export{V as L};
1
+ import{r as i,bT as E,j as p,bU as x,y as R,an as S}from"./index-f5Lv9kLb.js";var v=Symbol.for("react.lazy"),u=E[" use ".trim().toString()];function C(e){return typeof e=="object"&&e!==null&&"then"in e}function y(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===v&&"_payload"in e&&C(e._payload)}function w(e){const t=h(e),r=i.forwardRef((o,n)=>{let{children:a,...s}=o;y(a)&&typeof u=="function"&&(a=u(a._payload));const l=i.Children.toArray(a),f=l.find(N);if(f){const c=f.props.children,g=l.map(d=>d===f?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:n,children:i.isValidElement(c)?i.cloneElement(c,void 0,g):null})}return p.jsx(t,{...s,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function h(e){const t=i.forwardRef((r,o)=>{let{children:n,...a}=r;if(y(n)&&typeof u=="function"&&(n=u(n._payload)),i.isValidElement(n)){const s=_(n),l=P(a,n.props);return n.type!==i.Fragment&&(l.ref=o?x(o,s):s),i.cloneElement(n,l)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j=Symbol("radix.slottable");function N(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j}function P(e,t){const r={...t};for(const o in t){const n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...l)=>{const f=a(...l);return n(...l),f}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function _(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var L=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=L.reduce((e,t)=>{const r=w(`Primitive.${t}`),o=i.forwardRef((n,a)=>{const{asChild:s,...l}=n,f=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(f,{...l,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),A="Label",m=i.forwardRef((e,t)=>p.jsx($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));m.displayName=A;var b=m;const D=S("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),V=i.forwardRef(({className:e,...t},r)=>p.jsx(b,{ref:r,className:R(D(),e),...t}));V.displayName=b.displayName;export{V as L};
@@ -1 +1 @@
1
- import{e as A,aH as Q,r as ht,j as o,y as yt,ai as gt,ac as bt,ad as vt}from"./index-BeAhXwae.js";import{S as At,b as J,c as X,A as xt,i as K,L as N,d as Ot,e as st,m as V,h as Y,G as jt,j as St,k as Pt,l as kt,n as Rt,t as Ct,o as Et,p as Z,q as _t,r as wt,g as Dt,s as Tt,C as Nt,u as It,a as zt,v as Bt}from"./chart-BvckKrZJ.js";import{P as ct,a as lt}from"./PolarAngleAxis-sYvwhg8d.js";function w(t){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(t)}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},U.apply(this,arguments)}function tt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function F(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?tt(Object(a),!0).forEach(function(r){Lt(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):tt(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Lt(t,e,a){return e=Mt(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Mt(t){var e=$t(t,"string");return w(e)=="symbol"?e:e+""}function $t(t,e){if(w(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(w(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function et(t){return typeof t=="string"?parseInt(t,10):t}function Wt(t,e){var a="".concat(e.cx||t.cx),r=Number(a),n="".concat(e.cy||t.cy),i=Number(n);return F(F(F({},e),t),{},{cx:r,cy:i})}function rt(t){return A.createElement(At,U({shapeType:"sector",propTransformer:Wt},t))}var Gt=["shape","activeShape","activeIndex","cornerRadius"],Kt=["value","background"];function C(t){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(t)}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},I.apply(this,arguments)}function at(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function u(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?at(Object(a),!0).forEach(function(r){j(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):at(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function nt(t,e){if(t==null)return{};var a=Ft(t,e),r,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Ft(t,e){if(t==null)return{};var a={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;a[r]=t[r]}return a}function Vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function it(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pt(r.key),r)}}function Ut(t,e,a){return e&&it(t.prototype,e),a&&it(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}function qt(t,e,a){return e=z(e),Ht(t,ut()?Reflect.construct(e,a||[],z(t).constructor):e.apply(t,a))}function Ht(t,e){if(e&&(C(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qt(t)}function Qt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ut(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ut=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},z(t)}function Jt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}function q(t,e){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},q(t,e)}function j(t,e,a){return e=pt(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function pt(t){var e=Xt(t,"string");return C(e)=="symbol"?e:e+""}function Xt(t,e){if(C(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(C(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var D=(function(t){function e(){var a;Vt(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return a=qt(this,e,[].concat(n)),j(a,"state",{isAnimationFinished:!1}),j(a,"handleAnimationEnd",function(){var s=a.props.onAnimationEnd;a.setState({isAnimationFinished:!0}),Y(s)&&s()}),j(a,"handleAnimationStart",function(){var s=a.props.onAnimationStart;a.setState({isAnimationFinished:!1}),Y(s)&&s()}),a}return Jt(e,t),Ut(e,[{key:"getDeltaAngle",value:function(){var r=this.props,n=r.startAngle,i=r.endAngle,s=V(i-n),p=Math.min(Math.abs(i-n),360);return s*p}},{key:"renderSectorsStatically",value:function(r){var n=this,i=this.props,s=i.shape,p=i.activeShape,d=i.activeIndex,l=i.cornerRadius,c=nt(i,Gt),y=J(c,!1);return r.map(function(g,f){var v=f===d,m=u(u(u(u({},y),{},{cornerRadius:et(l)},g),X(n.props,g,f)),{},{className:"recharts-radial-bar-sector ".concat(g.className),forceCornerRadius:c.forceCornerRadius,cornerIsExternal:c.cornerIsExternal,isActive:v,option:v?p:s});return A.createElement(rt,I({},m,{key:"sector-".concat(f)}))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,n=this.props,i=n.data,s=n.isAnimationActive,p=n.animationBegin,d=n.animationDuration,l=n.animationEasing,c=n.animationId,y=this.state.prevData;return A.createElement(xt,{begin:p,duration:d,isActive:s,easing:l,from:{t:0},to:{t:1},key:"radialBar-".concat(c),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var f=g.t,v=i.map(function(m,E){var S=y&&y[E];if(S){var B=K(S.startAngle,m.startAngle),b=K(S.endAngle,m.endAngle);return u(u({},m),{},{startAngle:B(f),endAngle:b(f)})}var T=m.endAngle,L=m.startAngle,M=K(L,T);return u(u({},m),{},{endAngle:M(f)})});return A.createElement(N,null,r.renderSectorsStatically(v))})}},{key:"renderSectors",value:function(){var r=this.props,n=r.data,i=r.isAnimationActive,s=this.state.prevData;return i&&n&&n.length&&(!s||!Ot(s,n))?this.renderSectorsWithAnimation():this.renderSectorsStatically(n)}},{key:"renderBackground",value:function(r){var n=this,i=this.props.cornerRadius,s=J(this.props.background,!1);return r.map(function(p,d){p.value;var l=p.background,c=nt(p,Kt);if(!l)return null;var y=u(u(u(u(u({cornerRadius:et(i)},c),{},{fill:"#eee"},l),s),X(n.props,p,d)),{},{index:d,className:Q("recharts-radial-bar-background-sector",s?.className),option:l,isActive:!1});return A.createElement(rt,I({},y,{key:"sector-".concat(d)}))})}},{key:"render",value:function(){var r=this.props,n=r.hide,i=r.data,s=r.className,p=r.background,d=r.isAnimationActive;if(n||!i||!i.length)return null;var l=this.state.isAnimationFinished,c=Q("recharts-area",s);return A.createElement(N,{className:c},p&&A.createElement(N,{className:"recharts-radial-bar-background"},this.renderBackground(i)),A.createElement(N,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!d||l)&&st.renderCallByParent(u({},this.props),i))}}],[{key:"getDerivedStateFromProps",value:function(r,n){return r.animationId!==n.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:n.curData}:r.data!==n.curData?{curData:r.data}:null}}])})(ht.PureComponent);j(D,"displayName","RadialBar");j(D,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!jt.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});j(D,"getComposedData",function(t){var e=t.item,a=t.props,r=t.radiusAxis,n=t.radiusAxisTicks,i=t.angleAxis,s=t.angleAxisTicks,p=t.displayedData,d=t.dataKey,l=t.stackedData,c=t.barPosition,y=t.bandSize,g=t.dataStartIndex,f=St(c,e);if(!f)return null;var v=i.cx,m=i.cy,E=a.layout,S=e.props,B=S.children,b=S.minPointSize,T=E==="radial"?i:r,L=l?T.scale.domain():null,M=Pt({numericAxis:T}),$=kt(B,Rt),dt=p.map(function(P,_){var h,x,O,k,R,H;if(l?h=Ct(l[g+_],L):(h=Et(P,d),Array.isArray(h)||(h=[M,h])),E==="radial"){x=Z({axis:r,ticks:n,bandSize:y,offset:f.offset,entry:P,index:_}),R=i.scale(h[1]),k=i.scale(h[0]),O=x+f.size;var W=R-k;if(Math.abs(b)>0&&Math.abs(W)<Math.abs(b)){var ft=V(W||b)*(Math.abs(b)-Math.abs(W));R+=ft}H={background:{cx:v,cy:m,innerRadius:x,outerRadius:O,startAngle:a.startAngle,endAngle:a.endAngle}}}else{x=r.scale(h[0]),O=r.scale(h[1]),k=Z({axis:i,ticks:s,bandSize:y,offset:f.offset,entry:P,index:_}),R=k+f.size;var G=O-x;if(Math.abs(b)>0&&Math.abs(G)<Math.abs(b)){var mt=V(G||b)*(Math.abs(b)-Math.abs(G));O+=mt}}return u(u(u(u({},P),H),{},{payload:P,value:l?h:h[1],cx:v,cy:m,innerRadius:x,outerRadius:O,startAngle:k,endAngle:R},$&&$[_]&&$[_].props),{},{tooltipPayload:[_t(e,P)],tooltipPosition:wt(v,m,(x+O)/2,(k+R)/2)})});return{data:dt,layout:E}});var Yt=Dt({chartName:"RadialBarChart",GraphicalChild:D,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:ct},{axisType:"radiusAxis",AxisComp:lt}],formatAxisMap:Tt,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const re=({config:t,data:e,percentageValue:a,percentageLabel:r,className:n,tooltip:i=!0,size:s="responsive"})=>{const d=(()=>{switch(s){case"sm":return{barWidth:28,innerRadiusStart:e.length>1?42:56,fontSize:{percentage:"1.2rem",label:"0.8rem"}};case"md":return{barWidth:36,innerRadiusStart:e.length>1?60:72,fontSize:{percentage:"1.4rem",label:"0.9rem"}};case"lg":return{barWidth:46,innerRadiusStart:e.length>1?72:94,fontSize:{percentage:"1.6rem",label:"1rem"}};case"responsive":default:return{barWidth:46,innerRadiusStart:e.length>1?72:94,fontSize:{percentage:"1.6rem",label:"1rem"}}}})(),l={innerRadius:d.innerRadiusStart,outerRadius:d.innerRadiusStart+d.barWidth,startAngle:90,endAngle:-270};return o.jsx(Nt,{className:yt("mx-auto",n),config:t,children:o.jsxs(Yt,{data:e,endAngle:l.endAngle,innerRadius:l.innerRadius,outerRadius:l.outerRadius,startAngle:l.startAngle,children:[o.jsxs("defs",{children:[o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientPurple",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-purple))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-purple))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientBlue",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-blue))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-blue))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientTeal",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-teal))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-teal))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientGray",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-gray))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-gray))",stopOpacity:1})]})]}),o.jsx(ct,{angleAxisId:0,domain:[0,1],tick:!1,type:"number"}),o.jsx(D,{cornerRadius:10,dataKey:"value",minPointSize:-2,background:!0,children:e.length>1&&o.jsx(st,{className:"fill-black opacity-60",dataKey:"datatype",fontSize:11,position:"insideStart"})}),o.jsx(lt,{axisLine:!1,tick:!1,tickLine:!1,children:o.jsx(It,{content:({viewBox:c})=>{if(c&&"cx"in c&&"cy"in c)return o.jsxs("text",{dominantBaseline:"middle",textAnchor:"middle",x:c.cx,y:c.cy,children:[a&&o.jsx("tspan",{className:"fill-foreground text-[1.6rem] font-semibold tracking-tight",x:c.cx,y:(c.cy||0)-6,children:a}),r&&o.jsx("tspan",{className:"fill-muted-foreground font-medium",x:c.cx,y:(c.cy||0)+14,children:r})]})}})}),i&&o.jsx(zt,{content:o.jsx(Bt,{formatter:(c,y,g)=>o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:"size-2 rounded-full opacity-50",style:{backgroundColor:g.payload?.color}}),o.jsx("div",{className:"text-xs text-muted-foreground",children:g.payload?.datatype}),o.jsx("div",{className:"ml-3 font-mono text-xs",children:gt(c)})]}),nameKey:"datatype",hideLabel:!0}),cursor:!1,isAnimationActive:!1})]})})},ot=(t,e=!1)=>{try{const a=["ref","attribution_id","attribution_type"],r=new URL(t);for(const i of a)r.searchParams.delete(i);return e?(r.host+(r.pathname==="/"&&!r.search?"":r.pathname)+(r.search?r.search:"")+(r.hash?r.hash:"")).replace(/^www\./,""):r.toString()}catch{return t}},ae=(t,e)=>t.find(a=>a.link.link_id===e),ne=t=>{const r=(t?.links.map(n=>({link:n.link,count:n.count?.clicks||0}))||[]).map(n=>({...n,link:{...n.link,originalTo:n.link.to,to:ot(n.link.to,!1),title:ot(n.link.to,!0)}})).reduce((n,i)=>(n[i.link.title]?(n[i.link.title].count||(n[i.link.title].count=0),n[i.link.title].count+=i.count??0):n[i.link.title]=i,n),{});return Object.values(r).sort((n,i)=>{const s=n.count||0;return(i.count||0)-s})},ie=bt({dataType:"LinkResponseType",path:"/links/"}),oe=vt({method:"PUT",path:()=>"/links/bulk/",body:({editedUrl:t})=>({bulk:{action:"updateLink",meta:{link:{to:t}}}}),searchParams:({originalUrl:t,postId:e})=>({filter:`post_id:'${e}'+to:'${t}'`})});export{re as N,oe as a,ot as c,ae as g,ne as p,ie as u};
1
+ import{e as A,aH as Q,r as ht,j as o,y as yt,ai as gt,ac as bt,ad as vt}from"./index-f5Lv9kLb.js";import{S as At,b as J,c as X,A as xt,i as K,L as N,d as Ot,e as st,m as V,h as Y,G as jt,j as St,k as Pt,l as kt,n as Rt,t as Ct,o as Et,p as Z,q as _t,r as wt,g as Dt,s as Tt,C as Nt,u as It,a as zt,v as Bt}from"./chart-pimL5Chk.js";import{P as ct,a as lt}from"./PolarAngleAxis-B8JrAxf_.js";function w(t){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(t)}function U(){return U=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},U.apply(this,arguments)}function tt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function F(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?tt(Object(a),!0).forEach(function(r){Lt(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):tt(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function Lt(t,e,a){return e=Mt(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Mt(t){var e=$t(t,"string");return w(e)=="symbol"?e:e+""}function $t(t,e){if(w(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(w(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function et(t){return typeof t=="string"?parseInt(t,10):t}function Wt(t,e){var a="".concat(e.cx||t.cx),r=Number(a),n="".concat(e.cy||t.cy),i=Number(n);return F(F(F({},e),t),{},{cx:r,cy:i})}function rt(t){return A.createElement(At,U({shapeType:"sector",propTransformer:Wt},t))}var Gt=["shape","activeShape","activeIndex","cornerRadius"],Kt=["value","background"];function C(t){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(t)}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},I.apply(this,arguments)}function at(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function u(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?at(Object(a),!0).forEach(function(r){j(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):at(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function nt(t,e){if(t==null)return{};var a=Ft(t,e),r,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function Ft(t,e){if(t==null)return{};var a={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){if(e.indexOf(r)>=0)continue;a[r]=t[r]}return a}function Vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function it(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pt(r.key),r)}}function Ut(t,e,a){return e&&it(t.prototype,e),a&&it(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}function qt(t,e,a){return e=z(e),Ht(t,ut()?Reflect.construct(e,a||[],z(t).constructor):e.apply(t,a))}function Ht(t,e){if(e&&(C(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qt(t)}function Qt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ut(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ut=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},z(t)}function Jt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&q(t,e)}function q(t,e){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},q(t,e)}function j(t,e,a){return e=pt(e),e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function pt(t){var e=Xt(t,"string");return C(e)=="symbol"?e:e+""}function Xt(t,e){if(C(t)!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(C(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}var D=(function(t){function e(){var a;Vt(this,e);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return a=qt(this,e,[].concat(n)),j(a,"state",{isAnimationFinished:!1}),j(a,"handleAnimationEnd",function(){var s=a.props.onAnimationEnd;a.setState({isAnimationFinished:!0}),Y(s)&&s()}),j(a,"handleAnimationStart",function(){var s=a.props.onAnimationStart;a.setState({isAnimationFinished:!1}),Y(s)&&s()}),a}return Jt(e,t),Ut(e,[{key:"getDeltaAngle",value:function(){var r=this.props,n=r.startAngle,i=r.endAngle,s=V(i-n),p=Math.min(Math.abs(i-n),360);return s*p}},{key:"renderSectorsStatically",value:function(r){var n=this,i=this.props,s=i.shape,p=i.activeShape,d=i.activeIndex,l=i.cornerRadius,c=nt(i,Gt),y=J(c,!1);return r.map(function(g,f){var v=f===d,m=u(u(u(u({},y),{},{cornerRadius:et(l)},g),X(n.props,g,f)),{},{className:"recharts-radial-bar-sector ".concat(g.className),forceCornerRadius:c.forceCornerRadius,cornerIsExternal:c.cornerIsExternal,isActive:v,option:v?p:s});return A.createElement(rt,I({},m,{key:"sector-".concat(f)}))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,n=this.props,i=n.data,s=n.isAnimationActive,p=n.animationBegin,d=n.animationDuration,l=n.animationEasing,c=n.animationId,y=this.state.prevData;return A.createElement(xt,{begin:p,duration:d,isActive:s,easing:l,from:{t:0},to:{t:1},key:"radialBar-".concat(c),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var f=g.t,v=i.map(function(m,E){var S=y&&y[E];if(S){var B=K(S.startAngle,m.startAngle),b=K(S.endAngle,m.endAngle);return u(u({},m),{},{startAngle:B(f),endAngle:b(f)})}var T=m.endAngle,L=m.startAngle,M=K(L,T);return u(u({},m),{},{endAngle:M(f)})});return A.createElement(N,null,r.renderSectorsStatically(v))})}},{key:"renderSectors",value:function(){var r=this.props,n=r.data,i=r.isAnimationActive,s=this.state.prevData;return i&&n&&n.length&&(!s||!Ot(s,n))?this.renderSectorsWithAnimation():this.renderSectorsStatically(n)}},{key:"renderBackground",value:function(r){var n=this,i=this.props.cornerRadius,s=J(this.props.background,!1);return r.map(function(p,d){p.value;var l=p.background,c=nt(p,Kt);if(!l)return null;var y=u(u(u(u(u({cornerRadius:et(i)},c),{},{fill:"#eee"},l),s),X(n.props,p,d)),{},{index:d,className:Q("recharts-radial-bar-background-sector",s?.className),option:l,isActive:!1});return A.createElement(rt,I({},y,{key:"sector-".concat(d)}))})}},{key:"render",value:function(){var r=this.props,n=r.hide,i=r.data,s=r.className,p=r.background,d=r.isAnimationActive;if(n||!i||!i.length)return null;var l=this.state.isAnimationFinished,c=Q("recharts-area",s);return A.createElement(N,{className:c},p&&A.createElement(N,{className:"recharts-radial-bar-background"},this.renderBackground(i)),A.createElement(N,{className:"recharts-radial-bar-sectors"},this.renderSectors()),(!d||l)&&st.renderCallByParent(u({},this.props),i))}}],[{key:"getDerivedStateFromProps",value:function(r,n){return r.animationId!==n.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:n.curData}:r.data!==n.curData?{curData:r.data}:null}}])})(ht.PureComponent);j(D,"displayName","RadialBar");j(D,"defaultProps",{angleAxisId:0,radiusAxisId:0,minPointSize:0,hide:!1,legendType:"rect",data:[],isAnimationActive:!jt.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease",forceCornerRadius:!1,cornerIsExternal:!1});j(D,"getComposedData",function(t){var e=t.item,a=t.props,r=t.radiusAxis,n=t.radiusAxisTicks,i=t.angleAxis,s=t.angleAxisTicks,p=t.displayedData,d=t.dataKey,l=t.stackedData,c=t.barPosition,y=t.bandSize,g=t.dataStartIndex,f=St(c,e);if(!f)return null;var v=i.cx,m=i.cy,E=a.layout,S=e.props,B=S.children,b=S.minPointSize,T=E==="radial"?i:r,L=l?T.scale.domain():null,M=Pt({numericAxis:T}),$=kt(B,Rt),dt=p.map(function(P,_){var h,x,O,k,R,H;if(l?h=Ct(l[g+_],L):(h=Et(P,d),Array.isArray(h)||(h=[M,h])),E==="radial"){x=Z({axis:r,ticks:n,bandSize:y,offset:f.offset,entry:P,index:_}),R=i.scale(h[1]),k=i.scale(h[0]),O=x+f.size;var W=R-k;if(Math.abs(b)>0&&Math.abs(W)<Math.abs(b)){var ft=V(W||b)*(Math.abs(b)-Math.abs(W));R+=ft}H={background:{cx:v,cy:m,innerRadius:x,outerRadius:O,startAngle:a.startAngle,endAngle:a.endAngle}}}else{x=r.scale(h[0]),O=r.scale(h[1]),k=Z({axis:i,ticks:s,bandSize:y,offset:f.offset,entry:P,index:_}),R=k+f.size;var G=O-x;if(Math.abs(b)>0&&Math.abs(G)<Math.abs(b)){var mt=V(G||b)*(Math.abs(b)-Math.abs(G));O+=mt}}return u(u(u(u({},P),H),{},{payload:P,value:l?h:h[1],cx:v,cy:m,innerRadius:x,outerRadius:O,startAngle:k,endAngle:R},$&&$[_]&&$[_].props),{},{tooltipPayload:[_t(e,P)],tooltipPosition:wt(v,m,(x+O)/2,(k+R)/2)})});return{data:dt,layout:E}});var Yt=Dt({chartName:"RadialBarChart",GraphicalChild:D,legendContent:"children",defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"angleAxis",AxisComp:ct},{axisType:"radiusAxis",AxisComp:lt}],formatAxisMap:Tt,defaultProps:{layout:"radial",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const re=({config:t,data:e,percentageValue:a,percentageLabel:r,className:n,tooltip:i=!0,size:s="responsive"})=>{const d=(()=>{switch(s){case"sm":return{barWidth:28,innerRadiusStart:e.length>1?42:56,fontSize:{percentage:"1.2rem",label:"0.8rem"}};case"md":return{barWidth:36,innerRadiusStart:e.length>1?60:72,fontSize:{percentage:"1.4rem",label:"0.9rem"}};case"lg":return{barWidth:46,innerRadiusStart:e.length>1?72:94,fontSize:{percentage:"1.6rem",label:"1rem"}};case"responsive":default:return{barWidth:46,innerRadiusStart:e.length>1?72:94,fontSize:{percentage:"1.6rem",label:"1rem"}}}})(),l={innerRadius:d.innerRadiusStart,outerRadius:d.innerRadiusStart+d.barWidth,startAngle:90,endAngle:-270};return o.jsx(Nt,{className:yt("mx-auto",n),config:t,children:o.jsxs(Yt,{data:e,endAngle:l.endAngle,innerRadius:l.innerRadius,outerRadius:l.outerRadius,startAngle:l.startAngle,children:[o.jsxs("defs",{children:[o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientPurple",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-purple))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-purple))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientBlue",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-blue))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-blue))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientTeal",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-teal))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-teal))",stopOpacity:1})]}),o.jsxs("radialGradient",{cx:"30%",cy:"30%",id:"gradientGray",r:"70%",children:[o.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-gray))",stopOpacity:.5}),o.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-gray))",stopOpacity:1})]})]}),o.jsx(ct,{angleAxisId:0,domain:[0,1],tick:!1,type:"number"}),o.jsx(D,{cornerRadius:10,dataKey:"value",minPointSize:-2,background:!0,children:e.length>1&&o.jsx(st,{className:"fill-black opacity-60",dataKey:"datatype",fontSize:11,position:"insideStart"})}),o.jsx(lt,{axisLine:!1,tick:!1,tickLine:!1,children:o.jsx(It,{content:({viewBox:c})=>{if(c&&"cx"in c&&"cy"in c)return o.jsxs("text",{dominantBaseline:"middle",textAnchor:"middle",x:c.cx,y:c.cy,children:[a&&o.jsx("tspan",{className:"fill-foreground text-[1.6rem] font-semibold tracking-tight",x:c.cx,y:(c.cy||0)-6,children:a}),r&&o.jsx("tspan",{className:"fill-muted-foreground font-medium",x:c.cx,y:(c.cy||0)+14,children:r})]})}})}),i&&o.jsx(zt,{content:o.jsx(Bt,{formatter:(c,y,g)=>o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:"size-2 rounded-full opacity-50",style:{backgroundColor:g.payload?.color}}),o.jsx("div",{className:"text-xs text-muted-foreground",children:g.payload?.datatype}),o.jsx("div",{className:"ml-3 font-mono text-xs",children:gt(c)})]}),nameKey:"datatype",hideLabel:!0}),cursor:!1,isAnimationActive:!1})]})})},ot=(t,e=!1)=>{try{const a=["ref","attribution_id","attribution_type"],r=new URL(t);for(const i of a)r.searchParams.delete(i);return e?(r.host+(r.pathname==="/"&&!r.search?"":r.pathname)+(r.search?r.search:"")+(r.hash?r.hash:"")).replace(/^www\./,""):r.toString()}catch{return t}},ae=(t,e)=>t.find(a=>a.link.link_id===e),ne=t=>{const r=(t?.links.map(n=>({link:n.link,count:n.count?.clicks||0}))||[]).map(n=>({...n,link:{...n.link,originalTo:n.link.to,to:ot(n.link.to,!1),title:ot(n.link.to,!0)}})).reduce((n,i)=>(n[i.link.title]?(n[i.link.title].count||(n[i.link.title].count=0),n[i.link.title].count+=i.count??0):n[i.link.title]=i,n),{});return Object.values(r).sort((n,i)=>{const s=n.count||0;return(i.count||0)-s})},ie=bt({dataType:"LinkResponseType",path:"/links/"}),oe=vt({method:"PUT",path:()=>"/links/bulk/",body:({editedUrl:t})=>({bulk:{action:"updateLink",meta:{link:{to:t}}}}),searchParams:({originalUrl:t,postId:e})=>({filter:`post_id:'${e}'+to:'${t}'`})});export{re as N,oe as a,ot as c,ae as g,ne as p,ie as u};
@@ -1,4 +1,4 @@
1
- import{aA as e,eg as M0,aM as v0,T as m0,bs as _0,eh as g0,ei as L0,$ as x0,be as w0,bi as f0,C as I0,ej as C0,cX as b0,ek as c,el as r,cE as N0,bN as k,x as $0,em as q0,bj as p,cz as z0,aT as S0,bq as A0,cC as H0,en as j0,ab as V0,eo as P0,ep as B0,c$ as F0,d0 as D0,eq as R0,er as T0,es as s,cR as l,et as U0,cs as O0,eu as G0,cp as Z0,ev as W0,ew as E0,ex as X0,ey as u,cj as K0,c6 as Q0,ao as J0,ez as M,bK as Y0,eA as v,eB as m,c7 as _,ci as ea,X as aa,eC as q_}from"./index-BeAhXwae.js";import{A as ca}from"./a-large-small-CCJbivJB.js";import{A as ta,C as oa,G as da,M as na,P as g,S as ha,a as ia,T as ya,U as ra,W as ka}from"./wallet-cards-Hfikexmn.js";import{A as pa}from"./at-sign-BpRvqAQI.js";import{a as sa,C as la,c as L,D as ua,f as Ma,E as va,b as ma,d as x,F as _a,L as w,e as ga,M as La}from"./message-square-text-42zfcaLO.js";import{C as xa}from"./copy-BywnwlHN.js";import{H as wa}from"./hash-BQl75WLf.js";import{I as fa}from"./inbox-BMxFzv7J.js";import{M as Ia}from"./minus-vbx9q5AE.js";import{P as Ca,T as ba}from"./tags-dgsPPBjR.js";import{R as Na,S as $a}from"./square-DTB79BvA.js";import{R as qa,U as f}from"./user-round-check-C5Iux98g.js";import{R as za}from"./repeat-DBbPJ4Vq.js";import{R as Sa}from"./reply-DlcWrPL1.js";import{S as Aa}from"./sprout-Beunj00B.js";import{T as Ha}from"./trash-CT37Asdf.js";/**
1
+ import{aA as e,eg as M0,aM as v0,T as m0,bs as _0,eh as g0,ei as L0,$ as x0,be as w0,bi as f0,C as I0,ej as C0,cX as b0,ek as c,el as r,cE as N0,bN as k,x as $0,em as q0,bj as p,cz as z0,aT as S0,bq as A0,cC as H0,en as j0,ab as V0,eo as P0,ep as B0,c$ as F0,d0 as D0,eq as R0,er as T0,es as s,cR as l,et as U0,cs as O0,eu as G0,cp as Z0,ev as W0,ew as E0,ex as X0,ey as u,cj as K0,c6 as Q0,ao as J0,ez as M,bK as Y0,eA as v,eB as m,c7 as _,ci as ea,X as aa,eC as q_}from"./index-f5Lv9kLb.js";import{A as ca}from"./a-large-small-CgWPeKpi.js";import{A as ta,C as oa,G as da,M as na,P as g,S as ha,a as ia,T as ya,U as ra,W as ka}from"./wallet-cards-CSdWOmJE.js";import{A as pa}from"./at-sign-BottTo2X.js";import{a as sa,C as la,c as L,D as ua,f as Ma,E as va,b as ma,d as x,F as _a,L as w,e as ga,M as La}from"./message-square-text-BxquqPhA.js";import{C as xa}from"./copy-aC0WUVtq.js";import{H as wa}from"./hash-BcaWmkw5.js";import{I as fa}from"./inbox-D9hID-rO.js";import{M as Ia}from"./minus-Ziy4LSYD.js";import{P as Ca,T as ba}from"./tags-DV2SSdMK.js";import{R as Na,S as $a}from"./square-BEpRc_fY.js";import{R as qa,U as f}from"./user-round-check-DYkrjHxF.js";import{R as za}from"./repeat-CN4fiG5H.js";import{R as Sa}from"./reply-BfWgvH7y.js";import{S as Aa}from"./sprout-BKiwQsGn.js";import{T as Ha}from"./trash-CpnxYen-.js";/**
2
2
  * @license lucide-react v0.553.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as a}from"./index-BeAhXwae.js";const t=({children:e,...s})=>a.jsx("div",{className:"size-full",children:a.jsx("div",{className:"relative mx-auto flex h-full max-w-page flex-col",...s,children:e})});export{t as M};
1
+ import{j as a}from"./index-f5Lv9kLb.js";const t=({children:e,...s})=>a.jsx("div",{className:"size-full",children:a.jsx("div",{className:"relative mx-auto flex h-full max-w-page flex-col",...s,children:e})});export{t as M};
@@ -1,4 +1,4 @@
1
- import{aA as e}from"./index-BeAhXwae.js";/**
1
+ import{aA as e}from"./index-f5Lv9kLb.js";/**
2
2
  * @license lucide-react v0.553.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{aA as o}from"./index-BeAhXwae.js";/**
1
+ import{aA as o}from"./index-f5Lv9kLb.js";/**
2
2
  * @license lucide-react v0.553.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.