PageSourceSearch

https://bestcalculators.net/wp-content/plugins/waspthemes-yellow-pencil/library/js/library.min.js?ver=1.0

js bestcalculators.net collected 2026-10-07 23:57:08 UTC 7,026 bytes, 8 lines download raw bytes

1/*
2	A Helper javascript function for Yellow Pencil Editor;
3	CSS Animation trigger and Custom CSS Engine.
4	Visit the plugin website to the details: waspthemes.com/yellow-pencil
5
6	By WaspThemes / All Rights Reserved.
7*/
8!function($){"use strict";function is_yellow_pencil(){return!!$("body").hasClass("yp-yellow-pencil")||$(document).find(".yp-select-bar").length>0}function get_all_selectors(a){return""!=a&&(a.split("{").length==a.split("}").length&&(a=a.toString().replace(/\}\,/g,"}"),array_cleaner(a.replace(/\{(.*?)\}/g,"|BREAK|").split("|BREAK|"))))}function get_minimized_css(a,b){return a=a.replace(/(\r\n|\n|\r)/g,"").replace(/\t/g,""),a=a.replace(/\/\*(.*?)\*\//g,""),a=a.replace(/\}\s+\}/g,"}}").replace(/\s+\{/g,"{"),a=a.replace(/\s+\}/g,"}").replace(/\{\s+/g,"{"),a=filter_bad_queries(a),!0===b&&(a=a.replace(/@media(.*?)\}\}/g,"").replace(/@?([a-zA-Z0-9_-]+)?keyframes(.*?)\}\}/g,"").replace(/@font-face(.*?)\}\}/g,"").replace(/@import(.*?)\;/g,"").replace(/@charset(.*?)\;/g,"")),a}function filter_bad_queries(a){return a.replace(/[\u2018\u2019\u201A\u201B\u2032\u2035\u201C\u201D]/g,"")}function array_cleaner(a){var b=[];return $.each(a,function(a,c){-1===$.inArray(c,b)&&b.push(c)}),b}function get_css_data(){if(0===$("style#yellow-pencil,style#yp-live-preview,link#yp-custom-css,style#yellow-pencil-backend").length)return!1;var a="";return 0==window.externalCSS?($("#yellow-pencil-backend").length>0&&(a+=$("#yellow-pencil-backend").html()),$("style#yellow-pencil").length>0&&(a+=$("style#yellow-pencil").html()),$("style#yp-live-preview").length>0&&(a+=$("style#yp-live-preview").html())):(a=window.externalData,$("style#yp-live-preview").length>0&&(a+=$("style#yp-live-preview").html()),$("#yellow-pencil-backend").length>0&&(a+=$("#yellow-pencil-backend").html())),0==window.cacheCSS&&(window.cacheCSS=a),window.cacheCSS}function get_matches_selectors(a){var b=get_css_data(),c=get_minimized_css(b,!0),d=get_all_selectors(c),e=[];$.each(d,function(b,c){if(c.match(/\:|\}|\{|\;/))return!0;c.indexOf(a)>=0&&""!=c&&e.push(c.replace(a,""))});var f=get_minimized_css(b,!1),g=f.match(/@media(.*?){(.*?)}/g),h="",i="",j="";return $.each(g,function(b,c){i=c.match(/@media(.*?){/g).toString().replace(/\{/g,"").replace(/@media /g,"").replace(/@media/g,""),h=c.toString().replace(/@media(.*?){/g,""),j=get_all_selectors(h),$.each(j,function(b,c){if(c.match(/\:|\}|\{|\;/))return!0;window.matchMedia(i).matches&&c.indexOf(a)>=0&&""!=c&&e.push(c.replace(a,""))})}),e.toString()}function click_detect(){$(get_matches_selectors(".yp_click")).each(function(){$(this).click(function(){$(this).addClass("yp_click")})})}function onscreen_detect(){$(get_matches_selectors(".yp_onscreen")).each(function(){$(this).visible(!0)&&$(this).addClass("yp_onscreen")})}function cssEngine(rule,scriptMarkup,defaults,data){data=get_minimized_css(data,!0);var matches=data.match(new RegExp(rule+"(s+)?:","gi"));if(!matches)return!1;if(matches.length>0)for(var ix=0;ix<matches.length;ix++){var output=scriptMarkup,selector="",ruleData=data.match(new RegExp("}(.*){(.*)"+rule+"(s+)?:(.*);"));if(data=data.replaceLast(rule+":","processed-rule:"),null==ruleData)return!0;if(selector=$.trim(ruleData[1]),-1!=selector.indexOf("}")&&(selector=$.trim(ruleData[1].split("}")[ruleData[1].split("}").length-1])),selector.indexOf(":")>=0&&-1==selector.indexOf(":nth"))return!0;var value=$.trim(ruleData[4].split(";")[0]),otherProperties=ruleData[4];-1!=ruleData[4].indexOf("}")&&(otherProperties=ruleData[4].split("}")[0]);for(var allRules=(ruleData[2]+otherProperties).replace(value,"").split(";"),allRulesArray=[],item,ruleName,i=0;i<allRules.length;i++)null!=(item=$.trim(allRules[i]))&&""!=item&&","!=item&&void 0!=item&&allRulesArray.push(allRules[i]);if(allRules=allRulesArray,void 0!=defaults)for(var e=0;e<Object.keys(defaults).length;e++)-1==allRules.join(",").indexOf(Object.keys(defaults)[e]+":")&&allRules.push(Object.keys(defaults)[e]+":"+defaults[Object.keys(defaults)[e]]);for(var s=0;s<allRules.length;s++)ruleName=allRules[s].replace(/\"\)*$/,"").split(":")[0],output=output.replace(ruleName,allRules[s].replace(/\"\)*$/,"").split(":")[1]);if(output=output.replace(/\$selector/g,selector),output=output.replace(/\$value/g,value),output=-1!=rule.indexOf("jquery-")?output.replace(/\$rule/g,rule.split("-")[1]):output.replace(/\$rule/g,rule),output=output.replace(/\$self/g,"$('"+selector+"')"),output=output.replace(/undefined/g,"0"),"none"!=value&&"0"!=value)if(is_yellow_pencil()){var ifrm=$("#iframe")[0],iwind=ifrm.contentWindow;iwind.eval("(function($){"+output+"}(jQuery));")}else eval(output)}}function customRules(a){var b=get_css_data();0!=b&&(a+=b),a="#yellow-pencil{-yp-engine:true;}"+a,cssEngine("background-parallax","$self.simple_parallax({speed: background-parallax-speed, x: background-parallax-x});",{"background-parallax-speed":"1","background-parallax-x":"50"},a),is_yellow_pencil()||($(window).resize(function(){onscreen_detect()}),$(document).ready(function(){onscreen_detect(),click_detect()}),$(document).scroll(function(){onscreen_detect()}))}if(function(a){a.fn.simple_parallax=function(b){var c={speed:1,x:50},d=a.extend(c,b);return this.each(function(){var b=a(this);if("none"==b.css("background-image")||1==b.hasClass("yp-parallax-disabled"))return!1;d.speed<1&&(d.speed=1);var c=-a(window).scrollTop()/10*d.speed,e=d.x+"% "+c+"px";b.css({backgroundPosition:e}),a(window).scroll(function(){if("none"==b.css("background-image")||1==b.hasClass("yp-parallax-disabled"))return!1;d.speed<1&&(d.speed=1);var c=-a(window).scrollTop()/10*d.speed,e=d.x+"% "+c+"px";b.css({backgroundPosition:e})})})}}(jQuery),function(a){var b=a(window);a.fn.visible=function(a,c,d){if(!(this.length<1)){var e=this.length>1?this.eq(0):this,f=e.get(0),g=b.width(),h=b.height(),d=d||"both",i=!0!==c||f.offsetWidth*f.offsetHeight;if("function"==typeof f.getBoundingClientRect){var j=f.getBoundingClientRect(),k=j.top>=0&&j.top<h,l=j.bottom>0&&j.bottom<=h,m=j.left>=0&&j.left<g,n=j.right>0&&j.right<=g,o=a?k||l:k&&l,p=a?m||n:m&&n;if("both"===d)return i&&o&&p;if("vertical"===d)return i&&o;if("horizontal"===d)return i&&p}else{var q=b.scrollTop(),r=q+h,s=b.scrollLeft(),t=s+g,u=e.offset(),v=u.top,w=v+e.height(),x=u.left,y=x+e.width(),z=!0===a?w:v,A=!0===a?v:w,B=!0===a?y:x,C=!0===a?x:y;if("both"===d)return!!i&&r>=A&&z>=q&&t>=C&&B>=s;if("vertical"===d)return!!i&&r>=A&&z>=q;if("horizontal"===d)return!!i&&t>=C&&B>=s}}}}(jQuery),String.prototype.reverse=function(){return this.split("").reverse().join("")},String.prototype.replaceLast=function(a,b){return this.reverse().replace(new RegExp(a.reverse()),b.reverse()).reverse()},window.cacheCSS=!1,$.fn.CallCSSEngine=function(a){customRules(a)},is_yellow_pencil())$("#iframe").on("load",function(){customRules("")});else if($("link#yp-custom-css").length>0){window.externalCSS=!0,window.externalData=!0;var href=$("link#yp-custom-css").attr("href");$.when($.get(href)).done(function(a){window.externalData=a,customRules("")})}else window.externalCSS=!1,customRules("")}(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.