/**
 * Minify di: https://javascript-minifier.com/
 * Pure JS read more: https://github.com/jedfoster/Readmore.js/tree/version-3.0
 */
let uniqueIdCounter=0;const isCssEmbeddedFor=[];function forEach(e,t,o){for(let n=0;n<e.length;n+=1)t.call(o,e[n],n)}function extend(...e){const t={}.hasOwnProperty;let o=e[0],n=e[1];if(e.length>2){const t=[];for(Object.keys(e).forEach(o=>{t.push(e[o])});t.length>2;){const e=t.shift(),o=t.shift();t.unshift(extend(e,o))}o=t.shift(),n=t.shift()}return n&&Object.keys(n).forEach(e=>{t.call(n,e)&&("object"==typeof n[e]?(o[e]=o[e]||{},o[e]=extend(o[e],n[e])):o[e]=n[e])}),o}function debounce(e,t,o){let n;return function(...i){const r=o&&!n;clearTimeout(n),n=setTimeout(()=>{n=null,o||e.apply(this,i)},t),r&&e.apply(this,i)}}function uniqueId(){return`rmjs-${uniqueIdCounter+=1}`}function setBoxHeights(e){e.style.height="auto";const t=parseInt(e.getBoundingClientRect().height,10),o=parseInt(window.getComputedStyle(e).maxHeight,10),n=parseInt(e.readmore.defaultHeight,10);e.readmore.expandedHeight=t,e.readmore.maxHeight=o,e.readmore.collapsedHeight=o||e.readmore.collapsedHeight||n,e.style.maxHeight="none"}function createElementFromString(e){const t=document.createElement("div");return t.innerHTML=e,t.firstChild}function embedCSS(e,t){if(!isCssEmbeddedFor[e]){let o="";t.embedCSS&&""!==t.blockCSS&&(o+=`${e} + [data-readmore-toggle], ${e}[data-readmore] {\n        ${t.blockCSS}\n      }`),o+=`${e}[data-readmore] {\n      transition: height ${t.speed}ms;\n      overflow: hidden;\n    }`,((e,t)=>{const o=e.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=t:o.appendChild(e.createTextNode(t)),e.getElementsByTagName("head")[0].appendChild(o)})(document,o),isCssEmbeddedFor[e]=!0}}function buildToggle(e,t,o){let n=e;"function"==typeof e&&(n=e(t));const i=createElementFromString(n);return i.setAttribute("data-readmore-toggle",t.id),i.setAttribute("aria-controls",t.id),i.addEventListener("click",function(e){this.toggle(t,e)}.bind(o)),i}function isEnvironmentSupported(){return"undefined"!=typeof window&&"undefined"!=typeof document&&!!document.querySelectorAll&&!!window.addEventListener}!function(e){e.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]);const resizeBoxes=debounce(()=>{forEach(document.querySelectorAll("[data-readmore]"),e=>{const t="true"===e.getAttribute("aria-expanded");setBoxHeights(e),e.style.height=`${t?e.readmore.expandedHeight:e.readmore.collapsedHeight}px`})},100),defaults={speed:100,collapsedHeight:200,heightMargin:16,moreLink:'<a href="#">Read More</a>',lessLink:'<a href="#">Close</a>',embedCSS:!0,blockCSS:"display: block; width: 100%;",startOpen:!1,sourceOrder:"after",blockProcessed:()=>{},beforeToggle:()=>{},afterToggle:()=>{}};class Readmore{constructor(...e){if(!isEnvironmentSupported())return;const[t,o]=e;let n;(n="string"==typeof t?document.querySelectorAll(t):t.nodeName?[t]:t).length&&(this.options=extend({},defaults,o),"string"==typeof t?embedCSS(t,this.options):(this.instanceSelector=`.${uniqueId()}`,embedCSS(this.instanceSelector,this.options)),window.addEventListener("load",resizeBoxes),window.addEventListener("resize",resizeBoxes),this.elements=[],forEach(n,e=>{this.instanceSelector&&e.classList.add(this.instanceSelector.substr(1));const t=this.options.startOpen;e.readmore={defaultHeight:this.options.collapsedHeight,heightMargin:this.options.heightMargin},setBoxHeights(e);const{heightMargin:o}=e.readmore;if(e.getBoundingClientRect().height<=e.readmore.collapsedHeight+o)return void("function"==typeof this.options.blockProcessed&&this.options.blockProcessed(e,!1));e.setAttribute("data-readmore",""),e.setAttribute("aria-expanded",t),e.id=e.id||uniqueId();const n=buildToggle(t?this.options.lessLink:this.options.moreLink,e,this);e.parentNode.insertBefore(n,"before"===this.options.sourceOrder?e:e.nextSibling),e.style.height=`${t?e.readmore.expandedHeight:e.readmore.collapsedHeight}px`,"function"==typeof this.options.blockProcessed&&this.options.blockProcessed(e,!0),this.elements.push(e)}))}toggle(...e){let t=e[0];const o=e=>{const t=document.querySelector(`[aria-controls="${e.id}"]`),o=e.getBoundingClientRect().height<=e.readmore.collapsedHeight,n=o?e.readmore.expandedHeight:e.readmore.collapsedHeight;if("function"==typeof this.options.beforeToggle){if(!1===this.options.beforeToggle(t,e,!o))return}e.style.height=`${n}px`;const i=n=>{"function"==typeof this.options.afterToggle&&this.options.afterToggle(t,e,o),n.stopPropagation(),e.setAttribute("aria-expanded",o),e.removeEventListener("transitionend",i,!1)};e.addEventListener("transitionend",i,!1),this.options.speed<1&&i.call(this,{target:e});const r=o?this.options.lessLink:this.options.moreLink;r?t&&t.parentNode&&t.parentNode.replaceChild(buildToggle(r,e,this),t):t.remove()};if("string"==typeof t&&(t=document.querySelectorAll(t)),!t)throw new Error("Element MUST be either an HTML node or querySelector string");const n=e[1];n&&(n.preventDefault(),n.stopPropagation()),"object"!=typeof t||t.nodeName?o(t):forEach(t,o)}destroy(e){let t;forEach(t=e?"string"==typeof e?document.querySelectorAll(e):e.nodeName?[e]:e:this.elements,e=>{if(-1===this.elements.indexOf(e))return;this.elements=this.elements.filter(t=>t!==e),this.instanceSelector&&e.classList.remove(this.instanceSelector.substr(1)),delete e.readmore,e.style.height="initial",e.style.maxHeight="initial",e.removeAttribute("data-readmore"),e.removeAttribute("aria-expanded");const t=document.querySelector(`[aria-controls="${e.id}"]`);t&&t.remove(),-1!==e.id.indexOf("rmjs-")&&e.removeAttribute("id")})}}

(function( readMoreJs ) {
	"use strict";
	new Readmore('.entry-content-single', {
		speed: 75,
		collapsedHeight: 45,
		moreLink: '<div class="btb-more more-overlay heading-text">' + gmrobjrm.moretext + '</div>',
		lessLink: '<div class="btb-more heading-text">' + gmrobjrm.lesstext + '</div>'
	});
})( window.readMoreJs );