0

sss

Anònim fa 10 anys 0
(function(G,M,I){if(G.post_widget===I){var J=function(){var c=document.createElement("div"),d=c.getElementsByTagName("i"),e=3;do c.innerHTML="\x3c!--[if gt IE "+ ++e+"]\x3e\x3ci\x3e\x3c/i\x3e\x3c![endif]--\x3e";while(d[0]);return 4>0};e.prepareQueryParams=function(b){var a="?";this.each(b,function(b,c){a+=encodeURIComponent(b)+ "\x3d"+encodeURIComponent(c)+"\x26"});return a};e._prepareQueryParams=function(b){var a="?",c=this;this.each(b,function(b,h){c.isArray(h)?c.each(h,function(c,h){a+=encodeURIComponent(b)+"\x3d"+encodeURIComponent(h)+"\x26"}):a+=encodeURIComponent(b)+"\x3d"+encodeURIComponent(h)+"\x26"});return a};e.bind=function(b,a){return function(){return a.apply(b,arguments)}};e.bindAll=function(b,a){var d=a||c.ArrayProto.slice.call(arguments,1)[0],f,h;for(f=0;f=this.options.min&&(c.isFunction(d)&&d(b),this.options.tracking&&this.textUpdater(),e.document.selection&&e.document.selection.createRange||setTimeout(function(){k=e.win.getSelection();k.removeAllRanges(); k.addRange(h)},0))},checkForUrl:function(a){return(/(https?:\/\/[^\s]+)/g.test(a)||0===a.indexOf("www"))&&-1===a.indexOf(" ")},textUpdater:function(){var a,b,c,h,k,n=this,u=d.getScrollPosition();if(n.options.dublication)return!1;n.options.dublication=!0;a=d.createElement("a",{href:this.options.url,innerHTML:encodeURIComponent(this.options.url),style:{color:"#003399"}});a=this.options.msg.replace(RegExp("{link}","g"),a);k=d.createElement("span",{innerHTML:"\x3cbr/\x3e"+a});h=d.createElement("div", {className:this.options.postBlockClassName});e.document.selection&&e.document.selection.createRange?(c=d.createElement("div",{className:this.options.postBlockClassName,style:{left:u.x+this.options.additionalScroll+"px",top:u.y+this.options.additionalScroll+"px"}}),d.appendTo(d.getBy("body"),c),b=e.document.selection.createRange(),h.innerHTML="\x3cbr/\x3e"+b.htmlText,d.appendTo(h,k),d.appendTo(c,h),a=e.document.body.createTextRange(),a.moveToElementText(h),a.select(),setTimeout(function(){d.removeNode(c); ""!==b.text&&(b.select(),e.document.body.scrollLeft=e.document.documentElement.scrollLeft=u.x+n.options.additionalScroll+"px",e.document.body.scrollTop=e.document.documentElement.scrollTop=u.y+n.options.additionalScroll+"px");n.options.dublication=!1},0)):(a=e.win.getSelection(),b=e.document.createRange(),d.appendTo(d.getBy("body"),h),d.appendTo(h,a.getRangeAt(0).cloneContents()),d.appendTo(h,k),b.selectNode(h),a.removeAllRanges(),a.addRange(b),setTimeout(function(){d.removeNode(h);n.options.dublication= !1},0))}}});q("support",["util","globals","pubsub","env","enumeration"],function(c,d,e,b,a){d={};var g=!1;e.subscribe("application.ready",function(a){g=!0});d.fixPinterest=function(a){if("imageURL"===a||"Image"===a||"pinterestImage"===a)a="image";return a};d.appReady=function(a){var b=setInterval(function(){g&&(c.isFunction(a)&&a(),clearInterval(b))},1)};d.fixPinterestPwConf=function(a){var b={},d=this;c.each(a,function(a,c){b[d.fixPinterest(a)]=c});return b};d.updateServices=function(d){var e,k; d.p_share_popup&&(d.p_share_popup=c.arrayToString(d.p_share_popup),b.isMobile&&(d.p_share_popup=c.replaceAll(d.p_share_popup,a.favorites,"")),d.p_share_popup=c.stringToArray(d.p_share_popup));d.more_popup&&(d.more_popup=c.arrayToString(d.more_popup),b.isMobile&&(d.more_popup=c.replaceAll(d.more_popup,a.favorites,""),b.isMobile.iosV||(d.more_popup=c.replaceAll(d.more_popup,a.print,""))),d.more_popup=c.stringToArray(d.more_popup));d.exclude&&(c.isString(d.exclude)?e=k=c.stringToArray(d.exclude):c.isObject(d.exclude)&& (d.exclude.popup&&(e=c.stringToArray(d.exclude.popup)),d.exclude.popular&&(k=c.stringToArray(d.exclude.popular))),d.exclude={popup:e||[],popular:k||[]});b.isMobile&&(d.exclude=d.exclude||{popup:[],popular:[]},d.exclude.popup=d.exclude.popup.concat([a.favorites]),d.exclude.popular=d.exclude.popular.concat([a.favorites]));b.isMobile&&!b.isMobile.iosV&&(d.exclude.popup=d.exclude.popup.concat([a.print]),d.exclude.popular=d.exclude.popular.concat([a.print]));return d};return d});q("scriptParams",["util", "dom"],function(c,d){var e,b={},a,g;e=["publisherKey","init","lc","retina","clean"];g=function(){c.each(d.getBy("script"),function(b,d){var k=d.src;-1b.length?c.systemLanguage():b).toLowerCase(),f=b.split("-")[1],e=b.split("-")[0],g[e]&&(d=f&&-1(p.random-h.random)/1E3))return;h={t:d,pub:g.val("publisherKey"),pu:p.pu||g.val("defaults.url"),pt:p.pt|| g.val("defaults.title"),ru:a.doc("referrer"),v:t};p=c.mergeObjects(p,h);!0===k.optout()&&c.each(k.getRestrictedOptOutParams(),function(a,b){delete p[b]});w+=c.prepareQueryParams(p);"\x26"===w.charAt(w.length-1)&&(w=w.slice(0,-1));w=a.createElement("img",{className:e.cssClasses.pwLogImage,src:w});a.appendTo("html",w);a.removeNode(w)};w=function(a,b){v.push({name:a,params:b})};q=function(){v.length&&(c.each(v,function(a,b){z(b.name,b.params)}),v=[])};h.logEvent=function(a,b){0===k.optout()?w(a,b):z(a, b)};h.getUrl=function(a,b){var d;switch(a){case "sharePoint":d=m;break;case "shareList":d=s}return d+c.prepareQueryParams(b)};h.fetchStatus=function(a,b){d.fetch(t,b||{},function(b){c.tryValue(b,a);q()})};h.prepareURLForSharing=function(a,b,d,e,p,w){var f=p.tracking,t=u.get("id",d),t=c.getPropertyByPath(t,"extra.shorten"),h=g.val("track"),z="";b=n.parseHref(b);if(k.getCustomShortener(a))t=!1;else if(!c.isDefined(t)||c.isDefined(t)&&!0===t)w?t=!1:c.isDefined(p.shorten)&&(t=p.shorten);!c.isUndefined(b)&& !t&&h&&f&&(z=e+"."+d,!0!==h?b.search=0c?this.formatCount(a,"K",1E3):10>c?this.formatCount(a,"M",1E6):this.formatCount(a,"B",1E9));return b},getSyncChannels:function(a){var c=[];b.each(a,function(a,d){-1b&&eb&&(b=0)):b=r.top,r.left+f>d&&ff&&(f=0),g="pw-popup-side_right"): f=r.left,a.addClass(this.domNode,g)),c.isDefined(f)&&c.isDefined(b)&&a.setStyle(this.domNode,{left:f+"px",top:b+"px"}))},setOnCenter:function(){var b=a.getClientOffset(),d=a.getScrollPosition();a.setStyle(this.domNode,{left:c.toInt(b.w/2)-c.toInt(this.domNode.offsetWidth/2)+"px",top:d.y+(c.toInt(b.h/2)-c.toInt(this.domNode.offsetHeight/2))+"px"})}});return f});q("viewCore","oo config util dom enumeration pwConfig".split(" "),function(c,d,e,b,a,g){var f,h={},k;f=[{s:"pw_widget",r:"pw-widget"},{s:"pw_size_16", r:"pw-size-small"},{s:"pw_size_24",r:"pw-size-medium"},{s:"pw_size_32",r:"pw-size-large"},{s:"pw_counter_true",r:"pw-counter-show"},{s:"pw_counter_false",r:"pw-counter-none"},{s:"pw_copypaste_true",r:"pw-copypaste-true"},{s:"pw_copypaste_false",r:"pw-copypaste-false"},{s:"pw_vertical",r:"pw-vertical"}];k=function(b){return-1c?c=b.buttonsLoaded:(a(),clearInterval(d))},1)},loadAssets:function(){k.val("clean")||(b.loadCSS(e.mainCssPath),this.prepareRetina())},initCoreMethods:function(){this.updatePwidgetConfig();this.fixPinterestInPwConfig();this.loadAssets();m.init();this.insertAdditionalClasses(); t.init()},initApplication:function(a){var d=this,e=c.isObject(a)?a:b.getBy(a||"body");d.initialized||this.initCoreMethods();a?c.each(c.isArray(e)?e:[e],function(a,b){d.searchForWidgetsMarkup(b)}):this.searchForWidgetsMarkup(a);d.initialized||this.afterInit()},searchForWidgetsMarkup:function(a){var d=this;c.each(b.getBy(e.getCssQuerySelector("widget"),a),function(a,b){d.addWidgetToCollection({domNode:b})});c.each(b.getBy(e.getCssQuerySelector("widget","2.1"),a),function(a,b){d.addWidgetToCollection({domNode:b}, "2.1")});c.each(b.getBy("a",a),function(a,f){c.isNull(f.className.match(e.regexpPatterns.buttonContainer["3.0"]))||b.getParentByClassList(f,e.postWidgetAliases)||d.addWidgetToCollection({domNode:d.createWidgetFromSingleButton(f)})});C.initBoxCounters(a,{publisherKey:k.val("publisherKey"),attributes:{url:k.val("defaults.url")}})},isWidgetInitialized:function(a){var b=!1;c.each(this.widgetCollection,function(c,d){if(d.getDom()===a)return b=!0,!1});return b},updatePwidgetConfig:function(){var a;a=c.cloneObj(E.pwidget_config); a.publisherKey=a.publisherKey||y.get("publisherKey");a.locale=s.validateUserLocale(a.locale||y.get("lc"));a.retina=a.retina||y.get(f.retina);a.clean=c.isUndefined(a.clean)?c.strToBoolean(y.get("clean")):a.clean;!p.canonical.get()||a.defaults&&a.defaults.url||(a.defaults=a.defaults||{},a.defaults.url=p.canonical.get());F.isMobile&&F.isMobile.tablet&&(a.mobileOverlay=!0);a.defaults&&(a.defaults=c.mergeObjects(a.defaults,r.fixPinterestPwConf(a.defaults)));k.update({locale:a.locale},!0);k.update(a);k.setUserPwConfig(E.pwidget_config)}, initPwConfig:function(){k.update({init:c.cloneObj(E.pwidget_config).init||y.get("init")})},addWidgetToCollection:function(a,b){b&&(a.archVersion=b);a.pinterestCallBack=this.pinterestCallBack;this.isWidgetInitialized(a.domNode)||this.widgetCollection.push(new this.WidgetClass(a))},createWidgetFromSingleButton:function(a){var c=b.createElement("span",{className:e.widgetClassList});this.cloneNodeAttributes(a,c,e.widgetAttributes);this.cloneNodeClasses(a,c);b.appendTo(c,a.cloneNode(!0));b.insertBefore(a, c);b.removeNode(a);return c},cloneNodeAttributes:function(a,d,f){c.each(f,function(c,f){var g=e.getAttrValue(a,f.name);g&&b.attr(d,"data-"+f.name,g)})},cloneNodeClasses:function(a,c){b.setClass(c,a.className)},afterInit:function(a){var d=this;this.applicationOnLoad(function(){var e;a&&a(;;e=k.val("onload");d.prepareExternalFiles();d.initialized=!0;e&&e(;;d.trackToComScore();0===d.widgetCollection.length&&k.val("publisherKey")&&(d.fetchStatus(),d.logDataLoggerEvent("view",{vGUID:k.val("vguid")||c.GUID(!0), pu:p.canonical.get()||c.removeTrackingParam(b.doc("location.href")),pt:k.val("defaults.title"),pub:k.val("publisherKey")}));h.publish("application.ready")})},fetchStatus:function(){n.fetchStatus(function(a){0===z.optout()&&(z.optout(!!a.optout),h.publish("optout.ready"));z.setFetchingState(!1)})},prepareExternalFiles:function(){this.prepareCopyPaste()},prepareCopyPaste:function(){var a=f.copypaste,d=!0,g=this.widgetCollection,h=g.length,l=0,m=this,n;k.val("publisherKey")&&(c.each(g,function(a,b){if(c.isDefined(b.attributes.copypaste)){if(b.attributes.copypaste)return n= !0,!1;l++;n=!1}}),k.val(a)||c.isDefined(n)?k.val(a)||!c.isDefined(n)||n?l&&l===h&&(d=!1):d=!1:d=!1,k.val("shareQuote")?b.loadScript(e.externalModules.shareQuote,function(){m.initCopyPaste(d,m.initShareQuote())}):this.initCopyPaste(d))},initShareQuote:function(){var a=v.win.pwidget_modules.shareandquote;a("init",{poStLink:e.poStLink,postWidget:{buttons:k.val("shareQuoteOptions.buttons"),more_popup_exclude:k.val("shareQuoteOptions.more_popup_exclude")}});return a},initCopyPaste:function(a,b){var d= this,e=c.sGUID(),f=s.t("readMore"),g=k.val("i18n.readMore");g&&(f=-1