![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/metras.v32.1/node_modules/sharect/dist/ |
"use strict";var Sharect=function(){function e(){function e(){return new t(b.icon,function(){FB.ui({method:"share",display:"popup",quote:y,href:window.location.href})})}function n(){var e=g.username?" "+g.username+" "+window.location.href:" "+window.location.href;return new t(g.icon,function(){return window.open(g.url+encodeURIComponent(y)+e,"Share","width=550, height=280"),!1})}function o(){var e=document.createElement("style");e.innerHTML=".sharect__icon{fill:"+E+";}",document.body.appendChild(e)}function r(){var t=document.createElement("div"),o=0;v.twitter&&(t.appendChild(n()),o++),v.facebook&&(t.appendChild(e()),o++),k={icons:t,length:o}}function i(){var e=x.getRangeAt(0).getBoundingClientRect(),t=window.pageXOffset||document.documentElement.scrollTop||document.body.scrollTop;return{top:e.top+t-T-S,left:e.left+(e.width-T*k.length)/2}}function c(){var e=i(),t=e.top,n=e.left,o=document.querySelector(".sharect");o.style.top=t+"px",o.style.left=n+"px"}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createElement("div");n.className="sharect",n.style.cssText="line-height:0;position:absolute;background-color:"+C+";border-radius:3px;top:"+e+"px;left:"+t+"px;transition:all .2s ease-in-out;",n.appendChild(k.icons);var o=document.createElement("div");return o.style.cssText="position:absolute;border-left:"+S+"px solid transparent;border-right:"+S+"px solid transparent;border-top:"+S+"px solid "+C+";bottom:-"+(S-1)+"px;left:"+(T*k.length/2-S)+"px;width:0;height:0;",n.appendChild(o),n}function l(){var e=i(),t=e.top,n=e.left,o=s(t,n);document.body.appendChild(o)}function u(){return!!window.getSelection().toString()}function a(){return!!document.querySelector(".sharect")}function d(){x=window.getSelection(),y=x.toString()}function h(e,t){if(Element.prototype.closest)return e.closest(t);var n=e;do{if(n.matches(t))return n;n=n.parentNode}while(null!==n&&n.nodeType===Node.ELEMENT_NODE);return null}function f(){var e=window.getSelection().baseNode.parentNode;return N.some(function(t){return h(e,t)})}function p(){window.addEventListener("mouseup",function(){setTimeout(function(){if(a()){if(u()&&f())return d(),void c();document.querySelector(".sharect").remove()}u()&&f()&&(d(),l())},10)},!1)}function w(e){return v.twitter=void 0===e.twitter?v.twitter:e.twitter,v.facebook=void 0===e.facebook?v.facebook:e.facebook,g.username=void 0===e.twitterUsername?g.username:e.twitterUsername,C=e.backgroundColor||C,E=e.iconColor||E,N=e.selectableElements||N,this}function m(){return o(),r(),p(),this}var v={twitter:!0,facebook:!1},g={username:"",url:"https://twitter.com/intent/tweet?text=",icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="sharect__icon"><path d="M8.2,20.2c6.5,0,11.7-5.2,11.8-11.6c0-0.1,0-0.1,0-0.2c0-0.2,0-0.4,0-0.5c0.8-0.6,1.5-1.3,2.1-2.2c-0.8,0.3-1.6,0.6-2.4,0.7c0.9-0.5,1.5-1.3,1.8-2.3c-0.8,0.5-1.7,0.8-2.6,1c-1.6-1.7-4.2-1.7-5.9-0.1c-1.1,1-1.5,2.5-1.2,3.9C8.5,8.7,5.4,7.1,3.3,4.6c-1.1,1.9-0.6,4.3,1.3,5.5c-0.7,0-1.3-0.2-1.9-0.5l0,0c0,2,1.4,3.7,3.3,4.1c-0.6,0.2-1.2,0.2-1.9,0.1c0.5,1.7,2.1,2.8,3.9,2.9c-1.7,1.4-3.9,2-6.1,1.7C3.8,19.5,6,20.2,8.2,20.2"/></svg>'},b={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" enable-background="new 0 0 24 24" width="24" height="24" class="sharect__icon"><path d="M20,2H4C2.9,2,2,2.9,2,4v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2z M18.4,7.4H17c-0.9,0-1,0.3-1,1l0,1.3 h2.1L18,12h-1.9v7h-3.2v-7h-1.2V9.6h1.2V8.1c0-2,0.8-3.1,3.1-3.1h2.4V7.4z"/></svg>'},x="",y="",C="#333",E="#fff",k={},S=5,T=38,N=["body"];return{config:w,init:m}}function t(e,t){var n=document.createElement("div");return n.style.cssText="display:inline-block;margin:7px;cursor:pointer;transition:all .2s ease-in-out;",n.innerHTML=e,n.onclick=t,n.onmouseover=function(){this.style.transform="scale(1.2)"},n.onmouseout=function(){this.style.transform="scale(1)"},n}return e}();