1!function(e){var o={};function n(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=o,n.d=function(e,o,t){n.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,o){if(1&o&&(e=n(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var r in e)n.d(t,r,function(o){return e[o]}.bind(null,r));return t},n.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(o,"a",o),o},n.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},n.p="",n(n.s=273)}({273:function(e,o){!function(){"use strict";let e,o;function n(e){return new Promise((o,n)=>{const t=document.createElement("script");t.onload=()=>o(),t.onerror=e=>n(e),t.src=e,document.body.appendChild(t)})}function t(){if(e)return e;const o=window.wpcom_coblocks_js;return e=n(o.coblocks_lightbox_js),e}function r(){if(o)return o;window.wpcomJQueryUsageLoggerDisabled=!0;const e=window.wpcom_coblocks_js,t=window.jQuery?Promise.resolve():n(e.jquery_core_js).then(()=>n(e.jquery_migrate_js)),r=t.then(()=>window.imagesLoaded?Promise.resolve():n(e.imagesloaded_js)),c=t.then(()=>window.Masonry?Promise.resolve():n(e.masonry_js)),u=Promise.all([t,r,c]).then(()=>n(e.coblocks_masonry_js));return o=u,o}function c(){document.querySelector(".wp-block-coblocks-gallery-masonry")&&r(),document.querySelector(".has-lightbox")&&t(),document.body.classList.contains("block-editor-page")&&(r(),t())}"loading"!==document.readyState?c():document.addEventListener("DOMContentLoaded",c)}()}});; 2/** 3 * Makes "skip to content" link work correctly in IE9, Chrome, and Opera 4 * for better accessibility. 5 * 6 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/ 7 */ 8 9 ( function() { 10 var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1, 11 isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1, 12 isIE = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1; 13 14 if ( ( isWebkit || isOpera || isIE ) && document.getElementById && window.addEventListener ) { 15 window.addEventListener( 'hashchange', function() { 16 var id = location.hash.substring( 1 ), 17 element; 18 19 if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { 20 return; 21 } 22 23 element = document.getElementById( id ); 24 25 if ( element ) { 26 if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { 27 element.tabIndex = -1; 28 } 29 30 element.focus(); 31 32 // Repositions the window on jump-to-anchor to account for admin bar and border height. 33 window.scrollBy( 0, -53 ); 34 } 35 }, false ); 36 } 37} )(); 38; 39/* global screenReaderText */ 40/** 41 * Theme functions file. 42 * 43 * Contains handlers for navigation and widget area. 44 */ 45( function () { 46 'use strict'; 47 48 var mainNav, masthead, menuToggle, siteNavigation, socialNavigation, siteHeaderMenu, resizeTimer; 49 50 function matches( el, sel ) { 51 if ( Element.prototype.matches ) { 52 return el.matches( sel ); 53 } 54 55 if ( Element.prototype.msMatchesSelector ) { 56 return el.msMatchesSelector( sel ); 57 } 58 } 59 60 // Based on https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill 61 function closest( el, sel ) { 62 if ( el.closest ) { 63 return el.closest( sel ); 64 } 65 66 var current = el; 67 68 do { 69 if ( matches( el, sel ) ) { 70 return current; 71 } 72 current = current.parentElement || current.parentNode; 73 } while ( current !== null && current.nodeType === 1 ); 74 75 return null; 76 } 77 78 function forEachNode( parent, selector, fn ) { 79 var nodes = parent.querySelectorAll( selector ); 80 for ( var i = 0; i < nodes.length; i++ ) { 81 fn( nodes[ i ] ); 82 } 83 } 84 85 function initMainNavigation( container ) { 86 forEachNode( container, '.menu-item-has-children > a', function ( el ) { 87 // Add dropdown toggle that displays child menu items. 88 var dropdownToggle = document.createElement( 'button' ); 89 dropdownToggle.className = 'dropdown-toggle'; 90 dropdownToggle.setAttribute( 'aria-expanded', 'false' ); 91 92 var span = document.createElement( 'span' ); 93 span.className = 'screen-reader-text'; 94 span.textContent = screenReaderText.expand; 95 96 dropdownToggle.appendChild( span ); 97 98 el.parentNode.insertBefore( dropdownToggle, el.nextSibling ); 99 } ); 100 101 // Toggle buttons and submenu items with active children menu items. 102 forEachNode( container, '.current-menu-ancestor > button', function ( el ) { 103 el.classList.add( 'toggled-on' ); 104 } ); 105 forEachNode( container, '.current-menu-ancestor > .sub-menu', function ( el ) { 106 el.classList.add( 'toggled-on' ); 107 } ); 108 109 // Add menu items with submenus to aria-haspopup="true". 110 forEachNode( container, '.menu-item-has-children', function ( el ) { 111 el.setAttribute( 'aria-haspopup', 'true' ); 112 } ); 113 114 forEachNode( container, '.dropdown-toggle', function ( el ) { 115 el.addEventListener( 'click', function ( e ) { 116 var screenReaderSpan = el.querySelector( '.screen-reader-text' ); 117 118 e.preventDefault(); 119 el.classList.toggle( 'toggled-on' ); 120 var next = el.nextElementSibling; 121 if ( next && matches( next, '.children, .sub-menu' ) ) { 122 next.classList.toggle( 'toggled-on' ); 123 } 124 125 el.setAttribute( 126 'aria-expanded', 127 el.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false' 128 ); 129 screenReaderSpan.textContent = 130 screenReaderSpan.textContent === screenReaderText.expand ? screenReaderText.collapse: screenReaderText.expand; 131 } ); 132 } ); 133 } 134 135 mainNav = document.querySelector( '.main-navigation' ); 136 if ( mainNav ) { 137 initMainNavigation( mainNav ); 138 } 139 140 masthead = document.querySelector( '#masthead' ); 141 menuToggle = masthead && masthead.querySelector( '#menu-toggle' ); 142 siteHeaderMenu = masthead && masthead.querySelector( '#site-header-menu' ); 143 siteNavigation = masthead && masthead.querySelector( '#site-navigation' ); 144 socialNavigation = masthead && masthead.querySelector( '#social-navigation' ); 145 146 // Enable menuToggle. 147 ( function () { 148 // Return early if menuToggle is missing. 149 if ( ! menuToggle ) { 150 return; 151 } 152 153 var controls = [ menuToggle, siteNavigation, socialNavigation ].filter( Boolean ); 154 155 // Add an initial values for the attribute.
156 controls.forEach( function ( el ) { 157 el.setAttribute( 'aria-expanded', 'false' ); 158 } ); 159 160 menuToggle.addEventListener( 'click', function () { 161 menuToggle.classList.toggle( 'toggled-on' ); 162 siteHeaderMenu.classList.toggle( 'toggled-on' ); 163 164 var newVal = menuToggle.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false'; 165 controls.forEach( function ( el ) { 166 el.setAttribute( 'aria-expanded', newVal ); 167 } ); 168 } ); 169 } )(); 170 171 // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility. 172 ( function () { 173 if ( ! siteNavigation || ! siteNavigation.children.length ) { 174 return; 175 } 176 177 // Init `focus` class to allow submenu access on tablets. 178 function initFocusClassTouchScreen() { 179 document.body.addEventListener( 'touchstart', function ( e ) { 180 if ( ! closest( e.target, '.main-navigation li' ) ) { 181 forEachNode( document, '.main-navigation li', function ( el ) { 182 el.classList.remove( 'focus' ); 183 } ); 184 } 185 } ); 186 forEachNode( siteNavigation, '.menu-item-has-children > a', function ( link ) { 187 link.addEventListener( 'touchstart', function ( e ) { 188 if ( window.innerWidth >= 910 ) { 189 var el = link.parentElement; 190 191 if ( matches( el, 'li' ) && ! el.classList.contains( 'focus' ) ) { 192 e.preventDefault(); 193 el.classList.toggle( 'focus' ); 194 var children = el.parentElement.children; 195 for ( var i = 0; i < children.length; i++ ) { 196 if ( children[ i ] !== el ) { 197 children[ i ].classList.remove( 'focus' ); 198 } 199 } 200 } 201 } 202 } ); 203 } ); 204 } 205 206 function toggleFocus( el ) { 207 var item = closest( el, '.menu-item' ); 208 if ( item ) { 209 item.classList.toggle( 'focus' ); 210 } 211 } 212 213 if ( 'ontouchstart' in window ) { 214 initFocusClassTouchScreen(); 215 } 216 217 forEachNode( siteNavigation, 'a', function ( link ) { 218 link.addEventListener( 'focus', toggleFocus( link ) ); 219 link.addEventListener( 'blur', toggleFocus( link ) ); 220 } ); 221 } )(); 222 223 // Add the default ARIA attributes for the menu toggle and the navigations. 224 function onResizeARIA() { 225 if ( window.innerWidth < 910 ) { 226 if ( menuToggle && menuToggle.classList.contains( 'toggled-on' ) ) { 227 menuToggle.setAttribute( 'aria-expanded', 'true' ); 228 } else { 229 menuToggle.setAttribute( 'aria-expanded', 'false' ); 230 } 231 232 if ( siteHeaderMenu && siteHeaderMenu.classList.contains( 'toggled-on' ) ) { 233 siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'true' ); 234 socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'true' ); 235 } else { 236 siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'false' ); 237 socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'false' ); 238 } 239 240 menuToggle && menuToggle.setAttribute( 'aria-controls', 'site-navigation social-navigation' ); 241 } else { 242 menuToggle && menuToggle.removeAttribute( 'aria-expanded' ); 243 siteNavigation && siteNavigation.removeAttribute( 'aria-expanded' ); 244 socialNavigation && socialNavigation.removeAttribute( 'aria-expanded' ); 245 menuToggle && menuToggle.removeAttribute( 'aria-controls' ); 246 } 247 } 248 249 // Add 'below-entry-meta' class to elements. 250 function belowEntryMetaClass( selector ) { 251 if ( 252 document.body.classList.contains( 'page' ) || 253 document.body.classList.contains( 'search' ) || 254 document.body.classList.contains( 'single-attachment' ) || 255 document.body.classList.contains( 'error404' ) 256 ) { 257 return; 258 } 259 260 forEachNode( document, '.entry-content', function ( content ) { 261 forEachNode( content, selector, function ( element ) { 262 var elementPosTop = element.getBoundingClientRect().top; 263 var article = closest( element, 'article' ); 264 var entryFooter = article && article.querySelector( '.entry-footer' ); 265 var entryFooterPosBottom = 266 entryFooter ? entryFooter.getBoundingClientRect().top + entryFooter.offsetHeight + 28 : null; 267 var caption = closest( element, 'figure' ); 268 var next = element.nextSibling; 269 var figcaption = next && matches( next, 'figcaption' ) ? next : null; 270 var newImg; 271 272 // Add 'below-entry-meta' to elements below the entry meta. 273 if ( entryFooterPosBottom !== null && elementPosTop > entryFooterPosBottom ) { 274 // Check if full-size images and captions are larger than or equal to 840px. 275 if ( selector === 'img.size-full' || selector === '.wp-block-image img' ) { 276 // Create an image to find native image width of resized images (i.e. max-width: 100%). 277 newImg = new Image(); 278 newImg.src = element.getAttribute( 'src' ); 279 newImg.onload = function () { 280 if ( newImg.width >= 840 ) { 281 // Check if an image in an image block has a width attribute; if its value is less than 840, return. 282 if ( 283 selector === '.wp-block-image img' && 284 element.hasAttribute( 'width' ) && 285 element.getAttribute( 'width' ) < 840 286 ) { 287 return; 288 } 289 290 element.classList.add( 'below-entry-meta' ); 291 292 if ( caption && caption.classList.contains( 'wp-caption' ) ) { 293 caption.classList.add( 'below-entry-meta' ); 294 caption.removeAttribute( 'style' ); 295 } 296 297 if ( figcaption ) { 298 figcaption.classList.add( 'below-entry-meta' ); 299 } 300 } 301 }; 302 } else { 303 element.classList.add( 'below-entry-meta' ); 304 } 305 } else { 306 element.classList.remove( 'below-entry-meta' ); 307 caption && caption.classList.remove( 'below-entry-meta' ); 308 } 309 } ); 310 } ); 311 } 312
313 function init() { 314 window.addEventListener( 'load', onResizeARIA ); 315 window.addEventListener( 'resize', function () { 316 clearTimeout( resizeTimer ); 317 resizeTimer = setTimeout( function () { 318 belowEntryMetaClass( 'img.size-full' ); 319 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 320 belowEntryMetaClass( '.wp-block-image img' ); 321 }, 300 ); 322 onResizeARIA(); 323 } ); 324 325 belowEntryMetaClass( 'img.size-full' ); 326 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 327 belowEntryMetaClass( '.wp-block-image img' ); 328 } 329 330 if ( document.readyState === 'loading' ) { 331 document.addEventListener( 'DOMContentLoaded', init ); 332 } else { 333 init(); 334 } 335} )(); 336; 337/* global FB, jpfbembed */ 338( function ( window ) { 339 var facebookEmbed = function () { 340 var fbroot, src, newScript, firstScript; 341 342 if ( 'undefined' !== typeof FB && FB.XFBML ) { 343 FB.XFBML.parse(); 344 } else { 345 fbroot = document.createElement( 'div' ); 346 fbroot.id = 'fb-root'; 347 document.getElementsByTagName( 'body' )[ 0 ].appendChild( fbroot ); 348 349 src = '//connect.facebook.net/' + jpfbembed.locale + '/sdk.js#xfbml=1'; 350 if ( jpfbembed.appid ) { 351 src += '&appId=' + jpfbembed.appid; 352 } 353 src += '&version=v2.3'; 354 355 newScript = document.createElement( 'script' ); 356 newScript.setAttribute( 'src', src ); 357 firstScript = document.querySelector( 'script' ); 358 firstScript.parentNode.insertBefore( newScript, firstScript ); 359 } 360 }; 361 362 window.fbAsyncInit = function () { 363 FB.init( { 364 appId: jpfbembed.appid, 365 version: 'v2.3', 366 } ); 367 368 FB.XFBML.parse(); 369 }; 370 371 if ( 'undefined' !== typeof infiniteScroll ) { 372 document.body.addEventListener( 'post-load', facebookEmbed ); 373 } 374 375 facebookEmbed(); 376} )( window ); 377; 378!function(){"use strict";var e,t={noop:function(){},texturize:function(e){return(e=(e=(e=(e+="").replace(/'/g,"’").replace(/'/g,"’")).replace(/"/g,"”").replace(/"/g,"”").replace(/"/g,"”").replace(/[\u201D]/g,"”")).replace(/([\w]+)=&#[\d]+;(.+?)&#[\d]+;/g,'$1="$2"')).trim()},applyReplacements:function(e,t){if(e)return t?e.replace(/{(\d+)}/g,function(e,r){return void 0!==t[r]?t[r]:e}):e},getBackgroundImage:function(e){var t=document.createElement("canvas"),r=t.getContext&&t.getContext("2d");if(e){r.filter="blur(20px) ",r.drawImage(e,0,0);var o=t.toDataURL("image/png");return t=null,o}}},r=function(){function e(e,t){return Element.prototype.matches?e.matches(t):Element.prototype.msMatchesSelector?e.msMatchesSelector(t):void 0}function r(e,t,r,o){if(!e)return o();e.jpCarouselCancelFade&&e.jpCarouselCancelFade(),e.classList.remove("jp-carousel-fade"),e.style.removeProperty("display"),e.style.opacity=t,e.style.pointerEvents="none",e.offsetWidth,e.classList.add("jp-carousel-fade"),e.style.opacity=r;var a=1e3*parseFloat(getComputedStyle(e).transitionDuration)||0,i=setTimeout(function(){e.jpCarouselCancelFade=null,e.style.removeProperty("pointer-events"),o()},a+50);e.jpCarouselCancelFade=function(){clearTimeout(i),e.jpCarouselCancelFade=null}}return{closest:function(t,r){if(t.closest)return t.closest(r);var o=t;do{if(e(o,r))return o;o=o.parentElement||o.parentNode}while(null!==o&&1===o.nodeType);return null},matches:e,hide:function(e){e&&(e.style.display="none")},show:function(e){e&&(e.style.display="block")},fadeIn:function(e,o){r(e,0,1,o=o||t.noop)},fadeOut:function(e,o){o=o||t.noop,r(e,1,0,function(){e&&(e.style.display="none"),o()})},scrollToElement:function(e,t,r){if(!e||!t)return r?r():void 0;var o=t.querySelector(".jp-carousel-info-extra");o&&(o.style.minHeight=window.innerHeight-64+"px");var a=!0,i=Date.now(),n=t.scrollTop,l=Math.max(0,e.offsetTop-Math.max(0,window.innerHeight-function(e){var t=e.querySelector(".jp-carousel-info-footer"),r=e.querySelector(".jp-carousel-info-extra"),o=e.querySelector(".jp-carousel-info-content-wrapper");if(t&&r&&o){var a=window.getComputedStyle(r),i=parseInt(a.paddingTop,10)+parseInt(a.paddingBottom,10);return i=isNaN(i)?0:i,o.offsetHeight+t.offsetHeight+i}return 0}(t)))-t.scrollTop;function s(){a=!1}l=Math.min(l,t.scrollHeight-window.innerHeight),t.addEventListener("wheel",s),function e(){var c,u=Date.now(),d=(c=(u-i)/300)<.5?2*c*c:1-Math.pow(-2*c+2,2)/2,p=(d=d>1?1:d)*l;if(t.scrollTop=n+p,u<=i+300&&a)return requestAnimationFrame(e);r&&r(),o&&(o.style.minHeight=""),a=!1,t.removeEventListener("wheel",s)}()},getJSONAttribute:function(e,t){if(e&&e.hasAttribute(t))try{return JSON.parse(e.getAttribute(t))}catch{return}},convertToPlainText:function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML},stripHTML:function(e){var t=document.createElement("div");return t.innerHTML=e.replace(/<[^>]*>?/gm,""),t.textContent},emitEvent:function(e,t,r){var o;try{o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r||null})}catch{(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,r||null)}e.dispatchEvent(o)},isTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}}();function o(){var o,a,i,n,l="",s=!1,c="div.gallery, div.tiled-gallery, ul.wp-block-gallery, ul.blocks-gallery-grid, figure.wp-block-gallery.has-nested-images, div.wp-block-jetpack-tiled-gallery, a.single-image-gallery",u=".gallery-item, .tiled-gallery-item, .blocks-gallery-item, .tiled-gallery__item",d=u+", .wp-block-image",p={},m="undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.stat?wpcom.carousel.stat:t.noop,g="undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.pageview?wpcom.carousel.pageview:t.noop;function h(t){if(!s)switch(t.which){case 38:t.preventDefault(),p.overlay.scrollTop-=100;break;case 40:t.preventDefault(),p.overlay.scrollTop+=100;break;case 39:t.preventDefault(),e.slideNext();break;case 37:case 8:t.preventDefault(),e.slidePrev();break;case 27:t.preventDefault(),x()}}function f(){s=!0}function v(){s=!1}function y(e){e.role="button",e.tabIndex=0,e.ariaLabel=jetpackCarouselStrings.image_label}function w(){p.overlay||(p.overlay=document.querySelector(".jp-carousel-overlay"),p.container=p.overlay.querySelector(".jp-carousel-wrap"),p.gallery=p.container.querySelector(".jp-carousel"),p.info=p.overlay.querySelector(".jp-carousel-info"),p.caption=p.info.querySelector(".jp-carousel-caption"),p.commentField=p.overlay.querySelector("#jp-carousel-comment-form-comment-field"),p.emailField=p.overlay.querySelector("#jp-carousel-comment-form-email-field"),p.authorField=p.overlay.querySelector("#jp-carousel-comment-form-author-field"),p.urlField=p.overlay.querySelector("#jp-carousel-comment-form-url-field"),window.innerWidth<=760&&Math.round(window.innerWidth/760*110)<40&&r.isTouch(),[p.commentField,p.emailField,p.authorField,p.urlField].forEac
378h(function(e){e&&(e.addEventListener("focus",f),e.addEventListener("blur",v))}),p.overlay.addEventListener("click",function(e){var t,o,a=e.target,i=!!r.closest(a,".jp-carousel-close-hint"),n=!!window.matchMedia("(max-device-width: 760px)").matches;a===p.overlay?n||x():i?x():a.classList.contains("jp-carousel-image-download")?m("download_original_click"):a.classList.contains("jp-carousel-comment-login")?(t=p.currentSlide,o=t?t.attrs.attachmentId:"0",window.location.href=jetpackCarouselStrings.login_url+"%23jp-carousel-"+o):r.closest(a,"#jp-carousel-comment-form-container")?function(e){var t=e.target,o=r.getJSONAttribute(p.container,"data-carousel-extra")||{},a=p.currentSlide.attrs.attachmentId,i=document.querySelector("#jp-carousel-comment-form-submit-and-info-wrapper"),n=document.querySelector("#jp-carousel-comment-form-spinner"),l=document.querySelector("#jp-carousel-comment-form-button-submit"),s=document.querySelector("#jp-carousel-comment-form");if(p.commentField&&p.commentField.getAttribute("id")===t.getAttribute("id"))f(),r.show(i);else if(r.matches(t,'input[type="submit"]')){e.preventDefault(),e.stopPropagation(),r.show(n),s.classList.add("jp-carousel-is-disabled");var c={action:"post_attachment_comment",nonce:jetpackCarouselStrings.nonce,blog_id:o.blog_id,id:a,comment:p.commentField.value};if(!c.comment.length)return void j(jetpackCarouselStrings.no_comment_text,!1);if(1!==Number(jetpackCarouselStrings.is_logged_in)&&(c.email=p.emailField.value,c.author=p.authorField.value,c.url=p.urlField.value,1===Number(jetpackCarouselStrings.require_name_email))){if(!c.email.length||!c.email.match("@"))return void j(jetpackCarouselStrings.no_comment_email,!1);if(!c.author.length)return void j(jetpackCarouselStrings.no_comment_author,!1)}var u=new XMLHttpRequest;u.open("POST",jetpackCarouselStrings.ajaxurl,!0),u.setRequestHeader("X-Requested-With","XMLHttpRequest"),u.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.onreadystatechange=function(){if(this.readyState===XMLHttpRequest.DONE&&this.status>=200&&this.status<300){var e;try{e=JSON.parse(this.response)}catch{return void j(jetpackCarouselStrings.comment_post_error,!1)}"approved"===e.comment_status?j(jetpackCarouselStrings.comment_approved,!0):"unapproved"===e.comment_status?j(jetpackCarouselStrings.comment_unapproved,!0):j(jetpackCarouselStrings.comment_post_error,!1),H(),q(a),l.value=jetpackCarouselStrings.post_comment,r.hide(n),s.classList.remove("jp-carousel-is-disabled")}else j(jetpackCarouselStrings.comment_post_error,!1)};var d=[];for(var m in c)if(m){var g=encodeURIComponent(m)+"="+encodeURIComponent(c[m]);d.push(g.replace(/%20/g,"+"))}var h=d.join("&");u.send(h)}}(e):(r.closest(a,".jp-carousel-photo-icons-container")||a.classList.contains("jp-carousel-photo-title"))&&function(e){e.preventDefault();var t=e.target,o=p.info.querySelector(".jp-carousel-info-extra"),a=p.info.querySelector(".jp-carousel-image-meta"),i=p.info.querySelector(".jp-carousel-comments-wrapper"),n=p.info.querySelector(".jp-carousel-icon-info"),l=p.info.querySelector(".jp-carousel-icon-comments");function s(){l&&l.classList.remove("jp-carousel-selected"),n.classList.toggle("jp-carousel-selected"),i&&i.classList.remove("jp-carousel-show"),a&&(a.classList.toggle("jp-carousel-show"),a.classList.contains("jp-carousel-show")?o.classList.add("jp-carousel-show"):o.classList.remove("jp-carousel-show"))}function c(){n&&n.classList.remove("jp-carousel-selected"),l.classList.toggle("jp-carousel-selected"),a&&a.classList.remove("jp-carousel-show"),i&&(i.classList.toggle("jp-carousel-show"),i.classList.contains("jp-carousel-show")?o.classList.add("jp-carousel-show"):o.classList.remove("jp-carousel-show"))}(r.closest(t,".jp-carousel-icon-info")||t.classList.contains("jp-carousel-photo-title"))&&(a&&a.classList.contains("jp-carousel-show")?r.scrollToElement(p.overlay,p.overlay,s):(s(),r.scrollToElement(p.info,p.overlay))),r.closest(t,".jp-carousel-icon-comments")&&(i&&i.classList.contains("jp-carousel-show")?r.scrollToElement(p.overlay,p.overlay,c):(c(),r.scrollToElement(p.info,p.overlay)))}(e)}),window.addEventListener("keydown",h),p.overlay.addEventListener("jp_carousel.afterOpen",function(){v(),p.slides.length<=1||(p.slides.length<=5?r.show(p.info.querySelector(".jp-swiper-pagination")):r.show(p.info.querySelector(".jp-carousel-pagination")))}),p.overlay.addEventListener("jp_carousel.beforeClose",function(){f(),document.documentElement.style.removeProperty("height"),e&&e.enable(),r.hide(p.info.querySelector(".jp-swiper-pagination")),r.hide(p.info.querySelector(".jp-carousel-pagination"))}),p.overlay.addEventListener("jp_carousel.afterClose",function(){window.history.pushState?history.pushState("",document.title,window.location.pathname+window.location.search):window.location.href="",l="",p.isOpen=!1}),p.overlay.addEventListener("touchstart",function(e){e.touches.length>1&&e.preventDefault()}))}function j(e,t){var o=p.overlay.querySelector("#jp-carousel-comment-post-results"),a="jp-carousel-comment-post-"+(t?"success":"error");o.innerHTML='<span class="'+a+'">'+e+"</span>",r.hide(p.overlay.querySelector("#jp-carousel-comment-form-spinner")),p.overlay.querySelector("#jp-carousel-comment-form").classList.remove("jp-carousel-is-disabled"),r.show(o)}function b(){var e=document.querySelectorAll("a img[data-attachment-id]");Array.prototype.forEach.call(e,function(e){var t=e.parentElement,o=t.parentElement;if(!o.classList.contains("gallery-icon")&&!r.closest(o,u)&&t.hasAttribute("href")){var a=!1;t.getAttribute("href").split("?")[0]===e.getAttribute("data-orig-file").split("?")[0]&&1===Number(jetpackCarouselStrings.single_image_gallery_media_file)&&(a=!0),t.getAttribute("href")===e.getAttribute("data-permalink")&&(a=!0),a&&(y(e),t.classList.add("single-image-gallery"),t.setAttribute("data-carousel-extra",JSON.stringify({blog_id:Number(jetpackCarouselStrings.blog_id)})))}})}function S(t,r){p.isOpen?(L(r),e.slideTo(r+1)):M(t,{startIndex:r})}function L(e){(!e||e<0||e>p.slides.length)&&(e=0),p.currentSlide=p.slides[e];var o,a,i=p.currentSlide,n=i.attrs.attachmentId;A(p.slides[e]),function(e){var t=[],r=p.slides.length;if(r>1){var o=e>0?e-1:r-1;t.push(o);var a=e<r-1?e+1:0;t.push(a)}t.forEach(function(e){var t=p.slides[e];t&&(A(t),1!==Number(jetpackCarouselStrings.display_background_image)||t.backgroundImage||_(t))})}(e),1!==Number(jetpackCarouselStrings.display_background_image)||p.slides[e].backgroundImage||_(p.slides[e]),r.hide(p.caption),function(e){var t,o,a,i,n,l,s;if(i=p.overlay.querySelector(".jp-carousel-photo-caption"),n=p.overlay.querySelector(".jp-carousel-caption"),l=p.overlay.querySelector(".jp-carousel-photo-title"),s=p.overlay.querySelector(".jp-carousel-photo-description"),r.hide(i),r.hide(n),r.hide(l),r.hide(s),t=E(e.caption)||"",o=E(e.title)||"",a=E(e.desc)||"",(t||o||a)&&(t&&(i.innerHTML=t,n.innerHTML=t,r.show(i),r.show(n)),r.stripHTML(t)===r.stripHTML(o)&&(o=""),r.stripHTML(t)===r.stripHTML(a)&&(a=""),r.stripHTML(o)===r.stripHTML(a)&&(a=""),a&&(s.innerHTML=a,r.show(s),o||t||(i.textContent=r.stripHTML(a),r.show(i))),o)){var c=r.stripHTML(o);l.textContent=c,t||(i.textContent=c,n.textContent=c,r.show(i)),r.show(l)}}
378({caption:i.attrs.caption,title:i.attrs.title,desc:i.attrs.desc}),function(e){if(!e||1!==Number(jetpackCarouselStrings.display_exif))return!1;var t=p.info.querySelector(".jp-carousel-image-meta");if(!t)return!1;var r="";for(var o in e){var a=e[o],i=jetpackCarouselStrings.meta_data||[];if(0!==parseFloat(a)&&a.length&&-1!==i.indexOf(o)){switch(o){case"focal_length":a+="mm";break;case"shutter_speed":a=C(a);break;case"aperture":a="f/"+a}r+="<li><h5>"+jetpackCarouselStrings[o]+"</h5>"+a+"</li>"}}var n=t.querySelector("ul.jp-carousel-image-exif");if(""!==r){if(!n){(n=document.createElement("ul")).className="jp-carousel-image-exif";var l=t.querySelector(".jp-carousel-title-and-caption");l&&l.nextSibling?t.insertBefore(n,l.nextSibling):t.insertBefore(n,t.firstChild)}n.innerHTML=r,n.style.removeProperty("display")}else n&&n.parentNode.removeChild(n)}(p.slides[e].attrs.imageMeta),function(e){if(!e)return!1;var r,o=[e.attrs.origWidth,e.attrs.origHeight],a=document.createElement("a");a.href=e.attrs.src.replace(/\?.+$/,""),r=null!==a.hostname.match(/^i[\d]{1}\.wp\.com$/i)?a.href:e.attrs.origFile.replace(/\?.+$/,"");var i=p.info.querySelector(".jp-carousel-download-text"),n=p.info.querySelector(".jp-carousel-image-download");i.innerHTML=t.applyReplacements(jetpackCarouselStrings.download_original,o),n.setAttribute("href",r),n.style.removeProperty("display")}(i),1===Number(jetpackCarouselStrings.display_comments)&&(o=p.slides[e].attrs.commentsOpened,a=p.info.querySelector("#jp-carousel-comment-form-container"),1===parseInt(o,10)?r.fadeIn(a):r.fadeOut(a),q(n),r.hide(p.info.querySelector("#jp-carousel-comment-post-results")));var s=p.info.querySelector(".jp-carousel-pagination");if(s&&p.slides.length>5){var c=e+1;s.innerHTML="<span>"+c+" / "+p.slides.length+"</span>"}jetpackCarouselStrings.stats&&p.isOpen&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?"+jetpackCarouselStrings.stats+"&post="+encodeURIComponent(n)+"&rand="+Math.random()),p.isOpen&&g(n),l="#jp-carousel-"+n,window.location.hash=l}function x(){document.body.style.overflow=a,document.documentElement.style.overflow=i,H(),f(),r.emitEvent(p.overlay,"jp_carousel.beforeClose"),window.scrollTo(window.scrollX||window.pageXOffset||0,n||0),p.isOpen=!1,e.destroy(),p.slides=[],p.currentSlide=void 0,p.gallery.innerHTML="",r.fadeOut(p.overlay,function(){r.emitEvent(p.overlay,"jp_carousel.afterClose")})}function k(e){if("object"!=typeof e&&(e={}),void 0===e.origFile)return"";if(void 0===e.origWidth||void 0===e.maxWidth)return e.origFile;if(!e.largeFile)return e.origFile;var t=document.createElement("a");t.href=e.largeFile;var r=/^i[0-2]\.wp\.com$/i.test(t.hostname),o=function(e,t,r){var o,a=r?e.replace(/.*=([\d]+%2C[\d]+).*$/,"$1"):e.replace(/.*-([\d]+x[\d]+)\..+$/,"$1");return"9999"===(o=a!==e?r?a.split("%2C"):a.split("x"):[t,0])[0]&&(o[0]="0"),"9999"===o[1]&&(o[1]="0"),o}(e.largeFile,e.origWidth,r),a=parseInt(o[0],10),i=parseInt(o[1],10);if(e.origMaxWidth=e.maxWidth,e.origMaxHeight=e.maxHeight,void 0!==window.devicePixelRatio&&window.devicePixelRatio>1&&(e.maxWidth=e.maxWidth*window.devicePixelRatio,e.maxHeight=e.maxHeight*window.devicePixelRatio),a>=e.maxWidth||i>=e.maxHeight)return e.largeFile;if(r){if(-1===e.largeFile.lastIndexOf("?"))return e.largeFile;var n=function(e){var t;try{t=new URL(e)}catch(t){return e}var r=["quality","ssl","filter","brightness","contrast","colorize","smooth"],o=Array.from(t.searchParams.entries());return t.search="",o.forEach(([e,o])=>{r.includes(e)&&t.searchParams.append(e,o)}),t}(e.largeFile);return(e.origWidth>e.maxWidth||e.origHeight>e.maxHeight)&&(e.origMaxWidth=2*e.maxWidth,e.origMaxHeight=2*e.maxHeight,n.searchParams.set("fit",e.origMaxWidth+","+e.origMaxHeight)),n.toString()}return e.origFile}function C(e){return e>=1?Math.round(10*e)/10+"s":"1/"+Math.round(1/e)+"s"}function E(e){return!e.match(" ")&&e.match("_")?"":e}function q(e,t){var a=void 0===t,i=p.info.querySelector(".jp-carousel-icon-comments .jp-carousel-has-comments-indicator");if(i.classList.remove("jp-carousel-show"),clearInterval(o),e){(!t||t<1)&&(t=0);var n=p.info.querySelector(".jp-carousel-comments"),l=p.info.querySelector("#jp-carousel-comments-loading");r.show(l),a&&(r.hide(n),n.innerHTML="");var s=new XMLHttpRequest,c=jetpackCarouselStrings.ajaxurl+"?action=get_attachment_comments&nonce="+jetpackCarouselStrings.nonce+"&id="+e+"&offset="+t;s.open("GET",c),s.setRequestHeader("X-Requested-With","XMLHttpRequest");var u=function(){r.fadeIn(n),r.fadeOut(l)};s.onload=function(){if(p.currentSlide&&p.currentSlide.attrs.attachmentId===e){var c,d=s.status>=200&&s.status<300;try{c=JSON.parse(s.responseText)}catch{}if(!d||!c||!Array.isArray(c))return u();a&&(n.innerHTML="");for(var m=0;m<c.length;m++){var g=c[m],h=document.createElement("div");h.classList.add("jp-carousel-comment"),h.setAttribute("id","jp-carousel-comment-"+g.id),h.innerHTML='<div class="comment-gravatar">'+g.gravatar_markup+'</div><div class="comment-content"><div class="comment-author">'+g.author_markup+'</div><div class="comment-date">'+g.date_gmt+"</div>"+g.content+"</div>",n.appendChild(h),clearInterval(o),o=setInterval(function(){p.container.scrollTop+150>window.innerHeight&&(q(e,t+10),clearInterval(o))},300)}c.length>0&&(r.show(n),i.innerText=c.length,i.classList.add("jp-carousel-show")),r.hide(l)}},s.onerror=u,s.send()}}function A(e){var t=e.attrs,r=e.el.querySelector("img");if(!r.hasAttribute("data-loaded"))if(r.setAttribute("itemprop","image"),r.setAttribute("data-loaded",1),t.previewImage&&t.previewImage!==t.src){r.src=t.previewImage,r.style.filter="blur(8px)";var o=new window.Image;o.addEventListener("load",function(){r.src=t.src,r.style.filter=""},{once:!0}),o.addEventListener("error",function(){r.style.filter=""},{once:!0}),o.src=t.src}else r.src=t.src}function _(e){var t=e.attrs.originalElement;if(t)if(t.complete&&0!==t.naturalHeight)T(e,t);else{var r=function(){t.removeEventListener("error",o),T(e,t)},o=function(){t.removeEventListener("load",r)};t.addEventListener("load",r,{once:!0}),t.addEventListener("error",o,{once:!0})}}
378function T(e,r){var o=t.getBackgroundImage(r);o&&(e.backgroundImage=o,e.el.style.backgroundImage="url("+o+")",e.el.style.backgroundSize="cover",e.el.style.backgroundPosition="center")}function H(){p.commentField&&(p.commentField.value="")}function I(e,o){p.slides=[];var a={width:window.innerWidth,height:window.innerHeight-64};0!==o&&null!==e[o].getAttribute("data-gallery-src")&&((new Image).src=e[o].getAttribute("data-gallery-src")),Array.prototype.forEach.call(e,function(e,o){var i=r.closest(e,"a"),n=e.getAttribute("data-orig-file")||e.getAttribute("src-orig"),l=e.getAttribute("data-attachment-id")||e.getAttribute("data-id")||"0",s=document.querySelector('img[data-attachment-id="'+l+'"] + figcaption');s=s?s.innerHTML:e.getAttribute("data-image-caption");var c={originalElement:e,attachmentId:l,commentsOpened:e.getAttribute("data-comments-opened")||"0",imageMeta:r.getJSONAttribute(e,"data-image-meta")||{},title:e.getAttribute("data-image-title")||"",desc:e.getAttribute("data-image-description")||"",largeFile:e.getAttribute("data-large-file")||"",origFile:n||"",thumbSize:{width:e.naturalWidth,height:e.naturalHeight},caption:s||"",permalink:i&&i.getAttribute("href"),src:n||e.getAttribute("src")||""},u=r.closest(e,".tiled-gallery-item"),d=u&&u.querySelector(".tiled-gallery-caption"),m=d&&d.innerHTML;m&&(c.caption=m);var g=function(e){var t=e.getAttribute("data-orig-size")||"";if(t){var r=t.split(",");return{width:parseInt(r[0],10),height:parseInt(r[1],10)}}return{width:e.getAttribute("data-original-width")||e.getAttribute("width")||void 0,height:e.getAttribute("data-original-height")||e.getAttribute("height")||void 0}}(e);if(c.origWidth=g.width||c.thumbSize.width,c.origHeight=g.height||c.thumbSize.height,"undefined"!=typeof wpcom&&wpcom.carousel&&wpcom.carousel.generateImgSrc?c.src=wpcom.carousel.generateImgSrc(e,a):c.src=k({origFile:c.src,origWidth:c.origWidth,origHeight:c.origHeight,maxWidth:a.width,maxHeight:a.height,largeFile:c.largeFile}),e.setAttribute("data-gallery-src",c.src),"0"!==c.attachmentId){c.title=t.texturize(c.title),c.desc=t.texturize(c.desc),c.caption=t.texturize(c.caption);var h=new Image,f=document.createElement("div");f.classList.add("swiper-slide"),f.setAttribute("itemprop","associatedMedia"),f.setAttribute("itemscope",""),f.setAttribute("itemtype","https://schema.org/ImageObject");var v=document.createElement("div");v.classList.add("swiper-zoom-container"),p.gallery.appendChild(f),f.appendChild(v),v.appendChild(h),f.setAttribute("data-attachment-id",c.attachmentId),f.setAttribute("data-permalink",c.permalink),f.setAttribute("data-orig-file",c.origFile),c.previewImage=e.currentSrc||e.getAttribute("src")||"";var y={el:f,attrs:c,index:o};p.slides.push(y)}})}function M(e,t){if(!window.JetpackSwiper){var o=document.querySelector("#jp-carousel-loading-overlay");r.show(o);var a=document.createElement("script");return a.id="jetpack-carousel-swiper-js",a.src=window.jetpackSwiperLibraryPath.url,a.async=!0,a.onload=function(){r.hide(o),F(e,t)},a.onerror=function(){r.hide(o)},void document.head.appendChild(a)}F(e,t)}function F(t,o){var l,s={imgSelector:".gallery-item [data-attachment-id], .tiled-gallery-item [data-attachment-id], img[data-attachment-id], img[data-id]",startIndex:0},c=r.getJSONAttribute(t,"data-carousel-extra");if(!c)return;const u=t.querySelectorAll(s.imgSelector);if(u.length&&(w(),!p.isOpen)){for(var d in p.isOpen=!0,a=getComputedStyle(document.body).overflow,document.body.style.overflow="hidden",i=getComputedStyle(document.documentElement).overflow,document.documentElement.style.overflow="hidden",n=window.scrollY||window.pageYOffset||0,p.container.setAttribute("data-carousel-extra",JSON.stringify(c)),m(["open","view_image"]),o||{})s[d]=o[d];-1===s.startIndex&&(s.startIndex=0),r.emitEvent(p.overlay,"jp_carousel.beforeOpen"),p.gallery.innerHTML="",p.overlay.style.opacity=1,p.overlay.style.display="block",I(u,s.startIndex),(e=new window.JetpackSwiper(".jp-carousel-swiper-container",{centeredSlides:!0,zoom:!0,loop:p.slides.length>1,enabled:p.slides.length>1,pagination:{el:".jp-swiper-pagination",clickable:!0},navigation:{nextEl:".jp-swiper-button-next",prevEl:".jp-swiper-button-prev"},initialSlide:s.startIndex,on:{init:function(){L(s.startIndex)}},preventClicks:!1,preventClicksPropagation:!1,preventInteractionOnTransition:!r.isTouch(),threshold:5})).on("slideChange",function(e){p.isOpen&&(L(e.realIndex),p.overlay.classList.remove("jp-carousel-hide-control
378s"))}),e.on("zoomChange",function(e,t){t>1&&p.overlay.classList.add("jp-carousel-hide-controls"),1===t&&p.overlay.classList.remove("jp-carousel-hide-controls")}),e.on("doubleTap",function(e){if(clearTimeout(l),1===e.zoom.scale)var t=setTimeout(function(){p.overlay.classList.remove("jp-carousel-hide-controls"),clearTimeout(t)},150)}),e.on("tap",function(){e.zoom.scale>1&&(l=setTimeout(function(){p.overlay.classList.toggle("jp-carousel-hide-controls")},150))}),r.fadeIn(p.overlay,function(){r.emitEvent(p.overlay,"jp_carousel.afterOpen")})}}function O(e){if("click"!==e.type){if("keydown"===e.type){const t=document.activeElement.parentElement,r=t&&t.classList.contains("tiled-gallery__item");" "!==e.key&&"Enter"!==e.key||!r||R(e)}}else R(e)}function N(e){return(e||"").split("?")[0].replace(/\/$/,"")}function W(e){"A"===e.tagName&&(e=e.querySelector("img")||e);var t=e.parentElement,o=t?t.parentElement:null,a=null;if(o&&o.classList.contains("wp-block-image")?a=t.getAttribute("href"):t&&t.classList.contains("wp-block-image")&&t.querySelector(":scope > a")&&(a=t.querySelector(":scope > a").getAttribute("href")),a){var i=N(a),n=N(e.getAttribute("data-orig-file")),l=N(e.getAttribute("data-permalink"));if(i!==n&&i!==l)return!1}return!(t&&t.classList.contains("gallery-caption")||r.matches(t,"figcaption"))}function R(e){if(window.CSS&&window.CSS.supports&&window.CSS.supports("display","grid")){var t,o=e.target,a=r.closest(o,c);if(a){if(!(t=a)||!t.getAttribute("data-carousel-extra"))return;if(!W(o))return;document.documentElement.style.height="auto",e.preventDefault(),e.stopPropagation();var i=r.closest(o,d),n=Array.prototype.indexOf.call(a.querySelectorAll(d),i);M(a,{startIndex:n})}}}document.body.addEventListener("click",O),document.body.addEventListener("keydown",O),document.querySelectorAll(u+"img").forEach(function(e){W(e)&&y(e)}),1===Number(jetpackCarouselStrings.single_image_gallery)&&(b(),document.body.addEventListener("is.post-load",function(){b()})),window.addEventListener("hashchange",function(){var e=/jp-carousel-(\d+)/;if(window.location.hash&&e.test(window.location.hash)){if(window.location.hash!==l||!p.isOpen)if(window.location.hash&&p.gallery&&!p.isOpen&&history.back)history.back();else{l=window.location.hash;for(var t=window.location.hash.match(e),r=parseInt(t[1],10),o=document.querySelectorAll(c),a=0;a<o.length;a++){for(var i,n=o[a],s=n.querySelectorAll("img"),u=0;u<s.length;u++)if(parseInt(s[u].getAttribute("data-attachment-id"),10)===r||parseInt(s[u].getAttribute("data-id"),10)===r){i=u;break}if(void 0!==i){S(n,i);break}}}}else p.isOpen&&x()}),window.location.hash&&r.emitEvent(window,"hashchange")}"loading"!==document.readyState?o():document.addEventListener("DOMContentLoaded",o)}();; 379( function () { 380 'use strict'; 381 382 if ( typeof window.wpcom === 'undefined' ) { 383 window.wpcom = {}; 384 } 385 386 if ( window.wpcom.carousel ) { 387 return; 388 } 389 390 var prebuilt_widths = jetpackCarouselStrings.widths; 391 var pageviews_stats_args = jetpackCarouselStrings.stats_query_args; 392 393 var findFirstLargeEnoughWidth = function ( original_w, original_h, dest_w, dest_h ) { 394 var inverse_ratio = original_h / original_w; 395 396 for ( var i = 0; i < prebuilt_widths.length; ++i ) { 397 if ( prebuilt_widths[ i ] >= dest_w || prebuilt_widths[ i ] * inverse_ratio >= dest_h ) { 398 return prebuilt_widths[ i ]; 399 } 400 } 401 402 return original_w; 403 }; 404 405 var removeResizeFromImageURL = function ( url ) { 406 return removeArgFromURL( url, 'resize' ); 407 }; 408 409 var removeArgFromURL = function ( url, arg ) { 410 var re = new RegExp( '[\\?&]' + arg + '(=[^?&]+)?' ); 411 if ( url.match( re ) ) { 412 return url.replace( re, '' ); 413 } 414 return url; 415 }; 416 417 var addWidthToImageURL = function ( url, width ) { 418 width = parseInt( width, 10 ); 419 // Give devices with a higher devicePixelRatio higher-res images (Retina display = 2, Android phones = 1.5, etc) 420 if ( 'undefined' !== typeof window.devicePixelRatio && window.devicePixelRatio > 1 ) { 421 width = Math.round( width * window.devicePixelRatio ); 422 } 423 url = addArgToURL( url, 'w', width ); 424 url = addArgToURL( url, 'h', '' ); 425 return url; 426 }; 427 428 var addArgToURL = function ( url, arg, value ) {
429 var re = new RegExp( arg + '=[^?&]+' ); 430 if ( url.match( re ) ) { 431 return url.replace( re, arg + '=' + value ); 432 } else { 433 var divider = url.indexOf( '?' ) !== -1 ? '&' : '?'; 434 return url + divider + arg + '=' + value; 435 } 436 }; 437 438 var stat = function ( names ) { 439 if ( typeof names !== 'string' ) { 440 names = names.join( ',' ); 441 } 442 443 new Image().src = window.location.protocol + 444 '//pixel.wp.com/g.gif?v=wpcom-no-pv' + 445 '&x_carousel=' + names + 446 '&baba=' + Math.random(); 447 }; 448 449 var lastTrackedPostId = null; 450 451 var pageview = function ( post_id ) { 452 // Prevent duplicate tracking of the same post during slide transitions 453 if ( post_id === lastTrackedPostId ) { 454 return; 455 } 456 457 lastTrackedPostId = post_id; 458 459 new Image().src = window.location.protocol + 460 '//pixel.wp.com/g.gif?host=' + encodeURIComponent( window.location.host ) + 461 '&ref=' + encodeURIComponent( document.referrer ) + 462 '&rand=' + Math.random() + 463 '&' + pageviews_stats_args + 464 '&post=' + encodeURIComponent( post_id ); 465 }; 466 467 var generateImgSrc = function ( srcItem, max ) { 468 var origSize = srcItem.getAttribute( 'data-orig-size' ) || ''; 469 470 var src = srcItem.getAttribute( 'src' ) || srcItem.getAttribute( 'original' ) || srcItem.getAttribute( 'data-original' ) || srcItem.getAttribute( 'data-lazy-src' ); 471 if ( src.indexOf( 'imgpress' ) !== -1 ) { 472 src = srcItem.getAttribute( 'data-orig-file' ); 473 } 474 // Square/Circle galleries use a resize param that needs to be removed. 475 src = removeResizeFromImageURL( src ); 476 src = addWidthToImageURL( 477 src, 478 findFirstLargeEnoughWidth( origSize.width, origSize.height, max.width, max.height ) 479 ); 480 481 return src; 482 }; 483 484 window.wpcom.carousel = { 485 findFirstLargeEnoughWidth: findFirstLargeEnoughWidth, 486 removeResizeFromImageURL: removeResizeFromImageURL, 487 addWidthToImageURL: addWidthToImageURL, 488 stat: stat, 489 pageview: pageview, 490 generateImgSrc: generateImgSrc 491 }; 492 493} )(); 494;
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.