text: parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"UOvc":[function(require,module,exports) {
  function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function o(t,e,o){return e&&r(t.prototype,e),o&&r(t,o),t}function n(t,e,r){return(n="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var o=c(t,e);if(o){var n=Object.getOwnPropertyDescriptor(o,e);return n.get?n.get.call(r):n.value}})(t,e,r||t)}function c(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=f();return function(){var r,o=p(t);if(e){var n=p(this).constructor;r=Reflect.construct(o,arguments,n)}else r=o.apply(this,arguments);return s(this,r)}}function s(e,r){return!r||"object"!==t(r)&&"function"!=typeof r?l(e):r}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y=wp,d=y.i18n,b=d.__,m=d.sprintf,v=bp,h=v.dynamicWidgetBlock,g=function(t){i(c,h);var r=a(c);function c(){return e(this,c),r.apply(this,arguments)}return o(c,[{key:"loop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"active",o=n(p(c.prototype),"useTemplate",this).call(this,"bp-dynamic-groups-item"),i=document.querySelector("#"+e),u="";t&&t.length?t.forEach(function(t){if("newest"===r&&t.created_since)t.extra=m(b("Created %s","buddypress"),t.created_since);else if("popular"===r&&t.total_member_count){var e=parseInt(t.total_member_count,10);t.extra=0===e?b("No members","buddypress"):1===e?b("1 member","buddypress"):m(b("%s members","buddypress"),t.total_member_count)}else t.extra=m(b("Active %s","buddypress"),t.last_activity_diff);t.avatar_alt=m(b("Group Profile photo of %s","buddypress"),t.name),u+=o(t)}):u='<div class="widget-error">'+b("There are no groups to display.","buddypress")+"</div>",i.innerHTML=u}},{key:"start",value:function(){var t=this;this.blocks.forEach(function(e,r){var o=e.selector,i=e.query_args.type,u=document.querySelector("#"+o).closest(".bp-dynamic-block-container");n(p(c.prototype),"getItems",t).call(t,i,r),u.querySelectorAll(".item-options a").forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),e.target.closest(".item-options").querySelector(".selected").classList.remove("selected"),e.target.classList.add("selected");var o=e.target.getAttribute("data-bp-sort");o!==t.blocks[r].query_args.type&&n(p(c.prototype),"getItems",t).call(t,o,r)})})})}}]),c}(),_=window.bpDynamicGroupsSettings||{},w=window.bpDynamicGroupsBlocks||[],O=new g(_,w);"loading"===document.readyState?document.addEventListener("DOMContentLoaded",O.start()):O.start();
  },{}]},{},["UOvc"], null)
  //# sourceMappingURL=/bp-groups/js/dynamic-groups.js.map