Linux webm002.cluster126.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
/
home
/
a
/
r
/
i
/
ariannadhf
/
www
/
wp-content
/
plugins
/
simple-history
/
build
/
/home/a/r/i/ariannadhf/www/wp-content/plugins/simple-history/build/index-admin-bar.js
(()=>{"use strict";var e={n:t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return e.d(i,{a:i}),i},d:(t,i)=>{for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.React,i=window.wp.domReady;var n=e.n(i);const r=window.wp.element,s=window.wp.apiFetch;var a=e.n(s);const l=window.wp.hooks,o=window.wp.i18n,m=window.wp.url;function c(e){var t,i,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(i=c(e[t]))&&(n&&(n+=" "),n+=i)}else for(i in e)e[i]&&(n&&(n+=" "),n+=i);return n}function d(){for(var e,t,i=0,n="",r=arguments.length;i<r;i++)(e=arguments[i])&&(t=c(e))&&(n&&(n+=" "),n+=t);return n}const u=d;Object.defineProperty;var p=new Map,y=new WeakMap,v=0;function E(e,t,i={},n=undefined){if(void 0===window.IntersectionObserver&&void 0!==n){const r=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof i.threshold?i.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),()=>{}}const{id:r,observer:s,elements:a}=function(e){const t=function(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(i=e.root,i?(y.has(i)||(v+=1,y.set(i,v.toString())),y.get(i)):"0"):e[t]}`;var i})).toString()}(e);let i=p.get(t);if(!i){const n=new Map;let r;const s=new IntersectionObserver((t=>{t.forEach((t=>{var i;const s=t.isIntersecting&&r.some((e=>t.intersectionRatio>=e));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(i=n.get(t.target))||i.forEach((e=>{e(s,t)}))}))}),e);r=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),i={id:t,observer:s,elements:n},p.set(t,i)}return i}(i),l=a.get(e)||[];return a.has(e)||a.set(e,l),l.push(t),s.observe(e),function(){l.splice(l.indexOf(t),1),0===l.length&&(a.delete(e),s.unobserve(e)),0===a.size&&(s.disconnect(),p.delete(r))}}t.Component;const w=window.wp.date;function h(e){const{children:i,className:n}=e,r=d("SimpleHistoryLogitem__inlineDivided",n);return(0,t.createElement)(t.Fragment,null," ",(0,t.createElement)("span",{className:r},i))}function g({event:e}){const[i,n]=(0,r.useState)((()=>(0,w.humanTimeDiff)(e.date_local)));return(0,r.useEffect)((()=>{const t=setInterval((()=>{n((0,w.humanTimeDiff)(e.date_local))}),1e3);return()=>clearInterval(t)}),[e.date_local]),(0,t.createElement)(h,{className:"SimpleHistoryLogitem__permalink SimpleHistoryLogitem__when"},(0,t.createElement)("div",null,i))}function f({event:e}){const{initiator_data:i}=e;let n;switch(e.initiator){case"wp_user":n=i.user_display_name||i.user_login;break;case"web_user":n=(0,o.__)("Anonymous web user","simple-history");break;case"wp_cli":n=(0,o.__)("WP-CLI","simple-history");break;case"wp":n=(0,o.__)("WordPress","simple-history");break;case"other":n=(0,o.__)("Other","simple-history");break;default:n=e.initiator}return(0,t.createElement)(h,null,(0,t.createElement)("strong",null,n))}const _=e=>{var i;const{event:n,variant:r="default"}=e,s=(null!==(i=window.ajaxurl)&&void 0!==i?i:"").replace("admin-ajax.php","");if("sidebar"===r){const e=`${s}revision.php?revision=${n.context.post_revision_id}`,i=n.context.post_revision_id?(0,t.createElement)("div",{className:"sh-GutenbergPanel-event__meta-revision"},(0,t.createElement)("a",{href:e},"View revision")):null;return(0,t.createElement)("li",{className:"sh-GutenbergPanel-event"},(0,t.createElement)("div",{style:{display:"flex",flexDirection:"column",gap:"4px"}},(0,t.createElement)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"4px"}},(0,t.createElement)(f,{event:n}),(0,t.createElement)("span",null,"•"),(0,t.createElement)("a",{href:n.link,title:(0,o.__)("View event details","simple-history")},(0,t.createElement)(g,{event:n}))),i))}return(0,t.createElement)("li",{role:"group",id:"wp-admin-bar-simple-history-subnode-1"},(0,t.createElement)("a",{className:"ab-item SimpleHistory-adminBarEventsList-item",role:"menuitem",href:n.link,title:(0,o.__)("View event details","simple-history")},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-dot"}),(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content"},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-meta"},(0,t.createElement)(f,{event:n}),(0,t.createElement)(g,{event:n})),(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-message"},(0,t.createElement)("p",null,n.message),n.subsequent_occasions_count>1&&(0,t.createElement)("p",{className:"SimpleHistory-adminBarEventsList-item-content-message-occasions"},"+",n.subsequent_occasions_count-1," ",(0,o.__)("similar events","simple-history"))))))},N=e=>{const{events:i,isLoading:n,variant:r="default",maxEvents:s=null}=e;if(n)return null;if(0===i.length)return null;const a=s?i.slice(0,s):i,l=s&&i.length>s,m="sidebar"===r?"sh-GutenbergPanel-events":"SimpleHistory-adminBarEventsList";return(0,t.createElement)("ul",{className:m},a.map((e=>(0,t.createElement)(_,{key:e.id,event:e,variant:r}))),l&&(0,t.createElement)("li",{className:"sh-GutenbergPanel-more"},`+${i.length-s} ${(0,o.__)("more events","simple-history")}`))},b=()=>(0,t.createElement)(t.Fragment,null,(0,t.createElement)("ul",{className:"SimpleHistory-adminBarEventsList SimpleHistory-adminBarEventsList--skeleton"},[1,2,3,4,5].map((e=>(0,t.createElement)(S,{key:e,className:"SimpleHistory-adminBarEventsList-item"},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-dot"}),(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content"},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-meta"},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-meta-skeleton"})),(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-message"},(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-item-content-message-skeleton"})))))))),S=e=>{const{children:i,href:n,className:r,title:s}=e,a=u("ab-item",{"ab-empty-item":!n,[r]:r}),l=n?"a":"div";return(0,t.createElement)("li",{role:"group",id:"wp-admin-bar-simple-history-subnode-1"},(0,t.createElement)(l,{className:a,role:"menuitem",href:n,title:s},i))},H=()=>{const[e,i]=(0,r.useState)(!1),[n,s]=(0,r.useState)([]),[c,d]=(0,r.useState)(null),[p,y]=(0,r.useState)("all"),v=window.simpleHistoryAdminBar.adminPageUrl,w=window.simpleHistoryAdminBar.viewSettingsUrl,h=Boolean(Number(window.simpleHistoryAdminBar.currentUserCanViewHistory)),g=Number(window.simpleHistoryAdminBar.currentPostId||0),f=window.simpleHistoryAdminBar.currentPostTitle||"",_="this-page"===p&&g>0,S=(0,l.applyFilters)("simpleHistory.adminBar.showThisPageTeaser",_,{currentPostId:g,currentPostTitle:f}),H=(0,l.applyFilters)("simpleHistory.adminBar.viewFullHistoryUrl",v,{filterMode:p,currentPostId:g,currentPostTitle:f}),B=h?(0,t.createElement)("a",{href:H,className:"SimpleHistory-adminBarEventsList-actions-settings"},(0,o.__)("View full history","simple-history")):null,{ref:k,inView:M}=function({threshold:e,delay:i,trackVisibility:n,rootMargin:r,root:s,triggerOnce:a,skip:l,initialInView:o,fallbackInView:m,onChange:c}={}){var d;const[u,p]=t.useState(null),y=t.useRef(c),[v,w]=t.useState({inView:!!o,entry:void 0});y.current=c,t.useEffect((()=>{if(l||!u)return;let t;return t=E(u,((e,i)=>{w({inView:e,entry:i}),y.current&&y.current(e,i),i.isIntersecting&&a&&t&&(t(),t=void 0)}),{root:s,rootMargin:r,threshold:e,trackVisibility:n,delay:i},m),()=>{t&&t()}}),[Array.isArray(e)?e.toString():e,u,s,r,a,l,n,m,i]);const h=null==(d=v.entry)?void 0:d.target,g=t.useRef(void 0);u||!h||a||l||g.current===h||(g.current=h,w({inView:!!o,entry:void 0}));const f=[p,v.inView,v.entry];return f.ref=f[0],f.inView=f[1],f.entry=f[2],f}({});(0,r.useEffect)((()=>{!1!==M&&null===c&&d(Date.now())}),[M,c]),(0,r.useEffect)((()=>{null===c||S||d(Date.now())}),[p]),(0,r.useEffect)((()=>{null!==c&&async function(){i(!0);const e=(0,l.applyFilters)("simpleHistory.adminBar.eventsQueryParams",{per_page:5,dates:"lastdays:7"},{filterMode:p,currentPostId:g});try{const t=await a()({path:(0,m.addQueryArgs)("/simple-history/v1/events",e),parse:!1}),i=await t.json();s(i)}catch(e){console.error("Error loading events:",e)}finally{i(!1)}}()}),[c,g,p]);const L=(0,t.createElement)("button",{className:"SimpleHistory-adminBarEventsList-actions-reload",onClick:()=>{d(Date.now())},disabled:e},(0,t.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNDgwLTE2MHEtMTMzIDAtMjI2LjUtOTMuNVQxNjAtNDgwcTAtMTMzIDkzLjUtMjI2LjVUNDgwLTgwMHE4NSAwIDE0OSAzNC41VDc0MC02NzF2LTEyOWg2MHYyNTRINTQ2di02MGgxNjhxLTM4LTYwLTk3LTk3dC0xMzctMzdxLTEwOSAwLTE4NC41IDc1LjVUMjIwLTQ4MHEwIDEwOSA3NS41IDE4NC41VDQ4MC0yMjBxODMgMCAxNTItNDcuNVQ3MjgtMzkzaDYycS0yOSAxMDUtMTE1IDE2OXQtMTk1IDY0WiIvPjwvc3ZnPg==",alt:""}),(0,o.__)("Reload","simple-history")),I=(0,t.createElement)("a",{href:w},(0,o.__)("Settings","simple-history")),T=g>0?(0,t.createElement)("div",{className:"SimpleHistory-adminBarQuickView-filterToggle"},(0,t.createElement)("button",{className:u("SimpleHistory-adminBarQuickView-filterToggle-button",{"is-active":"all"===p}),onClick:()=>y("all")},(0,o.__)("All history","simple-history")),(0,t.createElement)("button",{className:u("SimpleHistory-adminBarQuickView-filterToggle-button",{"is-active":"this-page"===p}),onClick:()=>y("this-page")},(0,o.__)("This page","simple-history"))):null,V=(0,l.applyFilters)("simpleHistory.adminBar.infoText",(0,o.__)("Events from the last 7 days","simple-history"),{filterMode:p,currentPostId:g,currentPostTitle:f}),A=!e&&0===n.length,D=(0,t.createElement)("li",null,(0,t.createElement)("div",{className:"SimpleHistory-adminBarQuickView-premiumTeaser"},(0,t.createElement)("p",{className:"SimpleHistory-adminBarQuickView-premiumTeaser-heading"},(0,o.__)("History for this page","simple-history")),(0,t.createElement)("p",{className:"SimpleHistory-adminBarQuickView-premiumTeaser-description"},(0,o.__)("Filter the log to show only events for the page you're viewing.","simple-history")),(0,t.createElement)("a",{href:"https://simple-history.com/add-ons/premium/?utm_source=wpadmin&utm_medium=adminbar&utm_campaign=this-page-filter",className:"SimpleHistory-adminBarQuickView-premiumTeaser-link",target:"_blank",rel:"noopener noreferrer"},(0,o.__)("Available with Premium","simple-history"),(0,t.createElement)("span",{"aria-hidden":"true"}," →"))));return(0,t.createElement)("li",{ref:k},(0,t.createElement)("ul",null,g>0?(0,t.createElement)("li",null,(0,t.createElement)("div",{className:"SimpleHistory-adminBarQuickView-tabs"},T)):null,S?D:(0,t.createElement)(t.Fragment,null,(0,t.createElement)("li",null,(0,t.createElement)("div",{className:"SimpleHistory-adminBarQuickView-infoText"},V)),e?(0,t.createElement)(b,null):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(N,{events:n,isLoading:e}),A&&(0,t.createElement)("li",null,(0,t.createElement)("div",{className:"SimpleHistory-adminBarQuickView-emptyState"},(0,o.__)("No events found.","simple-history"))))),(0,t.createElement)("li",null,(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-actions"},B,(0,t.createElement)("div",{className:"SimpleHistory-adminBarEventsList-actions-right"},L,I)))))};n()((()=>{const e=document.getElementById("wp-admin-bar-simple-history-react-root-group");e&&"function"==typeof r.createRoot&&(0,r.createRoot)(e).render((0,t.createElement)(H,null))}))})();