HEX
Server: Apache
System: Linux host.fiblib.com 5.14.0-570.58.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 29 06:24:11 EDT 2025 x86_64
User: scientificreligi (1062)
PHP: 8.0.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //home/scientificreligi/www/wp-content/plugins/elfsight-social-icons-cc/assets/elfsight-block.js
/*
    Social Icons
    Version: 1.7.1
    Release date: Fri Dec 25 2020

    https://elfsight.com

    Copyright (c) 2020 Elfsight, LLC. ALL RIGHTS RESERVED
*/

!function(wp,$){"use strict";let IconBlock=function(e){return wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"20",height:"20",viewBox:"0 0 20 20",class:"dashicon"},[wp.element.createElement("path",{id:"a",d:"M8.945 13.92C9.078 16.794 6.927 20 3.131 20A5.75 5.75 0 0 1 0 19.078a4.112 4.112 0 0 0 3.023-.847 2.04 2.04 0 0 1-1.91-1.42c.324.058.631.041.922-.034A2.06 2.06 0 0 1 .39 14.743c.274.157.59.249.922.257a2.042 2.042 0 0 1-.63-2.733A5.792 5.792 0 0 0 4.9 14.402a2.045 2.045 0 0 1 3.489-1.86 3.892 3.892 0 0 0 1.295-.499c-.15.482-.481.88-.897 1.13.416-.05.806-.158 1.171-.324-.265.423-.614.78-1.013 1.071zm.748-12.026c.15.373.224.764.24 1.254.017.473.025.64.025 1.835 0 1.196 0 1.354-.024 1.836-.017.49-.092.88-.241 1.254-.15.382-.35.69-.64.98-.282.29-.598.49-.98.64a4.008 4.008 0 0 1-1.254.24c-.473.017-.64.025-1.836.025-1.196 0-1.353 0-1.835-.024-.49-.017-.88-.092-1.254-.241a2.746 2.746 0 0 1-.98-.64 2.676 2.676 0 0 1-.64-.98 4.008 4.008 0 0 1-.24-1.254c-.017-.473-.026-.64-.026-1.836 0-1.196 0-1.353.025-1.835.017-.49.092-.88.241-1.254.15-.382.349-.69.64-.98.282-.291.598-.49.98-.64a4.008 4.008 0 0 1 1.254-.24c.473-.017.64-.026 1.835-.026 1.196 0 1.354 0 1.836.025.49.017.88.092 1.254.241.382.15.69.349.98.64.29.282.49.598.64.98zM8.77 6.769c.016-.465.025-.606.025-1.786 0-1.179 0-1.32-.025-1.785-.025-.457-.1-.715-.166-.88a1.63 1.63 0 0 0-.374-.574 1.494 1.494 0 0 0-.573-.374c-.166-.066-.424-.14-.88-.166-.466-.016-.607-.025-1.786-.025-1.18 0-1.32 0-1.786.025-.457.025-.714.1-.88.166a1.63 1.63 0 0 0-.574.374c-.174.166-.282.34-.373.573-.067.166-.141.424-.166.88-.017.466-.025.607-.025 1.786 0 1.18 0 1.321.025 1.786.025.457.1.714.166.88.091.225.2.4.373.574a1.5 1.5 0 0 0 .574.373c.166.067.423.142.88.166.465.017.606.025 1.786.025 1.18 0 1.32 0 1.785-.025.457-.024.715-.1.88-.166.225-.091.4-.199.574-.373a1.51 1.51 0 0 0 .374-.573c.066-.167.14-.424.166-.88zM7.483 3.05a.565.565 0 1 1 0-1.13.565.565 0 0 1 0 1.13zm-2.5-.64a2.586 2.586 0 0 1 2.583 2.583 2.58 2.58 0 0 1-2.583 2.583A2.58 2.58 0 0 1 2.4 4.992a2.586 2.586 0 0 1 2.583-2.583zm0 3.986a1.41 1.41 0 1 0-1.412-1.412c0 .781.632 1.412 1.412 1.412zm7.642-.996V3.372h1.486v-.789C14.111 1.221 15.133 0 16.387 0h1.636v2.027h-1.636c-.183 0-.39.216-.39.54v.805h2.026V5.4h-2.026v4.568h-1.894V5.399h-1.478zm7.367 7.973c-.042.972-.673 2.3-1.902 3.987-1.263 1.759-2.334 2.64-3.215 2.64-.54 0-1.005-.54-1.378-1.611-.25-.98-.499-1.969-.748-2.949-.282-1.071-.581-1.611-.897-1.611-.066 0-.315.158-.73.473l-.44-.606c.456-.432.913-.864 1.361-1.296.615-.564 1.072-.863 1.379-.897.723-.074 1.171.457 1.337 1.595.183 1.23.307 1.985.374 2.284.208 1.013.44 1.528.69 1.528.199 0 .49-.332.88-.988.39-.656.598-1.163.623-1.503.058-.573-.15-.856-.623-.856-.225 0-.457.058-.69.166.457-1.603 1.33-2.383 2.625-2.342.955.025 1.412.69 1.354 1.985z"})])};if(void 0===wp.components||void 0===wp.blocks||void 0===wp.element||void 0===wp.i18n)return!1;const{Component:Component}=window.React,{__:__}=wp.i18n,el=wp.element.createElement,registerBlockType=wp.blocks.registerBlockType,ServerSideRender=wp.components.ServerSideRender,restApiUrl=window.wpApiSettings.root+"/elfsight-social-icons/admin",restApiNonce=window.wpApiSettings.nonce;let initTimeout;function initWidget(){clearTimeout(initTimeout),initTimeout=setTimeout(function(){const widgets=document.querySelectorAll("[data-elfsight-social-icons-options]");Array.prototype.slice.call(widgets).forEach(function(widget){const options=widget.getAttribute("data-elfsight-social-icons-options"),data=JSON.parse(decodeURIComponent(options));eval("eappsSocialIcons(widget, data)"),widget.removeAttribute("data-elfsight-social-icons-options"),widget.removeAttribute("data-elfsight-social-icons-version"),widget.closest(".elfsight-block-widget-container").classList.add("elfsight-block-widget-initialized")})},1500)}async function getWidgets(){const e=await $.ajax({type:"GET",url:restApiUrl+"/widgets/list/",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",restApiNonce)}});return e.status?[e.data,e.data.reduce(function(e,t){return e[t.id]=t,e},{})]:[]}function getWidgetId(e){let t;return e.some(function(e){return"1"===e.active&&(t=parseInt(e.id),!0)}),t}class Widget extends Component{componentDidMount(){initWidget()}componentDidUpdate(){initWidget()}render(){const{id:e}=this.props;return e?el("div",{className:"elfsight-block-widget-container"},el(ServerSideRender,{block:"elfsight-social-icons/block",attributes:{id:e}}),el("div",{className:"elfsight-block-widget-placeholder"},el(IconBlock,{}),el("span",{},"Social Icons"))):null}}class Button extends Component{render(){const{href:e,className:t,text:i}=this.props,s=document.location.origin+document.location.pathname.replace("post.php","admin.php")+"?page=elfsight-social-icons#";return el("a",{href:s+e,target:"_blank",className:t},i)}}class WidgetSelect extends Component{constructor(){super(),this.state={widgets:[]}}setWidget(e){e.preventDefault();const{setAttributes:t}=this.props,i=e.target.querySelector("option:checked");t({id:parseInt(i.value)})}componentDidMount(){const{id:e,setAttributes:t}=this.props;getWidgets().then(i=>{const[s,o]=i;this.setState({widgets:s});const n=!(!o[e]||"1"!==o[e].active);t(!n&&o?{id:getWidgetId(s),exist:!0}:{id:e,exist:n})})}render(){const{widgets:e}=this.state,{id:t}=this.props;return e.length>0?el("div",{className:"components-base-control"},el("div",{className:"components-base-control__field"},el("select",{className:"components-select-control__input",id:"elfsight-social-icons-block-control-id",value:t,onChange:this.setWidget.bind(this)},e.map(({id:e,name:t})=>el("option",{value:e},t))))):null}}registerBlockType("elfsight-social-icons/block",{title:"Social Icons",description:"Increasing followers and your social networks subscribers is fast and easy with the stylish and creative Elfsight Social Icons plugin",icon:{src:IconBlock},category:"widgets",keywords:["Social Icons","Elfsight"],supports:{html:!1},attributes:{id:{type:"number"},exist:{type:"bool",default:!1}},edit:function(e){const{attributes:{id:t,exist:i},setAttributes:s}=e;return getWidgets().then(e=>{const[o,n]=e;s(!i&&o?{id:getWidgetId(o),exist:!0}:{id:t,exist:i})}),el(wp.element.Fragment,{},el(wp.editor.InspectorControls,{},el(wp.components.PanelBody,{className:"elfsight-block-panel",title:"Select widget"},el(WidgetSelect,{id:t,setAttributes:function(t){e.setAttributes(t)}}),i?el("div",{className:"elfsight-block-panel-group"},el(Button,{href:"/edit-widget/"+t,className:"components-button is-button is-default is-large elfsight-block-panel-button",text:__("Edit Widget")}),el(Button,{href:"/add-widget/",className:"elfsight-block-panel-link",text:__("Create new widget")})):el("div",{className:"elfsight-block-panel-group"},el("span",{},__("No widgets yet")),el(Button,{href:"/add-widget/",className:"components-button is-button is-default is-primary is-large elfsight-block-panel-button",text:__("Create Widget")})))),i?el(Widget,{id:t,exist:i}):null,i?null:el("div",{className:"elfsight-block-form"},el("div",{className:"elfsight-block-form-header"},el(IconBlock,{}),el("span",{},"Social Icons")),el("div",{className:"elfsight-block-form-text"},__("Increasing followers and your social networks subscribers is fast and easy with the stylish and creative Elfsight Social Icons plugin"),el("br"),el("strong",{},__("Let's create your first widget!"))),el(Button,{href:"/add-widget/",className:"components-button is-button is-default is-primary is-large elfsight-block-form-button",text:__("Create Widget")})))},save:function(){return null}})}(wp,jQuery);