Server : LiteSpeed System : Linux server 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : alsaif ( 1057) PHP Version : 7.4.33 Disable Function : show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/alsaif/domains/alsaif.group/private_html/plugins/content/powrshortcodes/ |
!function(){function D(e,t,o,n){var r=new Date;r.setTime(r.getTime()+24*o*60*60*1e3);r="expires="+r.toUTCString();n=n||"samesite=None;",document.cookie=e+"="+t+";"+r+";"+n+"path=/;Secure"}function U(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),n=0;n<o.length;n++){for(var r=o[n];" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""}var j,p,o,z="https://www.powr.io";function G(){return function(){}}function Y(e,t,o){e.addEventListener?e.addEventListener(t,o,!1):e.attachEvent&&e.attachEvent("on"+t,o)}function m(e,t,o,n){var r=null==window.Shopify?0:2e3;setTimeout(()=>{t.appendChild(e),POWR_RECEIVERS.push({receiver:e.contentWindow,url:o,data_url:n})},r)}function X(e,t,o,n,r,i){var a=e;G()("Match:",e);var l=a.match(/powr-[^\s\]]*/i),e=a.match(/id="[^"]*"/i),e='<div class="'+l+'" '+(e=null==(e=null==(e=null==(e=null==(e=null==e?a.match(/id='[^']*'/i):e)&&null!=(e=a.match(/id=[^\]]*/i))?e[0].replace("id=",'id="')+'"':e)?a.match(/label="[^"]*"/i):e)?a.match(/label='[^']*'/i):e)?"":e)+"></div>";return G()("Result is:"+e),e}function F(e){for(var t={},o=e.search("\\?"),n=(e=e.substr(o+1)).split("&"),r=0;r<n.length;r++){var i,a=n[r].split("=");void 0===t[a[0]]?t[a[0]]=a[1]:"string"==typeof t[a[0]]?(i=[t[a[0]],a[1]],t[a[0]]=i):t[a[0]].push(a[1])}return t}function K(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf("msie")&&parseInt(e.split("msie")[1])}function Q(e){return-1<["popup","sales-popup","sales-pop","exit-popup","exit-intent-popup","overlay-popup","onclick-popup","popup-form","email-popup","coupon-box","email-subscription-popup","popup-notification","full-screen-popup","survey-popup","splash-popup","popup-maker","slide-in","modal-popup"].indexOf(e)}function Z(e){for(var t=!1,o=e;o&&o!==document;o=o.parentNode)if(null!=o.classList&&o.classList.contains("powr-ignore")){t=!0;break}return t}function $(){try{return window.top.location.href}catch(e){return G()("Couldn't get page url:",e),""}}function g(o){var n=new XMLHttpRequest;n.open("GET",POWR_RECEIVERS[o].data_url,!0),n.withCredentials=!0,n.onreadystatechange=function(){var e,t;n.readyState!=XMLHttpRequest.DONE&&4!=n.readyState||(200==n.status?((e=JSON.parse(n.responseText)).iframe_index=o,POWR_RECEIVERS[o].data=e,t=setInterval(function(){POWR_RECEIVERS[o].loaded&&(POWR_RECEIVERS[o].receiver.postMessage(JSON.stringify({message:"loadView",data:e}),POWR_RECEIVERS[o].url),clearInterval(t))},10)):G()("Error receiving POWr App Data"))},n.send()}function a(e){switch(e.scrollTo){case"top":r(0,e.scrollSpeed);break;case"bottom":t=e.scrollSpeed,r((document.documentElement.scrollHeight||document.body.scrollHeight)-window.innerHeight+50,t);break;case"text":!function(e,t){e=function(e){for(var t=document.querySelectorAll("body, body *"),o=0;o<t.length;o++)for(var n=t[o],r=n.childNodes,i=0;i<r.length;i++){var a=r[i];if(3==a.nodeType)if(-1<a.nodeValue.search(e))return n}return!1}(e);if(!e)return;r(e.getBoundingClientRect().top+window.scrollY-150,t)}(e.scrollToText,e.scrollSpeed);break;case"anchor":!function(e,t){e=document.getElementById(e);if(!e)return;r(e.getBoundingClientRect().top+window.scrollY-150,t)}(e.scrollToAnchor,e.scrollSpeed);break;case"app":t=document.querySelector('iframe[src="'+e.url+'"]');if(t){if(e.ios){window.scrollTo(0,t.offsetTop-50);break}r(t.offsetTop-50,e.scrollSpeed);break}window.scrollBy(0,e.distance)}var t}function r(e,t,o){var n=document.documentElement.scrollTop||document.body.scrollTop;n!==o&&(window.requestAnimationFrame(function(){r(e,t,n)}),n<e?window.scrollTo(0,n+(e-n)/t):window.scrollTo(0,n-(n-e)/t))}function e(e){G()("Settings got a message!",e);try{var t=JSON.parse(e.data);if("viewLoaded"==t.message){G()("Settings received view loaded");var o=t.data.iframe_index;POWR_RECEIVERS[o].loaded=!0;var n=t.data.cookiesToGet;0<n.length&&(POWR_RECEIVERS[o].cookies=n.map(function(e){return{cname:e,value:U(e)}}),POWR_RECEIVERS[o].receiver.postMessage(JSON.stringify({message:"cookiesSent",cookies:POWR_RECEIVERS[o].cookies}),POWR_RECEIVERS[o].url))}else if("updateSize"==t.message){"undefined"!=typeof gadgets&&void 0!==gadgets.window&&void 0!==gadgets.window.adjustHeight&&gadgets.window.adjustHeight(t.data.height);var o=t.data.iframe_index,r=document.querySelectorAll('[powrindex="'+o+'"]')[0];if(r&&(r.height=t.data.height+"px",r.style.height=t.data.height+"px",r.style.display="inline",null!=t.data.postCss))for(var i in t.data.postCss)r.style[i]=t.data.postCss[i];t.data.postMessage&&"scrollTo"==t.data.postMessage.messageType?a(t.data.postMessage):t.data.postMessage&&"deliverHashedData"===t.data.postMessage.messageType&&(n=t.data.postMessage.data,G()("HASHED DATA RECEIVED",n),__sharethis__&&"function"==typeof __sharethis__.hem&&__sharethis__.hem(n)),G()("Updating size of el",r)}else"loadMe"==t.message?(G()("Settings received loadMe request"),o=t.data.iframe_index,null!=POWR_RECEIVERS[o]&&null!=POWR_RECEIVERS[o].data&&POWR_RECEIVERS[o].receiver.postMessage(JSON.stringify({message:"loadView",data:POWR_RECEIVERS[o].data}),POWR_RECEIVERS[o].url)):"setCookie"===t.message&&D(t.cname,t.value,t.exdays)}catch(e){}}function ee(){return window.CookieControl&&window.CookieControl.isPOWrAllowed&&window.CookieControl.isPOWrAllowed()}function te(e,t,o,n,r,i,a){var l,s,d,c=document.createElement("iframe");function u(){var e={message:"loaded",data:{iframe_index:s,parent_window_width:window.innerWidth||document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth,parent_window_height:window.innerHeight||document.documentElement.clientHeight||document.getElementsByTagName("body")[0].clientHeight}};G()("POWr.js sending load message to url"+d+"; iframe:",l),l.contentWindow.postMessage(JSON.stringify(e),d)}c.src=r,c.setAttribute("powrindex",o),c.width="100%",c.height=c.style.height="0px",Q(t)||(c.style.transition="height 0.3s",c.style.webkitTransition="height 0.3s"),c.style.display="block",c.frameBorder="0",c.style.visibility="visible",c.setAttribute("webkitallowfullscreen",""),c.setAttribute("mozallowfullscreen",""),c.setAttribute("allowfullscreen",""),"ecwid"==n&&(e.style.minWidth="280px"),s=o,d=r,(l=c).addEventListener?l.addEventListener("load",u):l.attachEvent("onload",u),"async"==a&&(g(o),function t(o,e){e.addEventListener&&(e.addEventListener("powrPingListener",function(){return POWR_RECEIVERS[o].listenerConnected=!0},!1),POWR_RECEIVERS[o].ping_interval=setInterval(function(){var e=document.querySelectorAll('[powrindex="'+o+'"]')[0];e&&(POWR_RECEIVERS[o].listenerConnected=!1,e.dispatchEvent(p),!1===POWR_RECEIVERS[o].listenerConnected&&(console.log("POWr Lost connection. Reconnecting"),clearInterval(POWR_RECEIVERS[o].ping_interval),POWR_RECEIVERS[o].receiver=e.contentWindow,g(o),t(o,e)))},2e3))}(o,c)),"complete"===document.readyState||Q(t)?m(c,e,r,i):Y(window,"load",()=>{m(c,e,r,i)})}"undefined"==typeof loadPowr?(function(){for(var e=document.querySelectorAll(".powrLoaded"),t=0;t<e.length;t++){var o=e[t];o.innerHTML="",o.classList.remove("powrLoaded")}}(),window.addEventListener?window.addEventListener("message",e):window.attachEvent("onmessage",e),j=0,POWR_RECEIVERS=[],(p=document.createEvent("Event")).initEvent("powrPingListener",!0,!0),loadPowr=function(){if(document.body){for(var t=null,e=null,o=null,n=!1,r=document.querySelectorAll("script"),i=0;i<r.length;i++){var a=r[i],l=a.getAttribute("src");if(null!=l){var s=a.getAttribute("powr-token"),d=a.getAttribute("external-type");(o=F(l))&&o.loadApp&&o.uniqueId&&!a.getAttribute("auto-add")&&((v=document.createElement("div")).setAttribute("class","powr-"+o.loadApp),v.setAttribute("id",o.uniqueId),document.body.appendChild(v),a.setAttribute("auto-add",!0));var c,d=d||a.getAttribute("platform"),u=a.getAttribute("template-powr-token"),p=a.getAttribute("powr-load");if(null==p&&(p="sync"),K()&&K()<=9&&(p="sync"),n=a.getAttribute("demo-mode"),null!=s?t=s:-1<l.search("powr-token")&&void 0!==o["powr-token"]&&0<o["powr-token"].length&&(t=o["powr-token"]),null!=d?e=d:-1<l.search("external-type")?null!=(c=(o=F(l))["external-type"])&&0<c.length&&(e=c):-1<l.search("platform")&&null!=(c=(o=F(l)).platform)&&0<c.length&&(e=c),"ecwid"==e&&(p="sync"),null!=t||null!=e)break}}if(null==t||0==t.length)try{t=window.top.location.host}catch(e){t=""}"wix-oauth"==e&&document.querySelectorAll("head .powr-popup, head .powr-chat").forEach(function(e){document.body.append(e)});for(var m,g,w,E,f=/\[powr-[^\]]*\]/gi,h=/\[powr-[^\s\]]*/gi,R=document.querySelectorAll("a"),i=0;i<R.length;i++)Z(C=R[i])||(m=C.previousSibling,g=C.nextSibling,m&&g&&C.getAttribute("href")&&-1<C.getAttribute("href").search("tel")&&3==m.nodeType&&3==g.nodeType&&m.nodeValue.match(h)&&-1<g.nodeValue.search("]")&&(w=C.innerHTML,E=m.nodeValue.match(/powr-[^\s\]]*/gi)[0],(I=document.createElement("div")).innerHTML='<div class="'+E+'" label="'+w+'"></div>',m.parentNode.removeChild(m),g.parentNode.removeChild(g),C.parentNode.replaceChild(I,C)));for(var v,y,R=document.querySelectorAll("body, body *"),i=0;i<R.length;i++){var C,S=(C=R[i]).childNodes;if(!Z(C))for(var _=0;_<S.length;_++){var b,O,I,P=S[_];3!=P.nodeType||(O=(b=P.nodeValue).replace(f,X))!=b&&((I=document.createElement("div")).innerHTML=O,C.replaceChild(I,P))}}0==document.querySelectorAll("#powrIframeLoader").length&&(v=document.createElement("div"),y=document.getElementsByTagName("base")[0]||document.getElementsByTagName("script")[0],v.id="powrIframeLoader",v.innerHTML="­<style> .powrLoaded iframe { visibility: hidden; } </style>",y.parentNode.insertBefore(v,y));for(var k=document.querySelectorAll("[class*=powr-]"),W=!1,V=!1,i=0;i<k.length;i++){var A=k[i];if(!Z(A)&&!(A instanceof SVGElement||-1<A.className.search("powrLoaded"))){for(var T=A.className.split(/\s+/),_=0;_<T.length;_++)if(0===T[_].toLowerCase().search("powr-")){var L=T[_].toLowerCase().replace("powr-","");break}if(void 0!==L){Q(L)&&(W=!0),"scroll-to-top"!=L&&!Q(L)||(V=!0);var x=A.getAttribute("label");if("weebly_"!=(x=null==x?"":x)){A.className+=" powrLoaded",null==u&&(u="");var N=A.getAttribute("id");null==N&&(N="");var M=A.getAttribute("view-mode"),q="true"==n||"true"==A.getAttribute("demo-mode"),H=z+"/"+L+"/u/"+N;!1===ee()&&(H+="/cookieless"),H+="#platform="+(c||"html");var J,A=encodeURIComponent(x),x=z+"/plugins/"+L+"/cached_view?load="+p+"&index="+j+"&unique_label="+N+"&powr_token="+t+"&user_label="+A+"&demo_mode="+q+"&isCookieAllowed="+ee(),q="https://www.powr.io/plugins/"+L+"/view.json?unique_label="+N+"&powr_token="+t+"&user_label="+A+"&demo_mode="+q+"&isCookieAllowed="+ee();if(null!=e&&(q+=J="&external_type="+e,x+=J),null!=u&&(q+=J="&template_powr_token="+u,x+=J),null!=M&&(q+=M="&view_mode="+M,x+=M),G()("page url IS "+$()),$()&&(q+="&url="+encodeURIComponent($())),document.location.host)var B=document.location.protocol+"//"+document.location.host;else try{var B=document.location.ancestorOrigins[0]}catch(e){B=window.top&&window.top.location&&window.top.location.host?window.top.location.protocol+"//"+window.top.location.host:""}if(q+="&request_url="+encodeURIComponent(B),x+="&request_url="+encodeURIComponent(document.location.href),0==A.length&&(x=H,$()&&(x+="&url="+encodeURIComponent($()))),window.CookieControl&&"function"==typeof window.CookieControl.isPOWrAllowed){H=U("isJimdoCookieSettingsShownBefore");if(!ee()&&!H)return void setTimeout(function(){window.CookieControl&&window.CookieControl.showCookieSettings&&(window.CookieControl.showCookieSettings(),D("isJimdoCookieSettingsShownBefore",!0,1))},1e3)}te(k[i],L,j,e,x,q,p),j++}}}}W&&(Y(document,"click",function(e){e=(e=e||window.event).relatedTarget||e.toElement||e.target;if(e&&e.classList.contains("trigger-popup"))for(var t=0;t<POWR_RECEIVERS.length;t++)POWR_RECEIVERS[t].receiver.postMessage(JSON.stringify({message:"triggerPowrPopupClick"}),POWR_RECEIVERS[t].url)}),Y(document,"mouseout",function(e){if((e=e||window.event).clientY<5)for(var t=0;t<POWR_RECEIVERS.length;t++)POWR_RECEIVERS[t].receiver.postMessage(JSON.stringify({message:"exitDocument"}),POWR_RECEIVERS[t].url)})),V&&Y(document,"scroll",function(e){for(var t=(document.documentElement.scrollHeight||document.body.scrollHeight)-window.innerHeight,o=100*(document.documentElement.scrollTop||document.body.scrollTop)/t,n=0;n<POWR_RECEIVERS.length;n++)POWR_RECEIVERS[n].receiver.postMessage(JSON.stringify({message:"scrollPosition",scrollPercentage:o}),POWR_RECEIVERS[n].url)})}},loadPowr(),setInterval(function(){loadPowr()},500),Y(window,"load",loadPowr),o=!1,Y(window,"keydown",function(e){if(80==e.keyCode&&(o=!0,setTimeout(function(){o=!1},2e3)),38==e.keyCode&&o){for(var t=0;t<POWR_RECEIVERS.length;t++)POWR_RECEIVERS[t].receiver.postMessage(JSON.stringify({message:"showEdit"}),POWR_RECEIVERS[t].url);return e.preventDefault(),!1}if(40==e.keyCode&&o){for(t=0;t<POWR_RECEIVERS.length;t++)POWR_RECEIVERS[t].receiver.postMessage(JSON.stringify({message:"hideEdit"}),POWR_RECEIVERS[t].url);return e.preventDefault(),!1}})):G()("Powr already loaded")}();