PageSourceSearch

https://danskestudier.dk/_static/??-eJyVzs0OgjAMB/AXsg4IgZPxWcYoc+…K9PMLImlQeDhSmqTDCZZ9F3f6v7rmrbrqr7+QXZiocc

js danskestudier.dk collected 2026-09-24 23:32:05 UTC 79,338 bytes, 1,037 lines download raw bytes

vendor: 4,215 bytes, line 1
1(()=>{var t={14:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var n=i(191),o=i.n(n),s=i(261),d=i.n(s),r=i(160),a=i.n(r),l=new URL(i(240),i.b),c=d()(o()),h=a()(l);c.push([t.id,`.wordads-ad-wrapper {\n    position: static;\n    font: 11px Arial, sans-serif;\n    letter-spacing: 1px;\n    text-decoration: none;\n    max-width: 100%;\n    margin: 25px auto;\n    padding: 0;\n    display: flex;\n    justify-content: center;\n}\n\n.wordads-ad-wrapper--sidebar,\n.wordads-ad-wrapper--gutenberg_skyscraper,\n.wordads-ad-wrapper--gutenberg_mobile_leaderboard {\n    font-size: 8px;\n}\n\n.wordads-ad-title {\n    margin: 0 auto 5px\n}\n\n.wordads-ad-controls {\n    margin: 5px auto 0;\n    text-align: right\n}\n\n/* Hide title and controls initially */\n.wordads-ad-title,\n.wordads-ad-controls {\n    visibility: hidden;\n}\n\n.wordads-ad-controls span {\n    cursor: pointer\n}\n\n.wordads-ad {\n    margin: 0 auto;\n    width: fit-content;\n    max-width: 100%;\n    overflow: hidden;\n}\n\n.wordads-ad iframe {\n    margin: 0;\n    padding: 0\n}\n\n.wordads-ad.wordads-ad-responsive {\n    width: 100%;\n    max-width: unset\n}\n\n.wordads-ad-sticky-wrapper {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: auto;\n    position: fixed;\n    transition: transform .2s ease-in-out;\n    user-select: none;\n    padding: 5px 0;\n    z-index: 49999\n}\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-sticky-wrapper {\n    right: 0;\n    left: 0;\n    bottom: 0;\n    background: transparent;\n    transform: translate(0, 0);\n}\n\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-sticky-wrapper.ad-slot-filled {\n    background: #f1f1f1;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right.wordads-ad-sticky-wrapper {\n    width: fit-content;\n    min-width: 120px;\n    top: max(calc(var(--wp-admin--admin-bar--height, 0px) + 24px), 10%);\n    right: 20px;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-content {\n    border: 1px solid #f1f1f1;\n    margin-left: -1px;\n}\n\n.wordads-ad-sticky-close-btn {\n    width: 28px;\n    height: 28px;\n    position: absolute;\n    box-sizing: content-box;\n    cursor: pointer;\n    overflow: hidden;\n    background-size: 28px;\n    background-repeat: no-repeat;\n    background-position: center;\n    background-image: url(${h})\n}\n\n.wordads-ad-wrapper--bottom_sticky .wordads-ad-sticky-close-btn {\n    top: -14px;\n    left: .75rem;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-sticky-close-btn {\n    top: -14px;\n    right: 0;\n}\n\n.wordads-ad-sticky {\n    width: auto;\n    max-width: initial;\n    max-height: inherit;\n}\n\n.wordads-ad-sticky .wordads-ad-title,\n.wordads-ad-sticky .wordads-ad-controls {\n    color: #333\n}\n\n.wordads-ad-hidden {\n\tvisibility: hidden !important;\n\tposition: absolute !important;\n\tpointer-events: none !important;\n\twidth: 0 !important;\n\theight: 0 !important;\n\toverflow: hidden !important;\n\tclip: rect(0 0 0 0) !important;\n}\n\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-hidden {\n    transform: translate(0, 1000px);\n}\n\n.google-auto-placed {\n    height: 0px !important;\n}\n\nins.adsbygoogle::before,\nins.adsbygoogle::after {\n    visibility: hidden !important;\n}\n\nins.adsbygoogle {\n    background: transparent;\n    padding: 0 !important;\n}`,""]);const u=c},261:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var d={};if(n)for(var r=0;r<this.length;r++){var a=this[r][0];null!=a&&(d[a]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&d[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},160:t=>{"use strict";
1t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},191:t=>{"use strict";t.exports=function(t){return t[1]}},546:function(t){t.exports=function(){"use strict";function t(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}return function e(i,n){function o(e,o,s){if("undefined"!=typeof document){"number"==typeof(s=t({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var r in s)s[r]&&(d+="; "+r,!0!==s[r]&&(d+="="+s[r].split(";")[0]));return document.cookie=e+"="+i.write(o,e)+d}}return Object.create({set:o,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],n={},o=0;o<e.length;o++){var s=e[o].split("="),d=s.slice(1).join("=");try{var r=decodeURIComponent(s[0]);if(n[r]=i.read(d,r),t===r)break}catch(t){}}return t?n[t]:n}},remove:function(e,i){o(e,"",t({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,t({},this.attributes,i))},withConverter:function(i){return e(t({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},462:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>w});var n=i(157),o=i.n(n),s=i(869),d=i.n(s),r=i(318),a=i.n(r),l=i(825),c=i.n(l),h=i(597),u=i.n(h),g=i(770),p=i.n(g),m=i(14),f={};f.styleTagTransform=p(),f.setAttributes=c(),f.insert=a().bind(null,"head"),f.domAPI=d(),f.insertStyleElement=u(),o()(m.Z,f);const w=m.Z&&m.Z.locals?m.Z.locals:void 0},157:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},d=[],r=0;r<t.length;r++){var a=t[r],l=n.base?a[0]+n.base:a[0],c=s[l]||0,h="".concat(l," ").concat(c);s[l]=c+1;var u=i(h),g={css:a[1],media:a[2],sourceMap:a[3],supports:a[4],layer:a[5]};if(-1!==u)e[u].references++,e[u].updater(g);else{var p=o(g,n);n.byIndex=r,e.splice(r,0,{identifier:h,updater:p,references:1})}d.push(h)}return d}function o(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,o){var s=n(t=t||[],o=o||{});return function(t){t=t||[];for(var d=0;d<s.length;d++){var r=i(s[d]);e[r].references--}for(var a=n(t,o),l=0;l<s.length;l++){var c=i(s[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}s=a}}},318:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},597:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},825:(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},869:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},770:t=>{"use strict";
1t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},858:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=i(639),s=n(i(539)),d=i(444),r=i(501);class a extends s.default{constructor(t,e){super(t,e),this.config={},this.adSenseLibraryLoaded=!1,this.adFlowUrl="https://af.pubmine.com?api_version=2"}insertAdBefore(t,e,i){if(!this.shouldShowInlineAds())return;this.log(`Inserting ad before element: ${t.id} of type: ${e}`);const n=this.getRandomTagId(),o=this.createAdSnippet(n,i),s=this.wrapSnippet(o,e);t.insertAdjacentElement("beforebegin",s),this.slots.push({tagId:n,type:e,sizes:i,element:s,isLazy:!0}),this.trackStat("render_inline")}getAdFlowRequestBody(t){const{maxHeight:e,maxWidth:i}=(0,d.getMaxSlotDimension)(t.sizes),n={site:{id:String(this.config.blog_id),is_wordads:this.config.is_wordads,page:window.location.href,language:this.config.blog_language},ad:{tag:t.tagId,format:t.type,max_width:i,max_height:e},user:{uid:this.consent.getOrCreateUID(),gdpr:!1}};return this.consent.usPrivacy&&(n.user.us_privacy=this.consent.usPrivacy),this.consent.tcData&&(n.user.gdpr=!0,n.user.gdpr_consent=this.consent.tcData.tcString),n}shouldShowInlineAds(){var t,e;if(!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.inline)){const t=document.getElementsByTagName("body")[0];(t.classList.contains("single-post")||t.classList.contains("wp-singular"))&&(this.config.enabled_formats||(this.config.enabled_formats={}),this.config.enabled_formats.inline=!0)}return!!(null===(e=this.config.enabled_formats)||void 0===e?void 0:e.inline)}getMaxSlots(){return r.MAX_INLINE_SLOTS}getMaxBlazeSlots(){return r.MAX_INLINE_BLAZE_SLOTS}shouldShowBottomStickyAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.bottom_sticky)}shouldShowSidebarStickyRightAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.sidebar_sticky_right)}shouldShowTopAds(){var t;return!!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.top)}isSlotTypeEnabled(t){var e;return!!(null===(e=this.config)||void 0===e?void 0:e.formats.includes(t))}getSlotFormatId(t){}getBottomStickySlots(){return(0,r.getSortedSlotSizes)(o.SlotType.BOTTOM_STICKY)}convertFormatsToObject(t){return t.reduce(((t,e)=>(t[e]=!0,t)),{})}initAdNetwork(){this.initDynamicAdSlots(),this.initAditude()}mergeConfig(){var t;window.isWatlV1=!1;const e=this.getServerConfig();e&&(this.config=this.deepMerge(e,this.config)),this.config.enabled_formats=this.convertFormatsToObject(this.config.formats),this.log("Merged config:"),this.log(null!==(t=this.config)&&void 0!==t?t:{})}handleAdResponse(t,e){const i=!!this.config.afp_account_id,n=t.content.indexOf("window.tude")>-1;if(!(t.content.indexOf("var sas = sas")>-1)&&n&&this.forceAfpAds&&i)return void this.renderGoogleAfpAd(e.tagId);const o=!!(null==t?void 0:t.content),s=!!(null==t?void 0:t.pixel);if(o){const e=document.createElement("script");e.type="application/javascript",e.innerHTML=t.content,document.body.appendChild(e)}if(s){const e=new XMLHttpRequest;e.open("GET",t.pixel),e.send()}this.trackAdFlowRequestLatency(o,e.tagId,e.type)}tryUsingIponwebSlots(){var t;window.__ATA=window.__ATA||{cmd:[]},window.__ATA.cmd=window.__ATA.cmd||[];const e=this;window.__ATA.initSlot=function(t,i){var n;const s=document.getElementById(t);if(s&&(0===s.children.length||"SCRIPT"===(null===(n=s.children[0])||void 0===n?void 0:n.tagName))){const n=(0,r.getFormatBySizes)(i.width,i.height);if(!n)return;const d=s.getBoundingClientRect();d.width<i.width&&(s.style.width=`${i.width}px !important`),d.height<i.height&&(s.style.height=`${i.height}px !important`);const a=e.createAdSnippet(t,[[i.width,i.height]]),l=e.wrapSnippet(a,o.SlotType.GUTENBERG_RECTANGLE);s.insertAdjacentElement("beforebegin",l),s.remove(),window.iponwebTags=window.iponwebTags||[],window.iponwebTags.push(t),window.tudeMappings.push({divId:t,format:n,width:i.width,height:i.height}),e.log(`Use IPONWEB's container for ${t} (${i.width}x${i.height}px), format: ${n}`)}},window.__ATA.initDynamicSlot=function(t){var e,i;const n=document.getElementById(t.id);if(n){const o=Math.round(null!==(i=null===(e=n.getBoundingClientRect())||void 0===e?void 0:e.width)&&void 0!==i?i:0);o>=300&&o<970&&window.__ATA.initSlot(t.id,{width:300,height:250})}},window.__ATA.initVideoSlot=function(t){window.__ATA.initDynamicSlot({id:t})};const i=null!==(t=window.__ATA.cmd.push)&&void 0!==t?t:()=>{};for(const t of window.__ATA.cmd)"function"==typeof t&&t!==i&&t()}initDynamicAdSlots(){var t,e,i,n,s,d;this.log("Initializing Gutenberg ad slots"),window.tudeMappings=window.tudeMappings||[],this.tryUsingIponwebSlots();for(const a of window.tudeMappings){(null==a?void 0:a.width)&&(null==a?void 0:a.height)||([a.width,a.height]=null!==(t=(0,r.getFilteredSlotSizesByWidthAndHeight)(a.format,728,250)[0])&&void 0!==t?t:[300,250]);const{divId:l,format:c,width:h,height:u}=a,g=document.getElementById(l);if(g){if((null===(i=null===(e=null==g?void 0:g.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.classList.contains("inline"))&&(null===(s=null===(n=g.parentElement.parentElement)||void 0===n?void 0:n.parentElement)||void 0===s?void 0:s.classList.contains("wpa"))&&(null===(d=g.parentElement.parentElement.parentElement.parentElement)||void 0===d?void 0:d.classList.contains("wpcnt"))){const t=g.getBoundingClientRect();t.width<a.width&&(g.style.width=`${a.width}px !important`),t.height<a.height&&(g.style.height=`${a.height}px !important`);const e=this.createAdSnippet(l,[[a.width,a.height]]),i=this.wrapSnippet(e,o.SlotType.GUTENBERG_RECTANGLE),n=g.parentElement.parentElement.parentElement.parentElement;n.insertAdjacentElement("beforebegin",i),n.remove(),g.remove()}this.slots.push({tagId:l,type:c,sizes:[[h,u]],element:g,isLazy:!0}),this.log(`Gutenberg ad slot ${l} initialized`)}else this.log(`Gutenberg ad slot ${l} not found`)}}initAditude(){this.log("Initializing Aditude"),window.tude=window.tude||{cmd:[]},window.Raven=window.Raven||{cmd:[]},window.tude.cmd.push((()=>
1{if(window.tude&&"function"==typeof window.tude.setPageTargeting){const t={param1:String(this.config.blog_id),param2:String(this.config.is_wordads),param3:String(this.config.hosting_type),param4:this.config.theme};window.tude.setPageTargeting(t),this.log("Aditude debug: custom dimensions set "+JSON.stringify(t))}})),window.tude.cmd.push((()=>{window.tude.events.addEventListener("tude_ad_filled",(t=>{this.log("aditude debug event: tude_ad_filled "+JSON.stringify(t)),this.handleAd({tagId:t.detail.id,adNetwork:"Aditude"})})),window.tude.events.addEventListener("tude_ad_unfilled",(t=>{this.log(`Aditude debug event: tude_ad_unfilled (${t.detail.id})`),this.handleNoAd({tagId:t.detail.id,adNetwork:"Aditude"})})),window.tude.events.addEventListener("tude_no_ad_sizes",(t=>{this.log(`Aditude debug event: tude_no_ad_sizes ${t.detail.id}`),this.handleNoAd({tagId:t.detail.id,adNetwork:"Aditude"})}))}))}getLibrariesToFetch(){return{prebid:{loaded:!1,url:"https://dn0qt3r0xannq.cloudfront.net/wordpress-2Pvwql52OT/wordpress-longform/prebid-load.js",isInitialized:()=>void 0!==window.tude,init:()=>{window.tude=window.tude||{cmd:[]}}}}}getServerConfig(){const t=super.getServerConfig();if(void 0!==window.wa_smart&&!0===window.isWatlV1){let[,e]=window.wa_smart.target.split(";");e=e.replace("language=","").split("_")[0];const i=[];for(const t of Object.values(o.SlotType)){const e=window.wa_smart[t];(null==e?void 0:e.enabled)&&i.push(t)}return Object.assign(Object.assign({},t),{blog_language:e,hosting_type:2,theme:window.wa_smart.theme,formats:i})}return t}setAdContainerVisibility(t,e){var i,n,s,d,r,a,l,c,h,u,g;const p=this.slots.find((e=>e.tagId===t));if(!p)return void this.log(`Ad container not found: ${t}`);const m=[o.SlotType.GUTENBERG_LEADERBOARD,o.SlotType.GUTENBERG_RECTANGLE,o.SlotType.GUTENBERG_MOBILE_LEADERBOARD,o.SlotType.GUTENBERG_SKYSCRAPER].includes(p.type);let f=null;if(m&&!(null===(i=window.iponwebTags)||void 0===i?void 0:i.includes(t))){const e=(null===(r=null===(d=null===(s=null===(n=p.element)||void 0===n?void 0:n.parentElement)||void 0===s?void 0:s.parentElement)||void 0===d?void 0:d.parentElement)||void 0===r?void 0:r.parentElement)||null;f=null!==e&&e.classList.contains("wpcnt")?e:null===(l=null===(a=document.getElementById(t))||void 0===a?void 0:a.parentElement)||void 0===l?void 0:l.parentElement}else f=m&&(null===(c=window.iponwebTags)||void 0===c?void 0:c.includes(t))?null===(h=p.element.parentElement)||void 0===h?void 0:h.parentElement:p.element;if(null===(u=p.element.parentElement)||void 0===u||u.querySelectorAll(".wordads-ad-title, .wordads-ad-controls").forEach((t=>{t instanceof HTMLElement&&(t.style.visibility=e?"visible":"hidden")})),f){if(f.classList.toggle("wordads-ad-hidden",!e),!e){const e=document.getElementById(t),i=null===(g=null==e?void 0:e.parentElement)||void 0===g?void 0:g.parentElement;i&&(null==i?void 0:i.classList.contains("ad-slot-filled"))&&i.classList.remove("ad-slot-filled")}}else this.log(`Ad container element not found: ${t}`)}showAdContainer(t){this.setAdContainerVisibility(t,!0)}hideAdContainer(t){this.setAdContainerVisibility(t,!1)}handleAd(t){super.handleAd(t),this.showAdContainer(t.tagId)}handleNoAd(t){this.config.afp_account_id?this.renderGoogleAfpAd(t.tagId):(this.log("Google AFP account is missing"),super.handleNoAd(t),this.hideAdContainer(t.tagId))}renderGoogleAfpAd(t){this.slots.filter((t=>t.type===o.SlotType.TOP)).length>1&&t.indexOf("atatags-dynamic-top-")>-1||this.tryLoadAdsenseLib(t,(()=>{var e;const i=this.config.afp_host_id,n=this.config.afp_account_id;if(!i||!n)return void this.log("Ad host or client ID is missing.");const o=document.getElementById(t);if(!o)return void this.log(`AFP Ad container not found: ${t}`);this.configureGoogleAdContainer(o,t);let s=this.getSlotDimensions(o,t);const d=o.getBoundingClientRect();d.width<s.minWidth&&(o.style.width=`${s.minWidth}px !important`),d.height<s.minHeight&&(o.style.height=`${s.minHeight}px !important`),o.innerHTML=this.createGoogleAdElement(String(n),String(i),s.minWidth,s.minHeight,t),this.log(`Adding observer to adDiv: ${o.id} with slotElementId: ${t}`),this.setupGoogleAdStatusObserver(o,null===(e=o.parentElement)||void 0===e?void 0:e.parentElement)}))}getSlotDimensions(t,e){const i=this.slots.find((t=>t.tagId===e));if(!i){const e=parseInt(t.getAttribute("data-ad-width")||"0",10),i=parseInt(t.getAttribute("data-ad-height")||"0",10);return{minWidth:Math.min(e,300),minHeight:Math.min(i,250)}}const n=i.sizes[i.sizes.length-1],o=(0,d.getCompatibleGoogleAdSizes)(n[0],n[1]),[s,r]=[300,250];
1return o?{minWidth:o[0],minHeight:o[1]}:{minWidth:s,minHeight:r}}getSlot(t){return this.slots.find((e=>e.tagId===t.id))}configureGoogleAdContainer(t,e){var i;const{minWidth:n,minHeight:s}=this.getSlotDimensions(t,e),d=null===(i=t.parentElement)||void 0===i?void 0:i.parentElement;if(!d)return;const r=this.getSlot(t);if((null==r?void 0:r.type)===o.SlotType.BOTTOM_STICKY){let t=s+20;for(const e of[".wordads-ad-title",".wordads-ad-controls"]){const i=d.querySelector(e);i&&(t+=i.offsetHeight||0)}d.style.maxHeight=`${String(t)}px`}else d.style.margin="40px auto","absolute"===window.getComputedStyle(d).position&&(d.style.position="static"),t.style.width=`${n}px`,t.style.height=`${s}px`}createGoogleAdElement(t,e,i,n,s){const d=this.slots.find((t=>t.tagId===s));let r=!1,a=null;(null==d?void 0:d.type)===o.SlotType.BOTTOM_STICKY||[728,970].includes(i)&&90===n?a=7415555587:(null==d?void 0:d.type)===o.SlotType.INLINE||300===i&&250===n?(a=2877544770,r=!0):(null==d?void 0:d.type)===o.SlotType.SIDEBAR_STICKY_RIGHT||120===i&&600===n?a=9195541113:(null==d?void 0:d.type)===o.SlotType.GUTENBERG_MOBILE_LEADERBOARD||320===i&&50===n?a=4785522812:(null==d?void 0:d.type)===o.SlotType.GUTENBERG_SKYSCRAPER||160===i&&600===n?a=5523889413:300===i&&250===n&&(a=6074553751),this.log(`Creating Google AFP ad element for #${s} (${i}x${n}px)`+(null!==a?`, slotId: ${a}`:""));let l=r?'data-ad-format="auto" data-full-width-responsive="true"':`data-ad-width="${i}" data-ad-height="${n}"`;return null!==a&&(l+=` data-ad-slot="${a}"`),`\n\t\t\t<ins class="adsbygoogle"\n\t\t\t\tstyle="${r?"display:block":`display:block;width:${i}px !important;height:${n}px !important;`}"\n\t\t\t\tdata-ad-client="ca-${t}"\n\t\t\t\tdata-ad-host="ca-host-pub-${e}"\n\t\t\t\tdata-ad-host-channel="${this.config.is_wordads?5598771027:3624119425}"\n\t\t\t\t\n\t\t\t\t${l}>\n\t\t\t</ins>\n\t\t`}setupGoogleAdStatusObserver(t,e){if(!e)return;let i=null;const n=t.id,o=this.slots.findIndex((t=>t.tagId===n));-1!==o&&void 0!==this.slots[o]&&(this.slots[o].isProcessed=!1);const s=new MutationObserver((e=>{var n;for(const d of e)if("attributes"===d.type&&"data-ad-status"===d.attributeName){const e=d.target.getAttribute("data-ad-status");let r=null!==(n=d.target.parentElement)&&void 0!==n?n:t;if("filled"===e){this.showAdContainer(r.id),this.log(`Google AFP rendered. Div: ${r.id} Status: ${e}`);const t=this.getSlot(r);(null==t?void 0:t.onAd)&&t.onAd()}else this.hideAdContainer(r.id),this.log(`Google AFP rendered. Div: ${r.id}. Status: ${e}`);null!==i&&clearTimeout(i),-1!==o&&void 0!==this.slots[o]&&(this.slots[o].isProcessed=!0),s.disconnect()}})),d=t.querySelector(".adsbygoogle");d&&(s.observe(d,{attributes:!0,attributeFilter:["data-ad-status"]}),i=setTimeout((()=>{var t;-1!==o&&this.slots[o]&&!1===(null!==(t=this.slots[o].isProcessed)&&void 0!==t&&t)&&(this.hideAdContainer(n),this.slots[o].isProcessed=!0,s.disconnect(),this.log("Time limit for processing Google AFP is exceeded for #"+n))}),5e3)),this.initializeAdsbyGoogle()}initializeAdsbyGoogle(){if(void 0===window.adsbygoogle){const t=setInterval((()=>{void 0!==window.adsbygoogle&&(clearInterval(t),this.initAdsByGoogle(),this.log("Google AFP initialized"))}),100);setTimeout((()=>clearInterval(t)),1e3)}else this.initAdsByGoogle()}initAdsByGoogle(){try{(window.adsbygoogle||[]).push({})}catch(t){let e="Failed to render Google AFP";t instanceof Error&&(e+=": "+t.message),this.log(e)}}tryLoadAdsenseLib(t,e){if(this.adSenseLibraryLoaded)return this.log("Adsense library already loaded"),void e();let i=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-${String(this.config.afp_account_id)}`;if(document.querySelector(`script[src="${i}"]`)){let i=0;const n=setInterval((()=>{if(++i,100*i/1e3>=5)return clearInterval(n),void this.hideAdContainer(t);this.adSenseLibraryLoaded&&(e(),clearInterval(n))}),100)}else{const n=document.createElement("script");n.src=i,n.async=!0;const o=setTimeout((()=>{this.log("Adsense library load timeout exceeded"),this.hideAdContainer(t)}),5e3);n.onload=()=>{clearTimeout(o),this.log("Adsense library loaded"),this.adSenseLibraryLoaded=!0,e()},n.onerror=()=>{this.log("Failed to load Adsense library"),this.hideAdContainer(t)},document.head.appendChild(n)}}}e.default=a}
1,12:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(202));i(462),e.default=class{constructor(){this.listenersController=new AbortController,this.signal=this.listenersController.signal,this.consent=new o.default}getConsent(){return this.consent}getListenersController(){return this.listenersController}init(t){t.preInit(),this.signal.onabort=()=>t.log("Event listeners removed"),document.addEventListener("scroll",t.throttle((()=>{t.processAds()}),250),{signal:this.signal}),document.addEventListener("resize",t.throttle((()=>{t.processAds()}),250),{signal:this.signal}),window.addEventListener("message",(e=>{t.handlePostMessage(e)}),{signal:this.signal})}}},501:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSortedSlotSizes=e.getFormatBySizes=e.getFilteredSlotSizesByWidthAndHeight=e.getFilteredSlotSizesByWidth=e.MAX_INLINE_BLAZE_SLOTS=e.MAX_INLINE_SLOTS=void 0;const n=i(639);e.MAX_INLINE_SLOTS=40,e.MAX_INLINE_BLAZE_SLOTS=20,e.getFilteredSlotSizesByWidth=(t,e)=>(s[t]||[]).filter((([t])=>t<=e)),e.getFilteredSlotSizesByWidthAndHeight=(t,e,i)=>(s[t]||[]).filter((([t,n])=>t<=e&&n<=i));const o=document.documentElement.clientWidth<800,s=Object.freeze({[n.SlotType.TOP]:o?[[320,50]]:[[970,250],[970,90],[728,90]],[n.SlotType.INLINE]:o?[[300,250],[320,50]]:[[970,250],[728,90],[300,250]],[n.SlotType.BELOW_POST]:o?[[300,250]]:[[300,250],[728,90]],[n.SlotType.BOTTOM_STICKY]:o?[[320,50],[468,60]]:[[728,90],[970,90]],[n.SlotType.SIDEBAR]:o?[[120,600],[160,600],[300,250],[300,400],[300,600]]:[[120,600],[160,600],[300,600]],[n.SlotType.SIDEBAR_STICKY_RIGHT]:o?[]:[[120,600],[160,600],[300,250],[300,600],[400,600]],[n.SlotType.GUTENBERG_RECTANGLE]:[[300,250]],[n.SlotType.GUTENBERG_LEADERBOARD]:[[728,90]],[n.SlotType.GUTENBERG_MOBILE_LEADERBOARD]:[[320,50]],[n.SlotType.GUTENBERG_SKYSCRAPER]:[[160,600]],[n.SlotType.SIDEBAR_WIDGET_MEDIUMRECTANGLE]:[[300,250]],[n.SlotType.SIDEBAR_WIDGET_LEADERBOARD]:[[728,90]],[n.SlotType.SIDEBAR_WIDGET_WIDESKYSCRAPER]:[[160,600]],[n.SlotType.SHORTCODE]:[[300,250]]});e.getFormatBySizes=(t,e)=>{for(const[i,o]of Object.entries(s))if(![n.SlotType.TOP,n.SlotType.BOTTOM_STICKY,n.SlotType.SIDEBAR,n.SlotType.SIDEBAR_STICKY_RIGHT,n.SlotType.SIDEBAR_WIDGET_MEDIUMRECTANGLE,n.SlotType.SIDEBAR_WIDGET_LEADERBOARD,n.SlotType.SIDEBAR_WIDGET_WIDESKYSCRAPER,n.SlotType.SIDEBAR_WIDGET_WIDESKYSCRAPER,n.SlotType.INLINE,n.SlotType.SHORTCODE,n.SlotType.BELOW_POST].includes(i)&&o.some((([i,n])=>i===t&&n===e)))return i;return null},e.getSortedSlotSizes=t=>s[t].sort(((t,e)=>{const i=e[0]-t[0];return 0!==i?i:e[1]-t[1]}))},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SMART_NETWORK_ID=void 0,e.SMART_NETWORK_ID=3905},506:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(12)),s=n(i(858)),d=new o.default,r=new s.default(d.getConsent(),d.getListenersController());d.init(r)},313:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDirection=void 0,function(t){t.UP="up",t.DOWN="down"}(i||(e.ScrollDirection=i={}))},639:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.StickySlotTypes=e.SlotType=void 0,function(t){t.TOP="top",t.INLINE="inline",t.BELOW_POST="belowpost",t.BOTTOM_STICKY="bottom_sticky",t.SIDEBAR="sidebar",t.SIDEBAR_STICKY_RIGHT="sidebar_sticky_right",t.GUTENBERG_RECTANGLE="gutenberg_rectangle",t.GUTENBERG_LEADERBOARD="gutenberg_leaderboard",t.GUTENBERG_MOBILE_LEADERBOARD="gutenberg_mobile_leaderboard",t.GUTENBERG_SKYSCRAPER="gutenberg_skyscraper",t.SIDEBAR_WIDGET_MEDIUMRECTANGLE="sidebar_widget_mediumrectangle",t.SIDEBAR_WIDGET_LEADERBOARD="sidebar_widget_leaderboard",t.SIDEBAR_WIDGET_WIDESKYSCRAPER="sidebar_widget_wideskyscraper",t.SHORTCODE="shortcode"}(i||(e.SlotType=i={})),e.StickySlotTypes=[i.BOTTOM_STICKY,i.SIDEBAR_STICKY_RIGHT]},202:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};
1Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(546)),s=i(586);e.default=class{constructor(){this.logging=!1,this.tcData=null,this.usPrivacy=null,this.uid=null}setLogging(t){this.logging=t}log(t){this.logging&&console.log(t)}init(){this.log("Initializing consent..."),window.__uspapi?(this.log("Querying USP API..."),window.__uspapi("getUSPData",1,((t,e)=>{e&&t.uspString&&(this.usPrivacy=t.uspString,this.log("USP API data found. Setting consent: "+this.usPrivacy))}))):this.log("USP API not found"),window.__tcfapi?(this.log("Querying TCF API..."),window.__tcfapi("addEventListener",2,((t,e)=>{var i;e&&t.gdprApplies?(this.tcData=t,this.log("TCF API data found. Setting consent: "+(null===(i=this.tcData)||void 0===i?void 0:i.tcString)),this.initCookieSync()):this.log("TCF API data found. GDPR does not apply")}))):this.log("TCF API not found")}createUIDFromCookies(t,e,i){const n={expires:e,domain:i||window.location.hostname};this.log(`Created UID from Cookies on ${n.domain}`);const s=o.default.withAttributes(n),d=this.generateUIDValue();return s.set(t,d),d}generateUIDValue(){return Math.random().toString(36).substring(2,10)+(new Date).getTime().toString()}getOrCreateUIDFromLocalStorage(t,e){this.log("UID from localStorage");const i=(localStorage.getItem(t)||"").split(":");let n=i[0];const o=(new Date).getTime();let s=parseInt(i[1]);return(!n||o>s)&&(n=this.generateUIDValue(),s=o+24*e*60*60*1e3,localStorage.setItem(t,n+":"+s)),n}getOrCreateUID(){if(null!==this.uid)return this.uid;if(!this.hasUserConsent())return this.uid="",this.uid;const t="wordads_uid",e=o.default.get(t);if(e)return this.log(`Reused UID value ${e}`),this.uid=e,this.uid;const i=this.getCookiesSharedDomain(t,window.location.hostname);return window.localStorage&&!i||(this.uid=this.createUIDFromCookies(t,30,i)),this.uid=this.uid||this.getOrCreateUIDFromLocalStorage(t,30),this.log(`UID value: ${this.uid}`),this.uid}getCookiesSharedDomain(t,e){const i=e.split(".");if(i.length<=2)return null;let n=null,s=0;for(const d of i){if(s+=d.length,n=e.substring(s),s>=e.length)return null;const i=o.default.withAttributes({domain:n});if(i.set(t,"1")&&i.get(t))return i.remove(t),n;s++}return null}hasUserConsent(){return!this.tcData||!0===this.tcData.vendor.consents[496]&&!0===this.tcData.purpose.consents[1]}initCookieSync(){this.log("Initializing Cookie Sync");let t=`https://sync.smartadserver.com/getuid?nwid=${s.SMART_NETWORK_ID}&url=https://af.pubmine.com/user-sync?pid=[sas_uid]`;this.tcData&&(t+=`&gdpr=1&gdpr_consent=${this.tcData.tcString}`),document.createElement("img").src=t}}},444:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCompatibleGoogleAdSizes=e.convertFormatsToObject=e.getMaxSlotDimension=void 0;const i=[[970,250],[970,90],[728,90],[336,280],[320,100],[300,600],[300,250],[250,250],[200,200],[320,50],[300,50],[468,60],[160,600],[120,600]];e.getMaxSlotDimension=t=>{let e=0,i=0;return t.forEach((([t,n])=>{t>e&&(e=t),n>i&&(i=n)})),{maxWidth:e,maxHeight:i}},e.convertFormatsToObject=t=>t.reduce(((t,e)=>(t[e]=!0,t)),{}),e.getCompatibleGoogleAdSizes=(t,e)=>{const n=i.find((([i,n])=>i<=t&&n<=e));return null!=n?n:null}},539:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=i(501),o=i(639),s=i(313),d=i(444),r=["BLOCKQUOTE","DIV","FIGURE","FORM","H1","H2","H3","H4","H5","H6","P","UL"];e.default=class{constructor(t,e){this.logging="function"==typeof URLSearchParams&&"true"===new URLSearchParams(window.location.search).get("wordads-logging"),this.consent=t,this.consent.setLogging(this.logging),this.adFlowUrl="https://af.pubmine.com",this.slots=[],this.initialized=!1,this.config={},this.scroll={lastDirection:s.ScrollDirection.DOWN,lastY:window.scrollY},this.listenersController=e,this.forceAfpAds="function"==typeof URLSearchParams&&"1"===new URLSearchParams(window.location.search).get("afp_test")}log(t){this.logging&&console.log(t)}logSlot(t,e){if(!this.logging)return;const i=t.sizes.map((([t,e])=>t+"x"+e)).join(","),n=[t.type,t.tagId,i].join("|");this.log(`[${n}] ${e}`)}trackStat(t){window._stq=window._stq||[],window._stq.push(["extra",{x_wordads_smart:t}])}recordTracksEvent(t,e){e=e||{},window._tkq=window._tkq||[],window._tkq.push(["recordEvent",t,e])}getServerConfig(){var t,e;const i=document.getElementById("adflow-configuration"),n=i?JSON.parse(i.innerText):{},o=null!==(e=null===(t=null===window||void 0===window?void 0:window.wa_client)||void 0===t?void 0:t.config)&&void 0!==e?e:null===window||void 0===window?void 0:window.wa_smart;return this.deepMerge(n,o)}createAdSnippet(t,e){let i=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div");if(i.classList.add("wordads-ad"),n.classList.add("wordads-ad-title"),o.classList.add("wordads-ad-content"),s.classList.add("wordads-ad-controls"),n.innerText=this.config._.title,o.id=t,e){const{maxHeight:t,maxWidth:i}=(0,d.getMaxSlotDimension)(e);o.setAttribute("data-ad-height",t.toString()),o.setAttribute("data-ad-width",i.toString())}return s.innerHTML=this.consent.tcData?`<span onclick="__tcfapi( 'showUi' )">${this.config._.privacy_settings}</span>`:"",i.appendChild(n),i.appendChild(o),i.appendChild(s),i}getBottomStickySlots(){}createBottomStickyAdSnippet(t){const e=this.getBottomStickySlots(),i=this.createAdSnippet(t,e);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,o.SlotType.BOTTOM_STICKY);n.classList.add("wordads-ad-sticky-wrapper");const d=()=>{this.toggleVisibility(n,s.ScrollDirection.DOWN)},r=document.createElement("div");
1return r.classList.add("wordads-ad-sticky-close-btn"),r.onclick=function(){n.remove(),document.removeEventListener("scroll",d)},n.insertBefore(r,i),{event:d,snippet:n}}createSidebarStickyAdSnippet(t,e){const i=this.createAdSnippet(t);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,e);n.classList.add("wordads-ad-sticky-wrapper");const o=this.throttle((()=>{this.updateSidebarStickyVisibility(n)}),150),s=document.createElement("div");return s.classList.add("wordads-ad-sticky-close-btn"),s.onclick=function(){n.remove(),window.removeEventListener("resize",o),document.removeEventListener("scroll",o)},n.insertBefore(s,i),{event:o,snippet:n,adContent:i.querySelector(".wordads-ad-content")}}toggleVisibility(t,e){const i=window.scrollY>this.scroll.lastY?s.ScrollDirection.DOWN:s.ScrollDirection.UP,n=this.scroll.lastDirection===i;if(this.scroll.lastDirection=i,this.scroll.lastY=window.scrollY,n)return;const o="wordads-ad-hidden";e===i?t.classList.remove(o):t.classList.add(o)}wrapSnippet(t,e){const i=document.createElement("div");return i.classList.add("wordads-ad-wrapper"),i.classList.add(`wordads-ad-wrapper--${e}`),i.appendChild(t),i}checkBrandSafety(t,e){}handleNotOkayResponse(t,e){var i;if(this.log(`Site unable to show ads: ${e.tagId}`),204===t){const t=document.getElementById(e.tagId),n=null===(i=null==t?void 0:t.parentElement)||void 0===i?void 0:i.parentElement;t&&(null==n?void 0:n.classList.contains("wordads-ad-wrapper"))&&n.classList.add("wordads-ad-hidden"),this.listenersController.abort()}}callAdFlow(t){this.logSlot(t,"calling AdFlow");const e=new XMLHttpRequest;e.onreadystatechange=()=>{if(XMLHttpRequest.DONE===e.readyState){if(performance.mark(`${t.tagId}-end`),200!==e.status)return void this.handleNotOkayResponse(e.status,t);const i=JSON.parse(e.response);this.handleAdResponse(i,t)}},e.open("POST",this.adFlowUrl),e.setRequestHeader("Accept","application/json"),e.withCredentials=!0,performance.mark(`${t.tagId}-start`);const i=this.getAdFlowRequestBody(t);e.send(JSON.stringify(i))}trackAdFlowRequestLatency(t,e,i){let n=performance.measure(`${e}-duration`,`${e}-start`,`${e}-end`),o={has_ad:t,ad_type:i,request_time:Math.round(n.duration),theme:this.config.theme};navigator.connection&&(o.connection_effective_type=navigator.connection.effectiveType,o.connection_downlink=navigator.connection.downlink),this.recordTracksEvent("wpcom_wordads_adflow",o)}insertFallbackAd(t,e){let i=(window.sas_fallback||[]).filter((function(t){return t.type===e}));if(0===i.length)return t.remove(),void this.log(`No fallback found for ${e}, snippet removed`);let n=i[0].tag.replaceAll("{{unique_id}}",Math.trunc(1e6*Math.random())),o=document.createElement("div");o.innerHTML=n,n=o.childNodes[0].nodeValue;let s=document.createElement("div");s.innerHTML=n,t.style.position="relative",t.style.visibility="visible",t.innerHTML=s.innerHTML,s.querySelectorAll("script").forEach((function(t){t.parentNode&&t.parentNode.removeChild(t);let e=document.createElement("script");t.src?e.src=t.src:t.textContent?e.textContent=t.textContent:t.innerText&&(e.innerText=t.innerText),document.body.appendChild(e)})),this.trackStat("fallback_"+e)}getPostItems(t){let e=[];for(let i=0;i<t.children.length;i++){let n=t.children[i];this.isPostItemValid(n)&&e.push(n)}return e}getFontSize(t){const e=t.parentElement;if(e)for(let t=0;t<e.children.length;t++){const i=e.children[t];if("P"===i.nodeName)return parseFloat(window.getComputedStyle(i).fontSize)}return 16}isPostItemVisible(t){const e=window.getComputedStyle(t);return!!t.offsetParent&&"hidden"!==e.visibility&&"none"!==e.display&&t.offsetHeight>=this.getFontSize(t)}isPostItemValid(t,e=!1){if(!t||!r.includes(t.nodeName))return!1;if(e&&"DIV"===t.nodeName){let e=!1;const i=4,n=t=>{var e;return!(null===(e=document.evaluate('//div[contains(@class, "wpcnt")]/div[contains(@class, "wpa")]/div/div/div[starts-with(@id, "atatags-")]',t,null,XPathResult.ANY_UNORDERED_NODE_TYPE,null).singleNodeValue)||void 0===e||!e)},o=t=>{var e;return!(null===(e=document.evaluate('//div[contains(@class, "wordads-ad-wrapper")]',t,null,XPathResult.ANY_UNORDERED_NODE_TYPE,null).singleNodeValue)||void 0===e||!e)},s=(t,e)=>{if(e>i)return!1;for(let i=0;i<t.children.length;i++){const d=t.children[i];if(o(d))return!0;
1if(n(d))return!0;if(s(d,e+1))return!0}return!1};if(e=s(t,1),e)return!1}return this.isPostItemVisible(t)}getFloatingElements(t){let e=[],i=t.getElementsByTagName("*");for(let t=0;t<i.length;t++){let n=i[t],o=getComputedStyle(n),s=o.getPropertyValue("position"),d=o.getPropertyValue("float");"relative"!==s&&"absolute"!==s&&"none"===d||e.push(n)}return e}getElementGlobalPosition(t){let e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX,bottom:e.top+window.scrollY+e.height,right:e.left+window.scrollX+e.width}}collidesWithElements(t,e){let i=this.getElementGlobalPosition(t),n=!1;return e.forEach((t=>{let e=this.getElementGlobalPosition(t);i.bottom<e.top||i.top>e.bottom||i.right<e.left||i.left>e.left||(n=!0)})),n}getInlineFormatId(){}initInlineAds(){if(!this.shouldShowInlineAds())return;this.log(`Initializing ${o.SlotType.INLINE}`);let t=document.getElementById("wordads-inline-marker");if(!t)return void this.trackStat("inline_no_marker");let e=t.parentElement;if(!e)return;const i=this.getAvailableWidth(e),s=(0,n.getFilteredSlotSizesByWidth)(o.SlotType.INLINE,i);t.remove();let d=this.getMaxSlots(),r=0;const a=window.innerHeight,l=Math.ceil(1.1*a),c=Math.ceil(1.2*a);let h=e.getBoundingClientRect().top+window.scrollY+l;const u=this.getPostItems(e),g=this.getFloatingElements(e);if(u.length>0)for(let t=0;t<u.length;t++){const e=t>0?u[t-1]:null,i=t<u.length-1?u[t+1]:null,n=u[t],a=n.getBoundingClientRect().top+window.scrollY,l=a>h,p=e&&this.isPostItemValid(e,!0),m=this.isPostItemValid(n,!0),f=null===i||i&&this.isPostItemValid(i,!0),w=this.collidesWithElements(n,g);l&&r<d&&p&&m&&f&&!w&&(this.insertAdBefore(n,o.SlotType.INLINE,s,r,this.getInlineFormatId()),h=a+c,r++)}0===r&&this.trackStat("inline_no_insert")}getBottomStickyFormatId(){}initBottomSticky(){if(!this.shouldShowBottomStickyAds())return;this.log(`Initializing ${o.SlotType.BOTTOM_STICKY}`);const t=this.getRandomTagId(),{event:e,snippet:i}=this.createBottomStickyAdSnippet(t);document.body.append(i);const s=document.documentElement.clientWidth,d=(0,n.getFilteredSlotSizesByWidth)(o.SlotType.BOTTOM_STICKY,s),r=this.getBottomStickyFormatId();this.slots.push(Object.assign({tagId:t,type:o.SlotType.BOTTOM_STICKY,sizes:d,element:i,isLazy:!1,onAd:function(){var i;document.addEventListener("scroll",e,{passive:!0});const n=document.getElementById(t),o=null===(i=null==n?void 0:n.parentElement)||void 0===i?void 0:i.parentElement;o&&o.classList.add("ad-slot-filled")}},r?{formatId:r}:{}))}getSidebarStickyRightFormatId(){}initSidebarStickyRight(){var t,e;if(!this.shouldShowSidebarStickyRightAds())return;this.log(`Initializing ${o.SlotType.SIDEBAR_STICKY_RIGHT}`);const i=this.getRandomTagId(),{event:s,snippet:d,adContent:r}=this.createSidebarStickyAdSnippet(i,o.SlotType.SIDEBAR_STICKY_RIGHT),a=null!==(t=document.querySelectorAll(".wp-site-blocks"))&&void 0!==t?t:[];if(1===a.length)a[0].append(d);else{const t=null!==(e=document.querySelectorAll("div#page"))&&void 0!==e?e:[];1===t.length?t[0].append(d):document.body.append(d)}const{maxWidth:l,maxHeight:c}=this.getMaxAvailableSidebarStickySize(d);null==r||r.setAttribute("data-ad-height",c.toString()),null==r||r.setAttribute("data-ad-width",l.toString());const h=(0,n.getFilteredSlotSizesByWidthAndHeight)(o.SlotType.SIDEBAR_STICKY_RIGHT,l,c);if(!h.length)return this.log(`No size available for ${o.SlotType.SIDEBAR_STICKY_RIGHT}`),void d.remove();const u=this.getSidebarStickyRightFormatId();this.slots.push(Object.assign({tagId:i,type:o.SlotType.SIDEBAR_STICKY_RIGHT,sizes:h,element:d,isLazy:!1,onAd:()=>{this.updateSidebarStickyVisibility(d),window.addEventListener("resize",s,{passive:!0}),document.addEventListener("scroll",s,{passive:!0})}},u?{formatId:u}:{}))}appendTopTag(){const t=this.getRandomTagId(),e=document.createElement("div");e.id=t;const i=document.documentElement.clientWidth,s=(0,n.getFilteredSlotSizesByWidth)(o.SlotType.TOP,i),d=this.createAdSnippet(t,s),r=this.wrapSnippet(d,o.SlotType.TOP);return document.body.insertBefore(e,document.body.firstChild),e.insertAdjacentElement("beforebegin",r),e.remove(),this.slots.push({tagId:t,type:o.SlotType.TOP,sizes:s,element:r,isLazy:!0}),e}initTop(){if(!this.shouldShowTopAds())return;this.log(`Initializing ${o.SlotType.TOP}`);const t=Array.from(document.getElementsByClassName("wordads-tag"));let[e]=t.filter((t=>t.dataset.slotType===o.SlotType.TOP));e&&e.remove(),e=this.appendTopTag()}updateSidebarStickyVisibility(t){const e=t.offsetHeight;
1this.isWithinViewportHeight(e)&&!this.checkIfAdIsOverlappingContent(t)?(this.log("sidebar_sticky_right: ad slot can fit"),t.classList.remove("wordads-ad-hidden")):(this.log("sidebar_sticky_right: ad slot CANNOT fit"),t.classList.add("wordads-ad-hidden"))}isWithinViewportHeight(t){return t<=.8*window.innerHeight}getOverlappingElements(t,e,i){return t=Math.round(t),e=Math.round(e),document.elementsFromPoint(t,e).filter((t=>{return!((e=t)===i||i.contains(e)||e.contains(i));var e}))}isElementAboveSnippet(t,e){const i=e.getBoundingClientRect(),n=[[i.left+1,i.top+1],[i.right-1,i.top+1],[i.left+1,i.bottom-1],[i.right-1,i.bottom-1],[i.left+i.width/2,i.top+i.height/2]];for(const[i,o]of n){const n=document.elementsFromPoint(i,o);if(n.indexOf(t)<n.indexOf(e))return!0}return!1}checkIfAdIsOverlappingContent(t){const e=t.getBoundingClientRect(),i=[...this.getOverlappingElements(e.left,e.top,t),...this.getOverlappingElements(e.right,e.top,t),...this.getOverlappingElements(e.right,e.bottom,t),...this.getOverlappingElements(e.left,e.bottom,t)].map((t=>t.classList.contains("wordads-ad-wrapper")&&t.querySelector(".wordads-ad-content")||t)),n=[];for(const t of i){const i=t.getBoundingClientRect();if(!(Math.round(e.right)<=Math.round(i.left)||Math.round(e.left)>=Math.round(i.right)||Math.round(e.bottom)<=Math.round(i.top)||Math.round(e.top)>=Math.round(i.bottom))){const e=window.getComputedStyle(t);"none"!==e.display&&"hidden"!==e.visibility&&"0"!==e.opacity&&n.push(t)}}return n.some((e=>this.isElementAboveSnippet(e,t)))}getMaxAvailableSidebarStickySize(t){const e=(0,n.getSortedSlotSizes)(o.SlotType.SIDEBAR_STICKY_RIGHT);for(const[i,n]of e){t.style.width=`${i}px`,t.style.height=`${n}px`;const e=this.checkIfAdIsOverlappingContent(t);if(t.style.width="",t.style.height="",!e&&this.isWithinViewportHeight(n))return this.log(`sidebar_sticky_right: max available size without overlap, [${i}, ${n}]`),{maxWidth:i,maxHeight:n}}return this.log("sidebar_sticky_right: no slot size fits available space"),{maxWidth:0,maxHeight:0}}initAdTags(){var t;this.log("Initializing ad tags");const e=Array.from(document.getElementsByClassName("wordads-tag"));for(let i=0;i<e.length;i++){const o=e[i],s=null!==(t=o.dataset.slotType)&&void 0!==t?t:"",d=this.getSlotFormatId(s),r=this.getAvailableWidth(o.parentElement),a=(0,n.getFilteredSlotSizesByWidth)(s,r);this.log(`Initializing ad tag ${i+1}: ${s}, format id: ${d}`),s?this.isSlotTypeEnabled(s)?null!==d?a.length?(this.insertAdBefore(o,s,a,i,d),o.remove()):(this.log(`No available sizes for slot type: ${s}`),o.remove()):(this.log(`Invalid slot type: ${s}`),o.remove()):(this.log(`Disabled slot type: ${s}`),o.remove()):(this.log(`Slot type not provided: ${s}`),o.remove())}}getAvailableWidth(t){if(!t)return 0;const e=window.getComputedStyle(t),i=parseFloat(e.paddingLeft),n=parseFloat(e.paddingRight);return t.getBoundingClientRect().width-(i+n)}getFormat(t){}handleNoAdWithSmart(){}handleNoAd(t){let e=this.getSlotByTagId(t.tagId);e?((null==t?void 0:t.adNetwork)?this.logSlot(e,`Got NoAd from ${null==t?void 0:t.adNetwork}, requesting a fallback`):this.logSlot(e,"Got NoAd, requesting a fallback"),window.iponwebTags=window.iponwebTags||[],window.iponwebTags.includes(e.tagId)||this.insertFallbackAd(e.element,e.type),this.checkBrandSafety(t,e),this.trackStat("noad_"+e.type)):this.log(`NoAd: no slot found for tag id: ${t.tagId}, format: ${this.getFormat(t)}`)}handleAd(t){let e=this.getSlotByTagId(t.tagId);e?((null==t?void 0:t.adNetwork)?this.logSlot(e,`Got an Ad from ${null==t?void 0:t.adNetwork}`):this.logSlot(e,"Got an Ad"),o.StickySlotTypes.indexOf(e.type)>-1?e.element.style.position="fixed":e.element.style.position="relative",e.element.style.visibility="visible",e.onAd&&e.onAd(),this.trackStat("ad_"+e.type)):this.log(`Ad: no slot found for tag id: ${t.tagId}, format: ${this.getFormat(t)}`)}handlePostMessage(t){if("object"!=typeof t.data)return;if("wa-inline-frame"!==t.data.type)return;const e=t;let i=document.getElementsByTagName("iframe");for(let t=0;t<i.length;t++)if(i[t].contentWindow===e.source){i[t].style.height=Math.ceil(e.data.height)+"px";let n=i[t].closest(".wordads-ad");n&&(n.classList.contains("wordads-ad-responsive")||n.classList.add("wordads-ad-responsive"),e.data.maxWidth&&n.querySelectorAll(".wordads-ad-title, .wordads-ad-controls").forEach((t=>{t.style.maxWidth=e.data.maxWidth})));break}}getSlotByTagId(t){return this.slots.find((e=>e.tagId===t))}getRandomTagId(){return"wordads-ad-"+Math.trunc(1e6*Math.random())}throttle(t,e){let i=!1;return(...n)=>{i||(t(...n),i=!0,setTimeout((()=>{i=!1}),e))}}isElementInLazyViewport(t){let e=window.innerHeight,i=window.scrollY,n=i-e,o=i+2*e,s=this.getElementGlobalPosition(t);return!(s.bottom<=n||s.top>=o)}processAds(){this.log("processAds: "+this.slots.length),0!==this.slots.length&&this.slots.forEac
1h((t=>{if(t.isLoaded)return;const e=!t.isLazy||this.isElementInLazyViewport(t.element),i=this.checkIfAdIsOverlappingContent(t.element);i&&t.type===o.SlotType.TOP&&(this.logSlot(t,"Top overlaps with other elements, we have to remove it from slots"),this.slots=this.slots.filter((e=>e!==t)),t.element.remove()),!e||i&&t.type!==o.SlotType.BOTTOM_STICKY||(this.logSlot(t,"in view"),t.isLoaded=!0,this.callAdFlow(t))}))}tryInit(t){const e=Object.values(t).map((t=>t.loaded&&t.isInitialized())).filter(Boolean);Object.keys(t).length===e.length&&(this.log("All scripts loaded, initializing..."),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{this.init()})):this.init())}preInit(){this.log("Running Pre Init");const t=this.getLibrariesToFetch();for(const[e,i]of Object.entries(t)){if(i.isInitialized())continue;this.log(`Fetching ${e} script`),i.init();const n=document.createElement("script");n.src=i.url,n.async=!0,n.addEventListener("load",(()=>{this.log(`${e} is loaded`),t[e]=Object.assign(Object.assign({},i),{loaded:!0}),this.tryInit(t)})),document.head.appendChild(n)}}init(){this.log("Init..."),this.mergeConfig(),this.consent.init(),this.initAdNetwork(),this.consent.initCookieSync(),this.initAds()}initAds(){this.initialized||(this.initialized=!0,this.initInlineAds(),this.initTop(),this.initBottomSticky(),this.initSidebarStickyRight(),this.initAdTags(),this.processAds())}deepMerge(t,e){for(let i in e)e.hasOwnProperty(i)&&(e[i]instanceof Object&&t[i]instanceof Object?t[i]=this.deepMerge(t[i],e[i]):t[i]=e[i]);return t}}},240:t=>{"use strict";t.exports="data:image/svg+xml,%3Csvg width=%2730%27 height=%2730%27 viewBox=%270 0 30 30%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 fill=%27white%27/%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 stroke=%27%23DDDDDF%27/%3E%3Cpath d=%27M19 11L15 15L19 19%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3Cpath d=%27M11 19L15 15L11 11%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3C/svg%3E"}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.m=t,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href,i.nc=void 0,i(506)})();;
2( function() {
3	var cookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/, '$1' );
4	var overlay = document.querySelector( '#eu-cookie-law' );
5	var container = document.querySelector( '.widget_eu_cookie_law_widget' );
6	var initialScrollPosition, scrollFunction;
7
8	function remove( el ) {
9		return el && el.parentElement && el.parentElement.removeChild( el );
10	}
11
12	function triggerDismissEvent() {
13		try {
14			const dismissEvent = new Event( 'eucookielaw-dismissed' );
15			document.dispatchEvent( dismissEvent );
16		} catch ( err ) { }
17	}
18
19	function removeOverlay() {
20		remove( overlay );
21		triggerDismissEvent();
22	}
23
24	function fade( el, type, fn ) {
25		var duration = 400;
26
27		el.style.display = 'block';
28		el.style.transitionProperty = 'opacity';
29		el.style.transitionDuration = duration + 'ms';
30		el.style.opacity = type === 'in' ? 0 : 1;
31
32		// Double rAF to ensure styles are applied cross-browser.
33		requestAnimationFrame( function () {
34			requestAnimationFrame( function() {
35				el.style.opacity = type === 'in' ? 1 : 0;
36				// Wait for animation.
37				setTimeout( function () {
38					// Clean up.
39					el.style.removeProperty( 'opacity' );
40					el.style.removeProperty( 'transition-property' );
41					el.style.removeProperty( 'transition-duration' );
42
43					if ( type === 'out' ) {
44						el.style.display = 'none';
45					}
46
47					if ( typeof fn === 'function' ) {
48						fn();
49					}
50				}, duration + 50 );
51			} );
52		} );
53	}
54
55	function appendWidget() {
56		document.body.appendChild( container );
57		overlay.style.display = 'block';
58		fade( container, 'in' );
59	}
60
61	if ( typeof wp !== 'undefined' && !! wp.customize ) {
62		appendWidget();
63		return;
64	}
65
66	if ( ! overlay || ! container ) {
67		return;
68	}
69
70	if ( overlay.classList.contains( 'ads-active' ) ) {
71		var adsCookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/, '$1' );
72		if ( cookieValue !== '' && adsCookieValue !== '' ) {
73			removeOverlay();
74		}
75	} else if ( cookieValue !== '' ) {
76		removeOverlay();
77	}
78
79	appendWidget();
80
81	overlay.querySelector( 'form' ).addEventListener( 'submit', accept );
82
83	if ( overlay.classList.contains( 'hide-on-scroll' ) ) {
84		initialScrollPosition = window.pageYOffset;
85
86		scrollFunction = function() {
87			if ( Math.abs( window.pageYOffset - initialScrollPosition ) > 50 ) {
88				accept();
89			}
90		};
91
92		window.addEventListener( 'scroll', scrollFunction );
93	} else if ( overlay.classList.contains( 'hide-on-time' ) ) {
94		var timeout = parseInt( overlay.getAttribute( 'data-hide-timeout' ), 10 ) || 0;
95		setTimeout( accept, timeout * 1000 );
96	}
97
98	var accepted = false;
99	function accept( event ) {
100		if ( accepted ) {
101			return;
102		}
103		accepted = true;
104
105		if ( event && event.preventDefault ) {
106			event.preventDefault();
107		}
108
109		if ( overlay.classList.contains( 'hide-on-scroll' ) ) {
110			window.removeEventListener( 'scroll', scrollFunction );
111		}
112
113		var expireTime = new Date();
114		var consentExpiration = parseInt( overlay.getAttribute( 'data-consent-expiration' ), 10 ) || 0;
115		expireTime.setTime( expireTime.getTime() + ( consentExpiration * 24 * 60 * 60 * 1000 ) );
116
117		document.cookie = 'eucookielaw=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
118		if ( overlay.classList.contains( 'ads-active' ) && overlay.classList.contains( 'hide-on-button' ) ) {
119			document.cookie = 'personalized-ads-consent=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
120		}
121
122		fade( overlay, 'out', function() {
123			removeOverlay();
124			remove( container );
125		} );
126	}
127} )();
128;
129/**
130 * Comment Likes - JavaScript
131 *
132 * This handles liking and unliking comments, as well as viewing who has
133 * liked a particular comment.
134 *
135 * @dependency  Swipe (dynamically loaded when needed)
136 *
137 * @package     Comment_Likes
138 * @subpackage  JavaScript
139 */
140(function () {
141	function init() {
142		let extWin;
143		let extWinCheck;
144		let commentLikeEvent;
145
146		// Only run once.
147		if (window.comment_likes_loaded) {
148			return;
149		}
150		window.comment_likes_loaded = true;
151
152		// Client-side cache of who liked a particular comment to avoid
153		// having to hit the server multiple times for the same data.
154		const commentLikeCache = {};
155
156		let swipeLibPromise;
157
158		// Load the Swipe library, if it's not already loaded.
159		function swipeLibLoader() {
160			if (!swipeLibPromise) {
161				swipeLibPromise = new Promise((resolve, reject) => {
162					if (window.Swipe) {
163						resolve(window.Swipe);
164					} else {
165						const swipeScript = document.createElement('script');
166						swipeScript.src = comment_like_text.swipeUrl;
167						swipeScript.async = true;
168						document.body.appendChild(swipeScript);
169						swipeScript.addEventListener('load', () => resolve(window.Swipe));
170						swipeScript.addEventListener('error', error => reject(error));
171					}
172				});
173			}
174			return swipeLibPromise;
175		}
176
177		/**
178		 * Parse the comment ID from a comment like link.
179		 */
180		function getCommentId(link) {
181			const commentId =
182				link && link.getAttribute('href') && link.getAttribute('href').split('like_comment=');
183			return commentId[1].split('&_wpnonce=')[0];
184		}
185
186		/**
187		 * Handle an ajax action on the comment like link.
188		 */
189		function handleLinkAction(link, action, commentId, callback) {
190			const nonce =
191				link && link.getAttribute('href') && link.getAttribute('href').split('_wpnonce=')[1];
192
193			fetch('/wp-admin/admin-ajax.php', {
194				method: 'POST',
195				body: new URLSearchParams({
196					action: action,
197					_wpnonce: nonce,
198					like_comment: commentId,
199					blog_id: Number(link.dataset.blog),
200				}),
201				headers: {
202					'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
203					'X-Requested-With': 'XMLHttpRequest',
204					Accept: 'application/json',
205					'cache-control': 'no-cache',
206					pragma: 'no-cache',
207				},
208			})
209				.then(response => response.json())
210				.then(callback);
211		}
212
213		function startPolling() {
214			// Append cookie polling login iframe to this window to wait for user to finish logging in (or cancel)
215			const loginIframe = document.createElement('iframe');
216			loginIframe.id = 'wp-login-polling-iframe';
217			loginIframe.src = 'https://wordpress.com/public.api/connect/?iframe=true';
218			document.body.appendChild(loginIframe);
219			loginIframe.style.display = 'none';
220		}
221
222		function stopPolling() {
223			const iframe = document.querySelector('#wp-login-polling-iframe');
224			if (iframe) {
225				iframe.remove();
226			}
227		}
228
229		function hide(el) {
230			if (el && el.style) {
231				el.style.display = 'none';
232			}
233		}
234
235		function show(el) {
236			if (el && el.style) {
237				el.style.removeProperty('display');
238			}
239		}
240
241		// Overlay used for displaying comment like info.
242		class Overlay {
243			constructor() {
244				// Overlay element.
245				this.el = document.createElement('div');
246				this.el.classList.add('comment-likes-overlay');
247				document.body.appendChild(this.el);
248				hide(this.el);
249
250				this.el.addEventListener('mouseenter', () => {
251					// Don't hide the overlay if the user is mousing over it.
252					overlay.cancelHide();
253				});
254
255				this.el.addEventListener('mouseleave', () => overlay.requestHide());
256
257				// Inner contents of overlay.
258				this.innerEl = null;
259
260				// Instance of the Swipe library.
261				this.swipe = null;
262
263				// Timeout used for hiding the overlay.
264				this.hideTimeout = null;
265			}
266
267			// Initialise the overlay for use, removing any old content.
268			clear() {
269				// Unload any previous instance of Swipe (to avoid leaking a global
270				// event handler). This is done before clearing the contents of the
271				// overlay because Swipe expects the slides to still be present.
272				if (this.swipe) {
273					this.swipe.kill();
274					this.swipe = null;
275				}
276				this.el.innerHTML = '';
277				this.innerEl = document.createElement('div');
278				this.innerEl.classList.add('inner');
279				this.el.appendChild(this.innerEl);
280			}
281
282			/**
283			 * Construct a list (<ul>) of user (gravatar, name) details.
284			 *
285			 * @param  data     liker data returned from the server
286			 * @param  klass    CSS class to apply to the <ul> element
287			 * @param  start    index of user to start at
288			 * @param  length   number of users to include in the list
289			 *
290			 * @return          A container element with the list
291			 */
292			getUserBits(data, klass, start, length) {
293				start = start || 0;
294				let last = start + (length || data.length);
295				last = last > data.length ? data.length : last;
296				const container = document.createElement('div');
297				container.classList.add('liker-list');
298				let html = `<ul class="${klass || ''}">`;
299				for (let i = start; i < last; ++i) {
300					const user = data[i];
301					html += `
302						<li>
303							<a rel="nofollow" title="${user.display_name_esc}" href="${user.profile_url_esc}">
304								<img src="${user.avatar_url_esc}" alt="${user.display_name_esc}" />
305								<span class="user-name">${user.display_name_esc}</span>
306							</a>
307						</li>
308					`;
309				}
310				html += '</ul>';
311				container.innerHTML = html;
312				return container;
313			}
314
315			/**
316			 * Render the display of who has liked this comment. The type of
317			 * display depends on how many people have liked the comment.
318			 * If more than 10 people have liked the comment, this function
319			 * renders navigation controls and sets up the Swipe library for
320			 * changing between pages.
321			 *
322			 * @param link  the element over which the user is hovering
323			 * @param data  the results retrieved from the server
324			 */
325			showLikes(link, data) {
326				this.clear();
327
328				link.dataset.likeCount = data.length;
329				if (data.length === 0) {
330					// No likers after all.
331					hide(this.el);
332					return;
333				}
334
335				this.innerEl.style.padding = '12px';
336
337				if (data.length < 6) {
338					// Only one column needed.
339					this.innerEl.style.maxWidth = '200px';
340					this.innerEl.innerHTML = '';
341					this.innerEl.appendChild(this.getUserBits(data, 'single'));
342					this.setPosition(link);
343				} else if (data.length < 11) {
344					// Two columns, but only one page.
345					this.innerEl.innerHTML = '';
346					this.innerEl.appendChild(this.getUserBits(data, 'double'));
347					this.setPosition(link);
348				} else {
349					// Multiple pages.
350					this.renderLikesWithPagination(data, link);
351				}
352			}
353
354			/**
355			 * Render multiple pages of likes with pagination controls.
356			 * This function is intended to be called by `showLikes` above.
357			 *
358			 * @param data  the results retrieved from the server
359			 */
360			renderLikesWithPagination(data, link) {
361				swipeLibLoader().then(() => {
362					const page_count = Math.ceil(data.length / 10);
363					// Swipe requires two nested containers.
364					const swipe = document.createElement('div');
365					swipe.classList.add('swipe');
366					this.innerEl.appendChild(swipe);
367
368					const wrap = document.createElement('div');
369					wrap.classList.add('swipe-wrap');
370					swipe.appendChild(wrap);
371
372					for (let i = 0; i < page_count; ++i) {
373						wrap.appendChild(this.getUserBits(data, 'double', i * 10, 10));
374					}
375
376					/**
377					 * Navigation controls.
378					 * This is based on the Newdash controls found in
379					 *    reader/recommendations-templates.php
380					 */
381					const nav = document.createElement('nav');
382					nav.classList.add('slider-nav');
383
384					let navContents = `
385						<a href="#" class="prev">
386							<span class="noticon noticon-previous" title="Previous" alt="<"></span>
387						</a>
388						<span class="position">
389					`;
390					for (let i = 0; i < page_count; ++i) {
391						navContents += `<em data-page="${i}" class="${i === 0 ? 'on' : ''}">&bull;</em>`;
392					}
393					navContents += `
394						</span>
395						<a href="#" class="next">
396							<span class="noticon noticon-next" title="Next" alt=">"></span>
397						</a>
398					`;
399					this.innerEl.appendChild(nav);
400					nav.innerHTML = navContents;
401
402					/** Set up Swipe. **/
403					// Swipe cannot be set up successfully unless its container
404					// is visible, so we show it now.
405					show(this.el);
406					this.setPosition(link);
407
408					this.swipe = new Swipe(swipe, {
409						callback: function (pos) {
410							// Update the pagination indicators.
411							//
412							// If there are exactly two pages, Swipe has a weird
413							// special case where it duplicates both pages and
414							// can return index 2 and 3 even though those aren't
415							// real pages (see swipe.js, line 47). To deal with
416							// this, we use the expression `pos % page_count`.
417							pos = pos % page_count;
418							nav.querySelectorAll('em').forEach(em => {
419								const page = Number(em.dataset.page);
420								em.setAttribute('class', pos === page ? 'on' : '');
421							});
422						},
423					});
424
425					nav.querySelectorAll('em').forEach(em => {
426						em.addEventListener('click', e => {
427							// Go to the page corresponding to the indicator clicked.
428							this.swipe.slide(Number(em.dataset.page));
429							e.preventDefault();
430						});
431					});
432					// Previous and next buttons.
433					nav.querySelector('.prev').addEventListener('click', e => {
434						this.swipe.prev();
435						e.preventDefault();
436					});
437					nav.querySelector('.next').addEventListener('click', e => {
438						this.swipe.next();
439						e.preventDefault();
440					});
441				});
442			}
443
444			/**
445			 * Open the overlay and show a loading message.
446			 */
447			showLoadingMessage(link) {
448				this.clear();
449				this.innerEl.textContent = comment_like_text.loading;
450				this.setPosition(link);
451			}
452
453			/**
454			 * Position the overlay near the current comment.
455			 *
456			 * @param link  element near which to position the overlay
457			 */
458			setPosition(link) {
459				// Prepare a down arrow icon for the bottom of the overlay.
460				const icon = document.createElement('span');
461				this.el.appendChild(icon);
462				icon.classList.add('icon', 'noticon', 'noticon-downarrow');
463				icon.style.textShadow = '0px 1px 1px rgb(223, 223, 223)';
464
465				const rect = link.getBoundingClientRect();
466				const win = document.defaultView;
467				const offset = {
468					top: rect.top + win.scrollY,
469					left: rect.left + win.scrollX,
470				};
471
472				// Take measurements with the element fully visible.
473				show(this.el);
474				let left = offset.left - (this.el.offsetWidth - link.offsetWidth) / 2;
475				left = left < 5 ? 5 : left;
476				let top = offset.top - this.el.offsetHeight + 5;
477				hide(this.el);
478
479				const adminBar = document.querySelector('#wpadminbar');
480
481				// Check if the overlay would appear off the screen.
482				if (top < win.scrollY + ((adminBar && adminBar.offsetHeight) || 0)) {
483					// We'll display the overlay beneath the link instead.
484					top = offset.top + link.offsetHeight;
485					// Instead of using the down arrow icon, use an up arrow.
486					icon.remove();
487					this.el.prepend(icon);
488					icon.classList.remove('noticon-downarrow');
489					icon.classList.add('noticon-uparrow');
490					icon.style.textShadow = '0px -1px 1px rgb(223, 223, 223)';
491					icon.style.verticalAlign = 'bottom';
492				}
493
494				this.el.style.left = `${left}px`;
495				this.el.style.top = `${top}px`;
496				show(this.el);
497
498				// The height of the arrow icon differs slightly between browsers,
499				// so we compute the margin here to make sure it isn't disjointed
500				// from the overlay.
501				icon.style.marginTop = `${icon.scrollHeight - 26}px`;
502				icon.style.marginBottom = `${20 - icon.scrollHeight}px`;
503
504				// Position the arrow to be horizontally centred on the link.
505				icon.style.paddingLeft = `${
506					offset.left - left + (link.offsetWidth - icon.scrollWidth) / 2
507				}px`;
508			}
509
510			/**
511			 * Return whether the overlay is visible.
512			 */
513			isVisible() {
514				return this.el.style.getPropertyValue('display') !== 'none';
515			}
516
517			/**
518			 * Request that the overlay be hidden after a short delay.
519			 */
520			requestHide() {
521				if (this.hideTimeout !== null) {
522					return;
523				}
524				this.hideTimeout = setTimeout(() => {
525					hide(this.el);
526					this.clear();
527				}, 300);
528			}
529
530			/**
531			 * Cancel a request to hide the overlay.
532			 */
533			cancelHide() {
534				if (this.hideTimeout !== null) {
535					clearTimeout(this.hideTimeout);
536					this.hideTimeout = null;
537				}
538			}
539		}
540
541		// Overlay used for displaying comment like info.
542		const overlay = new Overlay();
543
544		// The most recent comment for which the user has requested to see
545		// who liked it.
546		var relevantComment;
547
548		// Precache after this timeout.
549		var precacheTimeout = null;
550
551		/**
552		 * Fetch the like data for a particular comment.
553		 */
554		function fetchLikeData(link, commentId) {
555			commentLikeCache[commentId] = null;
556
557			const container = link && link.parentElement && link.parentElement.parentElement;
558			const star = container.querySelector('a.comment-like-link');
559			star &&
560				handleLinkAction(star, 'view_comment_likes', commentId, data => {
561					// Populate the cache.
562					commentLikeCache[commentId] = data;
563
564					// Only show the overlay if the user is interested.
565					if (overlay.isVisible() && relevantComment === commentId) {
566						overlay.showLikes(link, data);
567					}
568				});
569		}
570
571		function readCookie(c) {
572			const nameEQ = c + '=';
573			const cookieStrings = document.cookie.split(';');
574
575			for (let i = 0; i < cookieStrings.length; i++) {
576				let cookieString = cookieStrings[i];
577				while (cookieString.charAt(0) === ' ') {
578					cookieString = cookieString.substring(1, cookieString.length);
579				}
580				if (cookieString.indexOf(nameEQ) === 0) {
581					const chunk = cookieString.substring(nameEQ.length, cookieString.length);
582					const pairs = chunk.split('&');
583					const cookieData = {};
584					for (let num = pairs.length - 1; num >= 0; num--) {
585						const pair = pairs[num].split('=');
586						cookieData[pair[0]] = decodeURIComponent(pair[1]);
587					}
588					return cookieData;
589				}
590			}
591			return null;
592		}
593
594		function getServiceData() {
595			const data = readCookie('wpc_wpc');
596			if (data === null || typeof data.access_token === 'undefined' || !data.access_token) {
597				return false;
598			}
599			return data;
600		}
601
602		function readMessage(msg) {
603			const event = msg.data;
604
605			if (typeof event.event === 'undefined') {
606				return;
607			}
608
609			if (event.event === 'login' && event.success) {
610				extWinCheck = setInterval(function () {
611					if (!extWin || extWin.closed) {
612						clearInterval(extWinCheck);
613						if (getServiceData()) {
614							// Load page in an iframe to get the current comment nonce
615							const nonceIframe = document.createElement('iframe');
616							nonceIframe.id = 'wp-login-comment-nonce-iframe';
617							nonceIframe.style.display = 'none';
618							nonceIframe.src = commentLikeEvent + '';
619							document.body.appendChild(nonceIframe);
620
621							const commentLikeId = (commentLikeEvent + '')
622								.split('like_comment=')[1]
623								.split('&_wpnonce=')[0];
624							let c;
625
626							// Set a 5 second timeout to redirect to the comment page without doing the Like as a fallback
627							const commentLikeTimeout = setTimeout(() => {
628								window.location = commentLikeEvent;
629							}, 5000);
630
631							// Check for a new nonced redirect and use that if available before timing out
632							const commentLikeCheck = setInterval(() => {
633								const iframe = document.querySelector('#wp-login-comment-nonce-iframe');
634								if (iframe) {
635									c = iframe.querySelector(`#comment-like-${commentLikeId} .comment-like-link`);
636								}
637								if (c && typeof c.href !== 'undefined') {
638									clearTimeout(commentLikeTimeout);
639									clearInterval(commentLikeCheck);
640									window.location = c.href;
641								}
642							}, 100);
643						}
644					}
645				}, 100);
646
647				if (extWin) {
648					if (!extWin.closed) {
649						extWin.close();
650					}
651					extWin = false;
652				}
653
654				stopPolling();
655			}
656		}
657
658		if (typeof window.postMessage !== 'undefined') {
659			window.addEventListener('message', e => {
660				let message = e && e.data;
661				if (typeof message === 'string') {
662					try {
663						message = JSON.parse(message);
664					} catch (err) {
665						return;
666					}
667				}
668
669				const type = message && message.type;
670				if (type === 'loginMessage') {
671					readMessage(message);
672				}
673			});
674		}
675
676		document.body.addEventListener('click', e => {
677			let target = e.target;
678
679			// Don't do anything when clicking on the "X people" link.
680			if (target.matches('p.comment-likes a.view-likers')) {
681				e.preventDefault();
682				return;
683			}
684
685			// Retrieve the surrounding paragraph to the star, if it hasn't been liked.
686			const notLikedPar = target.closest('p.comment-not-liked');
687
688			// Return if not clicking on star or surrounding paragraph.
689			if (!target.matches('a.comment-like-link') && !notLikedPar) {
690				return;
691			}
692
693			// When a comment hasn't been liked, make the text clickable, too.
694			if (notLikedPar) {
695				target = notLikedPar.querySelector('a.comment-like-link');
696				if (!target) {
697					return;
698				}
699			}
700
701			if (target.classList.contains('needs-login')) {
702				e.preventDefault();
703				commentLikeEvent = target;
704				if (extWin) {
705					if (!extWin.closed) {
706						extWin.close();
707					}
708					extWin = false;
709				}
710
711				stopPolling();
712
713				const url = 'https://wordpress.com/public.api/connect/?action=request&service=wordpress';
714				extWin = window.open(
715					url,
716					'likeconn',
717					'status=0,toolbar=0,location=1,menubar=0,directories=0,resizable=1,scrollbars=1,height=560,width=500'
718				);
719
720				startPolling();
721
722				return false;
723			}
724
725			// Record that the user likes or does not like this comment.
726			const commentId = getCommentId(target);
727			target.classList.add('loading');
728
729			let commentEl = document.querySelector(`p#comment-like-${commentId}`);
730			// Determine whether to like or unlike based on whether the comment is
731			// currently liked.
732			const action =
733				commentEl && commentEl.dataset.liked === 'comment-liked'
734					? 'unlike_comment'
735					: 'like_comment';
736			handleLinkAction(target, action, commentId, data => {
737				// Invalidate the like cache for this comment.
738				delete commentLikeCache[commentId];
739
740				const countEl = document.querySelector(`#comment-like-count-${data.context}`);
741				if (countEl) {
742					countEl.innerHTML = data.display;
743				}
744
745				commentEl = document.querySelector(`p#comment-like-${data.context}`);
746				if (action === 'like_comment') {
747					commentEl.classList.remove('comment-not-liked');
748					commentEl.classList.add('comment-liked');
749					commentEl.dataset.liked = 'comment-liked';
750				} else {
751					commentEl.classList.remove('comment-liked');
752					commentEl.classList.add('comment-not-liked');
753					commentEl.dataset.liked = 'comment-not-liked';
754				}
755
756				// Prefetch new data for this comment (if there are likers left).
757				const parent = target.closest('.comment-likes');
758				const link = parent && parent.querySelector('a.view-likers');
759				if (link) {
760					fetchLikeData(link, commentId);
761				}
762
763				target.classList.remove('loading');
764			});
765			e.preventDefault();
766			e.stopPropagation();
767		});
768
769		document.body.addEventListener(
770			'mouseenter',
771			function (e) {
772				if (!e.target.matches('p.comment-likes a.view-likers')) {
773					return;
774				}
775				// Show the user a list of who has liked this comment.
776
777				const link = e.target;
778				if (Number(link.dataset.likeCount || 0) === 0) {
779					// No one has liked this comment.
780					return;
781				}
782
783				// Don't hide the overlay.
784				overlay.cancelHide();
785
786				// Get the comment ID.
787				const container = link.parentElement && link.parentElement.parentElement;
788				const star = container && container.querySelector('a.comment-like-link');
789				const commentId = star && getCommentId(star);
790				relevantComment = commentId;
791
792				// Check if the list of likes for this comment is already in
793				// the cache.
794				if (commentId in commentLikeCache) {
795					const entry = commentLikeCache[commentId];
796					// Only display the likes if the ajax request is
797					// actually done.
798					if (entry !== null) {
799						overlay.showLikes(link, entry);
800					} else {
801						// Make sure the overlay is visible (in case
802						// the user moved the mouse away while loading
803						// but then came back before it finished
804						// loading).
805						overlay.showLoadingMessage(link);
806					}
807					return;
808				}
809
810				// Position the "Loading..." overlay.
811				overlay.showLoadingMessage(link);
812
813				// Fetch the data.
814				fetchLikeData(link, commentId);
815			},
816			true
817		);
818
819		document.body.addEventListener(
820			'mouseleave',
821			e => {
822				if (!e.target.matches('p.comment-likes a.view-likers')) {
823					return;
824				}
825				// User has moved cursor away - hide the overlay.
826				overlay.requestHide();
827			},
828			true
829		);
830
831		document.body.addEventListener(
832			'mouseenter',
833			e => {
834				if (!e.target.matches('.comment') || !e.target.querySelector('a.comment-like-link')) {
835					return;
836				}
837				// User is moving over a comment - precache the comment like data.
838				if (precacheTimeout !== null) {
839					clearTimeout(precacheTimeout);
840					precacheTimeout = null;
841				}
842
843				const star = e.target.querySelector('a.comment-like-link');
844				const parent = star.closest('.comment-likes');
845				const link = parent && parent.querySelector('a.view-likers');
846				if (!link || Number(link.dataset.likeCount || 0) === 0) {
847					// No likes.
848					return;
849				}
850				const commentId = getCommentId(star);
851				if (commentId in commentLikeCache) {
852					// Already in cache.
853					return;
854				}
855
856				precacheTimeout = setTimeout(() => {
857					precacheTimeout = null;
858					if (commentId in commentLikeCache) {
859						// Was cached in the interim.
860						return;
861					}
862					fetchLikeData(link, commentId);
863				}, 1000);
864			},
865			true
866		);
867	}
868
869	if (document.readyState !== 'loading') {
870		init();
871	} else {
872		document.addEventListener('DOMContentLoaded', init);
873	}
874})();
875;
876/**
877 * File navigation.js.
878 *
879 * Handles toggling the navigation menu for small screens and enables TAB key
880 * navigation support for dropdown menus.
881 */
882( function() {
883	var container, button, menu, links, i, len;
884
885	container = document.getElementById( 'site-navigation' );
886	if ( ! container ) {
887		return;
888	}
889
890	button = container.getElementsByTagName( 'button' )[0];
891	if ( 'undefined' === typeof button ) {
892		return;
893	}
894
895	menu = container.getElementsByTagName( 'ul' )[0];
896
897	// Hide menu toggle button if menu is empty and return early.
898	if ( 'undefined' === typeof menu ) {
899		button.style.display = 'none';
900		return;
901	}
902
903	menu.setAttribute( 'aria-expanded', 'false' );
904	if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
905		menu.className += ' nav-menu';
906	}
907
908	button.onclick = function() {
909		if ( -1 !== container.className.indexOf( 'toggled' ) ) {
910			container.className = container.className.replace( ' toggled', '' );
911			button.setAttribute( 'aria-expanded', 'false' );
912			menu.setAttribute( 'aria-expanded', 'false' );
913		} else {
914			container.className += ' toggled';
915			button.setAttribute( 'aria-expanded', 'true' );
916			menu.setAttribute( 'aria-expanded', 'true' );
917		}
918	};
919
920	// Get all the link elements within the menu.
921	links    = menu.getElementsByTagName( 'a' );
922
923	// Each time a menu link is focused or blurred, toggle focus.
924	for ( i = 0, len = links.length; i < len; i++ ) {
925		links[i].addEventListener( 'focus', toggleFocus, true );
926		links[i].addEventListener( 'blur', toggleFocus, true );
927	}
928
929	/**
930	 * Sets or removes .focus class on an element.
931	 */
932	function toggleFocus() {
933		var self = this;
934
935		// Move up through the ancestors of the current link until we hit .nav-menu.
936		while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
937
938			// On li elements toggle the class .focus.
939			if ( 'li' === self.tagName.toLowerCase() ) {
940				if ( -1 !== self.className.indexOf( 'focus' ) ) {
941					self.className = self.className.replace( ' focus', '' );
942				} else {
943					self.className += ' focus';
944				}
945			}
946
947			self = self.parentElement;
948		}
949	}
950
951	/**
952	 * Toggles `focus` class to allow submenu access on tablets.
953	 */
954	( function( container ) {
955		var touchStartFn, i,
956			parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
957
958		if ( 'ontouchstart' in window ) {
959			touchStartFn = function( e ) {
960				var menuItem = this.parentNode, i;
961
962				if ( ! menuItem.classList.contains( 'focus' ) ) {
963					e.preventDefault();
964					for ( i = 0; i < menuItem.parentNode.children.length; ++i ) {
965						if ( menuItem === menuItem.parentNode.children[i] ) {
966							continue;
967						}
968						menuItem.parentNode.children[i].classList.remove( 'focus' );
969					}
970					menuItem.classList.add( 'focus' );
971				} else {
972					menuItem.classList.remove( 'focus' );
973				}
974			};
975
976			for ( i = 0; i < parentLink.length; ++i ) {
977				parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
978			}
979		}
980	}( container ) );
981} )();
982;
983( function () {
984	'use strict';
985
986	function onPageLoad() {
987		// Trigger resize event to make sure video widgets in the footer maintain the correct aspect ratio
988		setTimeout( function () {
989			if ( typeof Event === 'function' ) {
990				window.dispatchEvent( new Event( 'resize' ) );
991			} else {
992				var event = window.document.createEvent( 'UIEvents' );
993				event.initUIEvent( 'resize', true, false, window, 0 );
994				window.dispatchEvent( event );
995			}
996		} );
997	}
998
999	if ( document.readyState === 'complete' ) {
1000		onPageLoad();
1001	} else {
1002		window.addEventListener( 'load', onPageLoad );
1003	}
1004} )();
1005;
1006/**
1007 * File skip-link-focus-fix.js.
1008 *
1009 * Helps with accessibility for keyboard only users.
1010 *
1011 * Learn more: https://git.io/vWdr2
1012 */
1013(function() {
1014	var isIe = /(trident|msie)/i.test( navigator.userAgent );
1015
1016	if ( isIe && document.getElementById && window.addEventListener ) {
1017		window.addEventListener( 'hashchange', function() {
1018			var id = location.hash.substring( 1 ),
1019				element;
1020
1021			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
1022				return;
1023			}
1024
1025			element = document.getElementById( id );
1026
1027			if ( element ) {
1028				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
1029					element.tabIndex = -1;
1030				}
1031
1032				element.focus();
1033			}
1034		}, false );
1035	}
1036})();
1037;

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.